replace_permission_associations
async
¶
replace_permission_associations(
from_permission_arn: String,
to_permission_arn: String,
*,
config_overrides: Optional[AsyncRAMClientConfig] = None,
from_permission_version: Optional[Integer] = None,
client_token: Optional[String] = None,
) -> ReplacePermissionAssociationsResponse
Updates all resource shares that use a managed permission to a different managed permission. This operation always applies the default version of the target managed permission. You can optionally specify that the update applies to only resource shares that currently use a specified version. This enables you to update to the latest version, without changing the which managed permission is used.
You can use this operation to update all of your resource shares to use the current default version of the permission by specifying the same value for the fromPermissionArn and toPermissionArn parameters.
You can use the optional fromPermissionVersion parameter to update only those resources that use a specified version of the managed permission to the new managed permission.
To successfully perform this operation, you must have permission to update the resource-based policy on all affected resource types.
Parameters:
-
from_permission_arn(String) –Specifies the Amazon Resource Name (ARN) of the managed permission that you want to replace.
-
from_permission_version(Optional[Integer], default:None) –Specifies that you want to updated the permissions for only those resource shares that use the specified version of the managed permission.
-
to_permission_arn(String) –Specifies the ARN of the managed permission that you want to associate with resource shares in place of the one specified by
fromPerssionArnandfromPermissionVersion.The operation always associates the version that is currently the default for the specified managed permission.
-
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.
-
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.
Source code in docs_src/capo_ram/_services/async_ram.py
2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 | |