ALIYUN::ApiGateway::Instance类型用于创建专享实例。

语法

{
  "Type": "ALIYUN::ApiGateway::Instance",
  "Properties": {
    "InstanceName": String,
    "DeletionForce": Boolean,
    "InstanceSpec": String,
    "HttpsPolicy": String,
    "ZoneId": String,
    "PricingCycle": String,
    "ChargeType": String,
    "Duration": Number,
    "AutoPay": Boolean,
    "Tags": List
  }
}

属性

属性名称类型必须允许更新描述约束
InstanceNameString实例名称。长度为1~50个字符,可包含汉字、英文字母、数字和特殊字符-/._
DeletionForceBoolean是否强制删除实例。取值:
  • true
  • false(默认值)
InstanceSpecString实例规格。

HttpsPolicyStringHTTPS安全策略。取值:
  • HTTPS1_1_TLS1_0
  • HTTPS2_TLS1_0
  • HTTPS2_TLS1_2

更多信息,请参见HTTPS安全策略

ZoneIdString可用区ID。
PricingCycleString预付费实例的付费周期。取值:
  • Month(默认值):按月付费。
  • Year:按年付费。
ChargeTypeString付费类型。取值:
  • PrePaid:预付费。
  • PostPaid(默认值):按量付费。
DurationNumber付费时长。取值:
  • 当PricingCycle值为Month时:1~9。
  • 当PricingCycle取值为Year时:1~3。
AutoPayBoolean到期是否自动续费。取值:
  • true(默认值)
  • false
TagsList标签。最多添加20个标签。

更多信息,请参见Tags属性

Tags语法

"Tags": [
  {
    "Key": String,
    "Value": String
  }
]

Tags属性

属性名称 类型必须允许更新描述约束
KeyString标签键。长度为1~128个字符,不能以aliyunacs:开头,不能包含http://https://
ValueString标签值。长度为0~128个字符,不能以aliyunacs:开头,不能包含http://https://

返回值

Fn::GetAtt

  • InstanceType:实例类型。
  • InstanceId:实例ID。
  • VpcEgressAddress:专有网络出口地址。
  • InternetEgressAddress:公网出口地址。
  • EgressIpv6Enable:IPv6出访能力。
  • VpcIntranetEnable:是否支持专有网络。
  • SupportIpv6:是否支持IPv6。
  • VpcSlbIntranetEnable:是否支持VPC类型SLB。

示例

  • YAML格式

    Parameters:
      InstanceName:
        Type: String
        Description: Instance name
      ZoneId:
        Type: String
        AssociationProperty: ZoneId
    ROSTemplateFormatVersion: '2015-09-01'
    Outputs:
      EgressIpv6Enable:
        Description: Whether enable egress IPv6.
        Value:
          Fn::GetAtt:
            - Instance
            - EgressIpv6Enable
      VpcEgressAddress:
        Description: VPC network egress address.
        Value:
          Fn::GetAtt:
            - Instance
            - VpcEgressAddress
      InternetEgressAddress:
        Description: Internet egress dddress.
        Value:
          Fn::GetAtt:
            - Instance
            - InternetEgressAddress
      InstanceId:
        Description: Instance ID.
        Value:
          Fn::GetAtt:
            - Instance
            - InstanceId
      VpcIntranetEnable:
        Description: Whether enable VPC intranet.
        Value:
          Fn::GetAtt:
            - Instance
            - VpcIntranetEnable
      SupportIpv6:
        Description: Whether support IPv6.
        Value:
          Fn::GetAtt:
            - Instance
            - SupportIpv6
      InstanceType:
        Description: Instance type.
        Value:
          Fn::GetAtt:
            - Instance
            - InstanceType
      VpcSlbIntranetEnable:
        Description: Whether enable VPC SLB intranet.
        Value:
          Fn::GetAtt:
            - Instance
            - VpcSlbIntranetEnable
    Resources:
      Instance:
        Type: ALIYUN::ApiGateway::Instance
        Properties:
          InstanceName: TestInstance
          InstanceSpec: api.s1.small
          HttpsPolicy: HTTPS2_TLS1_0
          ZoneId:
            Ref: ZoneId
  • JSON格式

    {
      "Parameters": {
        "InstanceName": {
          "Type": "String",
          "Description": "Instance name"
        },
        "ZoneId": {
          "Type": "String",
          "AssociationProperty": "ZoneId"
        }
      },
      "ROSTemplateFormatVersion": "2015-09-01",
      "Outputs": {
        "EgressIpv6Enable": {
          "Description": "Whether enable egress IPv6.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "EgressIpv6Enable"
            ]
          }
        },
        "VpcEgressAddress": {
          "Description": "VPC network egress address.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "VpcEgressAddress"
            ]
          }
        },
        "InternetEgressAddress": {
          "Description": "Internet egress dddress.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "InternetEgressAddress"
            ]
          }
        },
        "InstanceId": {
          "Description": "Instance ID.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "InstanceId"
            ]
          }
        },
        "VpcIntranetEnable": {
          "Description": "Whether enable VPC intranet.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "VpcIntranetEnable"
            ]
          }
        },
        "SupportIpv6": {
          "Description": "Whether support IPv6.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "SupportIpv6"
            ]
          }
        },
        "InstanceType": {
          "Description": "Instance type.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "InstanceType"
            ]
          }
        },
        "VpcSlbIntranetEnable": {
          "Description": "Whether enable VPC SLB intranet.",
          "Value": {
            "Fn::GetAtt": [
              "Instance",
              "VpcSlbIntranetEnable"
            ]
          }
        }
      },
      "Resources": {
        "Instance": {
          "Type": "ALIYUN::ApiGateway::Instance",
          "Properties": {
            "InstanceName": "TestInstance",
            "InstanceSpec": "api.s1.small",
            "HttpsPolicy": "HTTPS2_TLS1_0",
            "ZoneId": {
              "Ref": "ZoneId"
            }
          }
        }
      }
    }

更多示例,请参见:JSON示例