CreateAssetCommand

Creates an asset in Amazon DataZone catalog.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { DataZoneClient, CreateAssetCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, CreateAssetCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // CreateAssetInput
  name: "STRING_VALUE", // required
  domainIdentifier: "STRING_VALUE", // required
  externalIdentifier: "STRING_VALUE",
  typeIdentifier: "STRING_VALUE", // required
  typeRevision: "STRING_VALUE",
  description: "STRING_VALUE",
  glossaryTerms: [ // GlossaryTerms
    "STRING_VALUE",
  ],
  formsInput: [ // FormInputList
    { // FormInput
      formName: "STRING_VALUE", // required
      typeIdentifier: "STRING_VALUE",
      typeRevision: "STRING_VALUE",
      content: "STRING_VALUE",
    },
  ],
  owningProjectIdentifier: "STRING_VALUE", // required
  predictionConfiguration: { // PredictionConfiguration
    businessNameGeneration: { // BusinessNameGenerationConfiguration
      enabled: true || false,
    },
  },
  clientToken: "STRING_VALUE",
};
const command = new CreateAssetCommand(input);
const response = await client.send(command);
// { // CreateAssetOutput
//   id: "STRING_VALUE", // required
//   name: "STRING_VALUE", // required
//   typeIdentifier: "STRING_VALUE", // required
//   typeRevision: "STRING_VALUE", // required
//   externalIdentifier: "STRING_VALUE",
//   revision: "STRING_VALUE", // required
//   description: "STRING_VALUE",
//   createdAt: new Date("TIMESTAMP"),
//   createdBy: "STRING_VALUE",
//   firstRevisionCreatedAt: new Date("TIMESTAMP"),
//   firstRevisionCreatedBy: "STRING_VALUE",
//   glossaryTerms: [ // GlossaryTerms
//     "STRING_VALUE",
//   ],
//   owningProjectId: "STRING_VALUE", // required
//   domainId: "STRING_VALUE", // required
//   listing: { // AssetListingDetails
//     listingId: "STRING_VALUE", // required
//     listingStatus: "CREATING" || "ACTIVE" || "INACTIVE", // required
//   },
//   formsOutput: [ // FormOutputList // required
//     { // FormOutput
//       formName: "STRING_VALUE", // required
//       typeName: "STRING_VALUE",
//       typeRevision: "STRING_VALUE",
//       content: "STRING_VALUE",
//     },
//   ],
//   readOnlyFormsOutput: [
//     {
//       formName: "STRING_VALUE", // required
//       typeName: "STRING_VALUE",
//       typeRevision: "STRING_VALUE",
//       content: "STRING_VALUE",
//     },
//   ],
//   latestTimeSeriesDataPointFormsOutput: [ // TimeSeriesDataPointSummaryFormOutputList
//     { // TimeSeriesDataPointSummaryFormOutput
//       formName: "STRING_VALUE", // required
//       typeIdentifier: "STRING_VALUE", // required
//       typeRevision: "STRING_VALUE",
//       timestamp: new Date("TIMESTAMP"), // required
//       contentSummary: "STRING_VALUE",
//       id: "STRING_VALUE",
//     },
//   ],
//   predictionConfiguration: { // PredictionConfiguration
//     businessNameGeneration: { // BusinessNameGenerationConfiguration
//       enabled: true || false,
//     },
//   },
// };

CreateAssetCommand Input

See CreateAssetCommandInput for more details

Parameter
Type
Description
domainIdentifier
Required
string | undefined

Amazon DataZone domain where the asset is created.

name
Required
string | undefined

Asset name.

owningProjectIdentifier
Required
string | undefined

The unique identifier of the project that owns this asset.

typeIdentifier
Required
string | undefined

The unique identifier of this asset's type.

clientToken
string | undefined

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

description
string | undefined

Asset description.

externalIdentifier
string | undefined

The external identifier of the asset.

formsInput
FormInput[] | undefined

Metadata forms attached to the asset.

glossaryTerms
string[] | undefined

Glossary terms attached to the asset.

predictionConfiguration
PredictionConfiguration | undefined

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

typeRevision
string | undefined

The revision of this asset's type.

CreateAssetCommand Output

See CreateAssetCommandOutput for details

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
domainId
Required
string | undefined

The ID of the Amazon DataZone domain in which the asset was created.

formsOutput
Required
FormOutput[] | undefined

The metadata forms that are attached to the created asset.

id
Required
string | undefined

The unique identifier of the created asset.

name
Required
string | undefined

The name of the created asset.

owningProjectId
Required
string | undefined

The ID of the Amazon DataZone project that owns the created asset.

revision
Required
string | undefined

The revision of the asset.

typeIdentifier
Required
string | undefined

The identifier of the created asset type.

typeRevision
Required
string | undefined

The revision type of the asset.

createdAt
Date | undefined

The timestamp of when the asset was created.

createdBy
string | undefined

The Amazon DataZone user that created this asset in the catalog.

description
string | undefined

The description of the created asset.

externalIdentifier
string | undefined

The external identifier of the asset.

firstRevisionCreatedAt
Date | undefined

The timestamp of when the first revision of the asset took place.

firstRevisionCreatedBy
string | undefined

The Amazon DataZone user that made the first revision of the asset.

glossaryTerms
string[] | undefined

The glossary terms that are attached to the created asset.

latestTimeSeriesDataPointFormsOutput
TimeSeriesDataPointSummaryFormOutput[] | undefined

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

listing
AssetListingDetails | undefined

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

predictionConfiguration
PredictionConfiguration | undefined

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

readOnlyFormsOutput
FormOutput[] | undefined

The read-only metadata forms that are attached to the created asset.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ConflictException
client

There is a conflict while performing this action.

InternalServerException
server

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

ResourceNotFoundException
client

The specified resource cannot be found.

ServiceQuotaExceededException
client

The request has exceeded the specified service quota.

ThrottlingException
client

The request was denied due to request throttling.

ValidationException
client

The input fails to satisfy the constraints specified by the Amazon Web Services service.

UnauthorizedException
client

You do not have permission to perform this action.

DataZoneServiceException
Base exception class for all service exceptions from DataZone service.