Retrieve a list of application versions.
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:
-
application_name
(Optional[ApplicationName], default:
None
)
–
Specify an application name to show only application versions for that application.
-
version_labels
(Optional[VersionLabelsList], default:
None
)
–
Specify a version label to show a specific application version.
-
max_records
(Optional[MaxRecords], default:
None
)
–
For a paginated request. Specify a maximum number of application versions to include in each response.
If no MaxRecords is specified, all available application versions are retrieved in a single response.
-
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:
Examples:
To view information about an application version
The following operation retrieves information about an application version labeled v2:
>>> await client.describe_application_versions(application_name='my-app', version_labels=['v2'])
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
| async def describe_application_versions(
self,
*,
config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
application_name: Optional[
"capo_elastic_beanstalk.types.application_name.ApplicationName"
] = None,
version_labels: Optional[
"capo_elastic_beanstalk.types.version_labels_list.VersionLabelsList"
] = None,
max_records: Optional[
"capo_elastic_beanstalk.types.max_records.MaxRecords"
] = None,
next_token: Optional["capo_elastic_beanstalk.types.token.Token"] = None,
) -> "capo_elastic_beanstalk.types.application_version_descriptions_message.ApplicationVersionDescriptionsMessage":
"""<p>Retrieve a list of application versions.</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:
application_name: <p>Specify an application name to show only application versions for that application.</p>
version_labels: <p>Specify a version label to show a specific application version.</p>
max_records: <p>For a paginated request. Specify a maximum number of application versions to include in each response.</p> <p>If no <code>MaxRecords</code> is specified, all available application versions are retrieved in a single response.</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.
Examples:
To view information about an application version
The following operation retrieves information about an application version labeled v2:
>>> await client.describe_application_versions(application_name='my-app', version_labels=['v2'])
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_beanstalk.types.describe_application_versions_message.DescribeApplicationVersionsMessage]",
) -> AsyncOperationResponse[
"capo_elastic_beanstalk.types.application_version_descriptions_message.ApplicationVersionDescriptionsMessage"
]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.describe_application_versions
(
output,
http_response,
) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.describe_application_versions.async_describe_application_versions(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeApplicationVersions")
)
input_: capo_elastic_beanstalk.types.describe_application_versions_message.DescribeApplicationVersionsMessage = {}
if application_name is not None:
input_["application_name"] = application_name
if version_labels is not None:
input_["version_labels"] = version_labels
if max_records is not None:
input_["max_records"] = max_records
if next_token is not None:
input_["next_token"] = next_token
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|