云服务器内容精选

  • 示例 请求示例 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 } ] }
  • 请求示例 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