쿠키 기본 설정 선택

당사는 사이트와 서비스를 제공하는 데 필요한 필수 쿠키 및 유사한 도구를 사용합니다. 고객이 사이트를 어떻게 사용하는지 파악하고 개선할 수 있도록 성능 쿠키를 사용해 익명의 통계를 수집합니다. 필수 쿠키는 비활성화할 수 없지만 '사용자 지정' 또는 ‘거부’를 클릭하여 성능 쿠키를 거부할 수 있습니다.

사용자가 동의하는 경우 AWS와 승인된 제3자도 쿠키를 사용하여 유용한 사이트 기능을 제공하고, 사용자의 기본 설정을 기억하고, 관련 광고를 비롯한 관련 콘텐츠를 표시합니다. 필수가 아닌 모든 쿠키를 수락하거나 거부하려면 ‘수락’ 또는 ‘거부’를 클릭하세요. 더 자세한 내용을 선택하려면 ‘사용자 정의’를 클릭하세요.

ListServiceDeployments

포커스 모드
ListServiceDeployments - Amazon Elastic Container Service
이 페이지는 귀하의 언어로 번역되지 않았습니다. 번역 요청

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

A service deployment happens when you release a software 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.

Request Syntax

{ "cluster": "string", "createdAt": { "after": number, "before": number }, "maxResults": number, "nextToken": "string", "service": "string", "status": [ "string" ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

cluster

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 performance. If you don't specify a cluster, default is used.

Type: String

Required: No

createdAt

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.

Type: CreatedAt object

Required: No

maxResults

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.

Type: Integer

Required: No

nextToken

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.

Type: String

Required: No

service

The ARN or name of the service

Type: String

Required: Yes

status

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.

Type: Array of strings

Valid Values: PENDING | SUCCESSFUL | STOPPED | STOP_REQUESTED | IN_PROGRESS | ROLLBACK_IN_PROGRESS | ROLLBACK_SUCCESSFUL | ROLLBACK_FAILED

Required: No

Response Syntax

{ "nextToken": "string", "serviceDeployments": [ { "clusterArn": "string", "createdAt": number, "finishedAt": number, "serviceArn": "string", "serviceDeploymentArn": "string", "startedAt": number, "status": "string", "statusReason": "string", "targetServiceRevisionArn": "string" } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

nextToken

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.

Type: String

serviceDeployments

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.

Type: Array of ServiceDeploymentBrief objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You don't have authorization to perform the requested action.

HTTP Status Code: 400

ClientException

These errors are usually caused by a client action. This client action might be using an action or resource on behalf of a user that doesn't have permissions to use the action or resource. Or, it might be specifying an identifier that isn't valid.

The following list includes additional causes for the error:

  • The RunTask could not be processed because you use managed scaling and there is a capacity error because the quota of tasks in the PROVISIONING per cluster has been reached. For information about the service quotas, see Amazon ECS service quotas.

HTTP Status Code: 400

InvalidParameterException

The specified parameter isn't valid. Review the available parameters for the API request.

For more information about service event errors, see Amazon ECS service event messages.

HTTP Status Code: 400

ServerException

These errors are usually caused by a server issue.

HTTP Status Code: 500

ServiceNotFoundException

The specified service wasn't found. You can view your available services with ListServices. Amazon ECS services are cluster specific and Region specific.

HTTP Status Code: 400

UnsupportedFeatureException

The specified task isn't supported in this Region.

HTTP Status Code: 400

Examples

Example

This example request lists the service deployments for the sd-example service on the example cluster.

Sample Request

POST / HTTP/1.1 Host: ecs.us-west-2.amazonaws.com Accept-Encoding: identity Content-Length: 55 X-Amz-Target: AmazonEC2ContainerServiceV20141113.DescribeServiceDeployments X-Amz-Date: 20150528T163859Z User-Agent: aws-cli/2.17 Python/3.11.9 Darwin/14.3.0 Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "cluster": "example", "service": "sd-example" }

Sample Response

HTTP/1.1 200 OK Server: Server Date: Tue, 10 Sep 2024 18:50:14 GMT Content-Type: application/x-amz-json-1.1 Content-Length: 220 Connection: keep-alive RequestId: 360c5551-123e-4e74-9914-7582d3a28807 { "serviceDeployments": [ { "serviceDeploymentArn": "arn:aws:ecs:us-west-2:123456789012:service-deployment/example/sd-example/NCWGC2ZR-taawPAYrIaU5", "serviceArn": "arn:aws:ecs:us-west-2:123456789012:service/example/sd-example", "clusterArn": "arn:aws:ecs:us-west-2:123456789012:cluster/example", "targetServiceRevisionArn": "arn:aws:ecs:us-west-2:123456789012:service-revision/example/sd-example/4980306466373577095", "status": "SUCCESSFUL" } ] }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following:

이 페이지에서

프라이버시사이트 이용 약관쿠키 기본 설정
© 2025, Amazon Web Services, Inc. 또는 계열사. All rights reserved.