Experimental
@aws-cdk/app-staging-synthesizer-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
BootstrapRoles Struct
Roles that are bootstrapped to your account.
| Stability | Experimental |
|---|---|
| Source | lib/bootstrap-roles.ts |
Example
ts
import { BucketEncryption } from 'aws-cdk-lib/aws-s3';
const app = new App({
defaultStackSynthesizer: AppStagingSynthesizer.defaultResources({
appId: 'my-app-id',
stagingBucketEncryption: BucketEncryption.S3_MANAGED,
deploymentIdentities: DeploymentIdentities.specifyRoles({
cloudFormationExecutionRole: BootstrapRole.fromRoleArn('arn:aws:iam::123456789012:role/Execute'),
deploymentRole: BootstrapRole.fromRoleArn('arn:aws:iam::123456789012:role/Deploy'),
lookupRole: BootstrapRole.fromRoleArn('arn:aws:iam::123456789012:role/Lookup'),
}),
}),
});
python
from aws_cdk.aws_s3 import BucketEncryption
app = App(
default_stack_synthesizer=AppStagingSynthesizer.default_resources(
app_id="my-app-id",
staging_bucket_encryption=BucketEncryption.S3_MANAGED,
deployment_identities=DeploymentIdentities.specify_roles(
cloud_formation_execution_role=BootstrapRole.from_role_arn("arn:aws:iam::123456789012:role/Execute"),
deployment_role=BootstrapRole.from_role_arn("arn:aws:iam::123456789012:role/Deploy"),
lookup_role=BootstrapRole.from_role_arn("arn:aws:iam::123456789012:role/Lookup")
)
)
)
java
import software.amazon.awscdk.services.s3.BucketEncryption;
App app = App.Builder.create()
.defaultStackSynthesizer(AppStagingSynthesizer.defaultResources(DefaultResourcesOptions.builder()
.appId("my-app-id")
.stagingBucketEncryption(BucketEncryption.S3_MANAGED)
.deploymentIdentities(DeploymentIdentities.specifyRoles(BootstrapRoles.builder()
.cloudFormationExecutionRole(BootstrapRole.fromRoleArn("arn:aws:iam::123456789012:role/Execute"))
.deploymentRole(BootstrapRole.fromRoleArn("arn:aws:iam::123456789012:role/Deploy"))
.lookupRole(BootstrapRole.fromRoleArn("arn:aws:iam::123456789012:role/Lookup"))
.build()))
.build()))
.build();
csharp
// Install: dotnet add package Amazon.CDK.AppStagingSynthesizer.Alpha
using Amazon.CDK.AWS.S3;
var app = new App(new AppProps {
DefaultStackSynthesizer = AppStagingSynthesizer.DefaultResources(new DefaultResourcesOptions {
AppId = "my-app-id",
StagingBucketEncryption = BucketEncryption.S3_MANAGED,
DeploymentIdentities = DeploymentIdentities.SpecifyRoles(new BootstrapRoles {
CloudFormationExecutionRole = BootstrapRole.FromRoleArn("arn:aws:iam::123456789012:role/Execute"),
DeploymentRole = BootstrapRole.FromRoleArn("arn:aws:iam::123456789012:role/Deploy"),
LookupRole = BootstrapRole.FromRoleArn("arn:aws:iam::123456789012:role/Lookup")
})
})
});
go
// Install: go get github.com/aws/aws-cdk-go/appstagingsynthesizeralpha/v2
import "github.com/aws/aws-cdk-go/awscdk"
app := awscdk.NewApp(&AppProps{
DefaultStackSynthesizer: appstagingsynthesizeralpha.AppStagingSynthesizer_DefaultResources(&DefaultResourcesOptions{
AppId: jsii.String("my-app-id"),
StagingBucketEncryption: awscdk.BucketEncryption_S3_MANAGED,
DeploymentIdentities: appstagingsynthesizeralpha.DeploymentIdentities_SpecifyRoles(&BootstrapRoles{
CloudFormationExecutionRole: appstagingsynthesizeralpha.BootstrapRole_FromRoleArn(jsii.String("arn:aws:iam::123456789012:role/Execute")),
DeploymentRole: appstagingsynthesizeralpha.BootstrapRole_*FromRoleArn(jsii.String("arn:aws:iam::123456789012:role/Deploy")),
LookupRole: appstagingsynthesizeralpha.BootstrapRole_*FromRoleArn(jsii.String("arn:aws:iam::123456789012:role/Lookup")),
}),
}),
})
Properties
cloudFormationExecutionRoleoptionalBootstrapRolecloud_formation_execution_roleoptionalBootstrapRolecloudFormationExecutionRoleoptionalBootstrapRoleCloudFormationExecutionRoleoptionalBootstrapRoleCloudFormationExecutionRoleoptionalBootstrapRole #CloudFormation Execution Role.
Default: use bootstrapped role
deploymentRoleoptionalBootstrapRoledeployment_roleoptionalBootstrapRoledeploymentRoleoptionalBootstrapRoleDeploymentRoleoptionalBootstrapRoleDeploymentRoleoptionalBootstrapRole #Deployment Action Role.
Default: use boostrapped role
lookupRoleoptionalBootstrapRolelookup_roleoptionalBootstrapRolelookupRoleoptionalBootstrapRoleLookupRoleoptionalBootstrapRoleLookupRoleoptionalBootstrapRole #Lookup Role.
Default: use bootstrapped role