put_resource_policy

put_resource_policy(**kwargs)

Attaches a resource-based permission policy to the Amazon Web Services Migration Hub Refactor Spaces environment. The policy must contain the same actions and condition statements as the arn:aws:ram::aws:permission/AWSRAMDefaultPermissionRefactorSpacesEnvironment permission in Resource Access Manager. The policy must not contain new lines or blank lines.

See also: AWS API Documentation

Request Syntax

response = client.put_resource_policy(
    Policy='string',
    ResourceArn='string'
)
Parameters
  • Policy (string) --

    [REQUIRED]

    A JSON-formatted string for an Amazon Web Services resource-based policy.

  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource to which the policy is being attached.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • MigrationHubRefactorSpaces.Client.exceptions.ResourceNotFoundException
  • MigrationHubRefactorSpaces.Client.exceptions.InternalServerException
  • MigrationHubRefactorSpaces.Client.exceptions.InvalidResourcePolicyException
  • MigrationHubRefactorSpaces.Client.exceptions.ValidationException
  • MigrationHubRefactorSpaces.Client.exceptions.ThrottlingException
  • MigrationHubRefactorSpaces.Client.exceptions.AccessDeniedException