- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
GetAssetCommand
This operation returns information about an asset.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { DataExchangeClient, GetAssetCommand } from "@aws-sdk/client-dataexchange"; // ES Modules import
// const { DataExchangeClient, GetAssetCommand } = require("@aws-sdk/client-dataexchange"); // CommonJS import
const client = new DataExchangeClient(config);
const input = { // GetAssetRequest
AssetId: "STRING_VALUE", // required
DataSetId: "STRING_VALUE", // required
RevisionId: "STRING_VALUE", // required
};
const command = new GetAssetCommand(input);
const response = await client.send(command);
// { // GetAssetResponse
// Arn: "STRING_VALUE",
// AssetDetails: { // AssetDetails
// S3SnapshotAsset: { // S3SnapshotAsset
// Size: Number("double"), // required
// },
// RedshiftDataShareAsset: { // RedshiftDataShareAsset
// Arn: "STRING_VALUE", // required
// },
// ApiGatewayApiAsset: { // ApiGatewayApiAsset
// ApiDescription: "STRING_VALUE",
// ApiEndpoint: "STRING_VALUE",
// ApiId: "STRING_VALUE",
// ApiKey: "STRING_VALUE",
// ApiName: "STRING_VALUE",
// ApiSpecificationDownloadUrl: "STRING_VALUE",
// ApiSpecificationDownloadUrlExpiresAt: new Date("TIMESTAMP"),
// ProtocolType: "STRING_VALUE",
// Stage: "STRING_VALUE",
// },
// S3DataAccessAsset: { // S3DataAccessAsset
// Bucket: "STRING_VALUE", // required
// KeyPrefixes: [ // ListOf__string
// "STRING_VALUE",
// ],
// Keys: [
// "STRING_VALUE",
// ],
// S3AccessPointAlias: "STRING_VALUE",
// S3AccessPointArn: "STRING_VALUE",
// KmsKeysToGrant: [ // ListOfKmsKeysToGrant
// { // KmsKeyToGrant
// KmsKeyArn: "STRING_VALUE", // required
// },
// ],
// },
// LakeFormationDataPermissionAsset: { // LakeFormationDataPermissionAsset
// LakeFormationDataPermissionDetails: { // LakeFormationDataPermissionDetails
// LFTagPolicy: { // LFTagPolicyDetails
// CatalogId: "STRING_VALUE", // required
// ResourceType: "STRING_VALUE", // required
// ResourceDetails: { // LFResourceDetails
// Database: { // DatabaseLFTagPolicy
// Expression: [ // ListOfLFTags // required
// { // LFTag
// TagKey: "STRING_VALUE", // required
// TagValues: [ // ListOfLFTagValues // required
// "STRING_VALUE",
// ],
// },
// ],
// },
// Table: { // TableLFTagPolicy
// Expression: [ // required
// {
// TagKey: "STRING_VALUE", // required
// TagValues: [ // required
// "STRING_VALUE",
// ],
// },
// ],
// },
// },
// },
// },
// LakeFormationDataPermissionType: "STRING_VALUE", // required
// Permissions: [ // ListOfLFPermissions // required
// "STRING_VALUE",
// ],
// RoleArn: "STRING_VALUE",
// },
// },
// AssetType: "STRING_VALUE",
// CreatedAt: new Date("TIMESTAMP"),
// DataSetId: "STRING_VALUE",
// Id: "STRING_VALUE",
// Name: "STRING_VALUE",
// RevisionId: "STRING_VALUE",
// SourceId: "STRING_VALUE",
// UpdatedAt: new Date("TIMESTAMP"),
// };
GetAssetCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AssetId Required | string | undefined | The unique identifier for an asset. |
DataSetId Required | string | undefined | The unique identifier for a data set. |
RevisionId Required | string | undefined | The unique identifier for a revision. |
GetAssetCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
Arn | string | undefined | The ARN for the asset. |
AssetDetails | AssetDetails | undefined | Details about the asset. |
AssetType | AssetType | undefined | The type of asset that is added to a data set. |
CreatedAt | Date | undefined | The date and time that the asset was created, in ISO 8601 format. |
DataSetId | string | undefined | The unique identifier for the data set associated with this asset. |
Id | string | undefined | The unique identifier for the asset. |
Name | string | undefined | The name of the asset. When importing from Amazon S3, the Amazon S3 object key is used as the asset name. When exporting to Amazon S3, the asset name is used as default target Amazon S3 object key. When importing from Amazon API Gateway API, the API name is used as the asset name. When importing from Amazon Redshift, the datashare name is used as the asset name. When importing from AWS Lake Formation, the static values of "Database(s) included in the LF-tag policy" or "Table(s) included in the LF-tag policy" are used as the asset name. |
RevisionId | string | undefined | The unique identifier for the revision associated with this asset. |
SourceId | string | undefined | The asset ID of the owned asset corresponding to the entitled asset being viewed. This parameter is returned when an asset owner is viewing the entitled copy of its owned asset. |
UpdatedAt | Date | undefined | The date and time that the asset was last updated, in ISO 8601 format. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
InternalServerException | server | An exception occurred with the service. |
ResourceNotFoundException | client | The resource couldn't be found. |
ThrottlingException | client | The limit on the number of requests per second was exceeded. |
ValidationException | client | The request was invalid. |
DataExchangeServiceException | Base exception class for all service exceptions from DataExchange service. |