ECS / Client / list_service_deployments

list_service_deployments#

ECS.Client.list_service_deployments(**kwargs)#

This operation lists all the service deployments that meet the specified filter criteria.

A service deployment happens when you release a softwre update for the service. You route traffic from the running service revisions to the new service revison and control the number of running tasks.

This API returns the values that you use for the request parameters in DescribeServiceRevisions.

See also: AWS API Documentation

Request Syntax

response = client.list_service_deployments(
    service='string',
    cluster='string',
    status=[
        'PENDING'|'SUCCESSFUL'|'STOPPED'|'STOP_REQUESTED'|'IN_PROGRESS'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_SUCCESSFUL'|'ROLLBACK_FAILED',
    ],
    createdAt={
        'before': datetime(2015, 1, 1),
        'after': datetime(2015, 1, 1)
    },
    nextToken='string',
    maxResults=123
)
Parameters:
  • service (string) –

    [REQUIRED]

    The ARN or name of the service

  • cluster (string) – The cluster that hosts the service. This can either be the cluster name or ARN. Starting April 15, 2023, Amazon Web Services will not onboard new customers to Amazon Elastic Inference (EI), and will help current customers migrate their workloads to options that offer better price and performanceIf you don’t specify a cluster, deault is used.

  • status (list) –

    An optional filter you can use to narrow the results. If you do not specify a status, then all status values are included in the result.

    • (string) –

  • createdAt (dict) –

    An optional filter you can use to narrow the results by the service creation date. If you do not specify a value, the result includes all services created before the current time. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

    • before (datetime) –

      Include service deployments in the result that were created before this time. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

    • after (datetime) –

      Include service deployments in the result that were created after this time. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

  • nextToken (string) – The nextToken value returned from a ListServiceDeployments request indicating that more results are available to fulfill the request and further calls are needed. If you provided maxResults, it’s possible the number of results is fewer than maxResults.

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

Return type:

dict

Returns:

Response Syntax

{
    'serviceDeployments': [
        {
            'serviceDeploymentArn': 'string',
            'serviceArn': 'string',
            'clusterArn': 'string',
            'startedAt': datetime(2015, 1, 1),
            'createdAt': datetime(2015, 1, 1),
            'finishedAt': datetime(2015, 1, 1),
            'targetServiceRevisionArn': 'string',
            'status': 'PENDING'|'SUCCESSFUL'|'STOPPED'|'STOP_REQUESTED'|'IN_PROGRESS'|'ROLLBACK_IN_PROGRESS'|'ROLLBACK_SUCCESSFUL'|'ROLLBACK_FAILED',
            'statusReason': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • serviceDeployments (list) –

      An overview of the service deployment, including the following properties:

      • The ARN of the service deployment.

      • The ARN of the service being deployed.

      • The ARN of the cluster that hosts the service in the service deployment.

      • The time that the service deployment started.

      • The time that the service deployment completed.

      • The service deployment status.

      • Information about why the service deployment is in the current state.

      • The ARN of the service revision that is being deployed.

      • (dict) –

        The service deployment properties that are retured when you call ListServiceDeployments.

        This provides a high-level overview of the service deployment.

        • serviceDeploymentArn (string) –

          The ARN of the service deployment.

        • serviceArn (string) –

          The ARN of the service for this service deployment.

        • clusterArn (string) –

          The ARN of the cluster that hosts the service.

        • startedAt (datetime) –

          The time that the service deployment statred. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

        • createdAt (datetime) –

          The time that the service deployment was created. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

        • finishedAt (datetime) –

          The time that the service deployment completed. The format is yyyy-MM-dd HH:mm:ss.SSSSSS.

        • targetServiceRevisionArn (string) –

          The ARN of the service revision being deplyed.

        • status (string) –

          The status of the service deployment

        • statusReason (string) –

          Information about why the service deployment is in the current status. For example, the circuit breaker detected a deployment failure.

    • nextToken (string) –

      The nextToken value to include in a future ListServiceDeployments request. When the results of a ListServiceDeployments 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

  • ECS.Client.exceptions.AccessDeniedException

  • ECS.Client.exceptions.ClientException

  • ECS.Client.exceptions.InvalidParameterException

  • ECS.Client.exceptions.ServerException

  • ECS.Client.exceptions.ServiceNotFoundException

  • ECS.Client.exceptions.UnsupportedFeatureException