# StackSetParameters

Base parameters for the StackSet.

Obtainable from: StackSetParameters.fromArtifactPath, StackSetParameters.fromLiteral

- Source: [`aws-codepipeline-actions/lib/cloudformation/stackset-types.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/aws-codepipeline-actions/lib/cloudformation/stackset-types.ts#L218)
- Type last changed: v2.13.0 · 19 Feb 2022

## Example

TypeScript:

```ts
const parameters = codepipeline_actions.StackSetParameters.fromLiteral({
 BucketName: 'my-bucket',
 Asset1: 'true',
});
```

Python:

```python
parameters = codepipeline_actions.StackSetParameters.from_literal({
    "BucketName": "my-bucket",
    "Asset1": "true"
})
```

Java:

```java
StackSetParameters parameters = StackSetParameters.fromLiteral(Map.of(
        "BucketName", "my-bucket",
        "Asset1", "true"));
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
var parameters = StackSetParameters.FromLiteral(new Dictionary<string, string> {
    { "BucketName", "my-bucket" },
    { "Asset1", "true" }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
parameters := codepipeline_actions.StackSetParameters_FromLiteral(map[string]*string{
	"BucketName": jsii.String("my-bucket"),
	"Asset1": jsii.String("true"),
})
```

## Initializer

TypeScript:

```ts
new StackSetParameters()
```

Python:

```python
StackSetParameters()
```

Java:

```java
new StackSetParameters()
```

C# / .NET:

```csharp
new StackSetParameters()
```

Golang:

```go
NewStackSetParameters()
```

## Methods

- `fromArtifactPath(artifactPath: ArtifactPath): StackSetParameters // chainable` (static) — Read the parameters from a JSON file from one of the pipeline's artifacts.

  The file needs to contain a list of `{ ParameterKey, ParameterValue, UsePreviousValue }` objects, like
  this:

  ```
  [
      {
          "ParameterKey": "BucketName",
          "ParameterValue": "my-bucket"
      },
      {
          "ParameterKey": "Asset1",
          "ParameterValue": "true"
      },
      {
          "ParameterKey": "Asset2",
          "UsePreviousValue": true
      }
  ]
  ```

  You must specify all template parameters. Parameters you don't specify will revert
  to their `Default` values as specified in the template.

  For of parameters you want to retain their existing values
  without specifying what those values are, set `UsePreviousValue: true`.
  Use of this feature is discouraged. CDK is for
  specifying desired-state infrastructure, and use of this feature makes the
  parameter values unmanaged.

- `fromLiteral(parameters: { [key: string]: string }, usePreviousValues?: string[]): StackSetParameters // chainable` (static) — A list of template parameters for your stack set.

  You must specify all template parameters. Parameters you don't specify will revert
  to their `Default` values as specified in the template.

  Specify the names of parameters you want to retain their existing values,
  without specifying what those values are, in an array in the second
  argument to this function. Use of this feature is discouraged. CDK is for
  specifying desired-state infrastructure, and use of this feature makes the
  parameter values unmanaged.

  ```ts
  const parameters = codepipeline_actions.StackSetParameters.fromLiteral({
   BucketName: 'my-bucket',
   Asset1: 'true',
  });
  ```
