云服务器内容精选

  • 控制策略类型介绍 预防性控制策略:策略主体为SCP服务控制策略,任何在策略中显性拒绝的操作都会被拦截。预防性控制策略在指定OU上生效之后,该OU所有直系子级账号均会继承该策略。 检测性控制策略:策略主体为Config合规规则,不合规的资源配置会被检测发现并反馈给用户,用户可以在资源治理中心服务控制台查看不合规的资源列表。检测性控制策略在指定OU上生效后,该OU所有直系子级账号均会根据规则要求检测不合规配置的发生。
  • 实施类型 必选:这部分策略在开启RGC服务并设置Landing Zone后,便在核心OU和核心账号上强制自动生效,而且无法禁用。 强烈推荐:基于华为云治理最佳实践强烈推荐的合规遵从管控策略,大部分企业用户在云上治理多账号环境时大概率会涉及相关场景和服务,建议Landing Zone搭建完成之后,企业用户自主启用。 可选:企业云上治理过程中,部分企业用户可能会涉及相关控制策略,可以根据具体情况灵活选用相关策略。
  • 响应示例 返回状态码为200:删除成功,响应体参考DeleteTimeFlowConfigOutputDto。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "success" : ["a91e169602a24a68bad4aa639359c8cf"], "fail" : [ { "errcode" : "0304090003", "errmsg" : "The time flow policy does not exist.", "data" : "fde91508d7b043abacd95fed357c8c2c" } ] } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /controller/campus/v1/authconfigservice/accessconfig/timeflowconfig/batch-delete HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-AC CES S-TOKEN: x-yyyyyy { "siteId" : "a91e1696-02a2-4a68-bad4-aa639359c8cf", "ids" : [ "a91e169602a24a68bad4aa639359c8aa" ] }
  • 响应示例 返回状态码为200:添加成功,响应体参考TimeFlowConfigsOutputDto。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "total" : 10, "data" : [ { "id" : "a91e169602a24a68bad4aa639359c8cf", "timeFlowName" : "one", "siteId" : "75f8ed0f-810a-4ff5-8e64-67c81312d01c", "enableTrafficLimitMode" : true, "trafficLimitMode" : 1, "trafficLimit" : 34, "trafficLimitValue" : 34, "enableDurationLimitMode" : true, "durationLimitMode" : 1, "durationLimit" : 34, "durationLimitValue" : 34, "isReCount" : true, "isAnonymous" : false, "userGroupIds" : [ "33f8ed0f-810a-4ff5-8e64-67c81312d012" ], "description" : "a policy", "policyType" : 1, "oneTimeValue" : 60, "terminalTimeValue" : 1440, "terminalTimeUnit" : 1, "terminalFlowValue" : 1024, "terminalFlowUnit" : 1, "terminalReCountEnable" : true, "redirectEnable" : false, "redirectUrl" : "https://xxx.xxx.xxx.xxx" } ] } 返回状态码为400:参数不正确。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 POST /controller/campus/v1/authconfigservice/accessconfig/timeflowconfig HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "timeFlowName" : "one", "siteId" : "75f8ed0f-810a-4ff5-8e64-67c81312d01c", "enableTrafficLimitMode" : true, "trafficLimitMode" : 1, "trafficLimit" : 34, "trafficLimitValue" : 34, "enableDurationLimitMode" : true, "durationLimitMode" : 1, "durationLimit" : 34, "durationLimitValue" : 34, "isReCount" : true, "isAnonymous" : false, "userGroupIds" : [ "33f8ed0f-810a-4ff5-8e64-67c81312d012" ], "description" : "a policy", "policyType" : 1, "oneTimeValue" : 60, "terminalTimeValue" : 1440, "terminalTimeUnit" : 1, "terminalFlowValue" : 1024, "terminalFlowUnit" : 1, "terminalReCountEnable" : true, "redirectEnable" : false, "redirectUrl" : "https://xxx.xxx.xxx.xxx" }
  • 响应示例 返回状态码为200:修改成功,响应体参考CommonTimeFlowConfigDto。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "" } 返回状态码为400:校验异常。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 请求示例 HTTP的示例 PUT /controller/campus/v1/authconfigservice/accessconfig/timeflowconfig/a91e169602a24a68bad4aa639359c8cf HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy { "timeFlowName" : "one", "siteId" : "75f8ed0f-810a-4ff5-8e64-67c81312d01c", "enableTrafficLimitMode" : true, "trafficLimitMode" : 1, "trafficLimit" : 34, "trafficLimitValue" : 34, "enableDurationLimitMode" : true, "durationLimitMode" : 1, "durationLimit" : 34, "durationLimitValue" : 34, "isReCount" : true, "isAnonymous" : false, "userGroupIds" : [ "33f8ed0f-810a-4ff5-8e64-67c81312d012" ], "description" : "a policy", "policyType" : 1, "oneTimeValue" : 60, "terminalTimeValue" : 1440, "terminalTimeUnit" : 1, "terminalFlowValue" : 1024, "terminalFlowUnit" : 1, "terminalReCountEnable" : true, "redirectEnable" : false, "redirectUrl" : "https://xxx.xxx.xxx.xxx" }
  • 响应参数 返回状态码为200:修改成功,响应体参考CommonTimeFlowConfigDto。 表3 CommonTimeFlowConfigDto对象的参数列表 参数名称 类型 参数值域 默认值 参数说明 参数示例 errcode string - - 错误码。 "0" errmsg string - - 错误信息描述。 "" 返回状态码为400:校验异常。 详细信息请参见实际响应消息体。 返回状态码为500:内部错误。 详细信息请参见实际响应消息体。
  • URI /controller/campus/v1/authconfigservice/accessconfig/timeflowconfig 表1 query参数列表 参数名称 必选 类型 参数值域 默认值 参数说明 参数示例 id 否 string - - 用户在线控制策略ID,UUID格式。 "75f8ed0f810a4ff58e6467c81312d01c" timeFlowName 否 string 1~128个字符。 - 用户在线控制策略名称,模糊查询。 "policy" siteId 否 string - - 站点ID,UUID格式。 "75f8ed0f-810a-4ff5-8e64-67c81312d01c"
  • 请求示例 HTTP的示例 GET /controller/campus/v1/authconfigservice/accessconfig/timeflowconfig?id=75f8ed0f810a4ff58e6467c81312d01c&timeFlowName=policy&siteId=75f8ed0f-810a-4ff5-8e64-67c81312d01c HTTP/1.1 Host: 192.168.1.125:18002 Content-Type: application/json Accept: application/json Accept-Language: en-US X-ACCESS-TOKEN: x-yyyyyy
  • 响应示例 返回状态码为200:查询成功,响应体参考GetTimeFlowConfigsOutputDto。 HTTP/1.1 200 OK Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive { "errcode" : "0", "errmsg" : "", "total" : 10, "data" : [ { "id" : "a91e169602a24a68bad4aa639359c8cf", "timeFlowName" : "one", "siteId" : "75f8ed0f-810a-4ff5-8e64-67c81312d01c", "siteIdList" : [ "33f8ed0f-810a-4ff5-8e64-67c81312d012" ], "enableTrafficLimitMode" : true, "trafficLimitMode" : 1, "trafficLimit" : 34, "trafficLimitValue" : 34, "enableDurationLimitMode" : true, "durationLimitMode" : 1, "durationLimit" : 34, "durationLimitValue" : 34, "isReCount" : true, "isAnonymous" : false, "userGroupIds" : [ "33f8ed0f-810a-4ff5-8e64-67c81312d012" ], "description" : "a policy", "policyType" : 1, "oneTimeValue" : 60, "terminalTimeValue" : 1440, "terminalTimeUnit" : 1, "terminalFlowValue" : 1024, "terminalFlowUnit" : 1, "terminalReCountEnable" : true, "redirectEnable" : false, "redirectUrl" : "https://xxx.xxx.xxx.xxx" } ] } 返回状态码为400:参数不正确。 HTTP/1.1 400 Bad Request Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive 返回状态码为500:内部错误。 HTTP/1.1 500 Internal Server Error Date: Sun,16 Feb 2025 10:00:00 GMT Server: example-server Content-Type: application/json;charset=UTF-8 Content-Length: 250 Connection: keep-alive
  • 解绑SCP 方法一: 以组织管理员或管理账号的身份登录华为云,进入华为云Organizations控制台,进入组织管理页面。 选中要解绑SCP的OU或者账号。 在右侧详情页,选策略页签,展开“服务控制策略”列表,在列表单击要解绑的SCP操作列的“解绑”。 在弹窗中输入“确认”,单击“确定”,完成策略解绑。 图3 解绑SCP OU和账号至少直接绑定一个SCP,最后一个直接绑定策略,不可解绑。 方式二: 在Organizations控制台,进入策略管理页。 单击“服务控制策略策略”,进入SCP策略列表页。 单击SCP策略的名称,选择“目标”页签。 单击需要解绑的OU或账号操作列的“解绑”。 图4 解绑SCP 在弹窗中输入“确认”,单击“确定”,完成策略解绑。 图5 解绑SCP
  • 绑定SCP 方式一: 以组织管理员或管理账号的身份登录华为云,进入华为云Organizations控制台,进入组织管理页面。 选中要绑定SCP的OU或者账号。 在右侧详情页,选择策略页签,展开“服务控制策略”列表,单击列表上方的“绑定”。 图1 绑定SCP 在弹窗中选择要添加的策略后,在文本框中输入“确认”,然后单击“绑定”,完成策略绑定。 方式二: 在Organizations控制台,进入策略管理页。 单击“服务控制策略策略”,进入SCP策略列表页。 单击SCP策略操作列的“绑定”,选中要绑定SCP策略的OU或者账号。 在弹窗中输入“确认”,单击“确定”,完成策略绑定。 图2 绑定SCP