describe_capacity_providers
¶
describe_capacity_providers(
*,
config_overrides: Optional[ECSClientConfig] = None,
capacity_providers: Optional[StringList] = None,
cluster: Optional[String] = None,
include: Optional[CapacityProviderFieldList] = None,
max_results: Optional[BoxedInteger] = None,
next_token: Optional[String] = None,
) -> DescribeCapacityProvidersResponse
Describes one or more of your capacity providers.
Parameters:
-
capacity_providers(Optional[StringList], default:None) –The short name or full Amazon Resource Name (ARN) of one or more capacity providers. Up to
100capacity providers can be described in an action. -
cluster(Optional[String], default:None) –The name of the cluster to describe capacity providers for. When specified, only capacity providers associated with this cluster are returned, including Amazon ECS Managed Instances capacity providers.
-
include(Optional[CapacityProviderFieldList], default:None) –Specifies whether or not you want to see the resource tags for the capacity provider. If
TAGSis specified, the tags are included in the response. If this field is omitted, tags aren't included in the response. -
max_results(Optional[BoxedInteger], default:None) –The maximum number of account setting results returned by
DescribeCapacityProvidersin paginated output. When this parameter is used,DescribeCapacityProvidersonly returnsmaxResultsresults in a single page along with anextTokenresponse element. The remaining results of the initial request can be seen by sending anotherDescribeCapacityProvidersrequest with the returnednextTokenvalue. This value can be between 1 and 10. If this parameter is not used, thenDescribeCapacityProvidersreturns up to 10 results and anextTokenvalue if applicable. -
next_token(Optional[String], default:None) –The
nextTokenvalue returned from a previous paginatedDescribeCapacityProvidersrequest wheremaxResultswas used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned thenextTokenvalue.This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.
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.
-
UnsupportedFeatureException–The specified task isn't supported in this Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To describe all capacity providers This example retrieves details about all capacity providers.
>>> client.describe_capacity_providers()
To describe a specific capacity provider
This example retrieves details about the capacity provider MyCapacityProvider
Source code in docs_src/capo_ecs/_services/ecs.py
1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 | |