Class CfnInfrastructureConfigurationMixinProps.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.imagebuilder.CfnInfrastructureConfigurationMixinProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnInfrastructureConfigurationMixinProps>
- Enclosing interface:
CfnInfrastructureConfigurationMixinProps
@Stability(Stable)
public static final class CfnInfrastructureConfigurationMixinProps.Builder
extends Object
implements software.amazon.jsii.Builder<CfnInfrastructureConfigurationMixinProps>
A builder for
CfnInfrastructureConfigurationMixinProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.description(String description) Sets the value ofCfnInfrastructureConfigurationMixinProps.getDescription()instanceMetadataOptions(CfnInfrastructureConfigurationPropsMixin.InstanceMetadataOptionsProperty instanceMetadataOptions) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceMetadataOptions()instanceMetadataOptions(IResolvable instanceMetadataOptions) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceMetadataOptions()instanceProfileName(String instanceProfileName) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceProfileName()instanceProfileName(IInstanceProfileRef instanceProfileName) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceProfileName()instanceTypes(List<String> instanceTypes) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceTypes()Sets the value ofCfnInfrastructureConfigurationMixinProps.getKeyPair()Sets the value ofCfnInfrastructureConfigurationMixinProps.getLogging()logging(IResolvable logging) Sets the value ofCfnInfrastructureConfigurationMixinProps.getLogging()Sets the value ofCfnInfrastructureConfigurationMixinProps.getName()Sets the value ofCfnInfrastructureConfigurationMixinProps.getPlacement()placement(IResolvable placement) Sets the value ofCfnInfrastructureConfigurationMixinProps.getPlacement()resourceTags(Map<String, String> resourceTags) Sets the value ofCfnInfrastructureConfigurationMixinProps.getResourceTags()resourceTags(IResolvable resourceTags) Sets the value ofCfnInfrastructureConfigurationMixinProps.getResourceTags()securityGroupIds(List<String> securityGroupIds) Sets the value ofCfnInfrastructureConfigurationMixinProps.getSecurityGroupIds()snsTopicArn(String snsTopicArn) Sets the value ofCfnInfrastructureConfigurationMixinProps.getSnsTopicArn()snsTopicArn(ITopicRef snsTopicArn) Sets the value ofCfnInfrastructureConfigurationMixinProps.getSnsTopicArn()Sets the value ofCfnInfrastructureConfigurationMixinProps.getSubnetId()Sets the value ofCfnInfrastructureConfigurationMixinProps.getTags()terminateInstanceOnFailure(Boolean terminateInstanceOnFailure) Sets the value ofCfnInfrastructureConfigurationMixinProps.getTerminateInstanceOnFailure()terminateInstanceOnFailure(IResolvable terminateInstanceOnFailure) Sets the value ofCfnInfrastructureConfigurationMixinProps.getTerminateInstanceOnFailure()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
description
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder description(String description) Sets the value ofCfnInfrastructureConfigurationMixinProps.getDescription()- Parameters:
description- The description of the infrastructure configuration.- Returns:
this
-
instanceMetadataOptions
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder instanceMetadataOptions(IResolvable instanceMetadataOptions) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceMetadataOptions()- Parameters:
instanceMetadataOptions- The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances.- Returns:
this
-
instanceMetadataOptions
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder instanceMetadataOptions(CfnInfrastructureConfigurationPropsMixin.InstanceMetadataOptionsProperty instanceMetadataOptions) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceMetadataOptions()- Parameters:
instanceMetadataOptions- The instance metadata options that you can set for the HTTP requests that pipeline builds use to launch EC2 build and test instances.- Returns:
this
-
instanceProfileName
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder instanceProfileName(String instanceProfileName) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceProfileName()- Parameters:
instanceProfileName- The instance profile to associate with the instance used to customize your Amazon EC2 AMI.- Returns:
this
-
instanceProfileName
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder instanceProfileName(IInstanceProfileRef instanceProfileName) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceProfileName()- Parameters:
instanceProfileName- The instance profile to associate with the instance used to customize your Amazon EC2 AMI.- Returns:
this
-
instanceTypes
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder instanceTypes(List<String> instanceTypes) Sets the value ofCfnInfrastructureConfigurationMixinProps.getInstanceTypes()- Parameters:
instanceTypes- The instance types of the infrastructure configuration. You can specify one or more instance types to use for this build. The service will pick one of these instance types based on availability.- Returns:
this
-
keyPair
Sets the value ofCfnInfrastructureConfigurationMixinProps.getKeyPair()- Parameters:
keyPair- The key pair of the infrastructure configuration. You can use this to log on to and debug the instance used to create your image.- Returns:
this
-
logging
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder logging(IResolvable logging) Sets the value ofCfnInfrastructureConfigurationMixinProps.getLogging()- Parameters:
logging- The logging configuration of the infrastructure configuration.- Returns:
this
-
logging
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder logging(CfnInfrastructureConfigurationPropsMixin.LoggingProperty logging) Sets the value ofCfnInfrastructureConfigurationMixinProps.getLogging()- Parameters:
logging- The logging configuration of the infrastructure configuration.- Returns:
this
-
name
Sets the value ofCfnInfrastructureConfigurationMixinProps.getName()- Parameters:
name- The name of the infrastructure configuration.- Returns:
this
-
placement
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder placement(IResolvable placement) Sets the value ofCfnInfrastructureConfigurationMixinProps.getPlacement()- Parameters:
placement- The instance placement settings that define where the instances that are launched from your image will run.- Returns:
this
-
placement
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder placement(CfnInfrastructureConfigurationPropsMixin.PlacementProperty placement) Sets the value ofCfnInfrastructureConfigurationMixinProps.getPlacement()- Parameters:
placement- The instance placement settings that define where the instances that are launched from your image will run.- Returns:
this
-
resourceTags
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder resourceTags(Map<String, String> resourceTags) Sets the value ofCfnInfrastructureConfigurationMixinProps.getResourceTags()- Parameters:
resourceTags- The metadata tags to assign to the Amazon EC2 instance that Image Builder launches during the build process. Tags are formatted as key value pairs.- Returns:
this
-
resourceTags
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder resourceTags(IResolvable resourceTags) Sets the value ofCfnInfrastructureConfigurationMixinProps.getResourceTags()- Parameters:
resourceTags- The metadata tags to assign to the Amazon EC2 instance that Image Builder launches during the build process. Tags are formatted as key value pairs.- Returns:
this
-
securityGroupIds
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder securityGroupIds(List<String> securityGroupIds) Sets the value ofCfnInfrastructureConfigurationMixinProps.getSecurityGroupIds()- Parameters:
securityGroupIds- The security group IDs to associate with the instance used to customize your Amazon EC2 AMI.- Returns:
this
-
snsTopicArn
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder snsTopicArn(String snsTopicArn) Sets the value ofCfnInfrastructureConfigurationMixinProps.getSnsTopicArn()- Parameters:
snsTopicArn- The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.
- Returns:
this
-
snsTopicArn
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder snsTopicArn(ITopicRef snsTopicArn) Sets the value ofCfnInfrastructureConfigurationMixinProps.getSnsTopicArn()- Parameters:
snsTopicArn- The Amazon Resource Name (ARN) for the SNS topic to which we send image build event notifications.EC2 Image Builder is unable to send notifications to SNS topics that are encrypted using keys from other accounts. The key that is used to encrypt the SNS topic must reside in the account that the Image Builder service runs under.
- Returns:
this
-
subnetId
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder subnetId(String subnetId) Sets the value ofCfnInfrastructureConfigurationMixinProps.getSubnetId()- Parameters:
subnetId- The subnet ID in which to place the instance used to customize your Amazon EC2 AMI.- Returns:
this
-
tags
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder tags(Map<String, String> tags) Sets the value ofCfnInfrastructureConfigurationMixinProps.getTags()- Parameters:
tags- The metadata tags to assign to the infrastructure configuration resource that Image Builder creates as output. Tags are formatted as key value pairs.- Returns:
this
-
terminateInstanceOnFailure
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder terminateInstanceOnFailure(Boolean terminateInstanceOnFailure) Sets the value ofCfnInfrastructureConfigurationMixinProps.getTerminateInstanceOnFailure()- Parameters:
terminateInstanceOnFailure- The terminate instance on failure setting of the infrastructure configuration. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails.- Returns:
this
-
terminateInstanceOnFailure
@Stability(Stable) public CfnInfrastructureConfigurationMixinProps.Builder terminateInstanceOnFailure(IResolvable terminateInstanceOnFailure) Sets the value ofCfnInfrastructureConfigurationMixinProps.getTerminateInstanceOnFailure()- Parameters:
terminateInstanceOnFailure- The terminate instance on failure setting of the infrastructure configuration. Set to false if you want Image Builder to retain the instance used to configure your AMI if the build or test phase of your workflow fails.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<CfnInfrastructureConfigurationMixinProps>- Returns:
- a new instance of
CfnInfrastructureConfigurationMixinProps - Throws:
NullPointerException- if any required attribute was not provided
-