CreateInstance
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. |
PostPaid |
| InstanceName |
string |
Yes |
The instance name. |
ApigatewayInstance |
| InstanceSpec |
string |
Yes |
The instance specifications. |
api.s1.small |
| ZoneId |
string |
No |
The zone ID. This parameter is required for traditional dedicated instances and optional for VPC-integrated 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 available and required only when ChargeType is set to PrePaid. |
1 |
| PricingCycle |
string |
No |
The billing cycle of the subscription instance. Valid values:
Note
This parameter is required when ChargeType is set to PrePaid. |
Month |
| AutoPay |
boolean |
No |
Specifies whether to enable automatic payment for renewals. Valid values:
Default value: False. |
false |
| Token |
string |
Yes |
The client token that is used to ensure the idempotence of the request. Do not reuse the token. If the token string contains leading or trailing spaces, the spaces are automatically trimmed by the gateway. |
c20d86c4-1eb3-4d0b-afe9-c586df1e2136 |
| Tag |
array<object> |
No |
The 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. Valid values:
Important This parameter is in invitational preview and is not available. |
vpc_connect |
| InstanceCidr |
string |
No |
The CIDR block of the instance. This parameter is required when the dedicated instance type is VPC-integrated. Valid values:
Warning A VPC-integrated dedicated instance connects to the specified CIDR block. To prevent IP address conflicts, make sure that the specified CIDR block does not overlap with the private IP addresses of your cloud services. Important This parameter is in invitational preview and is not available. |
172.16.0.0/12 |
| UserVpcId |
string |
No |
The ID of the user VPC to be connected. This parameter is required when the dedicated instance type is VPC-integrated. Important This parameter is in invitational preview and is not available. |
vpc-m5eo7khlb4h4f8y9egsdg |
| ZoneVSwitchSecurityGroup |
array<object> |
No |
The zone, vSwitch, and security group information required for network connectivity. This parameter is required when the dedicated instance type is VPC-integrated. Important This parameter is in invitational preview and is not 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 security group ID. 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:
|
True |
| InstanceId |
string |
The instance ID. |
apigateway-hz-b3c5dadd5*** |
| RequestId |
string |
The request ID. |
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.