aws-cdk-lib.cx_api.CloudArtifact

class CloudArtifact

LanguageType name
.NETAmazon.CDK.CXAPI.CloudArtifact
Gogithub.com/aws/aws-cdk-go/awscdk/v2/cxapi#CloudArtifact
Javasoftware.amazon.awscdk.cxapi.CloudArtifact
Pythonaws_cdk.cx_api.CloudArtifact
TypeScript (source)aws-cdk-lib » cx_api » CloudArtifact

Represents an artifact within a cloud assembly.

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 cloudAssembly: cx_api.CloudAssembly;
const cloudArtifact = cx_api.CloudArtifact.fromManifest(cloudAssembly, 'MyCloudArtifact', {
  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
    assumeRoleArn: 'assumeRoleArn',
    assumeRoleExternalId: 'assumeRoleExternalId',
    bootstrapStackVersionSsmParameter: 'bootstrapStackVersionSsmParameter',
    cloudFormationExecutionRoleArn: 'cloudFormationExecutionRoleArn',
    lookupRole: {
      arn: 'arn',

      // the properties below are optional
      assumeRoleExternalId: 'assumeRoleExternalId',
      bootstrapStackVersionSsmParameter: 'bootstrapStackVersionSsmParameter',
      requiresBootstrapStackVersion: 123,
    },
    parameters: {
      parametersKey: 'parameters',
    },
    requiresBootstrapStackVersion: 123,
    stackName: 'stackName',
    stackTemplateAssetObjectUrl: 'stackTemplateAssetObjectUrl',
    tags: {
      tagsKey: 'tags',
    },
    terminationProtection: false,
    validateOnSynth: false,
  },
});

Initializer (protected)

super(assembly: CloudAssembly, id: string, manifest: ArtifactManifest)

Parameters

  • assembly CloudAssembly
  • id string
  • manifest ArtifactManifest

Properties

NameTypeDescription
assemblyCloudAssembly
dependenciesCloudArtifact[]Returns all the artifacts that this artifact depends on.
hierarchicalIdstringAn identifier that shows where this artifact is located in the tree of nested assemblies, based on their manifests.
idstring
manifestArtifactManifestThe artifact's manifest.
messagesSynthesisMessage[]The set of messages extracted from the artifact's metadata.

assembly

Type: CloudAssembly


dependencies

Type: CloudArtifact[]

Returns all the artifacts that this artifact depends on.


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: ArtifactManifest

The artifact's manifest.


messages

Type: SynthesisMessage[]

The set of messages extracted from the artifact's metadata.

Methods

NameDescription
findMetadataByType(type)
static fromManifest(assembly, id, artifact)Returns a subclass of CloudArtifact based on the artifact type defined in the artifact manifest.

findMetadataByType(type)

public findMetadataByType(type: string): MetadataEntryResult[]

Parameters

  • type string

Returns

  • MetadataEntryResult[]

static fromManifest(assembly, id, artifact)

public static fromManifest(assembly: CloudAssembly, id: string, artifact: ArtifactManifest): CloudArtifact

Parameters

  • assembly CloudAssembly — The cloud assembly from which to load the artifact.
  • id string — The artifact ID.
  • artifact ArtifactManifest — The artifact manifest.

Returns

  • CloudArtifact

Returns a subclass of CloudArtifact based on the artifact type defined in the artifact manifest.