Skip to content

describe_conformance_pack_compliance async

describe_conformance_pack_compliance(
    conformance_pack_name: ConformancePackName,
    *,
    config_overrides: Optional[AsyncConfigServiceClientConfig] = None,
    filters: Optional[ConformancePackComplianceFilters] = None,
    limit: Optional[DescribeConformancePackComplianceLimit] = None,
    next_token: Optional[NextToken] = None,
) -> DescribeConformancePackComplianceResponse

Returns compliance details for each rule in that conformance pack.

You must provide exact rule names.

Parameters:

Raises:

Source code in docs_src/capo_config_service/_services/async_config_service.py
async def describe_conformance_pack_compliance(
    self,
    conformance_pack_name: "capo_config_service.types.conformance_pack_name.ConformancePackName",
    *,
    config_overrides: Optional[AsyncConfigServiceClientConfig] = None,
    filters: Optional[
        "capo_config_service.types.conformance_pack_compliance_filters.ConformancePackComplianceFilters"
    ] = None,
    limit: Optional[
        "capo_config_service.types.describe_conformance_pack_compliance_limit.DescribeConformancePackComplianceLimit"
    ] = None,
    next_token: Optional["capo_config_service.types.next_token.NextToken"] = None,
) -> "capo_config_service.types.describe_conformance_pack_compliance_response.DescribeConformancePackComplianceResponse":
    """<p>Returns compliance details for each rule in that conformance pack.</p> <note> <p>You must provide exact rule names.</p> </note>

    Args:
        conformance_pack_name: <p>Name of the conformance pack.</p>
        filters: <p>A <code>ConformancePackComplianceFilters</code> object.</p>
        limit: <p>The maximum number of Config rules within a conformance pack are returned on each page.</p>
        next_token: <p>The <code>nextToken</code> string returned in a previous request that you use to request the next page of results in a paginated response.</p>

    Raises:
        capo_config_service.errors.invalid_limit_exception.InvalidLimitException: <p>The specified limit is outside the allowable range.</p>
        capo_config_service.errors.invalid_next_token_exception.InvalidNextTokenException: <p>The specified next token is not valid. Specify the <code>nextToken</code> string that was returned in the previous response to get the next page of results.</p>
        capo_config_service.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more of the specified parameters are not valid. Verify that your parameters are valid and try again.</p>
        capo_config_service.errors.no_such_config_rule_in_conformance_pack_exception.NoSuchConfigRuleInConformancePackException: <p>Config rule that you passed in the filter does not exist.</p>
        capo_config_service.errors.no_such_conformance_pack_exception.NoSuchConformancePackException: <p>You specified one or more conformance packs that do not exist.</p>
        capo_config_service.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_config_service.types.describe_conformance_pack_compliance_request.DescribeConformancePackComplianceRequest]",
    ) -> AsyncOperationResponse[
        "capo_config_service.types.describe_conformance_pack_compliance_response.DescribeConformancePackComplianceResponse"
    ]:
        import capo_config_service._operations.starling_dove_service.describe_conformance_pack_compliance

        (
            output,
            http_response,
        ) = await capo_config_service._operations.starling_dove_service.describe_conformance_pack_compliance.async_describe_conformance_pack_compliance(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeConformancePackCompliance")
    )
    input_: capo_config_service.types.describe_conformance_pack_compliance_request.DescribeConformancePackComplianceRequest = {
        "conformance_pack_name": conformance_pack_name
    }
    if filters is not None:
        input_["filters"] = filters
    if limit is not None:
        input_["limit"] = limit
    if next_token is not None:
        input_["next_token"] = next_token

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