All Products
Search
Document Center

Cloud Config:ListRemediationTemplates

Last Updated:Jun 17, 2024

Queries a list of remediation templates for a managed rule.

Operation description

In this topic, the oss-bucket-public-write-prohibited managed rule is used as an example. The return result shows the details of the remediation template of the OOS type for the managed rule. OOS represents Operation Orchestration Service.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
config:ListRemediationTemplatesRead
  • All Resources
    *
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RemediationTypestringNo

The type of the remediation template. Valid value: OOS, which stands for Operation Orchestration Service.

OOS
ManagedRuleIdentifierstringNo

The identifier of the managed rule.

You can call the ListCompliancePackTemplates operation to obtain the managed rule identifier.

oss-bucket-public-write-prohibited
PageNumberlongNo

The page number. Pages start from 1.

1
PageSizelongNo

The number of entries per page. Valid values: 1 to 100.

10

For more information about common request parameters, see Common parameters.

Response parameters

ParameterTypeDescriptionExample
object

None.

RequestIdstring

The ID of the request.

FC2C4750-7024-499C-A69F-763543D1CBE3
RemediationTemplatesobject []

The queried remediation templates.

RemediationTypestring

The type of the remediation template. Valid value: OOS, which indicates Operation Orchestration Service.

OOS
TemplateIdentifierstring

The ID of the remediation template.

ACS-OSS-PutBucketAcl
TemplateNamestring

The name of the remediation template.

Set the ACL of an OSS bucket to private
TemplateDefinitionstring

The definition of the remediation template.

{ "Parameters": { "bucketName": { "Default": "{resourceId}", "Description": { "zh-cn": "[Required]OSS Bucket Name.", "en": "[Required]OSS Bucket Name." }, "Type": "String" }, "regionId": { "AssociationProperty": "RegionId", "Default": "{regionId}", "Description": { "zh-cn": "[Required]The id of target region.", "en": "[Required]The id of target region." }, "Type": "String" }, "permissionName": { "AllowValues": "[\"public-read-write\",\"public-read\",\"private\"]", "Default": "private", "Description": { "zh-cn": "[Required]ACL Permission Name.", "en": "[Required]ACL Permission Name." }, "Type": "String" } } }
TemplateDescriptionstring

The description of the remediation template.

Configure encryption rules for OSSBucket through the PutBucketEncryption interface. Be aware of the risks and exercise caution.
PageNumberlong

The page number. Pages start from page 1.

1
PageSizelong

The number of entries per page. Valid values: 1 to 100.

10
TotalCountstring

The total number of remediation templates.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "FC2C4750-7024-499C-A69F-763543D1CBE3",
  "RemediationTemplates": [
    {
      "RemediationType": "OOS",
      "TemplateIdentifier": "ACS-OSS-PutBucketAcl",
      "TemplateName": "Set the ACL of an OSS bucket to private",
      "TemplateDefinition": "{\n    \"Parameters\": {\n        \"bucketName\": {\n            \"Default\": \"{resourceId}\",\n            \"Description\": {\n                \"zh-cn\": \"[Required]OSS Bucket Name.\",\n                \"en\": \"[Required]OSS Bucket Name.\"\n            },\n            \"Type\": \"String\"\n        },\n        \"regionId\": {\n            \"AssociationProperty\": \"RegionId\",\n            \"Default\": \"{regionId}\",\n            \"Description\": {\n                \"zh-cn\": \"[Required]The id of target region.\",\n                \"en\": \"[Required]The id of target region.\"\n            },\n            \"Type\": \"String\"\n        },\n        \"permissionName\": {\n            \"AllowValues\": \"[\\\"public-read-write\\\",\\\"public-read\\\",\\\"private\\\"]\",\n            \"Default\": \"private\",\n            \"Description\": {\n                \"zh-cn\": \"[Required]ACL Permission Name.\",\n                \"en\": \"[Required]ACL Permission Name.\"\n            },\n            \"Type\": \"String\"\n        }\n    }\n}",
      "TemplateDescription": "Configure encryption rules for OSSBucket through the PutBucketEncryption interface. Be aware of the risks and exercise caution."
    }
  ],
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": "1"
}

Error codes

HTTP status codeError codeError messageDescription
400NoPermissionYou are not authorized to perform this operation.You are not authorized to perform this operation.
503ServiceUnavailableThe request has failed due to a temporary failure of the server.The request has failed due to a temporary failure of the server.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-04-13API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 503
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: PageNumber
    Added Input Parameters: PageSize
Output ParametersThe response structure of the API has changed.