Class BootstrapOptions.Builder
java.lang.Object
software.amazon.awscdk.cli.lib.alpha.BootstrapOptions.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<BootstrapOptions>
- Enclosing interface:
BootstrapOptions
@Stability(Experimental)
public static final class BootstrapOptions.Builder
extends Object
implements software.amazon.jsii.Builder<BootstrapOptions>
A builder for
BootstrapOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassetMetadata
(Boolean assetMetadata) Sets the value ofSharedOptions.getAssetMetadata()
bootstrapBucketName
(String bootstrapBucketName) Sets the value ofBootstrapOptions.getBootstrapBucketName()
bootstrapCustomerKey
(String bootstrapCustomerKey) Sets the value ofBootstrapOptions.getBootstrapCustomerKey()
bootstrapKmsKeyId
(String bootstrapKmsKeyId) Sets the value ofBootstrapOptions.getBootstrapKmsKeyId()
build()
Builds the configured instance.caBundlePath
(String caBundlePath) Sets the value ofSharedOptions.getCaBundlePath()
cfnExecutionPolicy
(String cfnExecutionPolicy) Sets the value ofBootstrapOptions.getCfnExecutionPolicy()
Sets the value ofSharedOptions.getColor()
Sets the value ofSharedOptions.getContext()
customPermissionsBoundary
(String customPermissionsBoundary) Sets the value ofBootstrapOptions.getCustomPermissionsBoundary()
Sets the value ofSharedOptions.getDebug()
Sets the value ofSharedOptions.getEc2Creds()
examplePermissionsBoundary
(Boolean examplePermissionsBoundary) Sets the value ofBootstrapOptions.getExamplePermissionsBoundary()
Sets the value ofBootstrapOptions.getExecute()
Sets the value ofBootstrapOptions.getForce()
ignoreErrors
(Boolean ignoreErrors) Sets the value ofSharedOptions.getIgnoreErrors()
Sets the value ofSharedOptions.getJson()
Sets the value ofSharedOptions.getLookups()
Sets the value ofSharedOptions.getNotices()
pathMetadata
(Boolean pathMetadata) Sets the value ofSharedOptions.getPathMetadata()
Sets the value ofSharedOptions.getProfile()
Sets the value ofSharedOptions.getProxy()
publicAccessBlockConfiguration
(String publicAccessBlockConfiguration) Sets the value ofBootstrapOptions.getPublicAccessBlockConfiguration()
Sets the value ofBootstrapOptions.getQualifier()
Sets the value ofSharedOptions.getRoleArn()
showTemplate
(Boolean showTemplate) Sets the value ofBootstrapOptions.getShowTemplate()
Sets the value ofSharedOptions.getStacks()
Sets the value ofSharedOptions.getStaging()
Sets the value ofSharedOptions.getStrict()
Sets the value ofBootstrapOptions.getTemplate()
terminationProtection
(Boolean terminationProtection) Sets the value ofBootstrapOptions.getTerminationProtection()
toolkitStackName
(String toolkitStackName) Sets the value ofBootstrapOptions.getToolkitStackName()
Sets the value ofSharedOptions.getTrace()
Sets the value ofBootstrapOptions.getTrust()
trustForLookup
(String trustForLookup) Sets the value ofBootstrapOptions.getTrustForLookup()
usePreviousParameters
(Boolean usePreviousParameters) Sets the value ofBootstrapOptions.getUsePreviousParameters()
Sets the value ofSharedOptions.getVerbose()
versionReporting
(Boolean versionReporting) Sets the value ofSharedOptions.getVersionReporting()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bootstrapBucketName
@Stability(Experimental) public BootstrapOptions.Builder bootstrapBucketName(String bootstrapBucketName) Sets the value ofBootstrapOptions.getBootstrapBucketName()
- Parameters:
bootstrapBucketName
- The name of the CDK toolkit bucket;. bucket will be created and must not exist- Returns:
this
-
bootstrapCustomerKey
@Stability(Experimental) public BootstrapOptions.Builder bootstrapCustomerKey(String bootstrapCustomerKey) Sets the value ofBootstrapOptions.getBootstrapCustomerKey()
- Parameters:
bootstrapCustomerKey
- Create a Customer Master Key (CMK) for the bootstrap bucket (you will be charged but can customize permissions, modern bootstrapping only).- Returns:
this
-
bootstrapKmsKeyId
@Stability(Experimental) public BootstrapOptions.Builder bootstrapKmsKeyId(String bootstrapKmsKeyId) Sets the value ofBootstrapOptions.getBootstrapKmsKeyId()
- Parameters:
bootstrapKmsKeyId
- AWS KMS master key ID used for the SSE-KMS encryption.- Returns:
this
-
cfnExecutionPolicy
@Stability(Experimental) public BootstrapOptions.Builder cfnExecutionPolicy(String cfnExecutionPolicy) Sets the value ofBootstrapOptions.getCfnExecutionPolicy()
- Parameters:
cfnExecutionPolicy
- The Managed Policy ARNs that should be attached to the role performing deployments into this environment (may be repeated, modern bootstrapping only).- Returns:
this
-
customPermissionsBoundary
@Stability(Experimental) public BootstrapOptions.Builder customPermissionsBoundary(String customPermissionsBoundary) Sets the value ofBootstrapOptions.getCustomPermissionsBoundary()
- Parameters:
customPermissionsBoundary
- Use the permissions boundary specified by name.- Returns:
this
-
examplePermissionsBoundary
@Stability(Experimental) public BootstrapOptions.Builder examplePermissionsBoundary(Boolean examplePermissionsBoundary) Sets the value ofBootstrapOptions.getExamplePermissionsBoundary()
- Parameters:
examplePermissionsBoundary
- Use the example permissions boundary.- Returns:
this
-
execute
Sets the value ofBootstrapOptions.getExecute()
- Parameters:
execute
- Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet).- Returns:
this
-
force
Sets the value ofBootstrapOptions.getForce()
- Parameters:
force
- Always bootstrap even if it would downgrade template version.- Returns:
this
-
publicAccessBlockConfiguration
@Stability(Experimental) public BootstrapOptions.Builder publicAccessBlockConfiguration(String publicAccessBlockConfiguration) Sets the value ofBootstrapOptions.getPublicAccessBlockConfiguration()
- Parameters:
publicAccessBlockConfiguration
- Block public access configuration on CDK toolkit bucket (enabled by default).- Returns:
this
-
qualifier
Sets the value ofBootstrapOptions.getQualifier()
- Parameters:
qualifier
- String which must be unique for each bootstrap stack. You must configure it on your CDK app if you change this from the default.- Returns:
this
-
showTemplate
Sets the value ofBootstrapOptions.getShowTemplate()
- Parameters:
showTemplate
- Instead of actual bootstrapping, print the current CLI's bootstrapping template to stdout for customization.- Returns:
this
-
template
Sets the value ofBootstrapOptions.getTemplate()
- Parameters:
template
- Use the template from the given file instead of the built-in one (use --show-template to obtain an example).- Returns:
this
-
terminationProtection
@Stability(Experimental) public BootstrapOptions.Builder terminationProtection(Boolean terminationProtection) Sets the value ofBootstrapOptions.getTerminationProtection()
- Parameters:
terminationProtection
- Toggle CloudFormation termination protection on the bootstrap stacks.- Returns:
this
-
toolkitStackName
Sets the value ofBootstrapOptions.getToolkitStackName()
- Parameters:
toolkitStackName
- The name of the CDK toolkit stack to create.- Returns:
this
-
trust
Sets the value ofBootstrapOptions.getTrust()
- Parameters:
trust
- The AWS account IDs that should be trusted to perform deployments into this environment (may be repeated, modern bootstrapping only).- Returns:
this
-
trustForLookup
Sets the value ofBootstrapOptions.getTrustForLookup()
- Parameters:
trustForLookup
- The AWS account IDs that should be trusted to look up values in this environment (may be repeated, modern bootstrapping only).- Returns:
this
-
usePreviousParameters
@Stability(Experimental) public BootstrapOptions.Builder usePreviousParameters(Boolean usePreviousParameters) Sets the value ofBootstrapOptions.getUsePreviousParameters()
- Parameters:
usePreviousParameters
- Use previous values for existing parameters (you must specify all parameters on every deployment if this is disabled).- Returns:
this
-
assetMetadata
Sets the value ofSharedOptions.getAssetMetadata()
- Parameters:
assetMetadata
- Include "aws:asset:*" CloudFormation metadata for resources that use assets.- Returns:
this
-
caBundlePath
Sets the value ofSharedOptions.getCaBundlePath()
- Parameters:
caBundlePath
- Path to CA certificate to use when validating HTTPS requests.- Returns:
this
-
color
Sets the value ofSharedOptions.getColor()
- Parameters:
color
- Show colors and other style from console output.- Returns:
this
-
context
Sets the value ofSharedOptions.getContext()
- Parameters:
context
- Additional context.- Returns:
this
-
debug
Sets the value ofSharedOptions.getDebug()
- Parameters:
debug
- enable emission of additional debugging information, such as creation stack traces of tokens.- Returns:
this
-
ec2Creds
Sets the value ofSharedOptions.getEc2Creds()
- Parameters:
ec2Creds
- Force trying to fetch EC2 instance credentials.- Returns:
this
-
ignoreErrors
Sets the value ofSharedOptions.getIgnoreErrors()
- Parameters:
ignoreErrors
- Ignores synthesis errors, which will likely produce an invalid output.- Returns:
this
-
json
Sets the value ofSharedOptions.getJson()
- Parameters:
json
- Use JSON output instead of YAML when templates are printed to STDOUT.- Returns:
this
-
lookups
Sets the value ofSharedOptions.getLookups()
- Parameters:
lookups
- Perform context lookups. Synthesis fails if this is disabled and context lookups need to be performed- Returns:
this
-
notices
Sets the value ofSharedOptions.getNotices()
- Parameters:
notices
- Show relevant notices.- Returns:
this
-
pathMetadata
Sets the value ofSharedOptions.getPathMetadata()
- Parameters:
pathMetadata
- Include "aws:cdk:path" CloudFormation metadata for each resource.- Returns:
this
-
profile
Sets the value ofSharedOptions.getProfile()
- Parameters:
profile
- Use the indicated AWS profile as the default environment.- Returns:
this
-
proxy
Sets the value ofSharedOptions.getProxy()
- Parameters:
proxy
- Use the indicated proxy. Will read from HTTPS_PROXY environment if specified- Returns:
this
-
roleArn
Sets the value ofSharedOptions.getRoleArn()
- Parameters:
roleArn
- Role to pass to CloudFormation for deployment.- Returns:
this
-
stacks
Sets the value ofSharedOptions.getStacks()
- Parameters:
stacks
- List of stacks to deploy.- Returns:
this
-
staging
Sets the value ofSharedOptions.getStaging()
- Parameters:
staging
- Copy assets to the output directory. Needed for local debugging the source files with SAM CLI- Returns:
this
-
strict
Sets the value ofSharedOptions.getStrict()
- Parameters:
strict
- Do not construct stacks with warnings.- Returns:
this
-
trace
Sets the value ofSharedOptions.getTrace()
- Parameters:
trace
- Print trace for stack warnings.- Returns:
this
-
verbose
Sets the value ofSharedOptions.getVerbose()
- Parameters:
verbose
- show debug logs.- Returns:
this
-
versionReporting
Sets the value ofSharedOptions.getVersionReporting()
- Parameters:
versionReporting
- Include "AWS::CDK::Metadata" resource in synthesized templates.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<BootstrapOptions>
- Returns:
- a new instance of
BootstrapOptions
- Throws:
NullPointerException
- if any required attribute was not provided
-