Skip to content

enable_import_findings_for_product

enable_import_findings_for_product(
    *,
    config_overrides: Optional[SecurityHubClientConfig] = None,
    product_arn: Optional[NonEmptyString] = None,
) -> EnableImportFindingsForProductResponse

Enables the integration of a partner product with Security Hub CSPM. Integrated products send findings to Security Hub CSPM.

When you enable a product integration, a permissions policy that grants permission for the product to send findings to Security Hub CSPM is applied.

Parameters:

  • product_arn (Optional[NonEmptyString], default: None ) –

    The ARN of the product to enable 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.

  • ResourceConflictException –

    The resource specified in the request conflicts with an existing resource.

  • UnknownServiceError –

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

Examples:

To activate an integration The following example activates an integration between Security Hub and a third party partner product that sends findings to Security Hub.

>>> client.enable_import_findings_for_product(product_arn='arn:aws:securityhub:us-east-1:517716713836:product/crowdstrike/crowdstrike-falcon')
Source code in docs_src/capo_securityhub/_services/security_hub.py
def enable_import_findings_for_product(
    self,
    *,
    config_overrides: Optional[SecurityHubClientConfig] = None,
    product_arn: Optional[
        "capo_securityhub.types.non_empty_string.NonEmptyString"
    ] = None,
) -> "capo_securityhub.types.enable_import_findings_for_product_response.EnableImportFindingsForProductResponse":
    """<p>Enables the integration of a partner product with Security Hub CSPM. Integrated products send findings to Security Hub CSPM.</p> <p>When you enable a product integration, a permissions policy that grants permission for the product to send findings to Security Hub CSPM is applied.</p>

    Args:
        product_arn: <p>The ARN of the product to enable 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_conflict_exception.ResourceConflictException: <p>The resource specified in the request conflicts with an existing resource.</p>
        capo_securityhub.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To activate an integration
        The following example activates an integration between Security Hub and a third party partner product that sends findings to Security Hub.

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

    def _handler(
        req: "OperationRequest[capo_securityhub.types.enable_import_findings_for_product_request.EnableImportFindingsForProductRequest]",
    ) -> OperationResponse[
        "capo_securityhub.types.enable_import_findings_for_product_response.EnableImportFindingsForProductResponse"
    ]:
        import capo_securityhub._operations.security_hub_api_service.enable_import_findings_for_product

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("EnableImportFindingsForProduct")
    )
    input_: capo_securityhub.types.enable_import_findings_for_product_request.EnableImportFindingsForProductRequest = {}
    if product_arn is not None:
        input_["product_arn"] = product_arn

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