All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ApiGateway::Instance

Last Updated:Apr 11, 2025

ALIYUN::ApiGateway::Instance is used to create a dedicated instance.

Syntax

{
  "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
  }
}

Properties

Property

Type

Required

Editable

Description

Constraint

HttpsPolicy

String

Yes

No

The HTTPS security policy.

Valid values:

  • HTTPS1_1_TLS1_0

  • HTTPS2_TLS1_0

  • HTTPS2_TLS1_2

For more information, see Configure an HTTPS security policy.

InstanceName

String

Yes

No

The name of the instance.

The name must be 1 to 50 characters in length, and can contain letters, digits, and special characters. Special characters include - / . _

InstanceSpec

String

Yes

No

The instance type.

None.

ZoneId

String

Yes

No

The ID of the zone.

None.

AutoPay

Boolean

No

No

Specifies whether to automatically renew the instance when it expires.

Valid values:

  • true (default)

  • false

ChargeType

String

No

No

The billing method.

Valid values:

  • PrePaid: subscription.

  • PostPaid (default): pay-as-you-go.

DeletionForce

Boolean

No

No

Specifies whether to forcefully delete the instance.

Valid values:

  • true

  • false (default)

Duration

Number

No

No

The billing cycle.

Valid values:

  • Valid values when PricingCycle is set to Month: 1 to 9.

  • Valid values when PricingCycle is set to Year: 1 to 3.

PricingCycle

String

No

No

The unit of the subscription duration of the instance.

Valid values:

  • Month (default)

  • Year

Tags

List

No

Yes

The tags.

You can add up to 20 tags.

For more information, see Tags properties.

Tags syntax

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

Tags properties

Property

Type

Required

Editable

Description

Constraint

Key

String

Yes

No

The key of the tag.

The key must be 1 to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Value

String

No

No

The value of the tag.

The value can be up to 128 characters in length, and cannot contain http:// or https://. It cannot start with aliyun or acs:.

Return values

Fn::GetAtt

  • InstanceType: the instance type.

  • InstanceId: the ID of the instance.

  • VpcEgressAddress: the outbound IP address of the virtual private cloud (VPC).

  • InternetEgressAddress: the outbound IP address of the Internet.

  • EgressIpv6Enable: indicates whether outbound IPv6 traffic is supported.

  • VpcIntranetEnable: indicates whether VPCs are supported.

  • SupportIpv6: indicates whether IPv6 is supported.

  • VpcSlbIntranetEnable: indicates whether internal-facing Server Load Balancer (SLB) instances of the VPC type are supported.

  • Arn: the Alibaba Cloud Resource Name (ARN).

Examples

YAML format

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 format

{
  "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"
        }
      }
    }
  }
}