-
响应示例 状态码: 200 OK {
"stack" : {
"tags" : [ "Java", "Maven", "CPP", "Vue", "ServiceComb", "Blockchain", "GO", "Node.js", "Quantum", "JavaScript", "Ruby", "Python" ],
"stack_list" : [ {
"id" : 1,
"stack_id" : "all",
"creator" : "ide",
"name" : "All in One",
"description" : "支持Java、Python、JS/TS等多种语言",
"scope" : "general",
"config" : {
"recipe" : {
"content" : "hishell-all-in-one:alpha",
"type" : "dockerimage"
},
"attributes" : {
"specs" : [ "2U4G" ],
"volumes" : [ "5GB", "10GB", "20GB" ]
}
},
"tags" : [ "Java", "Maven", "CPP", "JavaScript", "Vue", "GO", "Node.js", "Ruby", "Python", "ServiceComb" ],
"disable" : false,
"arm_config" : {
"recipe" : {
"content" : "hishell-all-in-one:alpha",
"type" : "dockerimage"
},
"attributes" : {
"specs" : [ "4U8G" ],
"volumes" : [ "5GB", "10GB", "20GB" ]
}
}
} ]
},
"status" : "success"
}
-
响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 stack StacksTag object 技术栈 status String 状态 表4 StacksTag 参数 参数类型 描述 stack_list Array of Stacks objects 技术栈列表 tags Array of strings 技术栈tag集合 表5 Stacks 参数 参数类型 描述 arm_config StacksConfig object arm配置 config StacksConfig object x86配置 creator String 创建人 description String 描述 disable Boolean 是否可用 id Long id label String 标签 logo String 图标 name String 技术栈名称 scope String 范围 stack_id String 技术栈ID,通过技术栈管理ListStacks接口获取。 tags Array of strings tags 表6 StacksConfig 参数 参数类型 描述 attributes StacksAttribute object 属性值 recipe Recipe object 镜像 表7 StacksAttribute 参数 参数类型 描述 specs Array of strings 规格列表 suggest String 提示id suggest_title String 提示信息 volumes Array of strings 卷容量列表 表8 Recipe 参数 参数类型 描述 content String 镜像内容 type String 镜像类型 状态码: 403 表9 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 404 表10 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 406 表11 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码 状态码: 500 表12 响应Body参数 参数 参数类型 描述 error_msg String 错误描述 error_code String 错误码
-
请求 Request Header参数说明 参数 是否必选 类型 说明 X-Auth-Token 是 String 已认证的拥有Security Administrator权限的token。 Content-Type 是 String 该字段内容填为“application/json;charset=utf8” 请求样例 curl -i -k -H "X-Auth-Token:$token" -H 'Content-Type:application/json;charset=utf8' -X GET https://iam.myhuaweicloud.com/v3.0/OS-PAP/enterprise-projects/535fb147-6148-4c71-a679-b79a2cb0ee5d/groups
-
响应 Reponse Body参数说明 参数 是否必选 类型 说明 groups 是 Array 企业项目关联的用户组详情。 groups格式说明 参数 是否必选 类型 说明 group_id 是 String 关联用户组的ID。 group_name 是 String 关联用户组的名称。 group_desc 是 String 关联用户组的描述。 user_num 是 Int 关联用户组中的用户数。 policy_num 是 Int 关联用户组的策略数。 created_at 是 Int 关联用户组创建的时间(Unix时间:毫秒)。 响应样例:查询的企业项目关联了用户组。 {
"groups": [
{
"group_id": "758b99fa1fa24ec4a297d44e092bd...",
"group_name": "Test",
"group_desc": "Test",
"user_num": 4,
"policy_num": 1,
"created_at": 1549088526...
}
]
}
-
响应消息 正常响应要素说明 表2 要素说明 名称 参数类型 描述 total_count Integer 总记录数。 flavors Array of objects 实例规格信息列表。详情请参见表3。 表3 flavors字段数据结构说明 名称 参数类型 描述 engine_name String 接口名称。 engine_version String 接口版本。 vcpus String CPU核数。 ram String 内存大小,单位为兆字节。 spec_code String 资源规格编码。 示例:geminidb.cassandra.8xlarge.4 说明: “geminidb.cassandra”表示云数据库 GeminiDB的Cassandra数据库产品。 “8xlarge.4”表示节点性能规格。 availability_zone Array of strings 支持该规格的可用区ID。 说明: 该字段已废弃,请不要使用。 az_status Object 规格在可用区内的状态,包含以下状态: normal,在售。 unsupported,暂不支持该规格。 sellout,售罄。 响应样例中“az_status”字段下可用区的值为示例值。 正常响应样例 {
"total_count": 4,
"flavors": [
{
"engine_name": "cassandra",
"engine_version": "3.11",
"vcpus": "4",
"ram": "16",
"spec_code": "geminidb.cassandra.xlarge.4",
"availability_zone": [
"az1",
"az2"
],
"az_status": {
"az1":"normal",
"az2":"unsupported"
}
},
{
"engine_name": "cassandra",
"engine_version": "3.11",
"vcpus": "8",
"ram": "32",
"spec_code": "geminidb.cassandra.2xlarge.4",
"availability_zone": [
"az1",
"az2"
],
"az_status": {
"az1":"unsupported",
"az2":"normal"
}
},
{
"engine_name": "cassandra",
"engine_version": "3.11",
"vcpus": "16",
"ram": "64",
"spec_code": "geminidb.cassandra.4xlarge.4",
"availability_zone": [
"az1",
"az2"
],
"az_status": {
"az1":"normal",
"az2":"sellout"
}
},
{
"engine_name": "cassandra",
"engine_version": "3.11",
"vcpus": "32",
"ram": "128",
"spec_code": "geminidb.cassandra.8xlarge.4",
"availability_zone": [
"az1",
"az2"
],
"az_status": {
"az1":"normal",
"az2":"normal"
}
}
]
} 异常响应 请参见异常请求结果。
-
URI URI格式 GET https://{Endpoint}/v3/{project_id}/flavors?region={region}&engine_name={engine_name} URI样例 https://gaussdb-nosql.cn-north-4.myhuaweicloud.com/v3/375d8d8fad1f43039e23d3b6c0f60a19/flavors?region=cn-north-4&engine_name=cassandra 参数说明 表1 参数说明 名称 是否必选 描述 project_id 是 租户在某一region下的project ID。获取方法请参见获取项目ID。 region 否 实例所在区域。 取值: 非空,请参见地区和终端节点。 engine_name 否 数据库类型。 取值为“cassandra”,表示查询GeminiDB Cassandra数据库实例支持的规格。 取值为“mongodb”,表示查询GeminiDB Mongo数据库实例支持的规格。 取值为“influxdb”,表示查询GeminiDB Influx数据库实例支持的规格。 取值为“redis”,表示查询GeminiDB Redis数据库实例支持的规格。 如果不传该参数,默认为“cassandra”。
-
URI GET /v1/{project_id}/flows/running-history 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,用于资源隔离。获取方式请参考获取项目ID。 表2 Query参数 参数 是否必选 参数类型 描述 time_range 否 String 时间筛选范围,UTC时间。格式:yyyy-MM-dd'T'HH:mm:ss.SSS'Z'toyyyy-MM-dd'T'HH:mm:ss.SSS'Z' 例如:2020-11-10T00:00:00Zto2020-11-12T00:00:00 name 否 String 请求名称。 status 否 String 流的状态。 枚举值: success fail offset 否 Integer 当前页,起始页数应大于等于0。 limit 否 Integer 每页记录数,每页记录数应大于等于1。
-
响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 total Long 历史记录总数。 histories Array of histories objects 所有历史记录的信息。 表4 histories 参数 参数类型 描述 id String 流运行记录ID。 flow_id String 流ID。 flow_name String 流名称。 flow_version_id String 流运行版本ID。 run_model String 流运行模式,通常有手动、自动、测试三种。 手动:需要用户在页面单击运行流。 自动:会按照触发器的类型自动运行流。 测试:用户在创建流的时候可以测试流的功能。 status String 最后一次运行,流运行状态。 success:流运行成功 fail:流运行失败 icon String 流图标。 start_time String 流运行的开始时间。 end_time String 流运行的结束时间。 exec_time Long 执行时间,单位:毫秒。 running_times Long 运行次数。 last_time String 最后一次运行时间。 message String 最后一次运行,输出的错误信息。 状态码: 403 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码。 最小长度:8 最大长度:36 error_msg String 错误描述。 最小长度:2 最大长度:512 状态码: 500 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码。 最小长度:8 最大长度:36 error_msg String 错误描述。 最小长度:2 最大长度:512
-
示例 请求示例 POST /v1/{project_id}/objectstorage/task {
"src_node": {
"region": "source_region",
"ak": "source_ak",
"sk": "source_sk",
"list_file": {
"obs_bucket": "oms-file",
"list_file_key": "object-keys.txt"
},
"bucket": "source_bucket",
"cloud_type": XXX
},
"thread_num": 50,
"enableKMS": true,
"description": "xxx",
"dst_node": {
"region": "target_region",
"ak": "target_ak",
"sk": "target_sk",
"object_key": "targetkey",
"bucket": "targetbucket",
"cloud_type": XXX
},
"smnInfo": {
"topicUrn": "urn:smn:region:3cfb09080bd944d0b4cdd72ef26857bd:
OMS ",
"triggerConditions": ["SUC
CES S", "FAIL"],
"language": "en-us"
},
"task_type": "list",
"migrate_since": 123456789
} 或 POST /v1/{project_id}/objectstorage/task {
"src_node": {
"region": "source_region",
"ak": "source_ak",
"sk": "source_sk",
"object_key": {
"path": "",
"keys": ["object1", "object2"]
},
"bucket": "source_bucket",
"cloud_type": "XXX"
},
"thread_num": 50,
"enableKMS": true,
"description": "xxx",
"dst_node": {
"region": "target_region",
"ak": "target_ak",
"sk": "target_sk",
"object_key": "targetkey",
"bucket": "targetbucket",
"cloud_type": "XXX"
},
"smnInfo": {
"topicUrn": "urn:smn:region:3cfb09080bd944d0b4cdd72ef26857bd:OMS",
"triggerConditions": ["SUCCESS", "FAIL"],
"language": "en-us"
},
"source_cdn": {
"protocol": "https",
"domain": "xxx.xxx.xxx",
"authentication_type": "NONE"
},
"bandwidth_policy": [
{
"start": "00:00",
"end": "23:59",
"max_bandwidth": 50000000
}
]
}
-
请求消息 请求参数 表1 参数说明 参数 是否必选 参数类型 取值范围 描述 searchKey 否 String 16 工单简要描述模糊查询。 caseId 否 String 32 工单编号模糊查询。 subCustomerName 否 String 32
IAM 用户名模糊查询。 startTime 否 String N/A 查询工单开始时间。 时间格式例如:2019-05-22 03:30:52 endTime 否 String N/A 查询工单结束时间。 时间格式例如:2019-05-22 03:30:52 status 否 Integer N/A 状态 0:待受理 1:处理中 2:待确认结果 3:已完成 4:已撤销 查询全部传空 pageNo 否 Integer N/A 当前页,不传默认为1。 pageSize 否 Integer N/A 每页数量,取值范围:1-100,不传默认为10。 请求示例 searchKey=华为云&caseId=&startTime=&endTime=&subCustomerId=test&status=&pageNo=1&pageSize=10
-
请求示例 https://{{endpoint}}/v1/firewalls/c2c5234b-67ff-11ea-a41a-00e04c9bd2a3/firewall-rules{ "firewall" : { "ingress_firewall_policy" : { "id" : "9ea9351c-bf23-4c7a-8a92-bc6bfa6b7725", "firewall_rules" : [ { "name" : "", "description" : "", "enabled" : true, "action" : "allow", "protocol" : "any", "ip_version" : 4, "destination_ip_address" : "0.0.0.0/0", "destination_port" : "", "source_ip_address" : "0.0.0.0/0", "source_port" : "", "operate_type" : "add" } ] } }}
-
响应示例 状态码: 200 OK { "firewall" : { "id" : "c2c5234b-67ff-11ea-a41a-00e04c9bd2a3", "status" : "INACTIVE", "ingress_firewall_policy" : { "id" : "dd1b46d8-bff8-41d5-b79d-b96c300371d7", "firewall_rules" : [ { "id" : "438b8821-69a9-11ea-bec0-00e04c9bd2a3", "name" : "test", "description" : "test", "enabled" : true, "action" : "allow", "protocol" : "tcp", "ip_version" : 4, "destination_ip_address" : "0.0.0.0/12", "destination_port" : "443", "source_ip_address" : "0.0.0.0/24", "source_port" : "35" } ] }, "egress_firewall_policy" : { } }}
-
响应参数 状态码: 200 表7 响应Body参数 参数 参数类型 描述 firewall UpdateFirewallRuleResp object 更新网络ACL返回体,当更新操作为delete时,返回体中的policy策略中不再包含任何firewall_rule,只包含策略ID。 表8 UpdateFirewallRuleResp 参数 参数类型 描述 id String 网络ACL ID status String 网络ACL状态。 枚举值: INACTIVE egress_firewall_policy FirewallPolicy object 出方向网络ACL策略返回体,当该返回体有值时,则ingress_firewall_policy为{} ingress_firewall_policy FirewallPolicy object 入方向网络ACL策略返回体,当该返回体有值时,则egress_firewall_policy为{} 表9 FirewallPolicy 参数 参数类型 描述 id String 网络ACL策略ID。 name String 网络ACL策略名称。 最小长度:0 最大长度:64 firewall_rules Array of FirewallRule objects 网络ACL规则列表对象。 insert_after String ACL规则ID,表示在此ACL规则之后添加ACL规则 insert_before String ACL规则ID,表示在此ACL规则之前添加ACL规则 表10 FirewallRule 参数 参数类型 描述 action String 策略是否允许 取值范围:allow,deny,reject 枚举值: allow deny reject description String 网络ACL规则描述。 最小长度:0 最大长度:64 destination_ip_address String 目的地IP地址,IPv4的CIDR格式 destination_port String 目的地端口范围 取值范围:整数,比如80,或者以"-"隔开的范围,比如80-90 enabled Boolean 网络ACL规则使能开关。 取值范围:true,false 缺省值:true id String 网络ACL规则ID。 进行更新规则时,如果operate_type为add,则该值为空。 ip_version Integer IP协议版本 取值范围:4 name String 网络ACL规则名称。 最小长度:0 最大长度:64 operate_type String 网络ACL规则操作状态,作为请求时取值为"add"/"modify"/"delete",作为返回值时为"normal"。 当请求更新规则时,本参数值为delete时,除id之外,本请求体其他参数均可为空。 枚举值: add modify delete protocol String IP协议,为any时代表所有协议 取值范围:icmp,tcp,udp,any 枚举值: icmp tcp udp any source_ip_address String 源IP地址,IPv4的CIDR格式 source_port String 源地端口范围 取值范围:整数,比如80,或者以"-"隔开的范围,比如80-90
-
请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 表3 请求Body参数 参数 是否必选 参数类型 描述 firewall 否 UpdateFirewallRuleOption object 防火墙 表4 UpdateFirewallRuleOption 参数 是否必选 参数类型 描述 egress_firewall_policy 是 FirewallPolicy object 出方向防火墙策略,不能与ingress_firewall_policy同时存在 ingress_firewall_policy 是 FirewallPolicy object 入方向防火墙策略,不能与egress_firewall_policy同时存在 表5 FirewallPolicy 参数 是否必选 参数类型 描述 id 是 String 网络ACL策略ID。 name 否 String 网络ACL策略名称。 最小长度:0 最大长度:64 firewall_rules 是 Array of FirewallRule objects 网络ACL规则列表对象。 insert_after 否 String ACL规则ID,表示在此ACL规则之后添加ACL规则 insert_before 否 String ACL规则ID,表示在此ACL规则之前添加ACL规则 表6 FirewallRule 参数 是否必选 参数类型 描述 action 是 String 策略是否允许 取值范围:allow,deny,reject 枚举值: allow deny reject description 否 String 网络ACL规则描述。 最小长度:0 最大长度:64 destination_ip_address 是 String 目的地IP地址,IPv4的CIDR格式 destination_port 是 String 目的地端口范围 取值范围:整数,比如80,或者以"-"隔开的范围,比如80-90 enabled 是 Boolean 网络ACL规则使能开关。 取值范围:true,false 缺省值:true id 是 String 网络ACL规则ID。 进行更新规则时,如果operate_type为add,则该值为空。 ip_version 是 Integer IP协议版本 取值范围:4 name 是 String 网络ACL规则名称。 最小长度:0 最大长度:64 operate_type 是 String 网络ACL规则操作状态,作为请求时取值为"add"/"modify"/"delete",作为返回值时为"normal"。 当请求更新规则时,本参数值为delete时,除id之外,本请求体其他参数均可为空。 枚举值: add modify delete protocol 是 String IP协议,为any时代表所有协议 取值范围:icmp,tcp,udp,any 枚举值: icmp tcp udp any source_ip_address 是 String 源IP地址,IPv4的CIDR格式 source_port 是 String 源地端口范围 取值范围:整数,比如80,或者以"-"隔开的范围,比如80-90