update_permission
async
¶
update_permission(
permission_arn: String,
status: UpdatePermissionStatus,
*,
config_overrides: Optional[AsyncRAMClientConfig] = None,
client_token: Optional[String] = None,
) -> UpdatePermissionResponse
Updates the status of the specified customer managed permission.
Setting the status to DEPRECATED prevents new resource share associations. Setting it to ATTACHABLE restores a previously deprecated permission. Existing resource shares that use the permission continue to function.
Parameters:
-
permission_arn(String) –Specifies the Amazon Resource Name (ARN) of the customer managed permission that you want to update.
-
status(UpdatePermissionStatus) –Specifies the new status for the permission. This can be one of the following values:
-
ATTACHABLE– Restores a previously deprecated permission so it can be associated with resource shares again. -
DEPRECATED– Deprecates the permission so it can no longer be associated with new resource shares.
-
-
client_token(Optional[String], default:None) –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 Amazon Web Services generates a random one for you.
If you retry the operation with the same
ClientToken, but with different parameters, the retry fails with anIdempotentParameterMismatcherror.
Raises:
-
IdempotentParameterMismatchException–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.
-
InvalidClientTokenException–The operation failed because the specified client token isn't valid.
-
InvalidParameterException–The operation failed because a parameter you specified isn't valid.
-
MalformedArnException–The operation failed because the specified Amazon Resource Name (ARN) has a format that isn't valid.
-
OperationNotPermittedException–The operation failed because the requested operation isn't permitted.
-
PermissionLimitExceededException–The operation failed because it would exceed the maximum number of permissions you can create in each Amazon Web Services Region. To view the limits for your Amazon Web Services account, see the RAM page in the Service Quotas console.
-
ServerInternalException–The operation failed because the service could not respond to the request due to an internal problem. Try again later.
-
ServiceUnavailableException–The operation failed because the service isn't available. Try again later.
-
UnknownResourceException–The operation failed because a specified resource couldn't be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Deprecate a managed permission Deprecates a customer managed permission so it can no longer be associated with new resource shares.
>>> await client.update_permission(permission_arn='arn:aws:ram:us-east-1:123456789012:permission/AnyCompanyImageBuilderPermission', status='DEPRECATED')
Source code in docs_src/capo_ram/_services/async_ram.py
2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 | |