DeletePermissionVersion - AWS RAM


Deletes one version of a customer managed permission. The version you specify must not be attached to any resource share and must not be the default version for the permission.

If a customer managed permission has the maximum of 5 versions, then you must delete at least one version before you can create another.

Request Syntax

DELETE /deletepermissionversion?clientToken=clientToken&permissionArn=permissionArn&permissionVersion=permissionVersion HTTP/1.1

URI Request Parameters

The request uses the following URI parameters.


Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a UUID type of value..

If you don't provide this value, then AWS generates a random one for you.

If you retry the operation with the same ClientToken, but with different parameters, the retry fails with an IdempotentParameterMismatch error.


Specifies the Amazon Resource Name (ARN) of the permission with the version you want to delete.

Required: Yes


Specifies the version number to delete.

You can't delete the default version for a customer managed permission.

You can't delete a version if it's the only version of the permission. You must either first create another version, or delete the permission completely.

You can't delete a version if it is attached to any resource shares. If the version is the default, you must first use SetDefaultPermissionVersion to set a different version as the default for the customer managed permission, and then use AssociateResourceSharePermission to update your resource shares to use the new default version.

Required: Yes

Request Body

The request does not have a request body.

Response Syntax

HTTP/1.1 200 Content-type: application/json { "clientToken": "string", "permissionStatus": "string", "returnValue": boolean }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other parameters must also have the same values that you used in the first call.

Type: String


This operation is performed asynchronously, and this response parameter indicates the current status.

Type: String



A boolean value that indicates whether the operation is successful.

Type: Boolean


For information about the errors that are common to all actions, see Common Errors.


The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.

HTTP Status Code: 400


The operation failed because the specified client token isn't valid.

HTTP Status Code: 400


The operation failed because a parameter you specified isn't valid.

HTTP Status Code: 400


The operation failed because the specified Amazon Resource Name (ARN) has a format that isn't valid.

HTTP Status Code: 400


The operation failed because the requested operation isn't permitted.

HTTP Status Code: 400


The operation failed because the service could not respond to the request due to an internal problem. Try again later.

HTTP Status Code: 500


The operation failed because the service isn't available. Try again later.

HTTP Status Code: 503


The operation failed because a specified resource couldn't be found.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: