Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ Elastic IP/ API Reference/ APIs/ EIP/ Changing EIP Billing Mode from Pay-per-Use to Yearly/Monthly

Changing EIP Billing Mode from Pay-per-Use to Yearly/Monthly

Updated on 2025-02-08 GMT+08:00

Function

This API is used to change the EIP billing mode from pay-per-use to yearly/monthly.

URI

POST /v2.0/{project_id}/publicips/change-to-period

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

publicip_ids

Yes

Array

List of pay-per-use EIPs to be changed to yearly/monthly

extendParam

Yes

CreatePrePaidPublicipExtendParamOption object

Change billing mode from pay-per-use to yearly/monthly.

Table 3 CreatePrePaidPublicipExtendParamOption

Parameter

Mandatory

Type

Description

charge_mode

No

String

  • Billing mode.
  • The value can be:
    • prePaid: yearly/monthly, which is prepayment.
    • postPaid: pay-per-use, which is postpayment.
  • In the postpayment mode, fields in extendParam will be ignored.

Default value: postPaid

Enumerated values:

  • prePaid
  • postPaid

period_type

No

String

  • Subscription unit.
  • The value can be:
    • month: indicates that the subscription is in the unit of month.
    • year: indicates that the subscription is in the unit of year.
  • If you specify the shared bandwidth ID when you assign an EIP that is billed on a yearly/monthly basis, this parameter is optional. This parameter is mandatory if an EIP is billed on a yearly/monthly basis and is not assigned together with a shared bandwidth. If an EIP is assigned together with a shared bandwidth, the expiration time of the bandwidth is the same as that of the EIP.

Enumerated values:

  • month
  • year

period_num

No

Integer

  • Subscription period.
  • Value range: (The value will change with the operation policy.)
    • If period_type is set to month, the value ranges from 1 to 9.
    • If period_type is set to year, the value ranges from 1 to 13.
  • The constraints for period_num are the same as those for period_type.

Minimum value: 1

Maximum value: 9

is_auto_renew

No

Boolean

  • Whether to automatically renew the subscription.
  • false: The subscription will not be automatically renewed. true: The subscription will be automatically renewed.
  • After the subscription expires, the system automatically renews the subscription for one month by default (the automatic renewal period may change). For details, contact customer service.

Default value: false

is_auto_pay

No

Boolean

  • Whether the payment will be automatically deducted from your account balance when an order is submitted.
  • The value can be:
    • true: indicates automatic payment. The system will automatically deduct fees from your account balance after an order is submitted.
    • false: indicates non-automatic payment. You need to pay manually.
  • If you use automatic payment, only your account balance can be used. If you want to use a voucher, do not use automatic payment, and select the voucher for the payment in the Billing Center.

Default value: false

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

publicip_ids

Array

List of EIPs with billing mode changed to yearly/monthly

order_id

String

Order ID

request_id

String

Request ID

Example Request

POST /v2.0/{project_id}/publicips/change-to-period

{
  "publicip_ids" : [ "fe2a11c7-c880-49f7-b1e0-e151df2cc836" ],
  "extendParam" : {
    "charge_mode" : "prePaid",
    "period_type" : "month",
    "period_num" : 1,
    "is_auto_renew" : false,
    "is_auto_pay" : true
  }
}

Example Response

Status code: 200

OK

{
  "publicip_ids" : [ "2c3b404b-d595-4ab5-a333-69f3ff937dc2" ],
  "order_id" : "CS2212141730K2FGR",
  "request_id" : "9d5bc34c-810f-48f2-95c4-9c48d02f2a33"
}

Status Code

See Status Codes.

Error Code

See Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback