VPCLattice / Client / put_resource_policy

put_resource_policy#

VPCLattice.Client.put_resource_policy(**kwargs)#

Attaches a resource-based permission policy to a service or service network. The policy must contain the same actions and condition statements as the Amazon Web Services Resource Access Manager permission for sharing services and service networks.

See also: AWS API Documentation

Request Syntax

response = client.put_resource_policy(
    policy='string',
    resourceArn='string'
)
Parameters:
  • policy (string) –

    [REQUIRED]

    An IAM policy.

  • resourceArn (string) –

    [REQUIRED]

    The ID or Amazon Resource Name (ARN) of the service network or service for which the policy is created.

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • VPCLattice.Client.exceptions.ValidationException

  • VPCLattice.Client.exceptions.AccessDeniedException

  • VPCLattice.Client.exceptions.ThrottlingException

  • VPCLattice.Client.exceptions.ResourceNotFoundException

  • VPCLattice.Client.exceptions.InternalServerException