> **Experimental**
>
> `@aws-cdk/app-staging-synthesizer-alpha` is an [**experimental**](https://docs.aws.amazon.com/cdk/api/stability.html) (alpha) package: its API may change in any release, without a major version bump.
# AppStagingSynthesizer

App Staging Synthesizer.

Extends: [StackSynthesizer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.StackSynthesizer.html) › AppStagingSynthesizer
Implements: [IReusableStackSynthesizer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IReusableStackSynthesizer.html), [IStackSynthesizer](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.IStackSynthesizer.html)
Obtainable from: AppStagingSynthesizer.customFactory, AppStagingSynthesizer.customResources, AppStagingSynthesizer.defaultResources

- Stability: [Experimental](https://docs.aws.amazon.com/cdk/api/stability.html)
- Source: [`lib/app-staging-synthesizer.ts`](https://github.com/aws/aws-cdk/blob/v2.278.0/packages/@aws-cdk/app-staging-synthesizer-alpha/lib/app-staging-synthesizer.ts#L104)

## Example

TypeScript:

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

declare const deploymentIdentities: app_staging_synthesizer_alpha.DeploymentIdentities;
declare const stagingResourcesFactory: app_staging_synthesizer_alpha.IStagingResourcesFactory;
const appStagingSynthesizer = app_staging_synthesizer_alpha.AppStagingSynthesizer.customFactory({
  factory: stagingResourcesFactory,

  // the properties below are optional
  bootstrapQualifier: 'bootstrapQualifier',
  deploymentIdentities: deploymentIdentities,
  oncePerEnv: false,
});
```

Python:

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

# deployment_identities: app_staging_synthesizer_alpha.DeploymentIdentities
# staging_resources_factory: app_staging_synthesizer_alpha.IStagingResourcesFactory

app_staging_synthesizer = app_staging_synthesizer_alpha.AppStagingSynthesizer.custom_factory(
    factory=staging_resources_factory,

    # the properties below are optional
    bootstrap_qualifier="bootstrapQualifier",
    deployment_identities=deployment_identities,
    once_per_env=False
)
```

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.app.staging.synthesizer.alpha.*;

DeploymentIdentities deploymentIdentities;
IStagingResourcesFactory stagingResourcesFactory;

AppStagingSynthesizer appStagingSynthesizer = AppStagingSynthesizer.customFactory(CustomFactoryOptions.builder()
        .factory(stagingResourcesFactory)

        // the properties below are optional
        .bootstrapQualifier("bootstrapQualifier")
        .deploymentIdentities(deploymentIdentities)
        .oncePerEnv(false)
        .build());
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.AppStagingSynthesizer.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AppStagingSynthesizer.Alpha;

DeploymentIdentities deploymentIdentities;
IStagingResourcesFactory stagingResourcesFactory;

var appStagingSynthesizer = AppStagingSynthesizer.CustomFactory(new CustomFactoryOptions {
    Factory = stagingResourcesFactory,

    // the properties below are optional
    BootstrapQualifier = "bootstrapQualifier",
    DeploymentIdentities = deploymentIdentities,
    OncePerEnv = false
});
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/appstagingsynthesizeralpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import app_staging_synthesizer_alpha "github.com/aws/aws-cdk-go/appstagingsynthesizeralpha"

var deploymentIdentities DeploymentIdentities
var stagingResourcesFactory IStagingResourcesFactory

appStagingSynthesizer := app_staging_synthesizer_alpha.AppStagingSynthesizer_CustomFactory(&CustomFactoryOptions{
	Factory: stagingResourcesFactory,

	// the properties below are optional
	BootstrapQualifier: jsii.String("bootstrapQualifier"),
	DeploymentIdentities: deploymentIdentities,
	OncePerEnv: jsii.Boolean(false),
})
```

## Properties

- `bootstrapQualifier`: string — The qualifier used to bootstrap this stack.

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

- `DEFAULT_CLOUDFORMATION_ROLE_ARN`: string (static) — Default CloudFormation role ARN.

- `DEFAULT_DEPLOY_ROLE_ARN`: string (static) — Default deploy role ARN.

- `DEFAULT_LOOKUP_ROLE_ARN`: string (static) — Default lookup role ARN for missing values.

- `DEFAULT_QUALIFIER`: string (static) — Default ARN qualifier.

- `lookupRole`: string — The role used to lookup for this stack.

## Methods

- `addDockerImageAsset(_asset: DockerImageAssetSource): DockerImageAssetLocation` — Implemented for legacy purposes;

  this will never be called.

- `addFileAsset(_asset: FileAssetSource): FileAssetLocation` — Implemented for legacy purposes;

  this will never be called.

- `bind(_stack: Stack): void` — Implemented for legacy purposes;

  this will never be called.

- `customFactory(options: CustomFactoryOptions): AppStagingSynthesizer // chainable` (static) — Supply your own stagingStackFactory method for creating an IStagingStack when a stack is bound to the synthesizer.

  By default, `oncePerEnv = true`, which means that a new instance of the IStagingStack
  will be created in new environments. Set `oncePerEnv = false` to turn off that behavior.

- `customResources(options: CustomResourcesOptions): AppStagingSynthesizer // chainable` (static) — Use these exact staging resources for every stack that this synthesizer is used for.

- `defaultResources(options: DefaultResourcesOptions): AppStagingSynthesizer // chainable` (static) — Use the Default Staging Resources, creating a single stack per environment this app is deployed in.

- `reusableBind(stack: Stack): IBoundStackSynthesizer` — Returns a version of the synthesizer bound to a stack.

- `synthesize(_session: ISynthesisSession): void` — Implemented for legacy purposes;

  this will never be called.
