CreateAssetRevision - Amazon DataZone

CreateAssetRevision

Creates a revision of the asset.

Asset revisions represent new versions of existing assets, capturing changes to either the underlying data or its metadata. They maintain a historical record of how assets evolve over time, who made changes, and when those changes occurred. This versioning capability is crucial for governance and compliance, allowing organizations to track changes, understand their impact, and roll back if necessary.

Prerequisites:

  • Asset must already exist in the domain with identifier.

  • The form type with correct revision must be registered in the same domain.

  • The form content must include all required fields (e.g., bucketArn for S3ObjectCollectionForm).

  • The owning project of the original asset must still exist and be active.

  • User must have write access to the project and domain.

Request Syntax

POST /v2/domains/domainIdentifier/assets/identifier/revisions HTTP/1.1 Content-type: application/json { "clientToken": "string", "description": "string", "formsInput": [ { "content": "string", "formName": "string", "typeIdentifier": "string", "typeRevision": "string" } ], "glossaryTerms": [ "string" ], "name": "string", "predictionConfiguration": { "businessNameGeneration": { "enabled": boolean } }, "typeRevision": "string" }

URI Request Parameters

The request uses the following URI parameters.

domainIdentifier

The unique identifier of the domain where the asset is being revised.

Pattern: dzd[-_][a-zA-Z0-9_-]{1,36}

Required: Yes

identifier

The identifier of the asset.

Pattern: [a-zA-Z0-9_-]{1,36}

Required: Yes

Request Body

The request accepts the following data in JSON format.

clientToken

A unique, case-sensitive identifier that is provided to ensure the idempotency of the request.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [\x21-\x7E]+

Required: No

description

The revised description of the asset.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 2048.

Required: No

formsInput

The metadata forms to be attached to the asset as part of asset revision.

Type: Array of FormInput objects

Array Members: Minimum number of 0 items. Maximum number of 10 items.

Required: No

glossaryTerms

The glossary terms to be attached to the asset as part of asset revision.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 20 items.

Pattern: [a-zA-Z0-9_-]{1,36}

Required: No

name

Te revised name of the asset.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Required: Yes

predictionConfiguration

The configuration of the automatically generated business-friendly metadata for the asset.

Type: PredictionConfiguration object

Required: No

typeRevision

The revision type of the asset.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Required: No

Response Syntax

HTTP/1.1 200 Content-type: application/json { "createdAt": number, "createdBy": "string", "description": "string", "domainId": "string", "externalIdentifier": "string", "firstRevisionCreatedAt": number, "firstRevisionCreatedBy": "string", "formsOutput": [ { "content": "string", "formName": "string", "typeName": "string", "typeRevision": "string" } ], "glossaryTerms": [ "string" ], "governedGlossaryTerms": [ "string" ], "id": "string", "latestTimeSeriesDataPointFormsOutput": [ { "contentSummary": "string", "formName": "string", "id": "string", "timestamp": number, "typeIdentifier": "string", "typeRevision": "string" } ], "listing": { "listingId": "string", "listingStatus": "string" }, "name": "string", "owningProjectId": "string", "predictionConfiguration": { "businessNameGeneration": { "enabled": boolean } }, "readOnlyFormsOutput": [ { "content": "string", "formName": "string", "typeName": "string", "typeRevision": "string" } ], "revision": "string", "typeIdentifier": "string", "typeRevision": "string" }

Response Elements

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

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

createdAt

The timestamp of when the asset revision occured.

Type: Timestamp

createdBy

The Amazon DataZone user who performed the asset revision.

Type: String

description

The revised asset description.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 2048.

domainId

The unique identifier of the Amazon DataZone domain where the asset was revised.

Type: String

Pattern: dzd[-_][a-zA-Z0-9_-]{1,36}

externalIdentifier

The external identifier of the asset.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 600.

firstRevisionCreatedAt

The timestamp of when the first asset revision occured.

Type: Timestamp

firstRevisionCreatedBy

The Amazon DataZone user who performed the first asset revision.

Type: String

formsOutput

The metadata forms that were attached to the asset as part of the asset revision.

Type: Array of FormOutput objects

Array Members: Minimum number of 0 items. Maximum number of 10 items.

glossaryTerms

The glossary terms that were attached to the asset as part of asset revision.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 20 items.

Pattern: [a-zA-Z0-9_-]{1,36}

governedGlossaryTerms

The glossary terms in a restricted glossary.

Type: Array of strings

Array Members: Minimum number of 0 items. Maximum number of 20 items.

Pattern: [a-zA-Z0-9_-]{1,36}

id

The unique identifier of the asset revision.

Type: String

Pattern: [a-zA-Z0-9_-]{1,36}

latestTimeSeriesDataPointFormsOutput

The latest data point that was imported into the time series form for the asset.

Type: Array of TimeSeriesDataPointSummaryFormOutput objects

listing

The details of an asset published in an Amazon DataZone catalog.

Type: AssetListingDetails object

name

The revised name of the asset.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

owningProjectId

The unique identifier of the revised project that owns the asset.

Type: String

Pattern: [a-zA-Z0-9_-]{1,36}

predictionConfiguration

The configuration of the automatically generated business-friendly metadata for the asset.

Type: PredictionConfiguration object

readOnlyFormsOutput

The read-only metadata forms that were attached to the asset as part of the asset revision.

Type: Array of FormOutput objects

Array Members: Minimum number of 0 items. Maximum number of 10 items.

revision

The revision of the asset.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

