All Products
Search
Document Center

Key Management Service:UpdatePolicy

Last Updated:Aug 28, 2026

Updates a permission policy.

Operation description

  • You can update the role-based access control (RBAC) permissions, accessible resources, access control rules, and description of a permission policy. You cannot update the name or scope.

  • Updating a permission policy affects all application access points (AAPs) bound to the policy. Proceed with caution.

For more information about the access policy required by a RAM user or RAM role to call this API, see Resource Access Management.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Name

string

Yes

The name of the permission policy to update.

policy_test

Permissions

string

No

The operations supported by the updated policy. Valid values:

  • RbacPermission/Template/CryptoServiceKeyUser: allows you to perform cryptographic operations.

  • RbacPermission/Template/CryptoServiceSecretUser: allows you to perform secret-related operations.

You can select both.

["RbacPermission/Template/CryptoServiceKeyUser", "RbacPermission/Template/CryptoServiceSecretUser"]

Resources

string

No

The keys and secrets accessible after the update.

  • Key: Enter a key in the key/${KeyId} format. To allow access to all keys of a KMS instance, enter key/*.

  • Secret: Enter a secret in the secret/${SecretName} format. To allow access to all secrets of a KMS instance, enter secret/*.

["secret/acs/ram/user/ram-secret", "secret/acs/ram/user/acr-master", "key/key-hzz63d9c8d3dfv8cv****"]

AccessControlRules

string

No

The access control rule.

Note

For more information about how to query created access control rules, see ListNetworkRules.

{"NetworkRules":["kst-hzz62ee817bvyyr5x****.efkd","kst-hzz62ee817bvyyr5x****.eyyp"]}

Description

string

No

The description.

policy description

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

f455324b-e229-4066-9f58-9c1cf3fe83a8

Examples

Success response

JSON format

{
  "RequestId": "f455324b-e229-4066-9f58-9c1cf3fe83a8"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified parameter is not valid. An invalid value is specified for the parameter.
404 InvalidAccessKeyId.NotFound The Access Key ID provided does not exist in our records.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.