Class AmiDistribution.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.AmiDistribution.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AmiDistribution>
- Enclosing interface:
AmiDistribution
@Stability(Experimental)
public static final class AmiDistribution.Builder
extends Object
implements software.amazon.jsii.Builder<AmiDistribution>
A builder for
AmiDistribution-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionamiDescription(String amiDescription) Sets the value ofAmiDistribution.getAmiDescription()Sets the value ofAmiDistribution.getAmiKmsKey()amiLaunchPermission(AmiLaunchPermission amiLaunchPermission) Sets the value ofAmiDistribution.getAmiLaunchPermission()Sets the value ofAmiDistribution.getAmiName()Sets the value ofAmiDistribution.getAmiTags()amiTargetAccountIds(List<String> amiTargetAccountIds) Sets the value ofAmiDistribution.getAmiTargetAccountIds()build()Builds the configured instance.fastLaunchConfigurations(List<? extends FastLaunchConfiguration> fastLaunchConfigurations) Sets the value ofAmiDistribution.getFastLaunchConfigurations()launchTemplates(List<? extends LaunchTemplateConfiguration> launchTemplates) Sets the value ofAmiDistribution.getLaunchTemplates()licenseConfigurationArns(List<String> licenseConfigurationArns) Sets the value ofAmiDistribution.getLicenseConfigurationArns()Sets the value ofAmiDistribution.getRegion()ssmParameters(List<? extends SSMParameterConfigurations> ssmParameters) Sets the value ofAmiDistribution.getSsmParameters()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
amiDescription
Sets the value ofAmiDistribution.getAmiDescription()- Parameters:
amiDescription- The description of the AMI.- Returns:
this
-
amiKmsKey
Sets the value ofAmiDistribution.getAmiKmsKey()- Parameters:
amiKmsKey- The KMS key to encrypt the distributed AMI with.- Returns:
this
-
amiLaunchPermission
@Stability(Experimental) public AmiDistribution.Builder amiLaunchPermission(AmiLaunchPermission amiLaunchPermission) Sets the value ofAmiDistribution.getAmiLaunchPermission()- Parameters:
amiLaunchPermission- The launch permissions for the AMI, defining which principals are allowed to access the AMI.- Returns:
this
-
amiName
Sets the value ofAmiDistribution.getAmiName()- Parameters:
amiName- The name to use for the distributed AMIs.- Returns:
this
-
amiTags
Sets the value ofAmiDistribution.getAmiTags()- Parameters:
amiTags- The tags to apply to the distributed AMIs.- Returns:
this
-
amiTargetAccountIds
@Stability(Experimental) public AmiDistribution.Builder amiTargetAccountIds(List<String> amiTargetAccountIds) Sets the value ofAmiDistribution.getAmiTargetAccountIds()- Parameters:
amiTargetAccountIds- The account IDs to copy the output AMI to.- Returns:
this
-
fastLaunchConfigurations
@Stability(Experimental) public AmiDistribution.Builder fastLaunchConfigurations(List<? extends FastLaunchConfiguration> fastLaunchConfigurations) Sets the value ofAmiDistribution.getFastLaunchConfigurations()- Parameters:
fastLaunchConfigurations- The fast launch configurations to use for enabling EC2 Fast Launch on the distributed Windows AMI.- Returns:
this
-
launchTemplates
@Stability(Experimental) public AmiDistribution.Builder launchTemplates(List<? extends LaunchTemplateConfiguration> launchTemplates) Sets the value ofAmiDistribution.getLaunchTemplates()- Parameters:
launchTemplates- The launch templates to apply the distributed AMI to.- Returns:
this
-
licenseConfigurationArns
@Stability(Experimental) public AmiDistribution.Builder licenseConfigurationArns(List<String> licenseConfigurationArns) Sets the value ofAmiDistribution.getLicenseConfigurationArns()- Parameters:
licenseConfigurationArns- The License Manager license configuration ARNs to apply to the distributed AMIs.- Returns:
this
-
region
Sets the value ofAmiDistribution.getRegion()- Parameters:
region- The target region to distribute AMIs to.- Returns:
this
-
ssmParameters
@Stability(Experimental) public AmiDistribution.Builder ssmParameters(List<? extends SSMParameterConfigurations> ssmParameters) Sets the value ofAmiDistribution.getSsmParameters()- Parameters:
ssmParameters- The SSM parameters to create or update for the distributed AMIs.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AmiDistribution>- Returns:
- a new instance of
AmiDistribution - Throws:
NullPointerException- if any required attribute was not provided
-