ALIYUN::ESA::OriginPool

ALIYUN::ESA::OriginPool类型用于创建源地址池。

语法

{
  "Type": "ALIYUN::ESA::OriginPool",
  "Properties": {
    "OriginPoolName": String,
    "SiteId": Integer,
    "Enabled": Boolean,
    "Origins": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

OriginPoolName

String

源地址池名称。

一个站点下源地址池名称唯一。

SiteId

Integer

站点 ID。

Enabled

Boolean

源地址池是否启用。

取值:

  • true: 启用;

  • false:不启用。

Origins

List

源地址池里添加的源站信息。

多个源站使用数组传值。更多信息,请参考Origins属性

Origins语法

"Origins": [
  {
    "Type": String,
    "Header": String,
    "Address": String,
    "Enabled": Boolean,
    "AuthConf": Map,
    "OriginId": Integer,
    "Weight": Integer,
    "Name": String
  }
]

Origins属性

属性名称

类型

必须

允许更新

描述

约束

Address

String

源站地址。

AuthConf

Map

鉴权信息。

源站为 OSS 或者 S3 等源站需要鉴权时,需要传鉴权相关配置信息。更多信息,请参考AuthConf属性

Enabled

Boolean

源站是否启用。

取值:

  • true: 启用;

  • false:不启用。

Header

String

回源时带的请求头。

只支持 Host。

Name

String

源站名称。

一个源地址下源站名称唯一。

OriginId

Integer

源站 ID。

Type

String

源站类型。

取值:

  • ip_domain: ip 或域名类型源站;

  • OSS:OSS 地址源站;

  • S3:AWS S3 源站。

Weight

Integer

权重。

0-100 的整数。

AuthConf语法

"AuthConf": {
  "SecretKey": String,
  "Version": String,
  "Region": String,
  "AccessKey": String,
  "AuthType": String
}

AuthConf属性

属性名称

类型

必须

允许更新

描述

约束

AccessKey

String

私有鉴权时需要传的 access key。

AuthType

String

鉴权类型。

取值:

  • public:公共读写,源站为 OSS 或 S3 且为公共读写时使用;

  • private_same_account:私有同账号,源站为 OSS,且鉴权类型为同账号私有鉴权时使用;

  • private_cross_account:私有跨账号,源站为 OSS,且鉴权类型为跨账号私有鉴权时使用;

  • private:源站为 S3,且鉴权类型为私有时使用。

Region

String

源站为 AWS S3 时需要传的源站 region。

SecretKey

String

私有鉴权时需要传的 secret key。

Version

String

源站为 AWS S3 时需要传的签名版本。

返回值

Fn::GetAtt

  • RecordName:记录名称。

  • Origins:源地址池里添加的源站信息

  • SiteId:站点 ID

  • OriginPoolId:源地址池 ID。

  • ReferenceLBCount:被多少个负载均衡器引用。

  • References:源地址池被引用信息

  • Enabled:源地址池是否启用

  • OriginPoolName:源地址池名称

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Origins:
    AssociationPropertyMetadata:
      Parameter:
        AssociationPropertyMetadata:
          Parameters:
            Type:
              Type: String
              Description:
                en: |-
                  Source station type:
                  ip_domain: ip or domain name type origin station;
                  - `OSS`:OSS address source station;
                  - `S3`:AWS S3 Source station.
              AllowedValues:
                - ip_domain
                - OSS
                - S3
              Required: false
            Header:
              Type: String
              Description:
                en: The request header that is sent when returning to the source. Only Host is supported.
              Required: false
            Address:
              Type: String
              Description:
                en: Origin Address.
              Required: false
            Enabled:
              Type: Boolean
              Description:
                en: |-
                  Whether the source station is enabled:
                  - `true`: Enabled;
                  - `false`: Not enabled.
              Required: false
            AuthConf:
              AssociationPropertyMetadata:
                Parameters:
                  SecretKey:
                    Type: String
                    Description:
                      en: The SecretKey to be passed when AuthType is set to private_cross_account or private.
                    Required: false
                  Version:
                    Type: String
                    Description:
                      en: The signature version to be transmitted when the source station is AWS S3.
                    Required: false
                  Region:
                    Type: String
                    Description:
                      en: The Region of the source station to be transmitted when the source station is AWS S3.
                    Required: false
                  AccessKey:
                    Type: String
                    Description:
                      en: The AccessKey to be passed when AuthType is set to private_cross_account or private.
                    Required: false
                  AuthType:
                    Type: String
                    Description:
                      en: |-
                        Authentication type.
                        - `public`: public read/write, which is used when the source station is OSS or S3 and is public read/write;
                        - `private_same_account`: Used when the same account is private, the source station is OSS, and the authentication type is private authentication of the same account;
                        - `private_cross_account`: private cross-account, used when the origin station is OSS and the authentication type is cross-account private authentication;
                        - `private`: Used when the source station is S3 and the authentication type is private.
                    AllowedValues:
                      - public
                      - private_same_account
                      - private_cross_account
                      - private
                    Required: false
              Type: Json
              Description:
                en: The authentication information. When the source Station is an OSS or S3 and other source stations need to be authenticated, the authentication-related configuration information needs to be transmitted.
              Required: false
            OriginId:
              Type: Number
              Description:
                en: Origin ID.
              Required: false
            Weight:
              Type: Number
              Description:
                en: The weight, an integer between 0 and 100.
              Required: false
              MinValue: 0
              MaxValue: 100
            Name:
              Type: String
              Description:
                en: The name of the origin, which must be unique within an origin address.
              Required: false
        Type: Json
        Description:
          en: The Source station information added to the source address pool. Multiple Source stations use arrays to transfer values.
        Required: false
    AssociationProperty: List[Parameter]
    Type: Json
    Description:
      en: The Source station information added to the source address pool. Multiple Source stations use arrays to transfer values.
    Required: false
  SiteId:
    Type: Number
    Description:
      en: The site ID.
    Required: true
  OriginPoolName:
    Type: String
    Description:
      en: The source address pool name.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::ESA::OriginPool
    Properties:
      Origins:
        Ref: Origins
      SiteId:
        Ref: SiteId
      OriginPoolName:
        Ref: OriginPoolName
Outputs:
  RecordName:
    Description: The domain name assigned to the source address pool can be used as the source address recorded under the site.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - RecordName
  Origins:
    Description: The Source station information added to the source address pool. Multiple Source stations use arrays to transfer values.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Origins
  SiteId:
    Description: The site ID.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - SiteId
  OriginPoolId:
    Description: OriginPool Id.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - OriginPoolId
  ReferenceLBCount:
    Description: How many load balancers are referenced.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - ReferenceLBCount
  References:
    Description: The source address pool is referred to when the source address pool is configured by the load balancer or recorded as the source station.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - References
  Enabled:
    Description: Whether the source address pool is enabled:.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - Enabled
  OriginPoolName:
    Description: The source address pool name.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - OriginPoolName
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Origins": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "AssociationPropertyMetadata": {
            "Parameters": {
              "Type": {
                "Type": "String",
                "Description": {
                  "en": "Source station type:\nip_domain: ip or domain name type origin station;\n- `OSS`:OSS address source station;\n- `S3`:AWS S3 Source station."
                },
                "AllowedValues": [
                  "ip_domain",
                  "OSS",
                  "S3"
                ],
                "Required": false
              },
              "Header": {
                "Type": "String",
                "Description": {
                  "en": "The request header that is sent when returning to the source. Only Host is supported."
                },
                "Required": false
              },
              "Address": {
                "Type": "String",
                "Description": {
                  "en": "Origin Address."
                },
                "Required": false
              },
              "Enabled": {
                "Type": "Boolean",
                "Description": {
                  "en": "Whether the source station is enabled:\n- `true`: Enabled;\n- `false`: Not enabled."
                },
                "Required": false
              },
              "AuthConf": {
                "AssociationPropertyMetadata": {
                  "Parameters": {
                    "SecretKey": {
                      "Type": "String",
                      "Description": {
                        "en": "The SecretKey to be passed when AuthType is set to private_cross_account or private."
                      },
                      "Required": false
                    },
                    "Version": {
                      "Type": "String",
                      "Description": {
                        "en": "The signature version to be transmitted when the source station is AWS S3."
                      },
                      "Required": false
                    },
                    "Region": {
                      "Type": "String",
                      "Description": {
                        "en": "The Region of the source station to be transmitted when the source station is AWS S3."
                      },
                      "Required": false
                    },
                    "AccessKey": {
                      "Type": "String",
                      "Description": {
                        "en": "The AccessKey to be passed when AuthType is set to private_cross_account or private."
                      },
                      "Required": false
                    },
                    "AuthType": {
                      "Type": "String",
                      "Description": {
                        "en": "Authentication type.\n- `public`: public read/write, which is used when the source station is OSS or S3 and is public read/write;\n- `private_same_account`: Used when the same account is private, the source station is OSS, and the authentication type is private authentication of the same account;\n- `private_cross_account`: private cross-account, used when the origin station is OSS and the authentication type is cross-account private authentication;\n- `private`: Used when the source station is S3 and the authentication type is private."
                      },
                      "AllowedValues": [
                        "public",
                        "private_same_account",
                        "private_cross_account",
                        "private"
                      ],
                      "Required": false
                    }
                  }
                },
                "Type": "Json",
                "Description": {
                  "en": "The authentication information. When the source Station is an OSS or S3 and other source stations need to be authenticated, the authentication-related configuration information needs to be transmitted."
                },
                "Required": false
              },
              "OriginId": {
                "Type": "Number",
                "Description": {
                  "en": "Origin ID."
                },
                "Required": false
              },
              "Weight": {
                "Type": "Number",
                "Description": {
                  "en": "The weight, an integer between 0 and 100."
                },
                "Required": false,
                "MinValue": 0,
                "MaxValue": 100
              },
              "Name": {
                "Type": "String",
                "Description": {
                  "en": "The name of the origin, which must be unique within an origin address."
                },
                "Required": false
              }
            }
          },
          "Type": "Json",
          "Description": {
            "en": "The Source station information added to the source address pool. Multiple Source stations use arrays to transfer values."
          },
          "Required": false
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "The Source station information added to the source address pool. Multiple Source stations use arrays to transfer values."
      },
      "Required": false
    },
    "SiteId": {
      "Type": "Number",
      "Description": {
        "en": "The site ID."
      },
      "Required": true
    },
    "OriginPoolName": {
      "Type": "String",
      "Description": {
        "en": "The source address pool name."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::ESA::OriginPool",
      "Properties": {
        "Origins": {
          "Ref": "Origins"
        },
        "SiteId": {
          "Ref": "SiteId"
        },
        "OriginPoolName": {
          "Ref": "OriginPoolName"
        }
      }
    }
  },
  "Outputs": {
    "RecordName": {
      "Description": "The domain name assigned to the source address pool can be used as the source address recorded under the site.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "RecordName"
        ]
      }
    },
    "Origins": {
      "Description": "The Source station information added to the source address pool. Multiple Source stations use arrays to transfer values.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Origins"
        ]
      }
    },
    "SiteId": {
      "Description": "The site ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "SiteId"
        ]
      }
    },
    "OriginPoolId": {
      "Description": "OriginPool Id.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "OriginPoolId"
        ]
      }
    },
    "ReferenceLBCount": {
      "Description": "How many load balancers are referenced.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "ReferenceLBCount"
        ]
      }
    },
    "References": {
      "Description": "The source address pool is referred to when the source address pool is configured by the load balancer or recorded as the source station.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "References"
        ]
      }
    },
    "Enabled": {
      "Description": "Whether the source address pool is enabled:.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "Enabled"
        ]
      }
    },
    "OriginPoolName": {
      "Description": "The source address pool name.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "OriginPoolName"
        ]
      }
    }
  }
}