Lists the platform branches available for your account in an Amazon Web Services Region. Provides summary information about each platform branch.
For definitions of platform branch and other platform-related terms, see Elastic Beanstalk Platforms Glossary.
This action only returns information about resources that the calling principle has IAM permissions to access. For example, consider a case where a user only has permission to access one of three resources. When the user calls the this action, the response will only include the one resource that the user has permission to access instead of all three resources. If the user doesn’t have access to any of the resources an empty result is returned.
The AWSElasticBeanstalkReadOnly managed policy allows operators to view information about resources related to Elastic Beanstalk. For more information, see Managing Elastic Beanstalk user policies in the Elastic Beanstalk Developer Guide. For detailed instructions to attach a policy to a user or group, see the section Controlling access with managed policies in the same topic.
Parameters:
-
filters
(Optional[SearchFilters], default:
None
)
–
Criteria for restricting the resulting list of platform branches. The filter is evaluated as a logical conjunction (AND) of the separate SearchFilter terms.
The following list shows valid attribute values for each of the SearchFilter terms. Most operators take a single value. The in and not_in operators can take multiple values.
Array size: limited to 10 SearchFilter objects.
Within each SearchFilter item, the Values array is limited to 10 items.
-
max_records
(Optional[PlatformBranchMaxRecords], default:
None
)
–
The maximum number of platform branch values returned in one call.
-
next_token
(Optional[Token], default:
None
)
–
For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.
If no NextToken is specified, the first page is retrieved.
Raises:
Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
| def list_platform_branches(
self,
*,
config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
filters: Optional[
"capo_elastic_beanstalk.types.search_filters.SearchFilters"
] = None,
max_records: Optional[
"capo_elastic_beanstalk.types.platform_branch_max_records.PlatformBranchMaxRecords"
] = None,
next_token: Optional["capo_elastic_beanstalk.types.token.Token"] = None,
) -> "capo_elastic_beanstalk.types.list_platform_branches_result.ListPlatformBranchesResult":
"""<p>Lists the platform branches available for your account in an Amazon Web Services Region. Provides summary information about each platform branch.</p> <p>For definitions of platform branch and other platform-related terms, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/platforms-glossary.html">Elastic Beanstalk Platforms Glossary</a>.</p> <p>This action only returns information about resources that the calling principle has IAM permissions to access. For example, consider a case where a user only has permission to access one of three resources. When the user calls the this action, the response will only include the one resource that the user has permission to access instead of all three resources. If the user doesn’t have access to any of the resources an empty result is returned.</p> <note> <p>The <a href="https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AWSElasticBeanstalkReadOnly.html">AWSElasticBeanstalkReadOnly</a> managed policy allows operators to view information about resources related to Elastic Beanstalk. For more information, see <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.managed-policies.html"> Managing Elastic Beanstalk user policies</a> in the <i>Elastic Beanstalk Developer Guide</i>. For detailed instructions to attach a policy to a user or group, see the section <a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.iam.managed-policies.html#iam-userpolicies-managed"> Controlling access with managed policies</a> in the same topic.</p> </note>
Args:
filters: <p>Criteria for restricting the resulting list of platform branches. The filter is evaluated as a logical conjunction (AND) of the separate <code>SearchFilter</code> terms.</p> <p>The following list shows valid attribute values for each of the <code>SearchFilter</code> terms. Most operators take a single value. The <code>in</code> and <code>not_in</code> operators can take multiple values.</p> <ul> <li> <p> <code>Attribute = BranchName</code>:</p> <ul> <li> <p> <code>Operator</code>: <code>=</code> | <code>!=</code> | <code>begins_with</code> | <code>ends_with</code> | <code>contains</code> | <code>in</code> | <code>not_in</code> </p> </li> </ul> </li> <li> <p> <code>Attribute = LifecycleState</code>:</p> <ul> <li> <p> <code>Operator</code>: <code>=</code> | <code>!=</code> | <code>in</code> | <code>not_in</code> </p> </li> <li> <p> <code>Values</code>: <code>beta</code> | <code>supported</code> | <code>deprecated</code> | <code>retired</code> </p> </li> </ul> </li> <li> <p> <code>Attribute = PlatformName</code>:</p> <ul> <li> <p> <code>Operator</code>: <code>=</code> | <code>!=</code> | <code>begins_with</code> | <code>ends_with</code> | <code>contains</code> | <code>in</code> | <code>not_in</code> </p> </li> </ul> </li> <li> <p> <code>Attribute = TierType</code>:</p> <ul> <li> <p> <code>Operator</code>: <code>=</code> | <code>!=</code> </p> </li> <li> <p> <code>Values</code>: <code>WebServer/Standard</code> | <code>Worker/SQS/HTTP</code> </p> </li> </ul> </li> </ul> <p>Array size: limited to 10 <code>SearchFilter</code> objects.</p> <p>Within each <code>SearchFilter</code> item, the <code>Values</code> array is limited to 10 items.</p>
max_records: <p>The maximum number of platform branch values returned in one call.</p>
next_token: <p>For a paginated request. Specify a token from a previous response page to retrieve the next response page. All other parameter values must be identical to the ones specified in the initial request.</p> <p>If no <code>NextToken</code> is specified, the first page is retrieved.</p>
Raises:
capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_elastic_beanstalk.types.list_platform_branches_request.ListPlatformBranchesRequest]",
) -> OperationResponse[
"capo_elastic_beanstalk.types.list_platform_branches_result.ListPlatformBranchesResult"
]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.list_platform_branches
output, http_response = (
capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.list_platform_branches.list_platform_branches(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("ListPlatformBranches")
)
input_: capo_elastic_beanstalk.types.list_platform_branches_request.ListPlatformBranchesRequest = {}
if filters is not None:
input_["filters"] = filters
if max_records is not None:
input_["max_records"] = max_records
if next_token is not None:
input_["next_token"] = next_token
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|