Skip to content

create_integration

create_integration(
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    source_arn: Optional[SourceArn] = None,
    target_arn: Optional[Arn] = None,
    integration_name: Optional[IntegrationName] = None,
    kms_key_id: Optional[String] = None,
    additional_encryption_context: Optional[EncryptionContextMap] = None,
    tags: Optional[TagList] = None,
    data_filter: Optional[DataFilter] = None,
    description: Optional[IntegrationDescription] = None,
) -> Integration

Creates a zero-ETL integration with Amazon Redshift.

Parameters:

Raises:

Examples:

To create a zero-ETL integration The following example creates a zero-ETL integration with Amazon Redshift.

>>> client.create_integration(integration_name='my-integration', source_arn='arn:aws:rds:us-east-1:123456789012:cluster:my-cluster', target_arn='arn:aws:redshift-serverless:us-east-1:123456789012:namespace/62c70612-0302-4db7-8414-b5e3e049f0d8')
Source code in docs_src/capo_rds/_services/rds.py
def create_integration(
    self,
    *,
    config_overrides: Optional[RDSClientConfig] = None,
    source_arn: Optional["capo_rds.types.source_arn.SourceArn"] = None,
    target_arn: Optional["capo_rds.types.arn.Arn"] = None,
    integration_name: Optional[
        "capo_rds.types.integration_name.IntegrationName"
    ] = None,
    kms_key_id: Optional["capo_rds.types.string.String"] = None,
    additional_encryption_context: Optional[
        "capo_rds.types.encryption_context_map.EncryptionContextMap"
    ] = None,
    tags: Optional["capo_rds.types.tag_list.TagList"] = None,
    data_filter: Optional["capo_rds.types.data_filter.DataFilter"] = None,
    description: Optional[
        "capo_rds.types.integration_description.IntegrationDescription"
    ] = None,
) -> "capo_rds.types.integration.Integration":
    """<p>Creates a zero-ETL integration with Amazon Redshift.</p>

    Args:
        source_arn: <p>The Amazon Resource Name (ARN) of the database to use as the source for replication.</p>
        target_arn: <p>The ARN of the Redshift data warehouse to use as the target for replication.</p>
        integration_name: <p>The name of the integration.</p>
        kms_key_id: <p>The Amazon Web Services Key Management System (Amazon Web Services KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, RDS uses a default Amazon Web Services owned key. </p>
        additional_encryption_context: <p>An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see <a href="https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context">Encryption context</a> in the <i>Amazon Web Services Key Management Service Developer Guide</i>.</p> <p>You can only include this parameter if you specify the <code>KMSKeyId</code> parameter.</p>
        data_filter: <p>Data filtering options for the integration. For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/zero-etl.filtering.html">Data filtering for Aurora zero-ETL integrations with Amazon Redshift</a> or <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/zero-etl.filtering.html">Data filtering for Amazon RDS zero-ETL integrations with Amazon Redshift</a>. </p>
        description: <p>A description of the integration.</p>

    Raises:
        capo_rds.errors.db_cluster_not_found_fault.DBClusterNotFoundFault: <p> <code>DBClusterIdentifier</code> doesn't refer to an existing DB cluster.</p>
        capo_rds.errors.db_instance_not_found_fault.DBInstanceNotFoundFault: <p> <code>DBInstanceIdentifier</code> doesn't refer to an existing DB instance.</p>
        capo_rds.errors.integration_already_exists_fault.IntegrationAlreadyExistsFault: <p>The integration you are trying to create already exists.</p>
        capo_rds.errors.integration_conflict_operation_fault.IntegrationConflictOperationFault: <p>A conflicting conditional operation is currently in progress against this resource. Typically occurs when there are multiple requests being made to the same resource at the same time, and these requests conflict with each other.</p>
        capo_rds.errors.integration_quota_exceeded_fault.IntegrationQuotaExceededFault: <p>You can't crate any more zero-ETL integrations because the quota has been reached.</p>
        capo_rds.errors.kms_key_not_accessible_fault.KMSKeyNotAccessibleFault: <p>An error occurred accessing an Amazon Web Services KMS key.</p>
        capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To create a zero-ETL integration
        The following example creates a zero-ETL integration with Amazon Redshift.

        >>> client.create_integration(integration_name='my-integration', source_arn='arn:aws:rds:us-east-1:123456789012:cluster:my-cluster', target_arn='arn:aws:redshift-serverless:us-east-1:123456789012:namespace/62c70612-0302-4db7-8414-b5e3e049f0d8')
    """

    def _handler(
        req: "OperationRequest[capo_rds.types.create_integration_message.CreateIntegrationMessage]",
    ) -> OperationResponse["capo_rds.types.integration.Integration"]:
        import capo_rds._operations.amazon_rd_sv19.create_integration

        output, http_response = (
            capo_rds._operations.amazon_rd_sv19.create_integration.create_integration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateIntegration")
    )
    input_: capo_rds.types.create_integration_message.CreateIntegrationMessage = {}
    if source_arn is not None:
        input_["source_arn"] = source_arn
    if target_arn is not None:
        input_["target_arn"] = target_arn
    if integration_name is not None:
        input_["integration_name"] = integration_name
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if additional_encryption_context is not None:
        input_["additional_encryption_context"] = additional_encryption_context
    if tags is not None:
        input_["tags"] = tags
    if data_filter is not None:
        input_["data_filter"] = data_filter
    if description is not None:
        input_["description"] = description

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