put_resource_policy
¶
put_resource_policy(
resource_arn: str,
policy: str,
*,
config_overrides: Optional[RedshiftServerlessClientConfig] = None,
) -> PutResourcePolicyResponse
Creates or updates a resource policy. Currently, you can use policies to share snapshots across Amazon Web Services accounts.
Parameters:
-
resource_arn(str) –The Amazon Resource Name (ARN) of the account to create or update a resource policy for.
-
policy(str) –The policy to create or update. For example, the following policy grants a user authorization to restore a snapshot.
"{\"Version\": \"2012-10-17\", \"Statement\" : [{ \"Sid\": \"AllowUserRestoreFromSnapshot\", \"Principal\":{\"AWS\": [\"739247239426\"]}, \"Action\": [\"redshift-serverless:RestoreFromSnapshot\"] , \"Effect\": \"Allow\" }]}"
Raises:
-
ConflictException–The submitted action has conflicts.
-
InternalServerException–The request processing has failed because of an unknown error, exception or failure.
-
ResourceNotFoundException–The resource could not be found.
-
ServiceQuotaExceededException–The service limit was exceeded.
-
ValidationException–The input failed to satisfy the constraints specified by an Amazon Web Services service.
-
UnknownServiceError–The service returned an error code this client does not model.