Retrieves the compiled information from a RequestEnvironmentInfo request.
Related Topics
Parameters:
-
environment_id
(Optional[EnvironmentId], default:
None
)
–
The ID of the data's environment.
If no such environment is found, returns an InvalidParameterValue error.
Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, Elastic Beanstalk returns MissingRequiredParameter error.
-
environment_name
(Optional[EnvironmentName], default:
None
)
–
The name of the data's environment.
If no such environment is found, returns an InvalidParameterValue error.
Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, Elastic Beanstalk returns MissingRequiredParameter error.
-
info_type
(EnvironmentInfoType)
–
The type of information to retrieve.
Raises:
Examples:
To retrieve tailed logs
The following operation retrieves a link to logs from an environment named my-env:
>>> await client.retrieve_environment_info(environment_name='my-env', info_type='tail')
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
| async def retrieve_environment_info(
self,
info_type: "capo_elastic_beanstalk.types.environment_info_type.EnvironmentInfoType",
*,
config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = None,
environment_id: Optional[
"capo_elastic_beanstalk.types.environment_id.EnvironmentId"
] = None,
environment_name: Optional[
"capo_elastic_beanstalk.types.environment_name.EnvironmentName"
] = None,
) -> "capo_elastic_beanstalk.types.retrieve_environment_info_result_message.RetrieveEnvironmentInfoResultMessage":
"""<p>Retrieves the compiled information from a <a>RequestEnvironmentInfo</a> request.</p> <p>Related Topics</p> <ul> <li> <p> <a>RequestEnvironmentInfo</a> </p> </li> </ul>
Args:
environment_id: <p>The ID of the data's environment.</p> <p>If no such environment is found, returns an <code>InvalidParameterValue</code> error.</p> <p>Condition: You must specify either this or an EnvironmentName, or both. If you do not specify either, Elastic Beanstalk returns <code>MissingRequiredParameter</code> error.</p>
environment_name: <p>The name of the data's environment.</p> <p> If no such environment is found, returns an <code>InvalidParameterValue</code> error. </p> <p> Condition: You must specify either this or an EnvironmentId, or both. If you do not specify either, Elastic Beanstalk returns <code>MissingRequiredParameter</code> error. </p>
info_type: <p>The type of information to retrieve.</p>
Raises:
capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To retrieve tailed logs
The following operation retrieves a link to logs from an environment named my-env:
>>> await client.retrieve_environment_info(environment_name='my-env', info_type='tail')
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_beanstalk.types.retrieve_environment_info_message.RetrieveEnvironmentInfoMessage]",
) -> AsyncOperationResponse[
"capo_elastic_beanstalk.types.retrieve_environment_info_result_message.RetrieveEnvironmentInfoResultMessage"
]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.retrieve_environment_info
(
output,
http_response,
) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.retrieve_environment_info.async_retrieve_environment_info(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RetrieveEnvironmentInfo")
)
input_: capo_elastic_beanstalk.types.retrieve_environment_info_message.RetrieveEnvironmentInfoMessage = {
"info_type": info_type
}
if environment_id is not None:
input_["environment_id"] = environment_id
if environment_name is not None:
input_["environment_name"] = environment_name
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|