Class AmiLaunchPermission.Builder
java.lang.Object
software.amazon.awscdk.services.imagebuilder.alpha.AmiLaunchPermission.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<AmiLaunchPermission>
- Enclosing interface:
AmiLaunchPermission
@Stability(Experimental)
public static final class AmiLaunchPermission.Builder
extends Object
implements software.amazon.jsii.Builder<AmiLaunchPermission>
A builder for
AmiLaunchPermission-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccountIds(List<String> accountIds) Sets the value ofAmiLaunchPermission.getAccountIds()build()Builds the configured instance.isPublicUserGroup(Boolean isPublicUserGroup) Sets the value ofAmiLaunchPermission.getIsPublicUserGroup()organizationalUnitArns(List<String> organizationalUnitArns) Sets the value ofAmiLaunchPermission.getOrganizationalUnitArns()organizationArns(List<String> organizationArns) Sets the value ofAmiLaunchPermission.getOrganizationArns()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
accountIds
Sets the value ofAmiLaunchPermission.getAccountIds()- Parameters:
accountIds- The AWS account IDs to share the AMI with.- Returns:
this
-
isPublicUserGroup
@Stability(Experimental) public AmiLaunchPermission.Builder isPublicUserGroup(Boolean isPublicUserGroup) Sets the value ofAmiLaunchPermission.getIsPublicUserGroup()- Parameters:
isPublicUserGroup- Whether to make the AMI public. Block public access for AMIs must be disabled to make the AMI public. WARNING: Making an AMI public exposes it to any AWS account globally. Ensure the AMI does not contain:- Sensitive data or credentials
- Proprietary software or configurations
- Internal network information or security settings
For more information on blocking public access for AMIs, see: Understand block public access for AMIs
- Returns:
this
-
organizationalUnitArns
@Stability(Experimental) public AmiLaunchPermission.Builder organizationalUnitArns(List<String> organizationalUnitArns) Sets the value ofAmiLaunchPermission.getOrganizationalUnitArns()- Parameters:
organizationalUnitArns- The ARNs for the AWS Organizations organizational units to share the AMI with.- Returns:
this
-
organizationArns
@Stability(Experimental) public AmiLaunchPermission.Builder organizationArns(List<String> organizationArns) Sets the value ofAmiLaunchPermission.getOrganizationArns()- Parameters:
organizationArns- The ARNs for the AWS Organization that you want to share the AMI with.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<AmiLaunchPermission>- Returns:
- a new instance of
AmiLaunchPermission - Throws:
NullPointerException- if any required attribute was not provided
-