list_service_deployments
async
¶
list_service_deployments(
service: String,
*,
config_overrides: Optional[AsyncECSClientConfig] = None,
cluster: Optional[String] = None,
status: Optional[ServiceDeploymentStatusList] = None,
created_at: Optional[CreatedAt] = None,
next_token: Optional[String] = None,
max_results: Optional[BoxedInteger] = None,
) -> ListServiceDeploymentsResponse
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.
Parameters:
-
service(String) –The ARN or name of the service
-
cluster(Optional[String], default:None) –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,
defaultis used. -
status(Optional[ServiceDeploymentStatusList], default:None) –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.
-
created_at(Optional[CreatedAt], default:None) –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.
-
next_token(Optional[String], default:None) –The
nextTokenvalue returned from aListServiceDeploymentsrequest indicating that more results are available to fulfill the request and further calls are needed. If you providedmaxResults, it's possible the number of results is fewer thanmaxResults. -
max_results(Optional[BoxedInteger], default:None) –The maximum number of service deployment results that
ListServiceDeploymentsreturned in paginated output. When this parameter is used,ListServiceDeploymentsonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherListServiceDeploymentsrequest with the returnednextTokenvalue. This value can be between 1 and 100. If this parameter isn't used, thenListServiceDeploymentsreturns up to 20 results and anextTokenvalue if applicable.
Raises:
-
AccessDeniedException–You don't have authorization to perform the requested action.
-
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.
-
ClusterNotFoundException–The specified cluster wasn't found. You can view your available clusters with ListClusters. Amazon ECS clusters are Region specific.
-
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.
-
ServerException–These errors are usually caused by a server issue.
-
ServiceNotFoundException–The specified service wasn't found. You can view your available services with ListServices. Amazon ECS services are cluster specific and Region specific.
-
UnsupportedFeatureException–The specified task isn't supported in this Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To list service deployments that meet the specified criteria This example lists all successful service deployments for the service "sd-example" in the cluster "example".
>>> await client.list_service_deployments(service='sd-example', cluster='example', status=['SUCCESSFUL'])
Source code in docs_src/capo_ecs/_services/async_ecs.py
4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 4961 4962 4963 4964 | |