Skip to content

disable_import_findings_for_product

disable_import_findings_for_product(
    product_subscription_arn: NonEmptyString,
    *,
    config_overrides: Optional[SecurityHubClientConfig] = None,
) -> DisableImportFindingsForProductResponse

Disables the integration of the specified product with Security Hub CSPM. After the integration is disabled, findings from that product are no longer sent to Security Hub CSPM.

Parameters:

  • product_subscription_arn (NonEmptyString) –

    The ARN of the integrated product to disable the integration for.

Raises:

  • InternalException –

    Internal server error.

  • InvalidAccessException –

    The account doesn't have permission to perform this action.

  • InvalidInputException –

    The request was rejected because you supplied an invalid or out-of-range value for an input parameter.

  • LimitExceededException –

    The request was rejected because it attempted to create resources beyond the current Amazon Web Services account or throttling limits. The error code describes the limit exceeded.

  • ResourceNotFoundException –

    The request was rejected because we can't find the specified resource.

  • UnknownServiceError –

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

Examples:

To end a Security Hub integration The following example ends an integration between Security Hub and the specified product that sends findings to Security Hub. After the integration ends, the product no longer sends findings to Security Hub.

>>> client.disable_import_findings_for_product(product_subscription_arn='arn:aws:securityhub:us-east-1:517716713836:product/crowdstrike/crowdstrike-falcon')
Source code in docs_src/capo_securityhub/_services/security_hub.py
def disable_import_findings_for_product(
    self,
    product_subscription_arn: "capo_securityhub.types.non_empty_string.NonEmptyString",
    *,
    config_overrides: Optional[SecurityHubClientConfig] = None,
) -> "capo_securityhub.types.disable_import_findings_for_product_response.DisableImportFindingsForProductResponse":
    """<p>Disables the integration of the specified product with Security Hub CSPM. After the integration is disabled, findings from that product are no longer sent to Security Hub CSPM.</p>

    Args:
        product_subscription_arn: <p>The ARN of the integrated product to disable the integration for.</p>

    Raises:
        capo_securityhub.errors.internal_exception.InternalException: <p>Internal server error.</p>
        capo_securityhub.errors.invalid_access_exception.InvalidAccessException: <p>The account doesn't have permission to perform this action.</p>
        capo_securityhub.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because you supplied an invalid or out-of-range value for an input parameter.</p>
        capo_securityhub.errors.limit_exceeded_exception.LimitExceededException: <p>The request was rejected because it attempted to create resources beyond the current Amazon Web Services account or throttling limits. The error code describes the limit exceeded.</p>
        capo_securityhub.errors.resource_not_found_exception.ResourceNotFoundException: <p>The request was rejected because we can't find the specified resource.</p>
        capo_securityhub.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To end a Security Hub integration
        The following example ends an integration between Security Hub and the specified product that sends findings to Security Hub. After the integration ends, the product no longer sends findings to Security  Hub.

        >>> client.disable_import_findings_for_product(product_subscription_arn='arn:aws:securityhub:us-east-1:517716713836:product/crowdstrike/crowdstrike-falcon')
    """

    def _handler(
        req: "OperationRequest[capo_securityhub.types.disable_import_findings_for_product_request.DisableImportFindingsForProductRequest]",
    ) -> OperationResponse[
        "capo_securityhub.types.disable_import_findings_for_product_response.DisableImportFindingsForProductResponse"
    ]:
        import capo_securityhub._operations.security_hub_api_service.disable_import_findings_for_product

        output, http_response = (
            capo_securityhub._operations.security_hub_api_service.disable_import_findings_for_product.disable_import_findings_for_product(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DisableImportFindingsForProduct")
    )
    input_: capo_securityhub.types.disable_import_findings_for_product_request.DisableImportFindingsForProductRequest = {
        "product_subscription_arn": product_subscription_arn
    }

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