VPCLattice / Client / put_auth_policy

put_auth_policy#

VPCLattice.Client.put_auth_policy(**kwargs)#

Creates or updates the auth policy. The policy string in JSON must not contain newlines or blank lines.

For more information, see Auth policies in the Amazon VPC Lattice User Guide.

See also: AWS API Documentation

Request Syntax

response = client.put_auth_policy(
    policy='string',
    resourceIdentifier='string'
)
Parameters:
  • policy (string) –

    [REQUIRED]

    The auth policy. The policy string in JSON must not contain newlines or blank lines.

  • resourceIdentifier (string) –

    [REQUIRED]

    The ID or ARN of the service network or service for which the policy is created.

Return type:

dict

Returns:

Response Syntax

{
    'policy': 'string',
    'state': 'Active'|'Inactive'
}

Response Structure

  • (dict) –

    • policy (string) –

      The auth policy. The policy string in JSON must not contain newlines or blank lines.

    • state (string) –

      The state of the auth policy. The auth policy is only active when the auth type is set to AWS_IAM. If you provide a policy, then authentication and authorization decisions are made based on this policy and the client’s IAM policy. If the Auth type is NONE, then, any auth policy that you provide remains inactive. For more information, see Create a service network in the Amazon VPC Lattice User Guide.

Exceptions