NetworkManager / Client / list_contexts

list_contexts

NetworkManager.Client.list_contexts(**kwargs)

Returns the context entries of a context store, and the version of the context entries. To get the context entries that were added or removed after this version, specify the returned VersionId in a ListContextChanges request. The context store must be in the AVAILABLE state.

See also: AWS API Documentation

Request Syntax

response = client.list_contexts(
    ContextStoreId='string',
    MaxResults=123,
    NextToken='string'
)
Parameters:
  • ContextStoreId (string) –

    [REQUIRED]

    The ID of the context store.

  • MaxResults (integer) – The maximum number of results to return.

  • NextToken (string) – The token for the next page of results.

Return type:

dict

Returns:

Response Syntax

{
    'Contexts': [
        {
            'ContextId': 'string',
            'ContextType': 'string',
            'SegmentType': 'string',
            'PublicId': 'string',
            'Region': 'string',
            'AvailabilityZone': 'string',
            'AttachmentType': 'string'
        },
    ],
    'NextToken': 'string',
    'VersionId': 'string'
}

Response Structure

  • (dict) –

    • Contexts (list) –

      The context entries.

      • (dict) –

        Describes a context entry in a context store. A context entry describes a resource, such as a security group, subnet, or attachment.

        • ContextId (string) –

          The ID of the context entry.

        • ContextType (string) –

          The type of the context entry, for example SegmentId, Subnet, or Attachment.

        • SegmentType (string) –

          The type of the segment, for example SecurityGroup. Network Manager returns this value only when the context type is SegmentId.

        • PublicId (string) –

          The ID of the resource, for example a security group ID, subnet ID, or transit gateway attachment ID.

        • Region (string) –

          The Amazon Web Services Region of the resource.

        • AvailabilityZone (string) –

          The ID of the Availability Zone of the resource, for example use1-az2. Network Manager returns this value only when the context type is Subnet.

        • AttachmentType (string) –

          The type of the attachment, for example VPC. Network Manager returns this value only when the context type is Attachment.

    • NextToken (string) –

      The token for the next page of results.

    • VersionId (string) –

      The version of the returned context entries. All pages of the same request return the same version.

Exceptions

  • NetworkManager.Client.exceptions.ValidationException

  • NetworkManager.Client.exceptions.AccessDeniedException

  • NetworkManager.Client.exceptions.ResourceNotFoundException

  • NetworkManager.Client.exceptions.ThrottlingException

  • NetworkManager.Client.exceptions.InternalServerException