typeIdentifier

The identifier of the revision type.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 513.

Pattern: (?!\.)[\w\.]*\w

typeRevision

The revision type of the asset.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Errors

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

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 403

ConflictException

There is a conflict while performing this action.

HTTP Status Code: 409

InternalServerException

The request has failed because of an unknown error, exception or failure.

HTTP Status Code: 500

ResourceNotFoundException

The specified resource cannot be found.

HTTP Status Code: 404

ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 429

UnauthorizedException

You do not have permission to perform this action.

HTTP Status Code: 401

ValidationException

The input fails to satisfy the constraints specified by the AWS service.

HTTP Status Code: 400

Examples

Example

This example illustrates one usage of CreateAssetRevision.

Sample Request

aws datazone create-asset-revision \ --domain-identifier "dzd_53ielnpxktdilj" \ --identifier "ast7k9mpq2xvn4" \ --name "CustomerDataset-v2" \ --forms-input '[ { "formName": "S3ObjectCollectionForm", "typeIdentifier": "amazon.datazone.S3ObjectCollectionFormType", "typeRevision": "7", "content": "{\"bucketArn\":\"arn:aws:s3:::customer-analytics-data\"}" } ]'

Sample Response

{ "createdAt": 1752601021.227, "createdBy": "usr7nx82mkl", "domainId": "dzd_53ielnpxktdilj", "firstRevisionCreatedAt": 1752554243.917, "firstRevisionCreatedBy": "usr7nx82mkl", "formsOutput": [{ "content": "{\"bucketArn\":\"arn:aws:s3:::customer-analytics-data\"}", "formName": "S3ObjectCollectionForm", "typeName": "amazon.datazone.S3ObjectCollectionFormType", "typeRevision": "7" }], "id": "ast7k9mpq2xvn4", "name": "CustomerDataset-v2", "owningProjectId": "prj7nx82mkl", "readOnlyFormsOutput": [], "revision": "2", "typeIdentifier": "amazon.datazone.S3ObjectCollectionAssetType", "typeRevision": "13" }

Example

Failure case - invalid revision number for form input:

Sample Request

aws datazone create-asset-revision \ --domain-identifier "dzd_53ielnpxktdilj" \ --identifier "ast7k9mpq2xvn4" \ --name "SalesTransactionsMart" \ --forms-input '[{ "formName": "GlueTableForm", "typeIdentifier": "amazon.datazone.GlueTableFormType", "typeRevision": "12", "content": "{\"databaseName\":\"retail_analytics\",\"tableName\":\"sales_transactions\",\"catalogId\":\"\",\"region\":\"us-east-1\",\"tableArn\":\"arn:aws:glue:us-east-1:*:table/retail_analytics/sales_transactions\",\"columns\":[{\"columnName\":\"transaction_id\",\"dataType\":\"string\"},{\"columnName\":\"transaction_date\",\"dataType\":\"timestamp\"},{\"columnName\":\"product_id\",\"dataType\":\"string\"},{\"columnName\":\"quantity\",\"dataType\":\"int\"},{\"columnName\":\"total_amount\",\"dataType\":\"decimal\"}]}" }]‘

Sample Response

An error occurred (ValidationException) when calling the CreateAsset operation: Form GlueTableForm expected form amazon.datazone#GlueTableFormType@13 but was provided amazon.datazone#GlueTableFormType@12

Example

Failure case - invalid or missing --domain-identifier:

Sample Request

aws datazone create-asset-revision \ --domain-identifier "invalid_domain" \ --identifier "ast7k9mpq2xvn4" \ --name "CustomerDataset-v2" \ --forms-input '[]'

Sample Response

An error occurred (ValidationException) when calling the CreateAssetRevision operation: 1 validation error detected: Value at 'domainIdentifier' failed to satisfy constraint: Member must satisfy regular expression pattern: dzd[-_][a-zA-Z0-9_-]{1,36}

Example

Failure case - unsupported form typeIdentifier or typeRevision:

Sample Request

aws datazone create-asset-revision \ --domain-identifier "dzd_53ielnpxktdilj" \ --identifier "ast7k9mpq2xvn4" \ --name "CustomerDataset-v2" \ --forms-input 'INVALID_JSON'

Sample Response

Error parsing parameter '—forms-input': Expected: '=', received: 'EOF' for input: {self._error_location()}

Example

Failure case - response does not exist:

Sample Request

aws datazone create-asset-revision \ --domain-identifier "dzd_53ielnpxktdilj" \ --identifier "ast7k9mpq2xvn4" \ --name "CustomerDataset-v2" \ --forms-input '[ { "formName": "InvalidForm", "typeIdentifier": "invalid.type.identifier", "typeRevision": "99", "content": "{}" } ]'

Sample Response

An error occurred (ResourceNotFoundException) when calling the CreateAssetRevision operation: The given Asset doesn't exist. Try creating Asset before accessing it.

Example

Failure case - missing required content field:

Sample Request

aws datazone create-asset-revision \ --domain-identifier "dzd_53ielnpxktdilj" \ --identifier "ast7k9mpq2xvn4" \ --name "CustomerDataset-v2" \ --forms-input '[ { "formName": "S3ObjectCollectionForm", "typeIdentifier": "amazon.datazone.S3ObjectCollectionFormType", "typeRevision": "7" } ]'

Sample Response

An error occurred (ValidationException) when calling the CreateAssetRevision operation: $.S3ObjectCollectionForm.bucketArn: is missing but it is required

See Also

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