putDataExportConfiguration method

Future<void> putDataExportConfiguration({
  1. required String domainIdentifier,
  2. required bool enableExport,
  3. String? clientToken,
  4. EncryptionConfiguration? encryptionConfiguration,
})

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.

  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.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

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

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

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

Parameter encryptionConfiguration : 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.

Implementation

Future<void> putDataExportConfiguration({
  required String domainIdentifier,
  required bool enableExport,
  String? clientToken,
  EncryptionConfiguration? encryptionConfiguration,
}) async {
  final $payload = <String, dynamic>{
    'enableExport': enableExport,
    'clientToken': clientToken ?? _s.generateIdempotencyToken(),
    if (encryptionConfiguration != null)
      'encryptionConfiguration': encryptionConfiguration,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/data-export-configuration',
    exceptionFnMap: _exceptionFns,
  );
}