Skip to content

put_data_export_configuration async

put_data_export_configuration(
    domain_identifier: DomainId,
    enable_export: bool,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    encryption_configuration: Optional[EncryptionConfiguration] = None,
    client_token: Optional[ClientToken] = None,
) -> PutDataExportConfigurationOutput

Creates data export configuration details.

If you want to temporarily disable export and later re-enable it for the same domain, use the --no-enable-export flag to disable and the --enable-export flag to re-enable. This preserves the configuration and allows you to re-enable export without deleting S3 table.

You can enable asset metadata export for only one domain per account per Region. To enable export for a different domain, complete the following steps:

  1. Delete the export configuration for the currently enabled domain using the DeleteDataExportConfiguration operation.

  2. Delete the asset S3 table under the aws-sagemaker-catalog S3 table bucket. We recommend backing up the S3 table before deletion.

  3. Call the PutDataExportConfiguration API to enable export for the new domain.

Parameters:

  • domain_identifier (DomainId) –

    The domain ID for which you want to create data export configuration details.

  • enable_export (bool) –

    Specifies that the export is to be enabled as part of creating data export configuration details.

  • encryption_configuration (Optional[EncryptionConfiguration], default: None ) –

    The encryption configuration as part of creating data export configuration details.

    The KMS key provided here as part of encryptionConfiguration must have the required permissions as described in KMS permissions for exporting asset metadata in Amazon SageMaker Unified Studio.

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

    A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.

Raises:

Source code in docs_src/capo_datazone/_services/async_data_zone.py
async def put_data_export_configuration(
    self,
    domain_identifier: "capo_datazone.types.domain_id.DomainId",
    enable_export: bool,
    *,
    config_overrides: Optional[AsyncDataZoneClientConfig] = None,
    encryption_configuration: Optional[
        "capo_datazone.types.encryption_configuration.EncryptionConfiguration"
    ] = None,
    client_token: Optional["capo_datazone.types.client_token.ClientToken"] = None,
) -> "capo_datazone.types.put_data_export_configuration_output.PutDataExportConfigurationOutput":
    """<p>Creates data export configuration details.</p> <p>If you want to temporarily disable export and later re-enable it for the same domain, use the <code>--no-enable-export</code> flag to disable and the <code>--enable-export</code> flag to re-enable. This preserves the configuration and allows you to re-enable export without deleting S3 table.</p> <note> <p>You can enable asset metadata export for only one domain per account per Region. To enable export for a different domain, complete the following steps:</p> <ol> <li> <p>Delete the export configuration for the currently enabled domain using the DeleteDataExportConfiguration operation.</p> </li> <li> <p>Delete the asset S3 table under the aws-sagemaker-catalog S3 table bucket. We recommend backing up the S3 table before deletion.</p> </li> <li> <p>Call the PutDataExportConfiguration API to enable export for the new domain.</p> </li> </ol> </note>

    Args:
        domain_identifier: <p>The domain ID for which you want to create data export configuration details.</p>
        enable_export: <p>Specifies that the export is to be enabled as part of creating data export configuration details.</p>
        encryption_configuration: <p>The encryption configuration as part of creating data export configuration details.</p> <p>The KMS key provided here as part of encryptionConfiguration must have the required permissions as described in <a href="https://docs.aws.amazon.com/sagemaker-unified-studio/latest/adminguide/sagemaker-unified-studio-export-asset-metadata-kms-permissions.html">KMS permissions for exporting asset metadata in Amazon SageMaker Unified Studio</a>.</p>
        client_token: <p>A unique, case-sensitive identifier to ensure idempotency of the request. This field is automatically populated if not provided.</p>

    Raises:
        capo_datazone.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_datazone.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_datazone.errors.unauthorized_exception.UnauthorizedException: <p>You do not have permission to perform this action.</p>
        capo_datazone.errors.conflict_exception.ConflictException: <p>There is a conflict while performing this action.</p>
        capo_datazone.errors.internal_server_exception.InternalServerException: <p>The request has failed because of an unknown error, exception or failure.</p>
        capo_datazone.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource cannot be found.</p>
        capo_datazone.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request has exceeded the specified service quota.</p>
        capo_datazone.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the Amazon Web Services service.</p>
        capo_datazone.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_datazone.types.put_data_export_configuration_input.PutDataExportConfigurationInput]",
    ) -> AsyncOperationResponse[
        "capo_datazone.types.put_data_export_configuration_output.PutDataExportConfigurationOutput"
    ]:
        import capo_datazone._operations.data_zone.put_data_export_configuration

        (
            output,
            http_response,
        ) = await capo_datazone._operations.data_zone.put_data_export_configuration.async_put_data_export_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutDataExportConfiguration")
    )
    input_: capo_datazone.types.put_data_export_configuration_input.PutDataExportConfigurationInput = {
        "domain_identifier": domain_identifier,
        "enable_export": enable_export,
    }
    if encryption_configuration is not None:
        input_["encryption_configuration"] = encryption_configuration
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output