jokerchu 发表于 2018-9-2 08:00:45

Powershell AWS 自动化管理 (11) - 创建一个高可用的WordPress博客(中)

#配置S3和CloudFront  
$origin = New-Object Amazon.CloudFront.Model.Origin
  
$origin.DomainName="yuanliwordpress.s3.amazonaws.com"
  
$origin.id="S3-yuanliwordpress"
  
$origin.S3OriginConfig = New-Object Amazon.CloudFront.Model.S3OriginConfig
  
$origin.S3OriginConfig.OriginAccessIdentity = ""
  
$cfd=New-CFDistribution `
  
      -DistributionConfig_Enabled $true `
  
      -DistributionConfig_Comment "Test distribution" `
  
      -Origins_Item $origin `
  
      -Origins_Quantity 1 `
  
      -DistributionConfig_CallerReference wordpresstest `
  
      -DefaultCacheBehavior_TargetOriginId $origin.Id `
  
      -ForwardedValues_QueryString $true `
  
      -Cookies_Forward all `
  
      -WhitelistedNames_Quantity 0 `
  
      -TrustedSigners_Enabled $false `
  
      -TrustedSigners_Quantity 0 `
  
      -DefaultCacheBehavior_ViewerProtocolPolicy allow-all `
  
      -DefaultCacheBehavior_MinTTL 1000 `
  
      -DistributionConfig_PriceClass "PriceClass_All" `
  
      -CacheBehaviors_Quantity 0 `
  
      -Aliases_Quantity 0


页: [1]
查看完整版本: Powershell AWS 自动化管理 (11) - 创建一个高可用的WordPress博客(中)