Skip to content

get_compliance_detail

get_compliance_detail(
    policy_id: PolicyId,
    member_account: AWSAccountId,
    *,
    config_overrides: Optional[FMSClientConfig] = None,
) -> GetComplianceDetailResponse

Returns detailed compliance information about the specified member account. Details include resources that are in and out of compliance with the specified policy.

The reasons for resources being considered compliant depend on the Firewall Manager policy type.

Parameters:

  • policy_id (PolicyId) –

    The ID of the policy that you want to get the details for. PolicyId is returned by PutPolicy and by ListPolicies.

  • member_account (AWSAccountId) –

    The Amazon Web Services account that owns the resources that you want to get the details for.

Raises:

  • InternalErrorException –

    The operation failed because of a system problem, even though the request was valid. Retry your request.

  • InvalidInputException –

    The parameters of the request were invalid.

  • InvalidOperationException –

    The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an AssociateAdminAccount request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.

  • ResourceNotFoundException –

    The specified resource was not found.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_fms/_services/fms.py
def get_compliance_detail(
    self,
    policy_id: "capo_fms.types.policy_id.PolicyId",
    member_account: "capo_fms.types.aws_account_id.AWSAccountId",
    *,
    config_overrides: Optional[FMSClientConfig] = None,
) -> "capo_fms.types.get_compliance_detail_response.GetComplianceDetailResponse":
    """<p>Returns detailed compliance information about the specified member account. Details include resources that are in and out of compliance with the specified policy. </p> <p>The reasons for resources being considered compliant depend on the Firewall Manager policy type. </p>

    Args:
        policy_id: <p>The ID of the policy that you want to get the details for. <code>PolicyId</code> is returned by <code>PutPolicy</code> and by <code>ListPolicies</code>.</p>
        member_account: <p>The Amazon Web Services account that owns the resources that you want to get the details for.</p>

    Raises:
        capo_fms.errors.internal_error_exception.InternalErrorException: <p>The operation failed because of a system problem, even though the request was valid. Retry your request.</p>
        capo_fms.errors.invalid_input_exception.InvalidInputException: <p>The parameters of the request were invalid.</p>
        capo_fms.errors.invalid_operation_exception.InvalidOperationException: <p>The operation failed because there was nothing to do or the operation wasn't possible. For example, you might have submitted an <code>AssociateAdminAccount</code> request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that's disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.</p>
        capo_fms.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_fms.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_fms.types.get_compliance_detail_request.GetComplianceDetailRequest]",
    ) -> OperationResponse[
        "capo_fms.types.get_compliance_detail_response.GetComplianceDetailResponse"
    ]:
        import capo_fms._operations.awsfms_20180101.get_compliance_detail

        output, http_response = (
            capo_fms._operations.awsfms_20180101.get_compliance_detail.get_compliance_detail(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetComplianceDetail")
    )
    input_: capo_fms.types.get_compliance_detail_request.GetComplianceDetailRequest = {
        "policy_id": policy_id,
        "member_account": member_account,
    }

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