# StackAsset

An asset used by a Stack.

- Source: [`pipelines/lib/blueprint/stack-deployment.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/pipelines/lib/blueprint/stack-deployment.ts#L257)
- Type last changed: v2.187.0 · 31 Mar 2025

## Example

TypeScript:

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

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

```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();
```

C# / .NET:

```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"
};
```

Golang:

```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

- `assetId`: string (required) — Asset identifier.

- `assetManifestPath`: 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.

- `assetPublishingRoleArn`: string — Role ARN to assume to publish.

  **Default:** No need to assume any role

- `assetSelector`: string (required) — Asset selector to pass to `cdk-assets`.

- `assetType`: [AssetType](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.pipelines.AssetType.html) (required) — Type of asset to publish.

- `displayName`: string — The display name of this asset.

  **Default:** Use some generated string as display name

- `isTemplate`: boolean (required) = false — Does this asset represent the CloudFormation template for the stack.
