SageMaker / Paginator / GetCapacityReservationUsage

GetCapacityReservationUsage

class SageMaker.Paginator.GetCapacityReservationUsage
paginator = client.get_paginator('get_capacity_reservation_usage')
paginate(**kwargs)

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

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

{
    'SMCapacityReservationId': 'string',
    'TotalInstanceCount': 123,
    'AvailableInstanceCount': 123,
    'LastRefreshTime': datetime(2015, 1, 1),
    'InstanceUsageSet': [
        {
            'AccountId': 'string',
            'InUseInstanceCount': 123,
            'ResourcesUsage': [
                {
                    'ResourceType': 'HyperPodClusters'|'Endpoints',
                    'InUseInstanceCount': 123
                },
            ]
        },
    ],

}

Response Structure

  • (dict) –

    • SMCapacityReservationId (string) –

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

    • TotalInstanceCount (integer) –

      The number of instances in the SageMaker Capacity Reservation.

    • AvailableInstanceCount (integer) –

      The number of instances in the SageMaker Capacity Reservation that are not in use.

    • LastRefreshTime (datetime) –

      The time when SageMaker AI last refreshed the usage counts in this response.

    • InstanceUsageSet (list) –

      The instance usage for each account that uses instances from the SageMaker Capacity Reservation, sorted by account ID. Each account appears at most once across all pages. The list is empty when no instances are in use.

      • (dict) –

        The instances from a SageMaker Capacity Reservation that one account uses.

        • AccountId (string) –

          The ID of the Amazon Web Services account that uses the instances.

        • InUseInstanceCount (integer) –

          The number of instances that the account uses, across all resource types.

        • ResourcesUsage (list) –

          The instance usage for each resource type that has instances in use in the account.

          • (dict) –

            The instances from a SageMaker Capacity Reservation that one resource type uses in an account.

            • ResourceType (string) –

              The type of resource that uses the instances. Valid values:

              HyperPodClusters

              SageMaker AI HyperPod clusters.

              Endpoints

              SageMaker AI endpoints.

            • InUseInstanceCount (integer) –

              The number of instances from the SageMaker Capacity Reservation that are in use.