云服务器内容精选

  • 响应示例 状态码: 200 OK { "instances" : [ { "name" : "romamqs_640bb069-151e-4d5e-bd1b-xxxxxxxxxxxx", "engine" : "kafka", "port" : 9093, "status" : "RUNNING", "description" : "roma-mqs", "type" : "cluster", "specification" : "100MB", "engine_version" : "1.1.0", "connect_address" : "192.168.0.57,192.168.0.227,192.168.0.234", "instance_id" : "640bb069-151e-4d5e-bd1b-xxxxxxxxxxxx", "resource_spec_code" : "dms.instance.kafka.cluster.c3.mini", "charging_mode" : 1, "vpc_id" : "5810f4bb-b202-45cd-a5d1-xxxxxxxxxxxx", "vpc_name" : "vpc-4aeb", "created_at" : "1601016527494", "product_id" : "00300-30308-0--0", "security_group_id" : "20d120f2-70ba-4c8d-a6a4-xxxxxxxxxxxx", "security_group_name" : "sg-5ab2", "subnet_id" : "08c8e51c-7013-43ee-bb0a-xxxxxxxxxxxx", "available_zones" : [ "9f1c5806706d4c1fb0eb72f0a9b18c77" ], "user_id" : "4d1a542e7bcf400cb9c8efada01406d8", "user_name" : "paas_test", "access_user" : "mqs-gen-user-1601016526411", "maintain_begin" : "22:00:00", "maintain_end" : "02:00:00", "enable_log_collection" : false, "storage_space" : 490, "total_storage_space" : 600, "used_storage_space" : 25, "partition_num" : "300", "enable_publicip" : false, "ssl_enable" : true, "cross_vpc_info" : "{\"192.168.0.227\":{\"advertised_ip\":\"192.168.0.227\",\"port\":9011,\"port_id\":\"6ba24c0a-c3ba-4fb8-9adb-84b7a346a623\"},\"192.168.0.57\":{\"advertised_ip\":\"192.168.0.57\",\"port\":9011,\"port_id\":\"4d34a44d-d968-4dcb-89a9-e38e62626df6\"},\"192.168.0.234\":{\"advertised_ip\":\"192.168.0.234\",\"port\":9011,\"port_id\":\"9eac2e81-323c-4d2d-acce-7f84f2d3bd9b\"}}", "storage_resource_id" : "234705d3-8f33-451a-92aa-xxxxxxxxxxxx", "storage_spec_code" : "dms.physical.storage.normal", "service_type" : "advanced", "storage_type" : "hec", "is_logical_volume" : true, "extend_times" : 0, "retention_policy" : "produce_reject", "ipv6_enable" : false, "ipv6_connect_addresses" : [ ], "connector_enable" : false, "mqs_connector_enable" : true, "mqs_connector_address" : "192.168.0.10:9776;192.168.0.17:9776", "connector_id" : "", "rest_enable" : true, "rest_connect_address" : "https://10.10.10.170:9292", "kafka_public_status" : "false", "public_bandwidth" : 0, "public_boundwidth" : 0, "message_query_inst_enable" : true, "vpc_client_plain" : false, "support_features" : "kafka.crossvpc.domain.enable,feature.physerver.kafka.topic.accesspolicy,rabbitmq.plugin.management,roma_app_enable,auto_topic_switch,feature.physerver.kafka.user.manager,route,kafka.new.pod.port,feature.physerver.kafka.topic.modify,message_trace_enable,features.pod.token.access,roma.user.manage.no.support,feature.physerver.kafka.pulbic.dynamic,features.log.collection", "trace_enable" : false, "agent_enable" : false, "pod_connect_address" : "10.10.10.122:9080,10.10.10.96:9080,10.10.10.66:9080", "disk_encrypted" : false, "kafka_private_connect_address" : "192.168.0.227:9093,192.168.0.234:9093,192.168.0.57:9093", "enable_auto_topic" : false, "ces_version" : "linux,v1,v2", "plugin_enable" : false, "public_access_enabled" : "false", "node_num" : 3 }, { "name" : "romamqs_54fc780d-bf6f-4402-8149-xxxxxxxxxxxx", "engine" : "kafka", "port" : 9093, "status" : "RUNNING", "description" : "roma-mqs", "type" : "cluster", "specification" : "100MB", "engine_version" : "1.1.0", "connect_address" : "192.168.0.25,192.168.0.92,192.168.0.220", "instance_id" : "54fc780d-bf6f-4402-8149-xxxxxxxxxxxx", "resource_spec_code" : "dms.instance.kafka.cluster.c3.mini", "charging_mode" : 1, "vpc_id" : "5810f4bb-b202-45cd-a5d1-xxxxxxxxxxxx", "vpc_name" : "vpc-4aeb", "created_at" : "1600075938106", "product_id" : "00300-30308-0--0", "security_group_id" : "a9b9667f-8a48-4317-b637-xxxxxxxxxxxx", "security_group_name" : "default", "subnet_id" : "08c8e51c-7013-43ee-bb0a-xxxxxxxxxxxx", "available_zones" : [ "9f1c5806706d4c1fb0eb72f0a9b18c77" ], "user_id" : "4d1a542e7bcf400cb9c8efada01406d8", "user_name" : "paas_test", "access_user" : "mqs-gen-user-1600075937011", "maintain_begin" : "22:00:00", "maintain_end" : "02:00:00", "enable_log_collection" : false, "storage_space" : 492, "total_storage_space" : 600, "used_storage_space" : 25, "partition_num" : "300", "enable_publicip" : false, "ssl_enable" : true, "cross_vpc_info" : "{\"192.168.0.25\":{\"advertised_ip\":\"192.168.0.25\",\"port\":9011,\"port_id\":\"bcf9ba5e-26f4-4d09-b566-014eac1c804b\"},\"192.168.0.92\":{\"advertised_ip\":\"192.168.0.92\",\"port\":9011,\"port_id\":\"43bbffdd-07bf-450f-b1cd-c5e553c77c0f\"},\"192.168.0.220\":{\"advertised_ip\":\"192.168.0.220\",\"port\":9011,\"port_id\":\"dc26f9c0-2d2b-4522-9f22-b5b3d726121e\"}}", "storage_resource_id" : "0b391dcb-ccc8-4f9d-9440-xxxxxxxxxxxx", "storage_spec_code" : "dms.physical.storage.high", "service_type" : "advanced", "storage_type" : "hec", "is_logical_volume" : true, "extend_times" : 0, "retention_policy" : "produce_reject", "ipv6_enable" : false, "ipv6_connect_addresses" : [ ], "connector_enable" : false, "mqs_connector_enable" : true, "mqs_connector_address" : "192.168.0.66:9776;192.168.0.65:9776", "connector_id" : "", "rest_enable" : true, "rest_connect_address" : "https://10.10.10.57:9292", "kafka_public_status" : "false", "public_bandwidth" : 0, "public_boundwidth" : 0, "message_query_inst_enable" : true, "vpc_client_plain" : false, "support_features" : "kafka.crossvpc.domain.enable,route,kafka.new.pod.port,feature.physerver.kafka.topic.modify,feature.physerver.kafka.topic.accesspolicy,message_trace_enable,features.pod.token.access,rabbitmq.plugin.management,roma_app_enable,features.log.collection,auto_topic_switch,feature.physerver.kafka.user.manager", "trace_enable" : false, "agent_enable" : false, "pod_connect_address" : "10.10.10.244:9080,10.10.10.79:9080,10.10.10.64:9080", "disk_encrypted" : false, "kafka_private_connect_address" : "192.168.0.25:9093,192.168.0.92:9093,192.168.0.220:9093", "enable_auto_topic" : false, "ces_version" : "linux,v1,v2", "plugin_enable" : false, "public_access_enabled" : "false", "node_num" : 3 } ], "instance_num" : 2 }
  • 响应示例 状态码: 200 OK { "total" : 1, "size" : 1, "instances" : [ { "id" : "e34610ca-0a37-4f04-8856-4101b08cc5e2", "name" : "roma-test", "description" : " ", "flavor_id" : "00400-30101-0--0", "flavor_type" : "basic", "cpu_arch" : "x86_64", "vpc_id" : "000c3783-a9c0-4ee4-ac44-93bfdfbf3340", "subnet_id" : "8e2ee0d5-0f1d-4067-965f-caf00dd65529", "security_group_id" : "56275464-d5f1-417d-a73b-92ee479e91e2", "publicip_enable" : true, "publicip_id" : "55a6ef1b-498d-42fb-bbc7-d01ba1652bfc", "publicip_address" : "139.9.140.164", "status" : "RUNNING", "error_code" : "string", "error_msg" : "string", "charge_type" : "prePaid", "project_id" : "106506b9a92342df9a5025fc12351cfc", "create_time" : "2019-12-06T06:49:04Z", "update_time" : "2019-12-06T06:49:04Z", "maintain_begin" : "22:00:00", "maintain_end" : "02:00:00", "available_zone_ids" : [ "9f1c5806706d4c1fb0eb72f0a9b18c77" ], "enterprise_project_id" : "0" } ] } 状态码: 400 Bad Request { "error_code" : "ROMA.00013000", "error_msg" : "Invalid parameter value,parameterName:name. Please refer to the support documentation", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" } 状态码: 401 Unauthorized { "error_code" : "ROMA.00012000", "error_msg" : "Incorrect token or token resolution failed", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" } 状态码: 403 Forbidden { "error_code" : "ROMA.00012000", "error_msg" : "No permissions to request this method", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" } 状态码: 500 Internal Server Error { "error_code" : "ROMA.00011000", "error_msg" : "System error", "error_details" : "some error details here", "request_id" : "13760c1fe8655e61209b75665e9bef43" }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Integer 列表总数。 size Integer 本页数量。 instances Array of instances objects 实例列表。 表5 instances 参数 参数类型 描述 id String 实例ID。 name String 实例名称。 description String 实例描述。 flavor_id String 实例规格ID。 flavor_type String 实例规格类型。 - 基础版:basic - 专业版:professional - 企业版:enterprise - 铂金版:platinum cpu_arch String CPU架构类型,取值如下: x86_64: x86架构。 aarch64: arm架构。 vpc_id String 实例指定虚拟私有云ID。 subnet_id String 实例指定虚拟私有云子网ID。 security_group_id String 实例指定安全组ID。 publicip_enable Boolean 是否开启公网访问,开启时publicip_id字段必填。 publicip_id String 实例绑定的弹性公网地址ID。 publicip_address String 实例绑定的弹性公网地址。 status String 实例运行状态。 error_code String 错误码。 error_msg String 错误消息。 charge_type String 实例计费模式。 project_id String 租户项目ID。 create_time String 创建时间。 update_time String 更新时间。 maintain_begin String 运维开始时间。 maintain_end String 运维结束时间。 available_zone_ids Array of strings 创实例使用的可用区列表。 enterprise_project_id String 实例所属企业项目ID。 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。 状态码: 401 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。 状态码: 403 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。 状态码: 500 表9 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误消息。 error_details String 具体错误消息。 request_id String 请求处理ID。
  • 操作步骤 登录新版ROMA Connect控制台。 在左侧导航栏选择“资源管理”,在资源管理页面单击新版的容器实例,进入实例控制台。 在实例控制台的“实例信息”页面中,选择“基本信息”页签,可查看和编辑实例的基本信息。 表1 ROMA Connect基本信息 内容 内容说明 ROMA Connect实例信息 实例的基本信息,包括实例名称、实例ID、描述、可用区、创建时间。 您可以根据实际需要修改“实例名称”、“描述”等。 您可以单击“实例ID”右侧的“”复制实例ID信息。 虚拟私有云 实例所关联的VPC,您可以单击VPC名称跳转查看VPC的具体配置信息。 子网 实例所关联的子网,你可以单击子网名称跳转查看子网的具体配置信息。 安全组 实例所关联的安全组,你可以单击安全组名称跳转查看安全组的具体配置信息,也可以单击“更改”按钮,绑定新的安全组。 路由 配置私有网段。ROMA Connect实例创建完成后,默认能够与创建时指定的VPC子网网段进行互通,若有额外的私有网段需要与实例互通,可通过该配置项进行路由配置。 付费信息 实例的计费模式。 RCU分布配置 分布给不同集成能力的RCU值。 消息存储空间 实例的MQS消息存储空间信息,包括存储类型和存储空间使用率(百分比)。 MQS基本信息 实例的MQS的基本配置信息。 对应Kafka引擎类型,您可以根据实际需要修改“容量阈值策略”。 连接地址 实例的相关对接地址,包括: ROMA Connect连接地址 设备集成LINK连接地址 服务集成APIC连接地址 服务集成 APIC内网连接地址(自定义后端组件和网关组件) 消息集成 MQS内网连接地址 消息集成 MQS公网连接地址(仅开启开启公网访问时展示) 您可以单击连接地址右侧的“”复制连接地址信息。 公网访问入口 若实例未开启公网入口,您可以单击右侧“”开启公网入口。 若实例已开启公网入口,您可以单击地址右侧的“ ”复制地址信息。 若实例已开启公网入口,您可以单击公网带宽右侧的“ ”修改公网入口带宽大小。 若实例已开启公网入口,您可以单击右侧的“ ”关闭公网入口。 须知: 弹性IP地址为随机分配,开启后关闭再开启不保证IP地址分配的前后一致性。 公网IP访问控制(白名单) 仅当“公网访问入口”开启时可配置。 公网IP访问控制采用白名单模式,在开启的情况下仅白名单内的IP地址可以访问,未开启则默认全放通。 单击右侧更改进入编辑模式,您可以添加或删除允许放通的IP地址。 私网IP访问控制(白名单) 私网IP访问控制采用白名单模式,在开启的情况下仅白名单内的IP地址可以访问,未开启则默认全放通。 单击右侧更改进入编辑模式,您可以添加或删除允许放通的IP地址。
  • 响应示例 状态码: 202 Accepted { "jobs" : [ { "id" : "c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r", "name" : "DRS-1234", "status" : "Success" }, { "id" : "dc6016cf-f3b6-4c2d-b4d7-5084b0fjb20r", "name" : "DRS-2345", "status" : "Failed", "error_code" : "DRS.10000010", "error_msg" : "Job does not exist, please check job ID" } ] } 状态码: 400 Bad Request { "error_code" : "DRS.10000001", "error_msg" : "Failed." }
  • 响应参数 状态码: 202 表35 响应Body参数 参数 参数类型 描述 jobs Array of objects 批量更新指定ID异步任务响应体。 详情请参见表36。 表36 jobs字段数据结构说明 参数 参数类型 描述 id String 任务ID。 name String 任务名称。 status String 操作结果。 error_code String 错误码。 error_msg String 错误描述。 状态码: 400 表37 响应Body参数 参数 参数类型 描述 error_code String 错误码。 最小长度:12 最大长度:12 error_msg String 错误描述。 最小长度:1 最大长度:512
  • 请求示例 更新租户指定ID批量异步任务详情,任务模式为全量+增量,公网网络类型。 https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/batch-async-jobs/bd4193aa-072d-4ce6-beec-adffc7252341 { "jobs" : [ { "type" : "all", "params" : { "job_id" : "c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r", "base_info" : { "name" : "DRS-1234", "job_type" : "sync", "engine_type" : "oracle-to-gaussdbv5", "job_direction" : "up", "task_type" : "FULL_INCR_TRANS", "net_type" : "eip", "charging_mode" : "on_demand", "enterprise_project_id" : "0", "description" : "", "expired_days" : "14", "tags" : [ { "key" : "test", "value" : "test" } ] }, "source_endpoint" : [ { "db_type" : "oracle", "endpoint_type" : "offline", "endpoint_role" : "so", "endpoint" : { "endpoint_name" : "oracle", "ip" : "10.154.217.239", "db_port" : "1521", "db_user" : "ORACLE_USER", "db_name" : "serviceName.orcl", "db_password" : "******" }, "ssl" : { "ssl_link" : false } } ], "target_endpoint" : [ { "db_type" : "gaussdbv5", "endpoint_type" : "cloud", "endpoint_role" : "ta", "endpoint" : { "endpoint_name" : "cloud_gaussdbv5", "instance_id" : "c2c7579bc09c490b9d8009db715aeb0ain14", "db_user" : "root", "db_password" : "******" }, "cloud" : { "region" : "cn-north-4", "project_id" : "9dc8c0f3f74c4dbb23c29cf0318ee561", "az_code" : "cn-north-4a,cn-north-4g,cn-north-4c" }, "vpc" : { "vpc_id" : "2cb5d364-ae63-4fbb-85b7-7d59f4a88f8f", "subnet_id" : "2cb54324-ae63-4fbb-85b7-7d59f4a88f8f", "security_group_id" : "039a3s89-665a-43e2-9b4f-bda7d9ee148d" } } ], "alarm_notify" : { "alarm_to_user" : true, "topic_urn" : "urn:smn:cn-north-4:f2c2468c3ee7410c862a461ca073d2f2:test", "delay_time" : 60 }, "speed_limit" : [ { "begin" : "16:00", "end" : "15:59", "speed" : "10" } ], "policy_config" : { "ddl_trans" : false }, "db_object" : { "object_scope" : "table", "target_root_db" : { "db_name" : "target_db_name", "db_encoding" : "utf8" }, "object_info" : { "source_db1" : { "name" : "source_db1", "all" : false, "tables" : { "source_tb1" : { "type" : "table", "name" : "source_tb1", "all" : true }, "source_tb2" : { "type" : "table", "name" : "source_tb2", "all" : true } } } } }, "node_info" : { "spec" : { "node_type" : "medium" } } } }, { "type" : "endpoint", "params" : { "job_id" : "dc6016cf-f3b6-4c2d-b4d7-5084b0fjb20r", "source_endpoint" : [ { "db_type" : "oracle", "endpoint_type" : "offline", "endpoint_role" : "so", "endpoint" : { "endpoint_name" : "oracle", "ip" : "10.154.227.134", "db_port" : "1521", "db_user" : "ORACLE_USER", "db_name" : "serviceName.orcl", "db_password" : "******" }, "ssl" : { "ssl_link" : false } } ], "target_endpoint" : [ { "db_type" : "gaussdbv5", "endpoint_type" : "cloud", "endpoint_role" : "ta", "endpoint" : { "id" : "f59e6118-da89-4fdb-9b98-65f56709928a", "endpoint_name" : "cloud_gaussdbv5", "instance_id" : "c2c7579bc09c490b9d8009db715aeb0ain14", "db_user" : "root", "db_password" : "******" }, "cloud" : { "region" : "cn-north-4", "project_id" : "9dc8c0f3f74c4dbb23c29cf0318ee561", "az_code" : "cn-north-4a,cn-north-4g,cn-north-4c" }, "vpc" : { "vpc_id" : "2cb5d364-ae63-4fbb-85b7-7d59f4a88f8f", "subnet_id" : "2cb54324-ae63-4fbb-85b7-7d59f4a88f8f", "security_group_id" : "039a3s89-665a-43e2-9b4f-bda7d9ee148d" }, "ssl" : { "ssl_link" : false } } ] } } ] }
  • 请求示例 创建Oracle到 GaussDB 分布式版按需实时同步任务,任务模式为全量+增量,公网网络类型。 https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/jobs { "job" : { "base_info" : { "name" : "DRS-1234", "job_type" : "sync", "engine_type" : "oracle-to-gaussdbv5", "job_direction" : "up", "task_type" : "FULL_INCR_TRANS", "net_type" : "eip", "charging_mode" : "on_demand", "enterprise_project_id" : "0", "description" : "", "expired_days" : "14", "tags" : [ { "key" : "test", "value" : "test" } ] }, "source_endpoint" : [ { "db_type" : "oracle", "endpoint_type" : "offline", "endpoint_role" : "so", "endpoint" : { "endpoint_name" : "oracle", "ip" : "10.154.217.239", "db_port" : "1521", "db_user" : "ORACLE_USER", "db_name" : "serviceName.orcl", "db_password" : "******" }, "ssl" : { "ssl_link" : false } } ], "target_endpoint" : [ { "db_type" : "gaussdbv5", "endpoint_type" : "cloud", "endpoint_role" : "ta", "endpoint" : { "endpoint_name" : "cloud_gaussdbv5", "instance_id" : "c2c7579bc09c490b9d8009db715aeb0ain14", "db_user" : "root", "db_password" : "******" }, "cloud" : { "region" : "cn-north-4", "project_id" : "9dc8c0f3f74c4dbb23c29cf0318ee561", "az_code" : "cn-north-4a,cn-north-4c,cn-north-4g" }, "vpc" : { "vpc_id" : "2cb5d364-ae63-4fbb-85b7-7d59f4a88f8f", "subnet_id" : "2cb54324-ae63-4fbb-85b7-7d59f4a88f8f", "security_group_id" : "039a3s89-665a-43e2-9b4f-bda7d9ee148d" } } ], "node_info" : { "spec" : { "node_type" : "medium" }, "vpc" : { "vpc_id" : "2cb5d364-ae63-4fbb-85b7-7d59f4a88f8f", "subnet_id" : "2cb54324-ae63-4fbb-85b7-7d59f4a88f8f" } } } }
  • 响应示例 状态码: 200 OK { "job" : { "id" : "c7debc9c-8e09-4a5d-8dd6-cc44f78jb20r", "name" : "DRS-1234", "status" : "CREATING", "create_time" : "2022-11-07T16:15:18Z" } } 状态码: 400 Bad Request { "error_code" : "DRS.10000001", "error_msg" : "Failed." }
  • 响应参数 状态码: 200 表20 响应Body参数 参数 参数类型 描述 job Object 创建任务响应体。 详情请参见表21。 表21 job字段数据结构说明 参数 参数类型 描述 id String 任务ID。 name String 任务名称。 status String 任务状态。 create_time String 任务创建时间。 is_clone_job String 是否为克隆任务。 状态码: 400 表22 响应Body参数 参数 参数类型 描述 error_code String 错误码。 最小长度:12 最大长度:12 error_msg String 错误描述。 最小长度:1 最大长度:512
  • 响应示例 状态码: 200 请求成功 { "id" : "e543adf0-c61e-11ec-a1c5-0255ac100408", "name" : "huawei-chain-01", "status" : "Available", "edition" : "Professional", "data_management" : "Cloud", "chain_engine_version" : "1.0.1.2", "orgs" : [ { "name" : "org1", "status" : "Available", "is_consensus" : true }, { "name" : "org2", "status" : "Available", "is_consensus" : false } ], "chains" : [ { "chain_id" : "huawei-chain-01-egger394n", "consensus" : "raft", "sign_algorithm" : "ecdsa_with_sha256", "contract_num" : 1, "block_num" : 5, "transaction_num" : 9 } ], "create_time" : "2022-04-16T07:20:05Z", "update_time" : "2022-04-16T07:20:05Z", "enterprise_project_id" : "0", "enterprise_project_name" : "default" }
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 id String 实例ID name String 实例名称 status String 实例状态:正常(Available)、不可用(Unavailable)、异常(Exception)、待付款(Unpaid)、创建中(Creating)、删除中(Deleting)、升级中(Upgrading)、组织创建中(OrgCreating)、组织删除中(OrgDeleting) 枚举值: Available Unavailable Unpaid Creating Deleting Upgrading OrgCreating OrgDeleting edition String 版本类型: 专业版(Professional)、企业版(Enterprise)、铂金版(Platinum) kind String 实例类型,HuaweiCloudChain,Besu data_management String 数据管理模式:云端管理(Cloud) chain_engine_version String 实例 区块链 引擎版本 最小长度:7 最大长度:10 orgs Array of InstanceOrg objects 实例组织信息 数组长度:0 - 100 chains Array of InstanceChain objects 实例链信息 数组长度:1 - 1 create_time String 实例创建时间 update_time String 实例数据更新时间 enterprise_project_id String 企业项目id enterprise_project_name String 企业项目名称 表4 InstanceOrg 参数 参数类型 描述 name String 组织名称 status String 组织状态:正常(Available)、不可用(Unavailable)、异常(Exception)、待付款(Unpaid)、创建中(Creating)、删除中(Deleting) is_consensus Boolean 是否为共识组织,共识组织为true,非共识组织为false 表5 InstanceChain 参数 参数类型 描述 chain_id String 链ID consensus String 区块链共识类型:raft sign_algorithm String 区块链签名算法:ECDSA(ecdsa_with_sha256)、国密(sm2_with_sm3) contract_num Integer 合约数量 最小值:0 最大值:100 block_num Integer 区块数量 transaction_num Integer 交易数量 状态码: 400 表6 响应Body参数 参数 参数类型 描述 code String 状态码 最小长度:3 最大长度:3 error_code String 错误码 最小长度:12 最大长度:12 error_msg String 错误信息 最小长度:1 最大长度:65535 message String 错误详细信息 最小长度:1 最大长度:65535 状态码: 401 表7 响应Body参数 参数 参数类型 描述 code String 状态码 最小长度:3 最大长度:3 error_code String 错误码 最小长度:12 最大长度:12 error_msg String 错误信息 最小长度:1 最大长度:65535 message String 错误详细信息 最小长度:1 最大长度:65535 状态码: 500 表8 响应Body参数 参数 参数类型 描述 code String 状态码 最小长度:3 最大长度:3 error_code String 错误码 最小长度:12 最大长度:12 error_msg String 错误信息 最小长度:1 最大长度:65535 message String 错误详细信息 最小长度:1 最大长度:65535
  • 响应示例 创建一个GaussDB分布式独立部署,按需付费,引擎版本为2.7,同一可用区下,3个协调节点,3个分片,3个副本,规格为8U64G的实例: { "instance": { "id": "ad8cd1440aa94a02ae4580fcbebb3143in14", "name": "user1-v3-independent-01", "status": "BUILD", "datastore": { "type": "GaussDB", "version": "2.7" }, "ha": { "mode": "Enterprise", "replication_mode": "sync", "consistency": "strong" }, "port": "8000", "volume": { "type": "ULTRAHIGH", "size": 120 }, "replica_num": 3, "region": "aaa", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "enterprise_project_id": "0", "flavor_ref": "gaussdb.opengauss.ee.dn.m6.2xlarge.8.in", "availability_zone": "bbb,bbb,bbb", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "charge_info": { "charge_mode": "postPaid" } }, "job_id": "30f2790a-a5b6-4a13-a5ab-733c746609af" } GaussDB分布式部署形态,包周期付费(1年),引擎版本为2.7,三个不同可用区下,3个协调节点,3个分片,3个副本,规格为8U64G的实例响应: { "instance": { "id": "ad8cd1440aa94a02ae4580fcbebb3143in14", "name": "user1-v3-independent-02", "datastore": { "type": "GaussDB", "version": "2.7" }, "ha": { "mode": "Enterprise", "replication_mode": "sync", "consistency": "strong" }, "port": "8000", "volume": { "type": "ULTRAHIGH", "size": 120 }, "replica_num": 3, "region": "aaa", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "enterprise_project_id": "0", "flavor_ref": "gaussdb.opengauss.ee.dn.m6.2xlarge.8.in", "availability_zone": "bbb,bbb,bbb", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1, "is_auto_renew": false, "is_auto_pay": false } }, "job_id": "30f2790a-a5b6-4a13-a5ab-733c746609af" } GaussDB主备版高可用(1主2备),按需付费,引擎版本为2.7,同一可用区下,规格为8U64G的实例响应: { "instance": { "id": "ad8cd1440aa94a02ae4580fcbebb3143in14", "name": "user1-v3-ha-01", "status": "BUILD", "datastore": { "type": "GaussDB", "version": "2.7" }, "ha": { "mode": "Enterprise", "replication_mode": "sync", "consistency": "strong" }, "port": "8000", "volume": { "type": "ULTRAHIGH", "size": 120 }, "region": "aaa", "replica_num": 3, "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "enterprise_project_id": "0", "flavor_ref": "gaussdb.opengauss.ee.dn.m6.2xlarge.8.in", "availability_zone": "bbb,bbb,bbb", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "charge_info": { "charge_mode": "postPaid" }, "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f" }, "job_id": "30f2790a-a5b6-4a13-a5ab-733c746609af" } GaussDB主备版高可用(1主2备),包周期付费(1年),引擎版本为2.7,三个不同可用区下,规格为8U64G的实例响应: { "instance": { "id": "ad8cd1440aa94a02ae4580fcbebb3143in14", "name": "user1-v3-ha-02", "datastore": { "type": "GaussDB", "version": "2.7" }, "ha": { "mode": "Enterprise", "replication_mode": "sync", "consistency": "strong" }, "port": "8000", "volume": { "type": "ULTRAHIGH", "size": 120 }, "replica_num": 3, "region": "aaa", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "enterprise_project_id": "0", "flavor_ref": "gaussdb.opengauss.ee.dn.m6.2xlarge.8.in", "availability_zone": "bbb,bbb,bbb", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1, "is_auto_renew": false, "is_auto_pay": false } }, "job_id": "30f2790a-a5b6-4a13-a5ab-733c746609af" }
  • 请求示例 创建一个GaussDB实例,实例部署形态为分布式独立部署,包周期付费(1年),引擎版本为2.7,三个不同可用区下,3个协调节点,3个分片,3个副本,规格为8U64G。 POST https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/v3.1/054b61972980d4552f0bc00ac8d3f5cd/instances { "name": "user1-v3-independent-02", "datastore": { "type": "GaussDB", "version": "2.7" }, "flavor_ref": "gaussdb.opengauss.ee.dn.m6.2xlarge.8.in", "volume": { "type": "ULTRAHIGH", "size": 120 }, "disk_encryption_id": "24ae42b5-4009-4ea2-b66a-0b211e424dab", "region": "aaa", "availability_zone": "bbb,ccc,ddd", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "password": "xxxxxx", "configuration_id": "", "enterprise_project_id": "", "time_zone": "UTC+08:00", "ha":{ "mode":"enterprise", "consistency":"strong", "replication_mode":"sync" }, "sharding_num": 3, "coordinator_num": 3, "replica_num": 3, "port":8000, "enable_force_switch":true } 创建一个GaussDB实例,实例部署形态为主备版高可用(1主2备),按需付费,引擎版本为2.7,同一可用区下,规格为8U64G。 POST https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/v3.1/054b61972980d4552f0bc00ac8d3f5cd/instances { "name": "user1-v3-ha-01", "datastore": { "type": "GaussDB", "version": "2.7" }, "flavor_ref": "gaussdb.opengauss.ee.km1.2xlarge.arm8.ha", "volume": { "type": "ULTRAHIGH", "size": 120 }, "disk_encryption_id": "24ae42b5-4009-4ea2-b66a-0b211e424dab", "region": "aaa", "availability_zone": "bbb,bbb,bbb", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "charge_info": { "charge_mode": "postPaid", }, "password": "xxxxxx", "configuration_id": "", "enterprise_project_id": "", "time_zone": "UTC+08:00", "ha": { "mode": "centralization_standard", "consistency": "strong", "replication_mode": "sync" }, "replica_num": 3, "port": 8000, "enable_force_switch": true } 创建一个GaussDB实例,实例部署形态为主备版高可用(1主2备),包周期付费(1年),引擎版本为2.,三个不同可用区下,规格为8U64G。 POST https://gaussdb-opengauss.cn-north-4.myhuaweicloud.com/v3.1/054b61972980d4552f0bc00ac8d3f5cd/instances { "name": "user1-v3-ha-02", "datastore": { "type": "GaussDB", "version": "2.7" }, "flavor_ref": "gaussdb.opengauss.ee.km1.2xlarge.arm8.ha", "volume": { "type": "ULTRAHIGH", "size": 120 }, "disk_encryption_id": "24ae42b5-4009-4ea2-b66a-0b211e424dab", "region": "aaa", "availability_zone": "bbb,ccc,ddd", "vpc_id": "1f011c32-2de2-4aa8-a161-9498dbcef329", "subnet_id": "54a44bec-e36f-441e-86bb-d749ace9c189", "security_group_id": "c6123999-8532-421c-9db6-e078013ff58f", "backup_strategy": { "start_time": "17:00-18:00", "keep_days": 7 }, "charge_info": { "charge_mode": "prePaid", "period_type": "year", "period_num": 1 }, "password": "xxxxxx", "configuration_id": "", "enterprise_project_id": "", "time_zone": "UTC+08:00", "ha": { "mode": "centralization_standard", "consistency": "strong", "replication_mode": "sync" }, "replica_num": 3, "port": 8000, "enable_force_switch": true }
  • 响应参数 表8 响应参数 名称 参数类型 说明 instance Object 实例信息。 详情请参见表9。 job_id String 实例创建的任务ID。 仅创建按需实例时会返回该参数。 order_id String 订单号,创建包年包月时返回该参数。 表9 instance说明 名称 参数类型 说明 id String 实例ID。 name String 实例名称。用于表示实例的名称,同一租户下,同类型的实例名称可相同。 取值范围:4~64个字符之间,必须以字母开头,不区分大小写,可以包含字母、数字、中划线或者下划线,不能包含其他的特殊字符。 status String 实例状态。如BUILD,表示创建中。 仅创建按需实例时会返回该参数。 datastore Object 数据库信息。 详情请参见表10。 ha Object 数据库部署形态。 详情请参见表11。 replica_num Integer 实例副本集数。 port String 数据库端口信息,与请求参数相同。 backup_strategy Object 自动备份策略。 详情请参见表12。 enterprise_project_id String 项目标签。 flavor_ref String 规格码,取值范围:非空。 volume Object volume信息。 详情请参见表13。 region String 区域ID。 availability_zone String 可用区ID。 vpc_id String 虚拟私有云ID。 subnet_id String 子网的网络ID信息。 security_group_id String 实例所属的安全组。 charge_info Object 付费方式信息。 详情请参见表14。 表10 datastore字段数据结构说明 名称 参数类型 说明 type String 数据库引擎,返回值如下: GaussDB version String 数据库版本。 表11 ha字段数据结构说明 名称 参数类型 说明 mode String GaussDB分布式模式支持取值:enterprise(企业版) ,combined(基础版混合部署),主备版取值:centralization_standard,不区分大小写。 replication_mode String 备机同步参数。取值如下: sync 说明: “sync”为同步模式。 consistency String GaussDB的预留参数:指定事务一致性类型,取值范围: strong:强一致性。 eventual:最终一致性。 consistency_protocol String 指定副本一致性协议类型,取值范围:quorum 、paxos。不填时,默认为quorum。 表12 backup_strategy字段数据结构说明 名称 参数类型 说明 start_time String 备份时间段。自动备份将在该时间段内触发。 取值范围:非空,格式必须为hh:mm-HH:MM且有效,当前时间指UTC时间。 HH取值必须比hh大1。 mm和MM取值必须相同,且取值必须为00。 取值示例: 08:00-09:00 23:00-00:00 如果请求体中不填写“backup_strategy”字段,则响应体中 “start_time”默认返回“02:00-03:00”。 keep_days Integer 指定已生成备份文件的可保存天数。 取值范围:1~732。如果请求体中不填写“backup_strategy”字段,则响应体中 “keep_days”默认填写为7天。 表13 volume字段数据结构说明 名称 参数类型 说明 type String 磁盘类型。 取值如下,区分大小写: ULTRAHIGH,表示SSD盘。 ESSD,表示极速云盘。 size Integer 磁盘大小。 表14 charge_Info字段数据结构说明 名称 参数类型 说明 charge_mode String 计费模式。 postPaid:后付费,即按需付费。 prePaid:预付费,即包年/包月。 period_type String 订购周期类型。month:包月。year:包年。说明:“charge_mode”为“prePaid”时生效,且为必选值。 枚举值: month year period_num Integer “charge_mode”为“prePaid”时生效,且为必选值,指定订购的时间。 取值范围: 当“period_type”为“month”时,取值为1~9。当“period_type”为“year”时,取值为1~3。 is_auto_renew Boolean 创建包周期实例时可指定,表示是否自动续订,续订时会自动支付。 按月订购时续订周期默认为1个月,按年订购时续订周期默认为1年,续订周期可自定义修改。 true,表示自动续订。 false,表示不自动续订,默认为该方式。 is_auto_pay Boolean 创建包周期实例时可指定,表示是否自动从账户中支付,该字段不影响自动续订的支付方式。 true,表示自动从账户中支付。 false,表示手动从账户中支付,默认为该支付方式。