Skip to content

list_enabled_baselines

list_enabled_baselines(
    *,
    config_overrides: Optional[ControlTowerClientConfig] = None,
    filter: Optional[EnabledBaselineFilter] = None,
    next_token: Optional[ListEnabledBaselinesNextToken] = None,
    max_results: Optional[ListEnabledBaselinesMaxResults] = None,
    include_children: Optional[bool] = None,
) -> ListEnabledBaselinesOutput

Returns a list of summaries describing EnabledBaseline resources. You can filter the list by the corresponding Baseline or Target of the EnabledBaseline resources. For usage examples, see the Amazon Web Services Control Tower User Guide .

Parameters:

  • filter (Optional[EnabledBaselineFilter], default: None ) –

    A filter applied on the ListEnabledBaseline operation. Allowed filters are baselineIdentifiers and targetIdentifiers. The filter can be applied for either, or both.

  • next_token (Optional[ListEnabledBaselinesNextToken], default: None ) –

    A pagination token.

  • max_results (Optional[ListEnabledBaselinesMaxResults], default: None ) –

    The maximum number of results to be shown.

  • include_children (Optional[bool], default: None ) –

    A value that can be set to include the child enabled baselines in responses. The default value is false.

Raises:

Source code in docs_src/capo_controltower/_services/control_tower.py
def list_enabled_baselines(
    self,
    *,
    config_overrides: Optional[ControlTowerClientConfig] = None,
    filter: Optional[
        "capo_controltower.types.enabled_baseline_filter.EnabledBaselineFilter"
    ] = None,
    next_token: Optional[
        "capo_controltower.types.list_enabled_baselines_next_token.ListEnabledBaselinesNextToken"
    ] = None,
    max_results: Optional[
        "capo_controltower.types.list_enabled_baselines_max_results.ListEnabledBaselinesMaxResults"
    ] = None,
    include_children: Optional[bool] = None,
) -> "capo_controltower.types.list_enabled_baselines_output.ListEnabledBaselinesOutput":
    """<p>Returns a list of summaries describing <code>EnabledBaseline</code> resources. You can filter the list by the corresponding <code>Baseline</code> or <code>Target</code> of the <code>EnabledBaseline</code> resources. For usage examples, see <a href="https://docs.aws.amazon.com/controltower/latest/userguide/baseline-api-examples.html"> <i>the Amazon Web Services Control Tower User Guide</i> </a>.</p>

    Args:
        filter: <p>A filter applied on the <code>ListEnabledBaseline</code> operation. Allowed filters are <code>baselineIdentifiers</code> and <code>targetIdentifiers</code>. The filter can be applied for either, or both.</p>
        next_token: <p>A pagination token.</p>
        max_results: <p>The maximum number of results to be shown.</p>
        include_children: <p>A value that can be set to include the child enabled baselines in responses. The default value is false.</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.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.
    """

    def _handler(
        req: "OperationRequest[capo_controltower.types.list_enabled_baselines_input.ListEnabledBaselinesInput]",
    ) -> OperationResponse[
        "capo_controltower.types.list_enabled_baselines_output.ListEnabledBaselinesOutput"
    ]:
        import capo_controltower._operations.aws_control_tower_apis.list_enabled_baselines

        output, http_response = (
            capo_controltower._operations.aws_control_tower_apis.list_enabled_baselines.list_enabled_baselines(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListEnabledBaselines")
    )
    input_: capo_controltower.types.list_enabled_baselines_input.ListEnabledBaselinesInput = {}
    if filter is not None:
        input_["filter"] = filter
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results
    if include_children is not None:
        input_["include_children"] = include_children

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output