Skip to content

list_common_controls

list_common_controls(
    *,
    config_overrides: Optional[ControlCatalogClientConfig] = None,
    max_results: Optional[MaxListCommonControlsResults] = None,
    next_token: Optional[PaginationToken] = None,
    common_control_filter: Optional[CommonControlFilter] = None,
) -> ListCommonControlsResponse

Returns a paginated list of common controls from the Amazon Web Services Control Catalog.

You can apply an optional filter to see common controls that have a specific objective. If you don’t provide a filter, the operation returns all common controls.

Parameters:

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

    The maximum number of results on a page or for an API request call.

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

    The pagination token that's used to fetch the next set of results.

  • common_control_filter (Optional[CommonControlFilter], default: None ) –

    An optional filter that narrows the results to a specific objective.

    This filter allows you to specify one objective ARN at a time. Passing multiple ARNs in the CommonControlFilter isn’t supported.

Raises:

Source code in docs_src/capo_controlcatalog/_services/control_catalog.py
def list_common_controls(
    self,
    *,
    config_overrides: Optional[ControlCatalogClientConfig] = None,
    max_results: Optional[
        "capo_controlcatalog.types.max_list_common_controls_results.MaxListCommonControlsResults"
    ] = None,
    next_token: Optional[
        "capo_controlcatalog.types.pagination_token.PaginationToken"
    ] = None,
    common_control_filter: Optional[
        "capo_controlcatalog.types.common_control_filter.CommonControlFilter"
    ] = None,
) -> "capo_controlcatalog.types.list_common_controls_response.ListCommonControlsResponse":
    """<p>Returns a paginated list of common controls from the Amazon Web Services Control Catalog.</p> <p>You can apply an optional filter to see common controls that have a specific objective. If you don’t provide a filter, the operation returns all common controls. </p>

    Args:
        max_results: <p>The maximum number of results on a page or for an API request call.</p>
        next_token: <p>The pagination token that's used to fetch the next set of results.</p>
        common_control_filter: <p>An optional filter that narrows the results to a specific objective.</p> <p>This filter allows you to specify one objective ARN at a time. Passing multiple ARNs in the <code>CommonControlFilter</code> isn’t supported.</p>

    Raises:
        capo_controlcatalog.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_controlcatalog.errors.internal_server_exception.InternalServerException: <p>An internal service error occurred during the processing of your request. Try again later.</p>
        capo_controlcatalog.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_controlcatalog.errors.validation_exception.ValidationException: <p>The request has invalid or missing parameters.</p>
        capo_controlcatalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_controlcatalog.types.list_common_controls_request.ListCommonControlsRequest]",
    ) -> OperationResponse[
        "capo_controlcatalog.types.list_common_controls_response.ListCommonControlsResponse"
    ]:
        import capo_controlcatalog._operations.control_catalog.list_common_controls

        output, http_response = (
            capo_controlcatalog._operations.control_catalog.list_common_controls.list_common_controls(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListCommonControls")
    )
    input_: capo_controlcatalog.types.list_common_controls_request.ListCommonControlsRequest = {}
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if common_control_filter is not None:
        input_["common_control_filter"] = common_control_filter

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