文档数据库服务 DDS-创建实例:请求示例

时间:2024-12-04 09:31:54

请求示例

  • 创建版本为3.2,存储引擎为wiredTiger,带有虚拟私有云,子网,安全组,参数组配置,启用SSL连接,带有标签的集群实例
    {
      "name": "test-cluster-01",
      "datastore": {
        "type": "DDS-Community",
        "version": "3.2",
        "storage_engine": "wiredTiger"
      },
      "region": "aaa",
      "availability_zone": "az1xahz",
      "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
      "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007",
      "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58",
      "password": "******",
      "mode": "Sharding",
      "configurations": [
        {
          "type": "mongos",
          "configuration_id": "acb288dbd1174f26a8960b45591bd98apr02"
        },
        {
          "type": "shard",
          "configuration_id": "5bca546f0be64b038124ef9cedd1bfa1pr02"
        },
        {
          "type": "config",
          "configuration_id": "4d123b3ba8294921802b11bf4d8c5735pr02"
        }
      ],
      "flavor": [
        {
          "type": "mongos",
          "num": 2,
          "spec_code": "dds.mongodb.c6.medium.4.mongos"
        },
        {
          "type": "shard",
          "num": 2,
          "storage": "ULTRAHIGH",
          "size": 20,
          "spec_code": "dds.mongodb.c6.medium.4.shard"
        },
        {
          "type": "config",
          "num": 1,
          "storage": "ULTRAHIGH",
          "size": 20,
          "spec_code": "dds.mongodb.c6.large.2.config"
        }
      ],
      "backup_strategy": {
        "start_time": "08:15-09:15",
        "keep_days": 8
      },
      "ssl_option": 1,
      "dss_pool_id": "f5f84ed7-6f19-4bd4-99d7-b450ad6cc4dd",
      "server_group_policies": [
        "anti-affinity"
      ],
      "tags": [
        {
          "key": "dds001",
          "value": "dds001"
        }
      ]
    }
  • 创建版本为3.4,存储引擎为wiredTiger,带有虚拟私有云,子网,安全组,参数组配置,启用SSL连接,带有标签的跨AZ集群实例
    {
      "name": "test-cluster-01",
      "datastore": {
        "type": "DDS-Community",
        "version": "3.4",
        "storage_engine": "wiredTiger"
      },
      "region": "aaa",
      "availability_zone": "aaa,bbb,ccc",
      "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
      "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007b",
      "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58",
      "password": "******",
      "mode": "Sharding",
      "flavor": [
        {
          "type": "mongos",
          "num": 2,
          "spec_code": "dds.mongodb.c6.medium.4.mongos"
        },
        {
          "type": "shard",
          "num": 2,
          "storage": "ULTRAHIGH",
          "size": 20,
          "spec_code": "dds.mongodb.c6.medium.4.shard"
        },
        {
          "type": "config",
          "num": 1,
          "storage": "ULTRAHIGH",
          "size": 20,
          "spec_code": "dds.mongodb.c6.large.2.config"
        }
      ],
      "backup_strategy": {
        "start_time": "23:00-00:00",
        "keep_days": "8"
      },
      "ssl_option":"1",
      "tags" : [{ 
        "key" : "dds001", 
        "value" : "dds001" 
      }]
    }
  • 创建版本为3.2,存储引擎为wiredTiger,带有虚拟私有云,子网,安全组,参数组配置,启用SSL连接,带有标签的副本集实例
    {
      "name": "test-replicaset",
      "datastore": {
        "type": "DDS-Community",
        "version": "3.2",
        "storage_engine": "wiredTiger"
      },
      "region": "aaa",
      "availability_zone": "az1xahz",
      "vpc_id": "674e9b42-cd8d-4d25-a2e6-5abcc565b961",
      "subnet_id": "f1df08c5-71d1-406a-aff0-de435a51007",
      "security_group_id": "7aa51dbf-5b63-40db-9724-dad3c4828b58",
      "password": "******",
      "mode": "ReplicaSet",
      "configurations": [
        {
          "type": "replica",
          "configuration_id": "f17e3aad778440fbb68603c8c9032003pr02"
        }
      ],
      "flavor": [
        {
          "type": "replica",
          "num": 1,
          "storage": "ULTRAHIGH",
          "size": 30,
          "spec_code": "dds.mongodb.c6.medium.4.repset"
        }
      ],
      "backup_strategy": {
        "start_time": "08:15-09:15",
        "keep_days": 8
      },
      "ssl_option": 1,
      "tags": [
        {
          "key": "dds001",
          "value": "dds001"
        }
      ]
    }
support.huaweicloud.com/api-dds/dds_api_0020.html