Skip to content

create_data_integration

create_data_integration(
    name: Name,
    kms_key: NonBlankString,
    *,
    config_overrides: Optional[AppIntegrationsClientConfig] = None,
    description: Optional[Description] = None,
    source_uri: Optional[SourceURI] = None,
    schedule_config: Optional[ScheduleConfiguration] = None,
    tags: Optional[TagMap] = None,
    client_token: Optional[IdempotencyToken] = None,
    file_configuration: Optional[FileConfiguration] = None,
    object_configuration: Optional[ObjectConfiguration] = None,
) -> CreateDataIntegrationResponse

Creates and persists a DataIntegration resource.

You cannot create a DataIntegration association for a DataIntegration that has been previously associated. Use a different DataIntegration, or recreate the DataIntegration using the CreateDataIntegration API.

Parameters:

  • name (Name) –

    The name of the DataIntegration.

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

    A description of the DataIntegration.

  • kms_key (NonBlankString) –

    The KMS key ARN for the DataIntegration.

  • source_uri (Optional[SourceURI], default: None ) –

    The URI of the data source.

  • schedule_config (Optional[ScheduleConfiguration], default: None ) –

    The name of the data and how often it should be pulled from the source.

  • tags (Optional[TagMap], default: None ) –

    The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.

  • client_token (Optional[IdempotencyToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see Making retries safe with idempotent APIs.

  • file_configuration (Optional[FileConfiguration], default: None ) –

    The configuration for what files should be pulled from the source.

  • object_configuration (Optional[ObjectConfiguration], default: None ) –

    The configuration for what data should be pulled from the source.

Raises:

Source code in docs_src/capo_appintegrations/_services/app_integrations.py
def create_data_integration(
    self,
    name: "capo_appintegrations.types.name.Name",
    kms_key: "capo_appintegrations.types.non_blank_string.NonBlankString",
    *,
    config_overrides: Optional[AppIntegrationsClientConfig] = None,
    description: Optional[
        "capo_appintegrations.types.description.Description"
    ] = None,
    source_uri: Optional["capo_appintegrations.types.source_uri.SourceURI"] = None,
    schedule_config: Optional[
        "capo_appintegrations.types.schedule_configuration.ScheduleConfiguration"
    ] = None,
    tags: Optional["capo_appintegrations.types.tag_map.TagMap"] = None,
    client_token: Optional[
        "capo_appintegrations.types.idempotency_token.IdempotencyToken"
    ] = None,
    file_configuration: Optional[
        "capo_appintegrations.types.file_configuration.FileConfiguration"
    ] = None,
    object_configuration: Optional[
        "capo_appintegrations.types.object_configuration.ObjectConfiguration"
    ] = None,
) -> "capo_appintegrations.types.create_data_integration_response.CreateDataIntegrationResponse":
    """<p>Creates and persists a DataIntegration resource.</p> <note> <p>You cannot create a DataIntegration association for a DataIntegration that has been previously associated. Use a different DataIntegration, or recreate the DataIntegration using the <code>CreateDataIntegration</code> API.</p> </note>

    Args:
        name: <p>The name of the DataIntegration.</p>
        description: <p>A description of the DataIntegration.</p>
        kms_key: <p>The KMS key ARN for the DataIntegration.</p>
        source_uri: <p>The URI of the data source.</p>
        schedule_config: <p>The name of the data and how often it should be pulled from the source.</p>
        tags: <p>The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", "key2":"value2"} }.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If not provided, the Amazon Web Services SDK populates this field. For more information about idempotency, see <a href="https://aws.amazon.com/builders-library/making-retries-safe-with-idempotent-APIs/">Making retries safe with idempotent APIs</a>.</p>
        file_configuration: <p>The configuration for what files should be pulled from the source.</p>
        object_configuration: <p>The configuration for what data should be pulled from the source.</p>

    Raises:
        capo_appintegrations.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_appintegrations.errors.duplicate_resource_exception.DuplicateResourceException: <p>A resource with the specified name already exists.</p>
        capo_appintegrations.errors.internal_service_error.InternalServiceError: <p>Request processing failed due to an error or failure with the service.</p>
        capo_appintegrations.errors.invalid_request_exception.InvalidRequestException: <p>The request is not valid. </p>
        capo_appintegrations.errors.resource_quota_exceeded_exception.ResourceQuotaExceededException: <p>The allowed quota for the resource has been exceeded.</p>
        capo_appintegrations.errors.throttling_exception.ThrottlingException: <p>The throttling limit has been exceeded.</p>
        capo_appintegrations.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_appintegrations.types.create_data_integration_request.CreateDataIntegrationRequest]",
    ) -> OperationResponse[
        "capo_appintegrations.types.create_data_integration_response.CreateDataIntegrationResponse"
    ]:
        import capo_appintegrations._operations.amazon_app_integration_service.create_data_integration

        output, http_response = (
            capo_appintegrations._operations.amazon_app_integration_service.create_data_integration.create_data_integration(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateDataIntegration")
    )
    input_: capo_appintegrations.types.create_data_integration_request.CreateDataIntegrationRequest = {
        "name": name,
        "kms_key": kms_key,
    }
    if description is not None:
        input_["description"] = description
    if source_uri is not None:
        input_["source_uri"] = source_uri
    if schedule_config is not None:
        input_["schedule_config"] = schedule_config
    if tags is not None:
        input_["tags"] = tags
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if file_configuration is not None:
        input_["file_configuration"] = file_configuration
    if object_configuration is not None:
        input_["object_configuration"] = object_configuration

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