Creates an API Gateway instance.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
apigateway:CreateInstance |
create |
*Instance
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ChargeType |
string |
Yes |
The billing method of the instance. Valid values: PostPaid (pay-as-you-go) and PrePaid (subscription). |
PostPaid 后付费 PrePaid 预付费 |
| InstanceName |
string |
Yes |
The name of the instance. |
ApigatewayInstance |
| InstanceSpec |
string |
Yes |
The instance type. |
api.s1.small |
| ZoneId |
string |
No |
The zone where the instance is deployed. This parameter is required for classic network-type dedicated instances. This parameter is optional for VPC-connected dedicated instances. |
cn-beijing-MAZ3(c,e) |
| HttpsPolicy |
string |
No |
The HTTPS policy. |
HTTPS2_TLS1_2 |
| Duration |
integer |
No |
The subscription duration of the instance. Valid values:
Note
This parameter is required and takes effect only if you set ChargeType to PrePaid. |
1 |
| PricingCycle |
string |
No |
The billing cycle of the subscription instance. Valid values:
Note
This parameter is required if you set ChargeType to PrePaid. |
Month |
| AutoPay |
boolean |
No |
Specifies whether to enable auto-payment for renewals. Valid values:
Default value: False. |
false |
| Token |
string |
Yes |
A security token used to prevent duplicate requests. Do not reuse the token. The gateway automatically removes leading and trailing spaces from the token string. |
c20d86c4-1eb3-4d0b-afe9-c586df1e2136 |
| Tag |
array<object> |
No |
A list of tags. |
|
|
object |
No |
|||
| Key |
string |
No |
The tag key. |
test1 |
| Value |
string |
No |
The tag value. |
v1 |
| InstanceType |
string |
No |
The type of the dedicated instance.
Important This parameter is available only for invitational preview and is not publicly available. |
vpc_connect |
| InstanceCidr |
string |
No |
The CIDR block of the instance if the instance is a VPC-connected dedicated instance.
Warning The VPC-connected dedicated instance connects to the specified CIDR block. To prevent IP address conflicts, make sure that the CIDR block does not overlap with the private IP addresses of your Alibaba Cloud services. Important This parameter is available only for invitational preview and is not publicly available. |
172.16.0.0/12 |
| UserVpcId |
string |
No |
The ID of the user VPC to which you want to connect. This parameter is required if the instance is a VPC-connected dedicated instance. Important This parameter is available only for invitational preview and is not publicly available. |
vpc-m5eo7khlb4h4f8y9egsdg |
| ZoneVSwitchSecurityGroup |
array<object> |
No |
The zone, vSwitch, and security group information required for network connectivity. This parameter is required if the instance is a VPC-connected dedicated instance. Important This parameter is available only for invitational preview and is not publicly available. |
|
|
object |
No |
|||
| ZoneId |
string |
No |
The zone ID. |
cn-beijing-c |
| VSwitchId |
string |
No |
The vSwitch ID. |
vsw-0xi349n11cxogmvm866tb |
| CidrBlock |
string |
No |
The IPv4 CIDR block of the vSwitch. |
192.168.9.0/24 |
| SecurityGroupId |
string |
No |
The ID of the security group. Services in the same security group can access each other. |
sg-2ze2ql9nozv8q7kmlt6e |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| TagStatus |
boolean |
Indicates whether the tag exists. Valid values are `true` and `false`. |
True |
| InstanceId |
string |
The ID of the instance. |
apigateway-hz-b3c5dadd5*** |
| RequestId |
string |
The ID of the request. |
CEB6EC62-B6C7-5082-A45A-45A204724AC2 |
Examples
Success response
JSON format
{
"TagStatus": true,
"InstanceId": "apigateway-hz-b3c5dadd5***",
"RequestId": "CEB6EC62-B6C7-5082-A45A-45A204724AC2"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.