Skip to content

create_integration

create_integration(
    *,
    config_overrides: Optional[RedshiftClientConfig] = None,
    source_arn: Optional[SourceArn] = None,
    target_arn: Optional[TargetArn] = None,
    integration_name: Optional[IntegrationName] = None,
    kms_key_id: Optional[String] = None,
    tag_list: Optional[TagList] = None,
    additional_encryption_context: Optional[EncryptionContextMap] = None,
    description: Optional[IntegrationDescription] = None,
) -> Integration

Creates a zero-ETL integration or S3 event integration with Amazon Redshift.

Parameters:

  • source_arn (Optional[SourceArn], default: None ) –

    The Amazon Resource Name (ARN) of the database to use as the source for replication.

  • target_arn (Optional[TargetArn], default: None ) –

    The Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.

  • integration_name (Optional[IntegrationName], default: None ) –

    The name of the integration.

  • kms_key_id (Optional[String], default: None ) –

    An Key Management Service (KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, the default Amazon Web Services owned key is used.

  • tag_list (Optional[TagList], default: None ) –

    A list of tags.

  • additional_encryption_context (Optional[EncryptionContextMap], default: None ) –

    An optional set of non-secret key–value pairs that contains additional contextual information about the data. For more information, see Encryption context in the Amazon Web Services Key Management Service Developer Guide.

    You can only include this parameter if you specify the KMSKeyId parameter.

  • description (Optional[IntegrationDescription], default: None ) –

    A description of the integration.

Raises:

Source code in docs_src/capo_redshift/_services/redshift.py
def create_integration(
    self,
    *,
    config_overrides: Optional[RedshiftClientConfig] = None,
    source_arn: Optional["capo_redshift.types.source_arn.SourceArn"] = None,
    target_arn: Optional["capo_redshift.types.target_arn.TargetArn"] = None,
    integration_name: Optional[
        "capo_redshift.types.integration_name.IntegrationName"
    ] = None,
    kms_key_id: Optional["capo_redshift.types.string.String"] = None,
    tag_list: Optional["capo_redshift.types.tag_list.TagList"] = None,
    additional_encryption_context: Optional[
        "capo_redshift.types.encryption_context_map.EncryptionContextMap"
    ] = None,
    description: Optional[
        "capo_redshift.types.integration_description.IntegrationDescription"
    ] = None,
) -> "capo_redshift.types.integration.Integration":
    """<p>Creates a zero-ETL integration or S3 event 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 Amazon Resource Name (ARN) of the Amazon Redshift data warehouse to use as the target for replication.</p>
        integration_name: <p>The name of the integration.</p>
        kms_key_id: <p>An Key Management Service (KMS) key identifier for the key to use to encrypt the integration. If you don't specify an encryption key, the default Amazon Web Services owned key is used.</p>
        tag_list: <p>A list of tags.</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>
        description: <p>A description of the integration.</p>

    Raises:
        capo_redshift.errors.integration_already_exists_fault.IntegrationAlreadyExistsFault: <p>The integration you are trying to create already exists.</p>
        capo_redshift.errors.integration_conflict_operation_fault.IntegrationConflictOperationFault: <p>A conflicting conditional operation is currently in progress against this resource. This 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_redshift.errors.integration_quota_exceeded_fault.IntegrationQuotaExceededFault: <p>You can't create any more zero-ETL or S3 event integrations because the quota has been reached.</p>
        capo_redshift.errors.integration_source_not_found_fault.IntegrationSourceNotFoundFault: <p>The specified integration source can't be found.</p>
        capo_redshift.errors.integration_target_not_found_fault.IntegrationTargetNotFoundFault: <p>The specified integration target can't be found.</p>
        capo_redshift.errors.invalid_cluster_state_fault.InvalidClusterStateFault: <p>The specified cluster is not in the <code>available</code> state. </p>
        capo_redshift.errors.invalid_tag_fault.InvalidTagFault: <p>The tag is invalid.</p>
        capo_redshift.errors.tag_limit_exceeded_fault.TagLimitExceededFault: <p>You have exceeded the number of tags allowed.</p>
        capo_redshift.errors.unsupported_operation_fault.UnsupportedOperationFault: <p>The requested operation isn't supported.</p>
        capo_redshift.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_redshift._operations.redshift_service_version20121201.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_redshift.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 tag_list is not None:
        input_["tag_list"] = tag_list
    if additional_encryption_context is not None:
        input_["additional_encryption_context"] = additional_encryption_context
    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