Skip to content

get_enabled_control async

get_enabled_control(
    enabled_control_identifier: Arn,
    *,
    config_overrides: Optional[AsyncControlTowerClientConfig] = None,
) -> GetEnabledControlOutput

Retrieves details about an enabled control. For usage examples, see the Controls Reference Guide .

Parameters:

  • enabled_control_identifier (Arn) –

    The controlIdentifier of the enabled control.

Raises:

Source code in docs_src/capo_controltower/_services/async_control_tower.py
async def get_enabled_control(
    self,
    enabled_control_identifier: "capo_controltower.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncControlTowerClientConfig] = None,
) -> "capo_controltower.types.get_enabled_control_output.GetEnabledControlOutput":
    """<p>Retrieves details about an enabled control. For usage examples, see the <a href="https://docs.aws.amazon.com/controltower/latest/controlreference/control-api-examples-short.html"> <i>Controls Reference Guide</i> </a>.</p>

    Args:
        enabled_control_identifier: <p>The <code>controlIdentifier</code> of the enabled control.</p>

    Raises:
        capo_controltower.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_controltower.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during processing of a request.</p>
        capo_controltower.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request references a resource that does not exist.</p>
        capo_controltower.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_controltower.errors.validation_exception.ValidationException: <p>The input does not satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_controltower.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_controltower.types.get_enabled_control_input.GetEnabledControlInput]",
    ) -> AsyncOperationResponse[
        "capo_controltower.types.get_enabled_control_output.GetEnabledControlOutput"
    ]:
        import capo_controltower._operations.aws_control_tower_apis.get_enabled_control

        (
            output,
            http_response,
        ) = await capo_controltower._operations.aws_control_tower_apis.get_enabled_control.async_get_enabled_control(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetEnabledControl")
    )
    input_: capo_controltower.types.get_enabled_control_input.GetEnabledControlInput = {
        "enabled_control_identifier": enabled_control_identifier
    }

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