SageMaker / Paginator / DescribeResourceAssociations

DescribeResourceAssociations

class SageMaker.Paginator.DescribeResourceAssociations
paginator = client.get_paginator('describe_resource_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from SageMaker.Client.describe_resource_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    SMCapacityReservationArn='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters:
  • SMCapacityReservationArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the SageMaker Capacity Reservation. The ARN has the format arn:aws:sagemaker:region:account-id:sm-capacity-reservation/smcr-id.

  • PaginationConfig (dict) –

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) –

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) –

      The size of each page.

    • StartingToken (string) –

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type:

dict

Returns:

Response Syntax

{
    'SMCapacityReservationArn': 'string',
    'SMCapacityReservationId': 'string',
    'ResourceAssociations': [
        {
            'HyperPodClusters': {
                'Status': 'Pending'|'Active'|'Inactive',
                'FailureReason': 'string',
                'AssociatedTime': datetime(2015, 1, 1)
            },
            'Endpoints': {
                'MlReservationId': 'string',
                'Status': 'Pending'|'Active'|'Inactive',
                'MatchCriteria': 'Open'|'Targeted',
                'EndpointSharing': 'SingleEndpoint'|'MultipleEndpoints',
                'MlReservationArn': 'string',
                'FailureReason': 'string',
                'AssociatedTime': datetime(2015, 1, 1)
            }
        },
    ],

}

Response Structure

  • (dict) –

    • SMCapacityReservationArn (string) –

      The Amazon Resource Name (ARN) of the SageMaker Capacity Reservation.

    • SMCapacityReservationId (string) –

      The ID of the SageMaker Capacity Reservation. The ID is the last part of the ARN and starts with smcr-.

    • ResourceAssociations (list) –

      The associations between resources in your account and the SageMaker Capacity Reservation. The list is empty when your account has no associations with the reservation.

      • (dict) –

        An association between one type of resource in your account and a SageMaker Capacity Reservation. Each item contains exactly one member.

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: HyperPodClusters, Endpoints. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • HyperPodClusters (dict) –

          The association between the SageMaker AI HyperPod clusters in your account and the SageMaker Capacity Reservation. The association applies to all HyperPod clusters in your account.

          • Status (string) –

            The status of the association. Valid values:

            Pending

            SageMaker AI is adding or removing the association.

            Active

            The resources are associated with the SageMaker Capacity Reservation and can use its instances.

            Inactive

            The resources are not associated with the SageMaker Capacity Reservation.

          • FailureReason (string) –

            The reason that the most recent attempt to add or remove the association failed. This value is returned only when the most recent attempt failed. After a failure to add the association, the status is Inactive. After a failure to remove the association, the status is Active.

          • AssociatedTime (datetime) –

            The time when SageMaker AI started the current association. This time resets when you add the association again after it was removed or after it failed.

        • Endpoints (dict) –

          The association between the SageMaker AI endpoints in your account and the SageMaker Capacity Reservation, through one ML capacity reservation. The response includes one item for each ML capacity reservation.

          • MlReservationId (string) –

            The name of the ML capacity reservation. The name is the last part of the ML capacity reservation ARN.

          • Status (string) –

            The status of the association. Valid values:

            Pending

            SageMaker AI is adding or removing the association.

            Active

            The resources are associated with the SageMaker Capacity Reservation and can use its instances.

            Inactive

            The resources are not associated with the SageMaker Capacity Reservation.

          • MatchCriteria (string) –

            How endpoints in your account match the ML capacity reservation. Valid values:

            Open

            Endpoints in your account use the ML capacity reservation automatically when their instance type matches. You don’t specify the ML capacity reservation ARN when you create the endpoint.

            Targeted

            An endpoint uses the ML capacity reservation only when you specify its ARN when you create or update the endpoint.

          • EndpointSharing (string) –

            Whether one endpoint or multiple endpoints can use the ML capacity reservation. Valid values:

            SingleEndpoint

            Only one endpoint can use the ML capacity reservation.

            MultipleEndpoints

            Multiple endpoints can use the ML capacity reservation.

          • MlReservationArn (string) –

            The Amazon Resource Name (ARN) of the ML capacity reservation. Specify this ARN in CreateEndpointConfig to use the reserved instances for an endpoint. For a new ML capacity reservation, this value is returned when the status is Active.

          • FailureReason (string) –

            The reason that the most recent attempt to add or remove the association failed. This value is returned only when the most recent attempt failed. After a failure to add the association, the status is Inactive. After a failure to remove the association, the status is Active.

          • AssociatedTime (datetime) –

            The time when SageMaker AI started the current association. This time resets when you add the association again after it was removed or after it failed.