Class CfnDistributionConfiguration

java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:57.420Z") @Stability(Stable) public class CfnDistributionConfiguration extends CfnResource implements IInspectable
A CloudFormation AWS::ImageBuilder::DistributionConfiguration.

A distribution configuration allows you to specify the name and description of your output AMI, authorize other AWS account s to launch the AMI, and replicate the AMI to other AWS Regions . It also allows you to export the AMI to Amazon S3 .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.imagebuilder.*;
 Object amiDistributionConfiguration;
 Object containerDistributionConfiguration;
 CfnDistributionConfiguration cfnDistributionConfiguration = CfnDistributionConfiguration.Builder.create(this, "MyCfnDistributionConfiguration")
         .distributions(List.of(DistributionProperty.builder()
                 .region("region")
                 // the properties below are optional
                 .amiDistributionConfiguration(amiDistributionConfiguration)
                 .containerDistributionConfiguration(containerDistributionConfiguration)
                 .fastLaunchConfigurations(List.of(FastLaunchConfigurationProperty.builder()
                         .accountId("accountId")
                         .enabled(false)
                         .launchTemplate(FastLaunchLaunchTemplateSpecificationProperty.builder()
                                 .launchTemplateId("launchTemplateId")
                                 .launchTemplateName("launchTemplateName")
                                 .launchTemplateVersion("launchTemplateVersion")
                                 .build())
                         .maxParallelLaunches(123)
                         .snapshotConfiguration(FastLaunchSnapshotConfigurationProperty.builder()
                                 .targetResourceCount(123)
                                 .build())
                         .build()))
                 .launchTemplateConfigurations(List.of(LaunchTemplateConfigurationProperty.builder()
                         .accountId("accountId")
                         .launchTemplateId("launchTemplateId")
                         .setDefaultVersion(false)
                         .build()))
                 .licenseConfigurationArns(List.of("licenseConfigurationArns"))
                 .build()))
         .name("name")
         // the properties below are optional
         .description("description")
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnDistributionConfiguration

      protected CfnDistributionConfiguration(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnDistributionConfiguration

      protected CfnDistributionConfiguration(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnDistributionConfiguration

      @Stability(Stable) public CfnDistributionConfiguration(@NotNull Construct scope, @NotNull String id, @NotNull CfnDistributionConfigurationProps props)
      Create a new AWS::ImageBuilder::DistributionConfiguration.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      Returns the Amazon Resource Name (ARN) of this distribution configuration.

      The following pattern is applied: ^arn:aws[^:]*:imagebuilder:[^:]+:(?:\d{12}|aws):(?:image-recipe|infrastructure-configuration|distribution-configuration|component|image|image-pipeline)/[a-z0-9-_]+(?:/(?:(?:x|\d+)\.(?:x|\d+)\.(?:x|\d+))(?:/\d+)?)?$ .

    • getAttrName

      @Stability(Stable) @NotNull public String getAttrName()
      Returns the name of the distribution configuration.
    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getTags

      @Stability(Stable) @NotNull public TagManager getTags()
      The tags of this distribution configuration.
    • getDistributions

      @Stability(Stable) @NotNull public Object getDistributions()
      The distributions of this distribution configuration formatted as an array of Distribution objects.
    • setDistributions

      @Stability(Stable) public void setDistributions(@NotNull IResolvable value)
      The distributions of this distribution configuration formatted as an array of Distribution objects.
    • setDistributions

      @Stability(Stable) public void setDistributions(@NotNull List<Object> value)
      The distributions of this distribution configuration formatted as an array of Distribution objects.
    • getName

      @Stability(Stable) @NotNull public String getName()
      The name of this distribution configuration.
    • setName

      @Stability(Stable) public void setName(@NotNull String value)
      The name of this distribution configuration.
    • getDescription

      @Stability(Stable) @Nullable public String getDescription()
      The description of this distribution configuration.
    • setDescription

      @Stability(Stable) public void setDescription(@Nullable String value)
      The description of this distribution configuration.