Skip to content

retrieve_environment_info

retrieve_environment_info(
    info_type: EnvironmentInfoType,
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
    environment_id: Optional[EnvironmentId] = None,
    environment_name: Optional[EnvironmentName] = None,
) -> RetrieveEnvironmentInfoResultMessage

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:

>>> client.retrieve_environment_info(environment_name='my-env', info_type='tail')
Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
def retrieve_environment_info(
    self,
    info_type: "capo_elastic_beanstalk.types.environment_info_type.EnvironmentInfoType",
    *,
    config_overrides: Optional[ElasticBeanstalkClientConfig] = 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:

        >>> client.retrieve_environment_info(environment_name='my-env', info_type='tail')
    """

    def _handler(
        req: "OperationRequest[capo_elastic_beanstalk.types.retrieve_environment_info_message.RetrieveEnvironmentInfoMessage]",
    ) -> OperationResponse[
        "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 = (
            capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.retrieve_environment_info.retrieve_environment_info(
                req.options, req.input
            )
        )
        return OperationResponse(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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output