Class CfnDistribution

java.lang.Object
software.amazon.jsii.JsiiObject
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:30:43.478Z") @Stability(Stable) public class CfnDistribution extends CfnResource implements IInspectable
A CloudFormation AWS::CloudFront::Distribution.

A distribution tells CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery.

Example:

 Bucket sourceBucket;
 Distribution myDistribution = Distribution.Builder.create(this, "MyCfWebDistribution")
         .defaultBehavior(BehaviorOptions.builder()
                 .origin(new S3Origin(sourceBucket))
                 .build())
         .build();
 CfnDistribution cfnDistribution = (CfnDistribution)myDistribution.getNode().getDefaultChild();
 cfnDistribution.overrideLogicalId("MyDistributionCFDistribution3H55TI9Q");
 
  • 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

    • CfnDistribution

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

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

      @Stability(Stable) public CfnDistribution(@NotNull Construct scope, @NotNull String id, @NotNull CfnDistributionProps props)
      Create a new AWS::CloudFront::Distribution.

      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.
    • getAttrDomainName

      @Stability(Stable) @NotNull public String getAttrDomainName()
      The domain name of the resource, such as d111111abcdef8.cloudfront.net .
    • getAttrId

      @Stability(Stable) @NotNull public String getAttrId()
      The identifier for the distribution, for example EDFDVBD632BHDS5 .
    • getCfnProperties

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

      @Stability(Stable) @NotNull public TagManager getTags()
      A complex type that contains zero or more Tag elements.
    • getDistributionConfig

      @Stability(Stable) @NotNull public Object getDistributionConfig()
      The distribution's configuration.
    • setDistributionConfig

      @Stability(Stable) public void setDistributionConfig(@NotNull IResolvable value)
      The distribution's configuration.
    • setDistributionConfig

      @Stability(Stable) public void setDistributionConfig(@NotNull CfnDistribution.DistributionConfigProperty value)
      The distribution's configuration.