DescribeServiceRevisions - Amazon Elastic Container Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

DescribeServiceRevisions

Describes one or more service revisions.

A service revision is a version of the service that includes the values for the Amazon ECS resources (for example, task definition) and the environment resources (for example, load balancers, subnets, and security groups). For more information, see Amazon ECS service revisions.

You can't describe a service revision that was created before October 25, 2024.

Request Syntax

{ "serviceRevisionArns": [ "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.

serviceRevisionArns

The ARN of the service revision.

You can specify a maximum of 20 ARNs.

You can call ListServiceDeployments to get the ARNs.

Type: Array of strings

Required: Yes

Response Syntax

{ "failures": [ { "arn": "string", "detail": "string", "reason": "string" } ], "serviceRevisions": [ { "capacityProviderStrategy": [ { "base": number, "capacityProvider": "string", "weight": number } ], "clusterArn": "string", "containerImages": [ { "containerName": "string", "image": "string", "imageDigest": "string" } ], "createdAt": number, "fargateEphemeralStorage": { "kmsKeyId": "string" }, "guardDutyEnabled": boolean, "launchType": "string", "loadBalancers": [ { "containerName": "string", "containerPort": number, "loadBalancerName": "string", "targetGroupArn": "string" } ], "networkConfiguration": { "awsvpcConfiguration": { "assignPublicIp": "string", "securityGroups": [ "string" ], "subnets": [ "string" ] } }, "platformFamily": "string", "platformVersion": "string", "serviceArn": "string", "serviceConnectConfiguration": { "enabled": boolean, "logConfiguration": { "logDriver": "string", "options": { "string" : "string" }, "secretOptions": [ { "name": "string", "valueFrom": "string" } ] }, "namespace": "string", "services": [ { "clientAliases": [ { "dnsName": "string", "port": number } ], "discoveryName": "string", "ingressPortOverride": number, "portName": "string", "timeout": { "idleTimeoutSeconds": number, "perRequestTimeoutSeconds": number }, "tls": { "issuerCertificateAuthority": { "awsPcaAuthorityArn": "string" }, "kmsKey": "string", "roleArn": "string" } } ] }, "serviceRegistries": [ { "containerName": "string", "containerPort": number, "port": number, "registryArn": "string" } ], "serviceRevisionArn": "string", "taskDefinition": "string", "volumeConfigurations": [ { "managedEBSVolume": { "encrypted": boolean, "filesystemType": "string", "iops": number, "kmsKeyId": "string", "roleArn": "string", "sizeInGiB": number, "snapshotId": "string", "tagSpecifications": [ { "propagateTags": "string", "resourceType": "string", "tags": [ { "key": "string", "value": "string" } ] } ], "throughput": number, "volumeType": "string" }, "name": "string" } ], "vpcLatticeConfigurations": [ { "portName": "string", "roleArn": "string", "targetGroupArn": "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.

failures

Any failures associated with the call.

Type: Array of Failure objects

serviceRevisions

The list of service revisions described.

Type: Array of ServiceRevision 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

ClusterNotFoundException

The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.

HTTP Status Code: 400

InvalidParameterException

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

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 provides a full description of the service revision with the ARN arn:aws:ecs:us-west-2:123456789012:service-revision/testc/sd1/4980306466373577095.

Sample Request

POST / HTTP/1.1 Host: ecs.us-west-2.amazonaws.com Accept-Encoding: identity Content-Length: 55 X-Amz-Target: AmazonEC2ContainerServiceV20141113.DescribeServiceRevisions 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 { "serviceRevisionArn": "arn:aws:ecs:us-west-2:123456789012:service-revision/testc/sd1/4980306466373577095" }

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 { "serviceRevisions": [ { "serviceRevisionArn": "arn:aws:ecs:us-west-2:123456789012:service-revision/example/sd-example/4980306466373577095", "serviceArn": "arn:aws:ecs:us-west-2:123456789012:service/example/sd-example", "clusterArn": "arn:aws:ecs:us-west-2:123456789012:cluster/example", "taskDefinition": "arn:aws:ecs:us-west-2:123456789012:task-definition/large-ngingx:1", "launchType": "FARGATE", "platformVersion": "1.4.0", "platformFamily": "DockerLinux", "networkConfiguration": { "awsvpcConfiguration": { "subnets": [ "subnet-0a4040e73895f04e1" ], "securityGroups": [ "sg-09605d60a6bc1b296" ], "assignPublicIp": "ENABLED" } }, "createdAt": "2024-09-10T16:49:26.388000+00:00" } ], "failures": [] } ], "failures": [] }

See Also

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