CreateAssetTypeCommand

Creates a custom asset type.

Example Syntax

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

import { DataZoneClient, CreateAssetTypeCommand } from "@aws-sdk/client-datazone"; // ES Modules import
// const { DataZoneClient, CreateAssetTypeCommand } = require("@aws-sdk/client-datazone"); // CommonJS import
const client = new DataZoneClient(config);
const input = { // CreateAssetTypeInput
  domainIdentifier: "STRING_VALUE", // required
  name: "STRING_VALUE", // required
  description: "STRING_VALUE",
  formsInput: { // FormsInputMap // required
    "<keys>": { // FormEntryInput
      typeIdentifier: "STRING_VALUE", // required
      typeRevision: "STRING_VALUE", // required
      required: true || false,
    },
  },
  owningProjectIdentifier: "STRING_VALUE", // required
};
const command = new CreateAssetTypeCommand(input);
const response = await client.send(command);
// { // CreateAssetTypeOutput
//   domainId: "STRING_VALUE", // required
//   name: "STRING_VALUE", // required
//   revision: "STRING_VALUE", // required
//   description: "STRING_VALUE",
//   formsOutput: { // FormsOutputMap // required
//     "<keys>": { // FormEntryOutput
//       typeName: "STRING_VALUE", // required
//       typeRevision: "STRING_VALUE", // required
//       required: true || false,
//     },
//   },
//   owningProjectId: "STRING_VALUE",
//   originDomainId: "STRING_VALUE",
//   originProjectId: "STRING_VALUE",
//   createdAt: new Date("TIMESTAMP"),
//   createdBy: "STRING_VALUE",
//   updatedAt: new Date("TIMESTAMP"),
//   updatedBy: "STRING_VALUE",
// };

CreateAssetTypeCommand Input

See CreateAssetTypeCommandInput for more details

Parameter
Type
Description
domainIdentifier
Required
string | undefined

The unique identifier of the Amazon DataZone domain where the custom asset type is being created.

formsInput
Required
Record<string, FormEntryInput> | undefined

The metadata forms that are to be attached to the custom asset type.

name
Required
string | undefined

The name of the custom asset type.

owningProjectIdentifier
Required
string | undefined

The identifier of the Amazon DataZone project that is to own the custom asset type.

description
string | undefined

The descripton of the custom asset type.

CreateAssetTypeCommand Output

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 type was created.

formsOutput
Required
Record<string, FormEntryOutput> | undefined

The metadata forms that are attached to the asset type.

name
Required
string | undefined

The name of the asset type.

revision
Required
string | undefined

The revision of the custom asset type.

createdAt
Date | undefined

The timestamp of when the asset type is to be created.

createdBy
string | undefined

The Amazon DataZone user who creates this custom asset type.

description
string | undefined

The description of the custom asset type.

originDomainId
string | undefined

The ID of the Amazon DataZone domain where the asset type was originally created.

originProjectId
string | undefined

The ID of the Amazon DataZone project where the asset type was originally created.

owningProjectId
string | undefined

The ID of the Amazon DataZone project that currently owns this asset type.

updatedAt
Date | undefined

The timestamp of when the custom type was created.

updatedBy
string | undefined

The Amazon DataZone user that created the custom asset type.

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.

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.