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
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
config:ListRemediationTemplates | Read |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RemediationType | string | No | The type of the remediation template. Valid value: OOS, which stands for Operation Orchestration Service. | OOS |
ManagedRuleIdentifier | string | No | The identifier of the managed rule. You can call the ListCompliancePackTemplates operation to obtain the managed rule identifier. | oss-bucket-public-write-prohibited |
PageNumber | long | No | The page number. Pages start from 1. | 1 |
PageSize | long | No | The number of entries per page. Valid values: 1 to 100. | 10 |
For more information about common request parameters, see Common parameters.
Response parameters
Examples
Sample success responses
JSON
format
{
"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 code | Error code | Error message | Description |
---|---|---|---|
400 | NoPermission | You are not authorized to perform this operation. | You are not authorized to perform this operation. |
503 | ServiceUnavailable | The 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 time | Summary of changes | Operation | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2023-04-13 | API Description Update. The Error code has changed. The request parameters of the API has changed. The response structure of the API has changed | see changesets | ||||||||||||||||
|