BootstrapRole

class aws_cdk.app_staging_synthesizer_alpha.BootstrapRole(*args: Any, **kwargs)

Bases: object

(experimental) Bootstrapped role specifier.

These roles must exist already. This class does not create new IAM Roles.

Stability:

experimental

ExampleMetadata:

infused

Example:

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")
        )
    )
)

Methods

is_cli_credentials()

(experimental) Whether or not this is object was created using BootstrapRole.cliCredentials().

Stability:

experimental

Return type:

bool

Static Methods

classmethod cli_credentials()

(experimental) Use the currently assumed role/credentials.

Stability:

experimental

Return type:

BootstrapRole

classmethod from_role_arn(arn)

(experimental) Specify an existing IAM Role to assume.

Parameters:

arn (str) –

Stability:

experimental

Return type:

BootstrapRole