# SynthesizeStackArtifactOptions

Stack artifact options.

A subset of `cxschema.AwsCloudFormationStackProperties` of optional settings that need to be
configurable by synthesizers, plus `additionalDependencies`.

- Source: [`core/lib/stack-synthesizers/stack-synthesizer.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/core/lib/stack-synthesizers/stack-synthesizer.ts#L222)
- Type last changed: v2.160.0 · 24 Sep 2024

## Example

TypeScript:

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';

declare const assumeRoleAdditionalOptions: any;
const synthesizeStackArtifactOptions: cdk.SynthesizeStackArtifactOptions = {
  additionalDependencies: ['additionalDependencies'],
  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,
  },
  parameters: {
    parametersKey: 'parameters',
  },
  requiresBootstrapStackVersion: 123,
  stackTemplateAssetObjectUrl: 'stackTemplateAssetObjectUrl',
};
```

Python:

```python
from aws_cdk.cloud_assembly_schema import BootstrapRole
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk

# assume_role_additional_options: Any

synthesize_stack_artifact_options = cdk.SynthesizeStackArtifactOptions(
    additional_dependencies=["additionalDependencies"],
    assume_role_additional_options={
        "assume_role_additional_options_key": assume_role_additional_options
    },
    assume_role_arn="assumeRoleArn",
    assume_role_external_id="assumeRoleExternalId",
    bootstrap_stack_version_ssm_parameter="bootstrapStackVersionSsmParameter",
    cloud_formation_execution_role_arn="cloudFormationExecutionRoleArn",
    lookup_role=BootstrapRole(
        arn="arn",

        # the properties below are optional
        assume_role_additional_options={
            "assume_role_additional_options_key": assume_role_additional_options
        },
        assume_role_external_id="assumeRoleExternalId",
        bootstrap_stack_version_ssm_parameter="bootstrapStackVersionSsmParameter",
        requires_bootstrap_stack_version=123
    ),
    parameters={
        "parameters_key": "parameters"
    },
    requires_bootstrap_stack_version=123,
    stack_template_asset_object_url="stackTemplateAssetObjectUrl"
)
```

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.*;

Object assumeRoleAdditionalOptions;

SynthesizeStackArtifactOptions synthesizeStackArtifactOptions = SynthesizeStackArtifactOptions.builder()
        .additionalDependencies(List.of("additionalDependencies"))
        .assumeRoleAdditionalOptions(Map.of(
                "assumeRoleAdditionalOptionsKey", assumeRoleAdditionalOptions))
        .assumeRoleArn("assumeRoleArn")
        .assumeRoleExternalId("assumeRoleExternalId")
        .bootstrapStackVersionSsmParameter("bootstrapStackVersionSsmParameter")
        .cloudFormationExecutionRoleArn("cloudFormationExecutionRoleArn")
        .lookupRole(BootstrapRole.builder()
                .arn("arn")

                // the properties below are optional
                .assumeRoleAdditionalOptions(Map.of(
                        "assumeRoleAdditionalOptionsKey", assumeRoleAdditionalOptions))
                .assumeRoleExternalId("assumeRoleExternalId")
                .bootstrapStackVersionSsmParameter("bootstrapStackVersionSsmParameter")
                .requiresBootstrapStackVersion(123)
                .build())
        .parameters(Map.of(
                "parametersKey", "parameters"))
        .requiresBootstrapStackVersion(123)
        .stackTemplateAssetObjectUrl("stackTemplateAssetObjectUrl")
        .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;

var assumeRoleAdditionalOptions;

var synthesizeStackArtifactOptions = new SynthesizeStackArtifactOptions {
    AdditionalDependencies = new [] { "additionalDependencies" },
    AssumeRoleAdditionalOptions = new Dictionary<string, object> {
        { "assumeRoleAdditionalOptionsKey", assumeRoleAdditionalOptions }
    },
    AssumeRoleArn = "assumeRoleArn",
    AssumeRoleExternalId = "assumeRoleExternalId",
    BootstrapStackVersionSsmParameter = "bootstrapStackVersionSsmParameter",
    CloudFormationExecutionRoleArn = "cloudFormationExecutionRoleArn",
    LookupRole = new BootstrapRole {
        Arn = "arn",

        // the properties below are optional
        AssumeRoleAdditionalOptions = new Dictionary<string, object> {
            { "assumeRoleAdditionalOptionsKey", assumeRoleAdditionalOptions }
        },
        AssumeRoleExternalId = "assumeRoleExternalId",
        BootstrapStackVersionSsmParameter = "bootstrapStackVersionSsmParameter",
        RequiresBootstrapStackVersion = 123
    },
    Parameters = new Dictionary<string, string> {
        { "parametersKey", "parameters" }
    },
    RequiresBootstrapStackVersion = 123,
    StackTemplateAssetObjectUrl = "stackTemplateAssetObjectUrl"
};
```

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 cdk "github.com/aws/aws-cdk-go/awscdk"

var assumeRoleAdditionalOptions interface{}

synthesizeStackArtifactOptions := &SynthesizeStackArtifactOptions{
	AdditionalDependencies: []*string{
		jsii.String("additionalDependencies"),
	},
	AssumeRoleAdditionalOptions: map[string]interface{}{
		"assumeRoleAdditionalOptionsKey": assumeRoleAdditionalOptions,
	},
	AssumeRoleArn: jsii.String("assumeRoleArn"),
	AssumeRoleExternalId: jsii.String("assumeRoleExternalId"),
	BootstrapStackVersionSsmParameter: jsii.String("bootstrapStackVersionSsmParameter"),
	CloudFormationExecutionRoleArn: jsii.String("cloudFormationExecutionRoleArn"),
	LookupRole: &BootstrapRole{
		Arn: jsii.String("arn"),

		// the properties below are optional
		AssumeRoleAdditionalOptions: map[string]interface{}{
			"assumeRoleAdditionalOptionsKey": assumeRoleAdditionalOptions,
		},
		AssumeRoleExternalId: jsii.String("assumeRoleExternalId"),
		BootstrapStackVersionSsmParameter: jsii.String("bootstrapStackVersionSsmParameter"),
		RequiresBootstrapStackVersion: jsii.Number(123),
	},
	Parameters: map[string]*string{
		"parametersKey": jsii.String("parameters"),
	},
	RequiresBootstrapStackVersion: jsii.Number(123),
	StackTemplateAssetObjectUrl: jsii.String("stackTemplateAssetObjectUrl"),
}
```

## Properties

- `additionalDependencies`: string[] — Identifiers of additional dependencies.

  **Default:** No additional dependencies

- `assumeRoleAdditionalOptions`: { [key: string]: any } — Additional options to pass to STS when assuming the role for cloudformation deployments.

  **Default:** No additional options.

  - `RoleArn` should not be used. Use the dedicated `assumeRoleArn` property instead.
  - `ExternalId` should not be used. Use the dedicated `assumeRoleExternalId` instead.
  - `TransitiveTagKeys` defaults to use all keys (if any) specified in `Tags`. E.g, all tags are transitive by default.

- `assumeRoleArn`: string — The role that needs to be assumed to deploy the stack.

  **Default:** No role is assumed (current credentials are used)

- `assumeRoleExternalId`: string — The externalID to use with the assumeRoleArn.

  **Default:** No externalID is used

- `bootstrapStackVersionSsmParameter`: string — SSM parameter where the bootstrap stack version number can be found.

  **Default:** Bootstrap stack version number looked up

  Only used if `requiresBootstrapStackVersion` is set.

  - If this value is not set, the bootstrap stack name must be known at
    deployment time so the stack version can be looked up from the stack
    outputs.
  - If this value is set, the bootstrap stack can have any name because
    we won't need to look it up.

- `cloudFormationExecutionRoleArn`: string — The role that is passed to CloudFormation to execute the change set.

  **Default:** No role is passed (currently assumed role/credentials are used)

- `lookupRole`: [BootstrapRole](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.cloud_assembly_schema.BootstrapRole.html) = None — The role to use to look up values from the target AWS account.

- `parameters`: { [key: string]: string } — Values for CloudFormation stack parameters that should be passed when the stack is deployed.

  **Default:** No parameters

- `requiresBootstrapStackVersion`: number — Version of bootstrap stack required to deploy this stack.

  **Default:** No bootstrap stack required

- `stackTemplateAssetObjectUrl`: string — If the stack template has already been included in the asset manifest, its asset URL.

  **Default:** Not uploaded yet, upload just before deploying
