Skip to content

start_domain_export

start_domain_export(
    domain_name: DomainName,
    s3_bucket: S3BucketName,
    *,
    config_overrides: Optional[SimpleDBv2ClientConfig] = None,
    client_token: Optional[IdempotencyToken] = None,
    s3_key_prefix: Optional[S3KeyPrefix] = None,
    s3_sse_algorithm: Optional[S3SseAlgorithm] = None,
    s3_sse_kms_key_id: Optional[S3SseKmsKeyId] = None,
    s3_bucket_owner: Optional[AwsAccountId] = None,
) -> StartDomainExportResponse

Initiates the export of a SimpleDB domain to an S3 bucket.

Parameters:

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

    Providing a ClientToken makes the call to StartDomainExport API idempotent, meaning that multiple identical calls have the same effect as one single call. A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent. If you submit a request with the same client token but a change in other parameters within the 8-hour idempotency window, a ConflictException will be returned.

  • domain_name (DomainName) –

    The name of the domain to export.

  • s3_bucket (S3BucketName) –

    The name of the S3 bucket where the domain data will be exported.

  • s3_key_prefix (Optional[S3KeyPrefix], default: None ) –

    The prefix string to be used to generate the S3 object keys for export artifacts.

  • s3_sse_algorithm (Optional[S3SseAlgorithm], default: None ) –

    The server-side encryption algorithm to use for the exported data in S3. Valid values are: AES256 (SSE-S3) and KMS (SSE-KMS). If not specified, bucket's default encryption will apply.

  • s3_sse_kms_key_id (Optional[S3SseKmsKeyId], default: None ) –

    The KMS key ID to use for server-side encryption with AWS KMS-managed keys (SSE-KMS). This parameter is only expected with KMS as the S3 SSE algorithm.

  • s3_bucket_owner (Optional[AwsAccountId], default: None ) –

    The ID of the AWS account that owns the bucket the export will be stored in.

Raises:

Examples:

Start a domain export

>>> client.start_domain_export(domain_name='my-domain', s3_bucket='my-export-bucket')
Source code in docs_src/capo_simpledbv2/_services/simple_d_bv2.py
def start_domain_export(
    self,
    domain_name: "capo_simpledbv2.types.domain_name.DomainName",
    s3_bucket: "capo_simpledbv2.types.s3_bucket_name.S3BucketName",
    *,
    config_overrides: Optional[SimpleDBv2ClientConfig] = None,
    client_token: Optional[
        "capo_simpledbv2.types.idempotency_token.IdempotencyToken"
    ] = None,
    s3_key_prefix: Optional[
        "capo_simpledbv2.types.s3_key_prefix.S3KeyPrefix"
    ] = None,
    s3_sse_algorithm: Optional[
        "capo_simpledbv2.types.s3_sse_algorithm.S3SseAlgorithm"
    ] = None,
    s3_sse_kms_key_id: Optional[
        "capo_simpledbv2.types.s3_sse_kms_key_id.S3SseKmsKeyId"
    ] = None,
    s3_bucket_owner: Optional[
        "capo_simpledbv2.types.aws_account_id.AwsAccountId"
    ] = None,
) -> "capo_simpledbv2.types.start_domain_export_response.StartDomainExportResponse":
    """Initiates the export of a SimpleDB domain to an S3 bucket.

    Args:
        client_token: Providing a ClientToken makes the call to StartDomainExport API idempotent, meaning that multiple identical calls have the same effect as one single call. A client token is valid for 8 hours after the first request that uses it is completed. After 8 hours, any request with the same client token is treated as a new request. Do not resubmit the same request with the same client token for more than 8 hours, or the result might not be idempotent. If you submit a request with the same client token but a change in other parameters within the 8-hour idempotency window, a ConflictException will be returned.
        domain_name: The name of the domain to export.
        s3_bucket: The name of the S3 bucket where the domain data will be exported.
        s3_key_prefix: The prefix string to be used to generate the S3 object keys for export artifacts.
        s3_sse_algorithm: The server-side encryption algorithm to use for the exported data in S3. Valid values are: AES256 (SSE-S3) and KMS (SSE-KMS). If not specified, bucket's default encryption will apply.
        s3_sse_kms_key_id: The KMS key ID to use for server-side encryption with AWS KMS-managed keys (SSE-KMS). This parameter is only expected with KMS as the S3 SSE algorithm.
        s3_bucket_owner: The ID of the AWS account that owns the bucket the export will be stored in.

    Raises:
        capo_simpledbv2.errors.conflict_exception.ConflictException: Indicates a conflict with one or more parameters of the request.
        capo_simpledbv2.errors.invalid_parameter_combination_exception.InvalidParameterCombinationException: Parameters that must not be used together were used together in the request.
        capo_simpledbv2.errors.invalid_parameter_value_exception.InvalidParameterValueException: The specified parameter value is not valid.
        capo_simpledbv2.errors.no_such_domain_exception.NoSuchDomainException: The specified domain does not exist.
        capo_simpledbv2.errors.number_exports_limit_exceeded.NumberExportsLimitExceeded: Cannot start export as export quota limit was exceeded
        capo_simpledbv2.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Start a domain export

        >>> client.start_domain_export(domain_name='my-domain', s3_bucket='my-export-bucket')
    """

    def _handler(
        req: "OperationRequest[capo_simpledbv2.types.start_domain_export_request.StartDomainExportRequest]",
    ) -> OperationResponse[
        "capo_simpledbv2.types.start_domain_export_response.StartDomainExportResponse"
    ]:
        import capo_simpledbv2._operations.simple_d_bv2.start_domain_export

        output, http_response = (
            capo_simpledbv2._operations.simple_d_bv2.start_domain_export.start_domain_export(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("StartDomainExport")
    )
    input_: capo_simpledbv2.types.start_domain_export_request.StartDomainExportRequest = {
        "domain_name": domain_name,
        "s3_bucket": s3_bucket,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if s3_key_prefix is not None:
        input_["s3_key_prefix"] = s3_key_prefix
    if s3_sse_algorithm is not None:
        input_["s3_sse_algorithm"] = s3_sse_algorithm
    if s3_sse_kms_key_id is not None:
        input_["s3_sse_kms_key_id"] = s3_sse_kms_key_id
    if s3_bucket_owner is not None:
        input_["s3_bucket_owner"] = s3_bucket_owner

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