调用ListRemediationTemplates接口查询指定托管规则的修正模板详情。
本文将提供一个示例,查询托管规则oss-bucket-public-write-prohibited
的修正模板详情。返回结果显示修正类型OOS
(运维编排)的模板详情。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | ListRemediationTemplates |
要执行的操作,取值:ListRemediationTemplates。 |
RemediationType | String | 否 | OOS |
修正类型。仅支持OOS(运维编排)。 |
ManagedRuleIdentifier | String | 是 | oss-bucket-public-write-prohibited |
托管规则标识。 |
关于公共请求参数的详情,请参见公共参数。
返回数据
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | FC2C4750-7024-499C-A69F-763543D1CBE3 |
请求ID。 |
RemediationTemplates | Array of RemediationTemplate |
修正模板列表。 |
|
RemediationType | String | OOS |
修正类型。仅支持OOS(运维编排)。 |
TemplateIdentifier | String | ACS-OSS-PutBucketAcl |
修正模板ID。 |
TemplateName | String | Set the ACL of an OSS bucket to private. |
修正模板名称。 |
TemplateDefinition | String | {\n \"Parameters\": {\n \"regionId\": {\n \"Type\": \"String\",\n \"Description\": \"The id of target region.\",\n \"AssociationProperty\": \"RegionId\",\n \"Default\": \"{regionId}\"\n },\n \"bucketName\": {\n \"Description\": {\n \"en\": \"The OSS bucket name.\",\n \"zh-cn\": \"OSS Bucket名称。\"\n },\n \"Type\": \"String\",\n \"Default\": \"{resourceId}\"\n },\n \"permissionName\": {\n \"Description\": {\n \"en\": \"The acl permission name.\",\n \"zh-cn\": \"ACL权限名称。\"\n },\n \"Type\": \"String\",\n \"Default\": \"private\",\n \"AllowedValues\": [\n \"public-read-write\",\n \"public-read\",\n \"private\"\n ]\n }\n }\n} |
修正模板定义。 |
示例
请求示例
http(s)://[Endpoint]/?Action=ListRemediationTemplates
&ManagedRuleIdentifier=oss-bucket-public-write-prohibited
&<公共请求参数>
正常返回示例
XML
格式
HTTP/1.1 200 OK
Content-Type:application/xml
<ListRemediationTemplatesResponse>
<RequestId>B62CE8A9-8FED-432A-B51E-EADBD1450B5C</RequestId>
<RemediationTemplates>
<TemplateIdentifier>ACS-OSS-PutBucketAcl</TemplateIdentifier>
<TemplateName>Set the ACL of an OSS bucket to private.</TemplateName>
<TemplateDefinition>
{\n \"Parameters\": {\n \"regionId\": {\n \"Type\": \"String\",\n \"Description\": \"The id of target region.\",\n \"AssociationProperty\": \"RegionId\",\n \"Default\": \"{regionId}\"\n },\n \"bucketName\": {\n \"Description\": {\n \"en\": \"The OSS bucket name.\",\n \"zh-cn\": \"OSS Bucket名称。\"\n },\n \"Type\": \"String\",\n \"Default\": \"{resourceId}\"\n },\n \"permissionName\": {\n \"Description\": {\n \"en\": \"The acl permission name.\",\n \"zh-cn\": \"ACL权限名称。\"\n },\n \"Type\": \"String\",\n \"Default\": \"private\",\n \"AllowedValues\": [\n \"public-read-write\",\n \"public-read\",\n \"private\"\n ]\n }\n }\n}</TemplateDefinition>
<RemediationType>OOS</RemediationType>
</RemediationTemplates>
</ListRemediationTemplatesResponse>
JSON
格式
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "B62CE8A9-8FED-432A-B51E-EADBD1450B5C",
"RemediationTemplates" : [ {
"TemplateIdentifier" : "ACS-OSS-PutBucketAcl",
"TemplateName" : "Set the ACL of an OSS bucket to private.",
"TemplateDefinition" : "{\n \"Parameters\": {\n \"regionId\": {\n \"Type\": \"String\",\n \"Description\": \"The id of target region.\",\n \"AssociationProperty\": \"RegionId\",\n \"Default\": \"{regionId}\"\n },\n \"bucketName\": {\n \"Description\": {\n \"en\": \"The OSS bucket name.\",\n \"zh-cn\": \"OSS Bucket名称。\"\n },\n \"Type\": \"String\",\n \"Default\": \"{resourceId}\"\n },\n \"permissionName\": {\n \"Description\": {\n \"en\": \"The acl permission name.\",\n \"zh-cn\": \"ACL权限名称。\"\n },\n \"Type\": \"String\",\n \"Default\": \"private\",\n \"AllowedValues\": [\n \"public-read-write\",\n \"public-read\",\n \"private\"\n ]\n }\n }\n}",
"RemediationType" : "OOS"
} ]
}
错误码
HttpCode | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | NoPermission | You are not authorized to perform this operation. | 您无权执行此操作。 |
503 | ServiceUnavailable | The request has failed due to a temporary failure of the server. | 服务不可用。 |
访问错误中心查看更多错误码。