GlobalAccelerator / Client / create_cross_account_attachment

create_cross_account_attachment#

GlobalAccelerator.Client.create_cross_account_attachment(**kwargs)#

Create a cross-account attachment in Global Accelerator. You create a cross-account attachment to specify the principals who have permission to add to accelerators in their own account the resources in your account that you also list in the attachment.

A principal can be an Amazon Web Services account number or the Amazon Resource Name (ARN) for an accelerator. For account numbers that are listed as principals, to add a resource listed in the attachment to an accelerator, you must sign in to an account specified as a principal. Then you can add the resources that are listed to any of your accelerators. If an accelerator ARN is listed in the cross-account attachment as a principal, anyone with permission to make updates to the accelerator can add as endpoints resources that are listed in the attachment.

See also: AWS API Documentation

Request Syntax

response = client.create_cross_account_attachment(
    Name='string',
    Principals=[
        'string',
    ],
    Resources=[
        {
            'EndpointId': 'string',
            'Region': 'string'
        },
    ],
    IdempotencyToken='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters:
  • Name (string) –

    [REQUIRED]

    The name of the cross-account attachment.

  • Principals (list) –

    The principals to list in the cross-account attachment. A principal can be an Amazon Web Services account number or the Amazon Resource Name (ARN) for an accelerator.

    • (string) –

  • Resources (list) –

    The Amazon Resource Names (ARNs) for the resources to list in the cross-account attachment. A resource can be any supported Amazon Web Services resource type for Global Accelerator.

    • (dict) –

      An Amazon Web Services resource that is supported by Global Accelerator and can be added as an endpoint for an accelerator.

      • EndpointId (string) – [REQUIRED]

        The endpoint ID for the endpoint (Amazon Web Services resource).

      • Region (string) –

        The Amazon Web Services Region where a resource is located.

  • IdempotencyToken (string) –

    [REQUIRED]

    A unique, case-sensitive identifier that you provide to ensure the idempotency—that is, the uniqueness—of the request.

    This field is autopopulated if not provided.

  • Tags (list) –

    Create tags for cross-account attachment.

    For more information, see Tagging in Global Accelerator in the Global Accelerator Developer Guide.

    • (dict) –

      A complex type that contains a Tag key and Tag value.

      • Key (string) – [REQUIRED]

        A string that contains a Tag key.

      • Value (string) – [REQUIRED]

        A string that contains a Tag value.

Return type:

dict

Returns:

Response Syntax

{
    'CrossAccountAttachment': {
        'AttachmentArn': 'string',
        'Name': 'string',
        'Principals': [
            'string',
        ],
        'Resources': [
            {
                'EndpointId': 'string',
                'Region': 'string'
            },
        ],
        'LastModifiedTime': datetime(2015, 1, 1),
        'CreatedTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • CrossAccountAttachment (dict) –

      Information about the cross-account attachment.

      • AttachmentArn (string) –

        The Amazon Resource Name (ARN) of the cross-account attachment.

      • Name (string) –

        The name of the cross-account attachment.

      • Principals (list) –

        The principals included in the cross-account attachment.

        • (string) –

      • Resources (list) –

        The resources included in the cross-account attachment.

        • (dict) –

          An Amazon Web Services resource that is supported by Global Accelerator and can be added as an endpoint for an accelerator.

          • EndpointId (string) –

            The endpoint ID for the endpoint (Amazon Web Services resource).

          • Region (string) –

            The Amazon Web Services Region where a resource is located.

      • LastModifiedTime (datetime) –

        The date and time that the cross-account attachment was last modified.

      • CreatedTime (datetime) –

        The date and time that the cross-account attachment was created.

Exceptions

  • GlobalAccelerator.Client.exceptions.InternalServiceErrorException

  • GlobalAccelerator.Client.exceptions.InvalidArgumentException

  • GlobalAccelerator.Client.exceptions.LimitExceededException

  • GlobalAccelerator.Client.exceptions.AccessDeniedException

  • GlobalAccelerator.Client.exceptions.TransactionInProgressException