云数据库 TAURUSDB-创建数据库实例:请求示例

时间:2024-12-11 17:00:06

请求示例

  • 创建计费模式为按需计费,自动备份开始时间是08:00-09:00的实例。

    POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances
    
    {
      "name" : "gaussdb-mysql-instance1",
      "region" : "br-iaas-odin1",
      "charge_info" : {
        "charge_mode" : "postPaid"
      },
      "datastore" : {
        "type" : "gaussdb-mysql",
        "version" : "8.0"
      },
      "mode" : "Cluster",
      "flavor_ref" : "gaussdb.mysql.xlarge.arm.4",
      "vpc_id" : "3cedfc54-b105-4652-a4e0-847b11576b58",
      "subnet_id" : "c1cfa53c-65d3-431e-8552-326bf310c7ad",
      "security_group_id" : "fc577a1a-f202-424a-977f-24faec3fdd55",
      "configuration_id" : "43570e0de32e40c5a15f831aa5ce4176pr07",
      "password" : "***",
      "backup_strategy" : {
        "start_time" : "08:00-09:00"
      },
      "availability_zone_mode" : "single",
      "slave_count" : 1,
      "enterprise_project_id" : 0
    }
  • 将备份文件恢复到按需计费的新实例。

    POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances
    
    {
      "name" : "gaussdb-mysql-instance2",
      "region" : "br-iaas-odin1",
      "charge_info" : {
        "charge_mode" : "postPaid"
      },
      "datastore" : {
        "type" : "gaussdb-mysql",
        "version" : "8.0"
      },
      "mode" : "Cluster",
      "flavor_ref" : "gaussdb.mysql.xlarge.arm.4",
      "vpc_id" : "3cedfc54-b105-4652-a4e0-847b11576b58",
      "subnet_id" : "c1cfa53c-65d3-431e-8552-326bf310c7ad",
      "security_group_id" : "fc577a1a-f202-424a-977f-24faec3fdd55",
      "configuration_id" : "43570e0de32e40c5a15f831aa5ce4176pr07",
      "password" : "***",
      "backup_strategy" : {
        "start_time" : "08:00-09:00"
      },
      "availability_zone_mode" : "single",
      "slave_count" : 1,
      "enterprise_project_id" : 0,
      "restore_point" : {
        "source_instance_id" : "7033e7c3cf93438797d44ad7ae0a7d95in07",
        "backup_id" : "7ffbf305376b4cbea0ae491257b6aaf9br07",
        "type" : "backup"
      }
    }
  • 按时间点恢复到按需计费的新实例。

    POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances
    
    {
      "name" : "gaussdb-mysql-instance3",
      "region" : "br-iaas-odin1",
      "charge_info" : {
        "charge_mode" : "postPaid"
      },
      "datastore" : {
        "type" : "gaussdb-mysql",
        "version" : "8.0"
      },
      "mode" : "Cluster",
      "flavor_ref" : "gaussdb.mysql.xlarge.arm.4",
      "vpc_id" : "3cedfc54-b105-4652-a4e0-847b11576b58",
      "subnet_id" : "c1cfa53c-65d3-431e-8552-326bf310c7ad",
      "security_group_id" : "fc577a1a-f202-424a-977f-24faec3fdd55",
      "configuration_id" : "43570e0de32e40c5a15f831aa5ce4176pr07",
      "password" : "***",
      "backup_strategy" : {
        "start_time" : "08:00-09:00"
      },
      "availability_zone_mode" : "single",
      "slave_count" : 1,
      "enterprise_project_id" : 0,
      "restore_point" : {
        "source_instance_id" : "7033e7c3cf93438797d44ad7ae0a7d95in07",
        "restore_time" : 1673852043000,
        "type" : "timestamp"
      }
    }
  • 创建周期为一个月的包年/包月实例。

    POST https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances
    
    {
      "name" : "gaussdb-mysql-instance4",
      "region" : "br-iaas-odin1",
      "charge_info" : {
        "charge_mode" : "prePaid",
        "period_type" : "month",
        "period_num" : 1,
        "is_auto_renew" : false,
        "is_auto_pay" : true
      },
      "volume" : {
        "size" : 10
      },
      "datastore" : {
        "type" : "gaussdb-mysql",
        "version" : "8.0"
      },
      "mode" : "Cluster",
      "flavor_ref" : "gaussdb.mysql.xlarge.arm.4",
      "vpc_id" : "3cedfc54-b105-4652-a4e0-847b11576b58",
      "subnet_id" : "c1cfa53c-65d3-431e-8552-326bf310c7ad",
      "security_group_id" : "fc577a1a-f202-424a-977f-24faec3fdd55",
      "configuration_id" : "43570e0de32e40c5a15f831aa5ce4176pr07",
      "password" : "***",
      "backup_strategy" : {
        "start_time" : "08:00-09:00"
      },
      "availability_zone_mode" : "single",
      "slave_count" : 1,
      "enterprise_project_id" : 0,
      "restore_point" : {
        "source_instance_id" : "7033e7c3cf93438797d44ad7ae0a7d95in07",
        "restore_time" : 1673852043000,
        "type" : "timestamp"
      }
    }
support.huaweicloud.com/api-gaussdbformysql/CreateGaussMySqlInstance.html