update_permission
¶
update_permission(
permission_arn: String,
status: UpdatePermissionStatus,
*,
config_overrides: Optional[RAMClientConfig] = 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.
>>> client.update_permission(permission_arn='arn:aws:ram:us-east-1:123456789012:permission/AnyCompanyImageBuilderPermission', status='DEPRECATED')
Source code in docs_src/capo_ram/_services/ram.py
2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 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 | |