Batch / Client / describe_service_environments

describe_service_environments

Batch.Client.describe_service_environments(**kwargs)

Describes one or more of your service environments.

See also: AWS API Documentation

Request Syntax

response = client.describe_service_environments(
    serviceEnvironments=[
        'string',
    ],
    maxResults=123,
    nextToken='string'
)
Parameters:
  • serviceEnvironments (list) –

    An array of service environment names or ARN entries.

    • (string) –

  • maxResults (integer) – The maximum number of results returned by DescribeServiceEnvironments in paginated output. When this parameter is used, DescribeServiceEnvironments only returns maxResults results in a single page and a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeServiceEnvironments request with the returned nextToken value. This value can be between 1 and 100. If this parameter isn’t used, then DescribeServiceEnvironments returns up to 100 results and a nextToken value if applicable.

  • nextToken (string) –

    The nextToken value returned from a previous paginated DescribeServiceEnvironments request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

    Note

    Treat this token as an opaque identifier that’s only used to retrieve the next items in a list and not for other programmatic purposes.

Return type:

dict

Returns:

Response Syntax

{
    'serviceEnvironments': [
        {
            'serviceEnvironmentName': 'string',
            'serviceEnvironmentArn': 'string',
            'serviceEnvironmentType': 'SAGEMAKER_TRAINING',
            'state': 'ENABLED'|'DISABLED',
            'status': 'CREATING'|'UPDATING'|'DELETING'|'DELETED'|'VALID'|'INVALID',
            'capacityLimits': [
                {
                    'maxCapacity': 123,
                    'capacityUnit': 'string'
                },
            ],
            'tags': {
                'string': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • serviceEnvironments (list) –

      The list of service environments that match the request.

      • (dict) –

        Detailed information about a service environment, including its configuration, state, and capacity limits.

        • serviceEnvironmentName (string) –

          The name of the service environment.

        • serviceEnvironmentArn (string) –

          The Amazon Resource Name (ARN) of the service environment.

        • serviceEnvironmentType (string) –

          The type of service environment. For SageMaker Training jobs, this value is SAGEMAKER_TRAINING.

        • state (string) –

          The state of the service environment. Valid values are ENABLED and DISABLED.

        • status (string) –

          The current status of the service environment.

        • capacityLimits (list) –

          The capacity limits for the service environment. This defines the maximum resources that can be used by service jobs in this environment.

          • (dict) –

            Defines the type and maximum quantity of resources that can be allocated to service jobs in a service environment.

            • maxCapacity (integer) –

              The maximum capacity available for the service environment. For a quota management enabled service environment, this value represents the maximum quantity of a particular resource type (specified by capacityUnit) that can be allocated to service jobs. For other service environments, this value represents the maximum quantity of all resources that can be allocated to service jobs.

              For example, if maxCapacity=50 and capacityUnit=NUM_INSTANCES, you can run up to 50 instances concurrently. If you run 5 SageMaker Training jobs that each use 10 instances, a subsequent job requiring 10 instances waits in the queue until capacity is available. In a quota management enabled service environment with capacityUnit=ml.m5.large, only ml.m5.large instances count against this limit, and jobs requiring other instance types wait until a matching capacity limit is configured.

            • capacityUnit (string) –

              The unit of measure for the capacity limit, which defines how maxCapacity is interpreted. For SAGEMAKER_TRAINING jobs in a quota management enabled service environment, specify the instance type (for example, ml.m5.large). Otherwise, use NUM_INSTANCES.

        • tags (dict) –

          The tags associated with the service environment. Each tag consists of a key and an optional value. For more information, see Tagging your Batch resources.

          • (string) –

            • (string) –

    • nextToken (string) –

      The nextToken value to include in a future DescribeServiceEnvironments request. When the results of a DescribeServiceEnvironments request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

Exceptions

  • Batch.Client.exceptions.ClientException

  • Batch.Client.exceptions.ServerException