CreateJob - AWS Data Exchange

CreateJob

This operation creates a job.

Request Syntax

POST /v1/jobs HTTP/1.1 Content-type: application/json { "Details": { "CreateS3DataAccessFromS3Bucket": { "AssetSource": { "Bucket": "string", "KeyPrefixes": [ "string" ], "Keys": [ "string" ], "KmsKeysToGrant": [ { "KmsKeyArn": "string" } ] }, "DataSetId": "string", "RevisionId": "string" }, "ExportAssetsToS3": { "AssetDestinations": [ { "AssetId": "string", "Bucket": "string", "Key": "string" } ], "DataSetId": "string", "Encryption": { "KmsKeyArn": "string", "Type": "string" }, "RevisionId": "string" }, "ExportAssetToSignedUrl": { "AssetId": "string", "DataSetId": "string", "RevisionId": "string" }, "ExportRevisionsToS3": { "DataSetId": "string", "Encryption": { "KmsKeyArn": "string", "Type": "string" }, "RevisionDestinations": [ { "Bucket": "string", "KeyPattern": "string", "RevisionId": "string" } ] }, "ImportAssetFromApiGatewayApi": { "ApiDescription": "string", "ApiId": "string", "ApiKey": "string", "ApiName": "string", "ApiSpecificationMd5Hash": "string", "DataSetId": "string", "ProtocolType": "string", "RevisionId": "string", "Stage": "string" }, "ImportAssetFromSignedUrl": { "AssetName": "string", "DataSetId": "string", "Md5Hash": "string", "RevisionId": "string" }, "ImportAssetsFromLakeFormationTagPolicy": { "CatalogId": "string", "Database": { "Expression": [ { "TagKey": "string", "TagValues": [ "string" ] } ], "Permissions": [ "string" ] }, "DataSetId": "string", "RevisionId": "string", "RoleArn": "string", "Table": { "Expression": [ { "TagKey": "string", "TagValues": [ "string" ] } ], "Permissions": [ "string" ] } }, "ImportAssetsFromRedshiftDataShares": { "AssetSources": [ { "DataShareArn": "string" } ], "DataSetId": "string", "RevisionId": "string" }, "ImportAssetsFromS3": { "AssetSources": [ { "Bucket": "string", "Key": "string" } ], "DataSetId": "string", "RevisionId": "string" } }, "Type": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

Details

The details for the CreateJob request.

Type: RequestDetails object

Required: Yes

Type

The type of job to be created.

Type: String

Valid Values: IMPORT_ASSETS_FROM_S3 | IMPORT_ASSET_FROM_SIGNED_URL | EXPORT_ASSETS_TO_S3 | EXPORT_ASSET_TO_SIGNED_URL | EXPORT_REVISIONS_TO_S3 | IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES | IMPORT_ASSET_FROM_API_GATEWAY_API | CREATE_S3_DATA_ACCESS_FROM_S3_BUCKET | IMPORT_ASSETS_FROM_LAKE_FORMATION_TAG_POLICY

Required: Yes

Response Syntax

HTTP/1.1 201 Content-type: application/json { "Arn": "string", "CreatedAt": "string", "Details": { "CreateS3DataAccessFromS3Bucket": { "AssetSource": { "Bucket": "string", "KeyPrefixes": [ "string" ], "Keys": [ "string" ], "KmsKeysToGrant": [ { "KmsKeyArn": "string" } ] }, "DataSetId": "string", "RevisionId": "string" }, "ExportAssetsToS3": { "AssetDestinations": [ { "AssetId": "string", "Bucket": "string", "Key": "string" } ], "DataSetId": "string", "Encryption": { "KmsKeyArn": "string", "Type": "string" }, "RevisionId": "string" }, "ExportAssetToSignedUrl": { "AssetId": "string", "DataSetId": "string", "RevisionId": "string", "SignedUrl": "string", "SignedUrlExpiresAt": "string" }, "ExportRevisionsToS3": { "DataSetId": "string", "Encryption": { "KmsKeyArn": "string", "Type": "string" }, "EventActionArn": "string", "RevisionDestinations": [ { "Bucket": "string", "KeyPattern": "string", "RevisionId": "string" } ] }, "ImportAssetFromApiGatewayApi": { "ApiDescription": "string", "ApiId": "string", "ApiKey": "string", "ApiName": "string", "ApiSpecificationMd5Hash": "string", "ApiSpecificationUploadUrl": "string", "ApiSpecificationUploadUrlExpiresAt": "string", "DataSetId": "string", "ProtocolType": "string", "RevisionId": "string", "Stage": "string" }, "ImportAssetFromSignedUrl": { "AssetName": "string", "DataSetId": "string", "Md5Hash": "string", "RevisionId": "string", "SignedUrl": "string", "SignedUrlExpiresAt": "string" }, "ImportAssetsFromLakeFormationTagPolicy": { "CatalogId": "string", "Database": { "Expression": [ { "TagKey": "string", "TagValues": [ "string" ] } ], "Permissions": [ "string" ] }, "DataSetId": "string", "RevisionId": "string", "RoleArn": "string", "Table": { "Expression": [ { "TagKey": "string", "TagValues": [ "string" ] } ], "Permissions": [ "string" ] } }, "ImportAssetsFromRedshiftDataShares": { "AssetSources": [ { "DataShareArn": "string" } ], "DataSetId": "string", "RevisionId": "string" }, "ImportAssetsFromS3": { "AssetSources": [ { "Bucket": "string", "Key": "string" } ], "DataSetId": "string", "RevisionId": "string" } }, "Errors": [ { "Code": "string", "Details": { "ImportAssetFromSignedUrlJobErrorDetails": { "AssetName": "string" }, "ImportAssetsFromS3JobErrorDetails": [ { "Bucket": "string", "Key": "string" } ] }, "LimitName": "string", "LimitValue": number, "Message": "string", "ResourceId": "string", "ResourceType": "string" } ], "Id": "string", "State": "string", "Type": "string", "UpdatedAt": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 201 response.

The following data is returned in JSON format by the service.

Arn

The ARN for the job.

Type: String

CreatedAt

The date and time that the job was created, in ISO 8601 format.

Type: Timestamp

Details

Details about the job.

Type: ResponseDetails object

Errors

The errors associated with jobs.

Type: Array of JobError objects

Id

The unique identifier for the job.

Type: String

State

The state of the job.

Type: String

Valid Values: WAITING | IN_PROGRESS | ERROR | COMPLETED | CANCELLED | TIMED_OUT

Type

The job type.

Type: String

Valid Values: IMPORT_ASSETS_FROM_S3 | IMPORT_ASSET_FROM_SIGNED_URL | EXPORT_ASSETS_TO_S3 | EXPORT_ASSET_TO_SIGNED_URL | EXPORT_REVISIONS_TO_S3 | IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES | IMPORT_ASSET_FROM_API_GATEWAY_API | CREATE_S3_DATA_ACCESS_FROM_S3_BUCKET | IMPORT_ASSETS_FROM_LAKE_FORMATION_TAG_POLICY

UpdatedAt

The date and time that the job was last updated, in ISO 8601 format.

Type: Timestamp

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

Access to the resource is denied.

HTTP Status Code: 403

ConflictException

The request couldn't be completed because it conflicted with the current state of the resource.

HTTP Status Code: 409

InternalServerException

An exception occurred with the service.

HTTP Status Code: 500

ResourceNotFoundException

The resource couldn't be found.

HTTP Status Code: 404

ThrottlingException

The limit on the number of requests per second was exceeded.

HTTP Status Code: 429

ValidationException

The request was invalid.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: