Skip to content
v2.277.0

StackAsset Struct ​

An asset used by a Stack.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { pipelines } from 'aws-cdk-lib';
const stackAsset: pipelines.StackAsset = {
  assetId: 'assetId',
  assetManifestPath: 'assetManifestPath',
  assetSelector: 'assetSelector',
  assetType: pipelines.AssetType.FILE,
  isTemplate: false,

  // the properties below are optional
  assetPublishingRoleArn: 'assetPublishingRoleArn',
  displayName: 'displayName',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import pipelines

stack_asset = pipelines.StackAsset(
    asset_id="assetId",
    asset_manifest_path="assetManifestPath",
    asset_selector="assetSelector",
    asset_type=pipelines.AssetType.FILE,
    is_template=False,

    # the properties below are optional
    asset_publishing_role_arn="assetPublishingRoleArn",
    display_name="displayName"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.pipelines.*;

StackAsset stackAsset = StackAsset.builder()
        .assetId("assetId")
        .assetManifestPath("assetManifestPath")
        .assetSelector("assetSelector")
        .assetType(AssetType.FILE)
        .isTemplate(false)

        // the properties below are optional
        .assetPublishingRoleArn("assetPublishingRoleArn")
        .displayName("displayName")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.Pipelines;

var stackAsset = new StackAsset {
    AssetId = "assetId",
    AssetManifestPath = "assetManifestPath",
    AssetSelector = "assetSelector",
    AssetType = AssetType.FILE,
    IsTemplate = false,

    // the properties below are optional
    AssetPublishingRoleArn = "assetPublishingRoleArn",
    DisplayName = "displayName"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

stackAsset := &StackAsset{
	AssetId: jsii.String("assetId"),
	AssetManifestPath: jsii.String("assetManifestPath"),
	AssetSelector: jsii.String("assetSelector"),
	AssetType: awscdk.Pipelines.AssetType_FILE,
	IsTemplate: jsii.Boolean(false),

	// the properties below are optional
	AssetPublishingRoleArn: jsii.String("assetPublishingRoleArn"),
	DisplayName: jsii.String("displayName"),
}

Properties ​

assetIdstringasset_idstrassetIdStringAssetIdstringAssetId*string required #
Asset identifier.
assetManifestPathstringasset_manifest_pathstrassetManifestPathStringAssetManifestPathstringAssetManifestPath*string required #
Absolute asset manifest path.

This needs to be made relative at a later point in time, but when this information is parsed we don't know about the root cloud assembly yet.

assetPublishingRoleArnoptionalstringasset_publishing_role_arnoptionalstrassetPublishingRoleArnoptionalStringAssetPublishingRoleArnoptionalstringAssetPublishingRoleArnoptional*string #
Role ARN to assume to publish.

Default: No need to assume any role

assetSelectorstringasset_selectorstrassetSelectorStringAssetSelectorstringAssetSelector*string required #
Asset selector to pass to `cdk-assets`.
assetTypeAssetTypeasset_typeAssetTypeassetTypeAssetTypeAssetTypeAssetTypeAssetTypeAssetType required #
Type of asset to publish.
displayNameoptionalstringdisplay_nameoptionalstrdisplayNameoptionalStringDisplayNameoptionalstringDisplayNameoptional*string #
The display name of this asset.

Default: Use some generated string as display name

isTemplatebooleanis_templateboolisTemplateBooleanIsTemplateboolIsTemplate*bool = false required #
Does this asset represent the CloudFormation template for the stack.