Skip to content

create_data_set_export_task

create_data_set_export_task(
    application_id: Identifier,
    export_config: DataSetExportConfig,
    *,
    config_overrides: Optional[m2ClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    kms_key_id: Optional[KMSKeyId] = None,
) -> CreateDataSetExportTaskResponse

Starts a data set export task for a specific application.

Parameters:

  • application_id (Identifier) –

    The unique identifier of the application for which you want to export data sets.

  • export_config (DataSetExportConfig) –

    The data set export task configuration.

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

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create a data set export. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.

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

    The identifier of a customer managed key.

Raises:

Source code in docs_src/capo_m2/_services/m2.py
def create_data_set_export_task(
    self,
    application_id: "capo_m2.types.identifier.Identifier",
    export_config: "capo_m2.types.data_set_export_config.DataSetExportConfig",
    *,
    config_overrides: Optional[m2ClientConfig] = None,
    client_token: Optional["capo_m2.types.client_token.ClientToken"] = None,
    kms_key_id: Optional["capo_m2.types.kms_key_id.KMSKeyId"] = None,
) -> "capo_m2.types.create_data_set_export_task_response.CreateDataSetExportTaskResponse":
    """<p>Starts a data set export task for a specific application.</p>

    Args:
        application_id: <p>The unique identifier of the application for which you want to export data sets.</p>
        export_config: <p>The data set export task configuration.</p>
        client_token: <p>Unique, case-sensitive identifier you provide to ensure the idempotency of the request to create a data set export. The service generates the clientToken when the API call is triggered. The token expires after one hour, so if you retry the API within this timeframe with the same clientToken, you will get the same response. The service also handles deleting the clientToken after it expires.</p>
        kms_key_id: <p>The identifier of a customer managed key.</p>

    Raises:
        capo_m2.errors.access_denied_exception.AccessDeniedException: <p>The account or role doesn't have the right permissions to make the request.</p>
        capo_m2.errors.conflict_exception.ConflictException: <p>The parameters provided in the request conflict with existing resources.</p>
        capo_m2.errors.internal_server_exception.InternalServerException: <p>An unexpected error occurred during the processing of the request.</p>
        capo_m2.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_m2.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>One or more quotas for Amazon Web Services Mainframe Modernization exceeds the limit.</p>
        capo_m2.errors.throttling_exception.ThrottlingException: <p>The number of requests made exceeds the limit.</p>
        capo_m2.errors.validation_exception.ValidationException: <p>One or more parameters provided in the request is not valid.</p>
        capo_m2.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_m2.types.create_data_set_export_task_request.CreateDataSetExportTaskRequest]",
    ) -> OperationResponse[
        "capo_m2.types.create_data_set_export_task_response.CreateDataSetExportTaskResponse"
    ]:
        import capo_m2._operations.aws_supernova_control_plane_service.create_data_set_export_task

        output, http_response = (
            capo_m2._operations.aws_supernova_control_plane_service.create_data_set_export_task.create_data_set_export_task(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateDataSetExportTask")
    )
    input_: capo_m2.types.create_data_set_export_task_request.CreateDataSetExportTaskRequest = {
        "application_id": application_id,
        "export_config": export_config,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id

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