class AssetManifestArtifact
Language | Type name |
---|---|
.NET | Amazon.CDK.CXAPI.AssetManifestArtifact |
Go | github.com/aws/aws-cdk-go/awscdk/v2/cxapi#AssetManifestArtifact |
Java | software.amazon.awscdk.cxapi.AssetManifestArtifact |
Python | aws_cdk.cx_api.AssetManifestArtifact |
TypeScript (source) | aws-cdk-lib » cx_api » AssetManifestArtifact |
Extends
Cloud
Asset manifest is a description of a set of assets which need to be built and published.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { cloud_assembly_schema } from 'aws-cdk-lib';
import { cx_api } from 'aws-cdk-lib';
declare const assumeRoleAdditionalOptions: any;
declare const cloudAssembly: cx_api.CloudAssembly;
const assetManifestArtifact = new cx_api.AssetManifestArtifact(cloudAssembly, 'name', {
type: cloud_assembly_schema.ArtifactType.NONE,
// the properties below are optional
dependencies: ['dependencies'],
displayName: 'displayName',
environment: 'environment',
metadata: {
metadataKey: [{
type: 'type',
// the properties below are optional
data: 'data',
trace: ['trace'],
}],
},
properties: {
templateFile: 'templateFile',
// the properties below are optional
assumeRoleAdditionalOptions: {
assumeRoleAdditionalOptionsKey: assumeRoleAdditionalOptions,
},
assumeRoleArn: 'assumeRoleArn',
assumeRoleExternalId: 'assumeRoleExternalId',
bootstrapStackVersionSsmParameter: 'bootstrapStackVersionSsmParameter',
cloudFormationExecutionRoleArn: 'cloudFormationExecutionRoleArn',
lookupRole: {
arn: 'arn',
// the properties below are optional
assumeRoleAdditionalOptions: {
assumeRoleAdditionalOptionsKey: assumeRoleAdditionalOptions,
},
assumeRoleExternalId: 'assumeRoleExternalId',
bootstrapStackVersionSsmParameter: 'bootstrapStackVersionSsmParameter',
requiresBootstrapStackVersion: 123,
},
notificationArns: ['notificationArns'],
parameters: {
parametersKey: 'parameters',
},
requiresBootstrapStackVersion: 123,
stackName: 'stackName',
stackTemplateAssetObjectUrl: 'stackTemplateAssetObjectUrl',
tags: {
tagsKey: 'tags',
},
terminationProtection: false,
validateOnSynth: false,
},
});
Initializer
new AssetManifestArtifact(assembly: CloudAssembly, name: string, artifact: ArtifactManifest)
Parameters
- assembly
Cloud
Assembly - name
string
- artifact
Artifact
Manifest
Properties
Name | Type | Description |
---|---|---|
assembly | Cloud | |
contents | Asset | The Asset Manifest contents. |
dependencies | Cloud [] | Returns all the artifacts that this artifact depends on. |
file | string | The file name of the asset manifest. |
hierarchical | string | An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests. |
id | string | |
manifest | Artifact | The artifact's manifest. |
messages | Synthesis [] | The set of messages extracted from the artifact's metadata. |
bootstrap | string | Name of SSM parameter with bootstrap stack version. |
requires | number | Version of bootstrap stack required to deploy this stack. |
assembly
Type:
Cloud
contents
Type:
Asset
The Asset Manifest contents.
dependencies
Type:
Cloud
[]
Returns all the artifacts that this artifact depends on.
file
Type:
string
The file name of the asset manifest.
hierarchicalId
Type:
string
An identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
Defaults to the normal id. Should only be used in user interfaces.
id
Type:
string
manifest
Type:
Artifact
The artifact's manifest.
messages
Type:
Synthesis
[]
The set of messages extracted from the artifact's metadata.
bootstrapStackVersionSsmParameter?
Type:
string
(optional, default: Discover SSM parameter by reading stack)
Name of SSM parameter with bootstrap stack version.
requiresBootstrapStackVersion?
Type:
number
(optional)
Version of bootstrap stack required to deploy this stack.
Methods
Name | Description |
---|---|
find | |
static is | Checks if art is an instance of this class. |
findMetadataByType(type)
public findMetadataByType(type: string): MetadataEntryResult[]
Parameters
- type
string
Returns
static isAssetManifestArtifact(art)
public static isAssetManifestArtifact(art: any): boolean
Parameters
- art
any
Returns
boolean
Checks if art
is an instance of this class.
Use this method instead of instanceof
to properly detect AssetManifestArtifact
instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the cx-api
library on
disk are seen as independent, completely different libraries. As a
consequence, the class AssetManifestArtifact
in each copy of the cx-api
library
is seen as a different class, and an instance of one class will not test as
instanceof
the other class. npm install
will not create installations
like this, but users may manually symlink construct libraries together or
use a monorepo tool: in those cases, multiple copies of the cx-api
library can be accidentally installed, and instanceof
will behave
unpredictably. It is safest to avoid using instanceof
, and using
this type-testing method instead.