describe_capacity_providers
async
¶
describe_capacity_providers(
*,
config_overrides: Optional[AsyncECSClientConfig] = 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.
>>> await client.describe_capacity_providers()
To describe a specific capacity provider
This example retrieves details about the capacity provider MyCapacityProvider
>>> await client.describe_capacity_providers(capacity_providers=['MyCapacityProvider'], include=['TAGS'])
Source code in docs_src/capo_ecs/_services/async_ecs.py
1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 | |