# AddStageOpts

Options to pass to `addStage`.

Used as argument in: [PipelineBase.addStage](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.pipelines.PipelineBase.html#addstage), [Wave.addStage](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.pipelines.Wave.html#addstage)

- Source: [`pipelines/lib/blueprint/wave.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/aws-cdk-lib/pipelines/lib/blueprint/wave.ts#L80)

## Example

TypeScript:

```ts
declare const pipeline: pipelines.CodePipeline;
const topic = new sns.Topic(this, 'SecurityChangesTopic');
topic.addSubscription(new subscriptions.EmailSubscription('test@email.com'));

const stage = new MyApplicationStage(this, 'MyApplication');
pipeline.addStage(stage, {
  pre: [
    new pipelines.ConfirmPermissionsBroadening('Check', {
      stage,
      notificationTopic: topic,
    }),
  ],
});
```

Python:

```python
# pipeline: pipelines.CodePipeline

topic = sns.Topic(self, "SecurityChangesTopic")
topic.add_subscription(subscriptions.EmailSubscription("test@email.com"))

stage = MyApplicationStage(self, "MyApplication")
pipeline.add_stage(stage,
    pre=[
        pipelines.ConfirmPermissionsBroadening("Check",
            stage=stage,
            notification_topic=topic
        )
    ]
)
```

Java:

```java
CodePipeline pipeline;

Topic topic = new Topic(this, "SecurityChangesTopic");
topic.addSubscription(new EmailSubscription("test@email.com"));

MyApplicationStage stage = new MyApplicationStage(this, "MyApplication");
pipeline.addStage(stage, AddStageOpts.builder()
        .pre(List.of(
            ConfirmPermissionsBroadening.Builder.create("Check")
                    .stage(stage)
                    .notificationTopic(topic)
                    .build()))
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
CodePipeline pipeline;

var topic = new Topic(this, "SecurityChangesTopic");
topic.AddSubscription(new EmailSubscription("test@email.com"));

var stage = new MyApplicationStage(this, "MyApplication");
pipeline.AddStage(stage, new AddStageOpts {
    Pre = new [] {
        new ConfirmPermissionsBroadening("Check", new PermissionsBroadeningCheckProps {
            Stage = stage,
            NotificationTopic = topic
        }) }
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
var pipeline CodePipeline

topic := sns.NewTopic(this, jsii.String("SecurityChangesTopic"))
topic.AddSubscription(subscriptions.NewEmailSubscription(jsii.String("test@email.com")))

stage := newMyApplicationStage(this, jsii.String("MyApplication"))
pipeline.AddStage(stage, &AddStageOpts{
	Pre: []Step{
		pipelines.NewConfirmPermissionsBroadening(jsii.String("Check"), &PermissionsBroadeningCheckProps{
			Stage: *Stage,
			NotificationTopic: topic,
		}),
	},
})
```

## Properties

- `post`: [Step](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.pipelines.Step.html)[] — Additional steps to run after all of the stacks in the stage.

  **Default:** No additional steps

- `pre`: [Step](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.pipelines.Step.html)[] — Additional steps to run before any of the stacks in the stage.

  **Default:** No additional steps

- `stackSteps`: [StackSteps](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.pipelines.StackSteps.html)[] — Instructions for stack level steps.

  **Default:** No additional instructions
