Changing the Billing Mode of a Public NAT Gateway from Pay-per-Use to Yearly/Monthly
Function
This API is used to change the billing mode of a public NAT gateway from pay-per-use to yearly/monthly.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, no identity policy-based permission required for calling this API.
URI
POST /v2/{project_id}/nat_gateways/{nat_gateway_id}/change_to_period
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Specifies the project ID. |
| nat_gateway_id | Yes | String | Specifies the public NAT gateway ID. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| prepaid_options | No | PrepaidOptions object | Specifies the payment attributes. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| period_type | Yes | String | Specifies the subscription period type. Both monthly and yearly subscriptions are supported. |
| period_num | Yes | Integer | Number of subscription periods. The value varies depending on the operations policy. |
| is_auto_renew | No | Boolean | Whether to enable auto renewal. |
| is_auto_pay | No | Boolean | Whether the payment will be automatically deducted from your account balance when an order is submitted. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| order_id | String | Specifies the order ID. |
Example Requests
POST https://{NAT_endpoint}/v2/70505c941b9b4dfd82fd351932328a2f/nat_gateways/e1cacb3c-46a0-4c8e-9c4a-91eb63635f62/change_to_period
{
"prepaid_options" : {
"period_type" : "month",
"period_num" : 1,
"is_auto_renew" : false,
"is_auto_pay" : true
}
} Example Responses
Status code: 200
Successful request.
{
"order_id" : "CS2304211201WYELB"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Successful request. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.