Skip to content

get_configuration_profile async

get_configuration_profile(
    application_id: Name,
    configuration_profile_id: LongName,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
) -> ConfigurationProfile

Retrieves information about a configuration profile.

Parameters:

  • application_id (Name) –

    The ID of the application that includes the configuration profile you want to get.

  • configuration_profile_id (LongName) –

    The ID of the configuration profile that you want to get.

Raises:

Examples:

To retrieve configuration profile details The following get-configuration-profile example returns the details of the specified configuration profile.

>>> await client.get_configuration_profile(application_id='339ohji', configuration_profile_id='ur8hx2f')
Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def get_configuration_profile(
    self,
    application_id: "capo_appconfig.types.name.Name",
    configuration_profile_id: "capo_appconfig.types.long_name.LongName",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
) -> "capo_appconfig.types.configuration_profile.ConfigurationProfile":
    """<p>Retrieves information about a configuration profile.</p>

    Args:
        application_id: <p>The ID of the application that includes the configuration profile you want to get.</p>
        configuration_profile_id: <p>The ID of the configuration profile that you want to get.</p>

    Raises:
        capo_appconfig.errors.bad_request_exception.BadRequestException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_appconfig.errors.internal_server_exception.InternalServerException: <p>There was an internal failure in the AppConfig service.</p>
        capo_appconfig.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_appconfig.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To retrieve configuration profile details
        The following get-configuration-profile example returns the details of the specified configuration profile.

        >>> await client.get_configuration_profile(application_id='339ohji', configuration_profile_id='ur8hx2f')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_appconfig.types.get_configuration_profile_request.GetConfigurationProfileRequest]",
    ) -> AsyncOperationResponse[
        "capo_appconfig.types.configuration_profile.ConfigurationProfile"
    ]:
        import capo_appconfig._operations.amazon_app_config.get_configuration_profile

        (
            output,
            http_response,
        ) = await capo_appconfig._operations.amazon_app_config.get_configuration_profile.async_get_configuration_profile(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_output(
        output: "capo_appconfig.types.configuration_profile.ConfigurationProfile",
    ) -> dict[str, Any]:
        import capo_appconfig.types.configuration_profile

        return capo_appconfig.types.configuration_profile.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("GetConfigurationProfile", redact_output=_redact_output),
    )
    input_: capo_appconfig.types.get_configuration_profile_request.GetConfigurationProfileRequest = {
        "application_id": application_id,
        "configuration_profile_id": configuration_profile_id,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output