Select your cookie preferences

We use cookies and similar tools to enhance your experience, provide our services, deliver relevant advertising, and make improvements. Approved third parties also use these tools to help us deliver advertising and provide certain site features.

put_application_policy

put_application_policy(**kwargs)

Sets the permission policy for an application. For the list of actions supported for this operation, see Application Permissions .

See also: AWS API Documentation

Request Syntax

response = client.put_application_policy(
    ApplicationId='string',
    Statements=[
        {
            'Actions': [
                'string',
            ],
            'PrincipalOrgIDs': [
                'string',
            ],
            'Principals': [
                'string',
            ],
            'StatementId': 'string'
        },
    ]
)
Parameters
  • ApplicationId (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the application.

  • Statements (list) --

    [REQUIRED]

    An array of policy statements applied to the application.

    • (dict) --

      Policy statement applied to the application.

      • Actions (list) -- [REQUIRED]

        For the list of actions supported for this operation, see Application Permissions.

        • (string) --
      • PrincipalOrgIDs (list) --

        An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key.

        • (string) --
      • Principals (list) -- [REQUIRED]

        An array of AWS account IDs, or * to make the application public.

        • (string) --
      • StatementId (string) --

        A unique ID for the statement.

Return type

dict

Returns

Response Syntax

{
    'Statements': [
        {
            'Actions': [
                'string',
            ],
            'PrincipalOrgIDs': [
                'string',
            ],
            'Principals': [
                'string',
            ],
            'StatementId': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    Success

    • Statements (list) --

      An array of policy statements applied to the application.

      • (dict) --

        Policy statement applied to the application.

        • Actions (list) --

          For the list of actions supported for this operation, see Application Permissions.

          • (string) --
        • PrincipalOrgIDs (list) --

          An array of PrinciplalOrgIDs, which corresponds to AWS IAM aws:PrincipalOrgID global condition key.

          • (string) --
        • Principals (list) --

          An array of AWS account IDs, or * to make the application public.

          • (string) --
        • StatementId (string) --

          A unique ID for the statement.

Exceptions

  • ServerlessApplicationRepository.Client.exceptions.NotFoundException
  • ServerlessApplicationRepository.Client.exceptions.TooManyRequestsException
  • ServerlessApplicationRepository.Client.exceptions.BadRequestException
  • ServerlessApplicationRepository.Client.exceptions.InternalServerErrorException
  • ServerlessApplicationRepository.Client.exceptions.ForbiddenException