分布式消息服务KAFKA版-创建实例:请求示例

时间:2024-01-24 16:40:32

请求示例

  • 创建一个按需付费的Kafka实例,版本为2.7,规格为2U4G*3,300GB的存储空间。

    POST https://{endpoint}/v2/{engine}/{project_id}/instances
    
    {
      "name" : "kafka-test",
      "description" : "",
      "engine" : "kafka",
      "engine_version" : "2.7",
      "storage_space" : 300,
      "vpc_id" : "********-9b4a-44c5-a964-************",
      "subnet_id" : "********-8fbf-4438-ba71-************",
      "security_group_id" : "********-e073-4aad-991f-************",
      "available_zones" : [ "********706d4c1fb0eb72f0********" ],
      "product_id" : "c6.2u4g.cluster",
      "ssl_enable" : true,
      "kafka_security_protocol" : "SASL_SSL",
      "sasl_enabled_mechanisms" : [ "SC RAM -SHA-512" ],
      "storage_spec_code" : "dms.physical.storage.ultra.v2",
      "broker_num" : 3,
      "arch_type" : "X86",
      "enterprise_project_id" : "0",
      "access_user" : "********",
      "password" : "********",
      "enable_publicip" : true,
      "tags" : [ {
        "key" : "aaa",
        "value" : "111"
      } ],
      "retention_policy" : "time_base",
      "disk_encrypted_enable" : true,
      "disk_encrypted_key" : "********-b953-4875-a743-************",
      "publicip_id" : "********-88fc-4a8c-86d0-************,********-16af-455d-8d54-************,********-3d69-4367-95ab-************",
      "vpc_client_plain" : true,
      "enable_auto_topic" : true
    }
  • 创建一个包年包月的Kafka实例,版本为2.7,规格为2U4G*3,300GB的存储空间。

    POST https://{endpoint}/v2/{engine}/{project_id}/instances
    
    {
      "name" : "kafka-test1",
      "description" : "",
      "engine" : "kafka",
      "engine_version" : "2.7",
      "storage_space" : 300,
      "vpc_id" : "********-9b4a-44c5-a964-************",
      "subnet_id" : "********-8fbf-4438-ba71-************",
      "security_group_id" : "********-e073-4aad-991f-************",
      "available_zones" : [ "********706d4c1fb0eb72f0********" ],
      "product_id" : "c6.2u4g.cluster",
      "ssl_enable" : true,
      "kafka_security_protocol" : "SASL_SSL",
      "sasl_enabled_mechanisms" : [ "SCRAM-SHA-512" ],
      "storage_spec_code" : "dms.physical.storage.ultra.v2",
      "broker_num" : 3,
      "arch_type" : "X86",
      "enterprise_project_id" : "0",
      "access_user" : "********",
      "password" : "********",
      "enable_publicip" : true,
      "tags" : [ {
        "key" : "aaa",
        "value" : "111"
      } ],
      "retention_policy" : "time_base",
      "publicip_id" : "********-88fc-4a8c-86d0-************,********-16af-455d-8d54-************,********-3d69-4367-95ab-************",
      "vpc_client_plain" : true,
      "enable_auto_topic" : true,
      "bss_param" : {
        "charging_mode" : "prePaid",
        "period_type" : "month",
        "period_num" : 1,
        "is_auto_pay" : true
      }
    }
support.huaweicloud.com/api-kafka/CreateInstanceByEngine.html