You need to enable JavaScript to run this app.
导航

SetVpnGatewayRenewal

最近更新时间2024.04.18 17:23:56

首次发布时间2022.04.28 07:17:15

调用SetVpnGatewayRenewal修改指定VPN网关的续费方式。

调试

请求参数

名称类型是否必选示例值描述
ActionStringSetVpnGatewayRenewal要执行的操作,取值:SetVpnGatewayRenewal。
VersionString2020-04-01API版本信息。
VpnGatewayIdStringvgw-2fe7zjsz13ksg5oxruwed****要修改续费方式的VPN网关的ID。您可调用DescribeVpnGateways查询VPN网关的ID信息。

RenewType

Integer

1

续费的方式,默认“1”手动续费。

  • 1:手动续费。
  • 2:自动续费。
  • 3:到期不续费。

说明

若传入3,平台将不会在VPN网关到期前给您发送到期通知。

RenewPeriod

Integer

1

自动续费的时长,取值范围1、2、3、6、12,单位:月。

说明

RenewType传入“1”、“3”,则RemainRenewTimes无实际意义。

RemainRenewTimes

Integer

1

自动续费的次数。

  • 1~100:自动续费。
  • -1:无限续费。

说明

RenewType传入“1”、“3”,则RemainRenewTimes无实际意义。

返回数据

名称类型
示例值
描述
RequestIdString202203241614290567524308102CF****请求ID。

请求示例

GET /?Action=SetVpnGatewayRenewal&Version=2020-04-01&VpnGatewayId=vgw-2fe7zjsz13ksg5oxruwed****&RenewType=3 HTTP/1.1
Host: open.volcengineapi.com
ServiceName: vpn
Region: cn-beijing

返回示例

{
    "ResponseMetadata":{
        "RequestId":"202203241614290567524308102CF****",
        "Action":"SetVpnGatewayRenewal",
        "Version":"2020-04-01",
        "Service":"vpn",
        "Region":"cn-beijing"
    },
    "Result":{
        "RequestId":"202203241614290567524308102CF****"
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode错误码错误信息描述
400InvalidRenewType.MalformedThe specified renew type is malformed.Renew type must be 1, 2, or 3.指定的续费类型不合法。续费类型只允许为1, 2 或 3。
400InvalidRenewPeriodTimes.MalformedThe specified renew period times is malformed.Renew period times only support 1, 2, 3, 6, 12.指定的自动续费周期不合法。自动续费周期只支持1, 2, 3, 6, 12月。
400InvalidRemainRenewTimes.MalformedThe specified remain renew times is malformed.Remain renew times only support -1, 1~100.指定的自动续费次数不合法。自动续费次数只支持-1, 1~100。
400InvalidVpnGateway.InvalidBillingTypeThe specified VPN gateway is not in the correct BillingStatus for the request.指定的VPN网关实例所处计费类型无法响应该请求。
400InvalidVpnGateway.ModifyRenewalSettingsModify renewal settings failed.修改自动续费配置失败。
404InvalidVpnGateway.NotFoundThe specified VPN gateway does not exist.指定的VPN网关不存在。