paws.networking (version 0.1.6)

cloudfront_create_distribution: Creates a new web distribution

Description

Creates a new web distribution. You create a CloudFront distribution to tell CloudFront where you want content to be delivered from, and the details about how to track and manage content delivery. Send a POST request to the /<i>CloudFront API version</i>/distribution/distribution ID resource.

Usage

cloudfront_create_distribution(DistributionConfig)

Arguments

DistributionConfig

[required] The distribution\'s configuration information.

Request syntax

svc$create_distribution(
  DistributionConfig = list(
    CallerReference = "string",
    Aliases = list(
      Quantity = 123,
      Items = list(
        "string"
      )
    ),
    DefaultRootObject = "string",
    Origins = list(
      Quantity = 123,
      Items = list(
        list(
          Id = "string",
          DomainName = "string",
          OriginPath = "string",
          CustomHeaders = list(
            Quantity = 123,
            Items = list(
              list(
                HeaderName = "string",
                HeaderValue = "string"
              )
            )
          ),
          S3OriginConfig = list(
            OriginAccessIdentity = "string"
          ),
          CustomOriginConfig = list(
            HTTPPort = 123,
            HTTPSPort = 123,
            OriginProtocolPolicy = "http-only"|"match-viewer"|"https-only",
            OriginSslProtocols = list(
              Quantity = 123,
              Items = list(
                "SSLv3"|"TLSv1"|"TLSv1.1"|"TLSv1.2"
              )
            ),
            OriginReadTimeout = 123,
            OriginKeepaliveTimeout = 123
          )
        )
      )
    ),
    OriginGroups = list(
      Quantity = 123,
      Items = list(
        list(
          Id = "string",
          FailoverCriteria = list(
            StatusCodes = list(
              Quantity = 123,
              Items = list(
                123
              )
            )
          ),
          Members = list(
            Quantity = 123,
            Items = list(
              list(
                OriginId = "string"
              )
            )
          )
        )
      )
    ),
    DefaultCacheBehavior = list(
      TargetOriginId = "string",
      ForwardedValues = list(
        QueryString = TRUE|FALSE,
        Cookies = list(
          Forward = "none"|"whitelist"|"all",
          WhitelistedNames = list(
            Quantity = 123,
            Items = list(
              "string"
            )
          )
        ),
        Headers = list(
          Quantity = 123,
          Items = list(
            "string"
          )
        ),
        QueryStringCacheKeys = list(
          Quantity = 123,
          Items = list(
            "string"
          )
        )
      ),
      TrustedSigners = list(
        Enabled = TRUE|FALSE,
        Quantity = 123,
        Items = list(
          "string"
        )
      ),
      ViewerProtocolPolicy = "allow-all"|"https-only"|"redirect-to-https",
      MinTTL = 123,
      AllowedMethods = list(
        Quantity = 123,
        Items = list(
          "GET"|"HEAD"|"POST"|"PUT"|"PATCH"|"OPTIONS"|"DELETE"
        ),
        CachedMethods = list(
          Quantity = 123,
          Items = list(
            "GET"|"HEAD"|"POST"|"PUT"|"PATCH"|"OPTIONS"|"DELETE"
          )
        )
      ),
      SmoothStreaming = TRUE|FALSE,
      DefaultTTL = 123,
      MaxTTL = 123,
      Compress = TRUE|FALSE,
      LambdaFunctionAssociations = list(
        Quantity = 123,
        Items = list(
          list(
            LambdaFunctionARN = "string",
            EventType = "viewer-request"|"viewer-response"|"origin-request"|"origin-response",
            IncludeBody = TRUE|FALSE
          )
        )
      ),
      FieldLevelEncryptionId = "string"
    ),
    CacheBehaviors = list(
      Quantity = 123,
      Items = list(
        list(
          PathPattern = "string",
          TargetOriginId = "string",
          ForwardedValues = list(
            QueryString = TRUE|FALSE,
            Cookies = list(
              Forward = "none"|"whitelist"|"all",
              WhitelistedNames = list(
                Quantity = 123,
                Items = list(
                  "string"
                )
              )
            ),
            Headers = list(
              Quantity = 123,
              Items = list(
                "string"
              )
            ),
            QueryStringCacheKeys = list(
              Quantity = 123,
              Items = list(
                "string"
              )
            )
          ),
          TrustedSigners = list(
            Enabled = TRUE|FALSE,
            Quantity = 123,
            Items = list(
              "string"
            )
          ),
          ViewerProtocolPolicy = "allow-all"|"https-only"|"redirect-to-https",
          MinTTL = 123,
          AllowedMethods = list(
            Quantity = 123,
            Items = list(
              "GET"|"HEAD"|"POST"|"PUT"|"PATCH"|"OPTIONS"|"DELETE"
            ),
            CachedMethods = list(
              Quantity = 123,
              Items = list(
                "GET"|"HEAD"|"POST"|"PUT"|"PATCH"|"OPTIONS"|"DELETE"
              )
            )
          ),
          SmoothStreaming = TRUE|FALSE,
          DefaultTTL = 123,
          MaxTTL = 123,
          Compress = TRUE|FALSE,
          LambdaFunctionAssociations = list(
            Quantity = 123,
            Items = list(
              list(
                LambdaFunctionARN = "string",
                EventType = "viewer-request"|"viewer-response"|"origin-request"|"origin-response",
                IncludeBody = TRUE|FALSE
              )
            )
          ),
          FieldLevelEncryptionId = "string"
        )
      )
    ),
    CustomErrorResponses = list(
      Quantity = 123,
      Items = list(
        list(
          ErrorCode = 123,
          ResponsePagePath = "string",
          ResponseCode = "string",
          ErrorCachingMinTTL = 123
        )
      )
    ),
    Comment = "string",
    Logging = list(
      Enabled = TRUE|FALSE,
      IncludeCookies = TRUE|FALSE,
      Bucket = "string",
      Prefix = "string"
    ),
    PriceClass = "PriceClass_100"|"PriceClass_200"|"PriceClass_All",
    Enabled = TRUE|FALSE,
    ViewerCertificate = list(
      CloudFrontDefaultCertificate = TRUE|FALSE,
      IAMCertificateId = "string",
      ACMCertificateArn = "string",
      SSLSupportMethod = "sni-only"|"vip",
      MinimumProtocolVersion = "SSLv3"|"TLSv1"|"TLSv1_2016"|"TLSv1.1_2016"|"TLSv1.2_2018",
      Certificate = "string",
      CertificateSource = "cloudfront"|"iam"|"acm"
    ),
    Restrictions = list(
      GeoRestriction = list(
        RestrictionType = "blacklist"|"whitelist"|"none",
        Quantity = 123,
        Items = list(
          "string"
        )
      )
    ),
    WebACLId = "string",
    HttpVersion = "http1.1"|"http2",
    IsIPV6Enabled = TRUE|FALSE
  )
)

Details

When you update a distribution, there are more required fields than when you create a distribution. When you update your distribution by using UpdateDistribution, follow the steps included in the documentation to get the current configuration and then make your updates. This helps to make sure that you include all of the required fields. To view a summary, see Required Fields for Create Distribution and Update Distribution in the Amazon CloudFront Developer Guide.