El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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
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

Updating a VPC Channel

Updated on 2022-02-21 GMT+08:00

Function

This API is used to update the parameters of a specified VPC channel.

URI

The following table lists the HTTP/HTTPS request method and URI of the API.

Table 1 HTTP/HTTPS request method and URI

Request Method

URI

PUT

/v1.0/apigw/vpc-channels/{id}

The following table lists the parameter in the URI.

Table 2 Parameter description

Parameter

Mandatory

Type

Description

id

Yes

String

VPC channel ID

Request

Table 3 Parameter description

Parameter

Mandatory

Type

Description

name

Yes

String

VPC channel name

A VPC channel name consists of 3–64 characters, starting with a letter. Only letters, digits, hyphens (-), and underscores (_) are allowed.

type

Yes

Integer

VPC channel type, which can be:

  • 2: fast channel with the load balancing function

member_type

Mandatory if type is 2

String

Member type of the VPC channel, which can be:

  • ip (not supported currently)
  • instance

This parameter is valid only when the VPC channel type is set to 2. The default value is instance.

port

Mandatory if type is 2

Integer

Host port of the VPC channel

This parameter is valid only when the VPC channel type is set to 2. The value range is 1–65535.

balance_strategy

Mandatory if type is 2

Integer

Distribution algorithm, which can be:

  • 1: WRR
  • 2: WLC
  • 3: SH
  • 4: URI hashing

This parameter is valid only when the VPC channel type is set to 2. The default value is 1.

vpc_health_config

Mandatory if type is 2

Dictionary

Health check details. This parameter is valid only when the VPC channel type is set to 2.

vpc_instances

Yes

Dictionary

Backend instance list. Only one backend instance is included if the VPC channel type is set to 1.

Table 4 Health check details

Parameter

Mandatory

Type

Description

protocol

Yes

String

Protocol for performing health checks on cloud servers in the VPC channel. The value can be:
  • TCP
  • HTTP
  • HTTPS

path

Required if protocol is set to http.

String

Destination path for health checks

NOTE:

The value of this parameter must comply with URI specifications.

port

No

Integer

Destination port for health checks. By default, the host port of the VPC channel is used.

Range: 1–65535

threshold_normal

Yes

Integer

Healthy threshold

It refers to the number (x) of consecutive successful checks required for a cloud server to be marked as healthy.

Range: 2–10

threshold_abnormal

Yes

Integer

Unhealthy threshold

It refers to the number (x) of consecutive failed checks required for a cloud server to be marked as unhealthy.

Range: 2–10

time_out

Yes

Integer

Timeout for determining whether a health check fails. Unit: s. The value must be less than the value of time_interval.

Range: 2–30

time_interval

Yes

Integer

Interval between consecutive checks. Unit: s. The value must be greater than the value of time_out.

Range: 5–300

http_code

Required if protocol is set to http.

String

HTTP response codes for determining a successful HTTP response

The value can be any integer within 100–599 in one of the following formats:

  • Multiple values, for example, 200,201,202
  • Range, for example, 200-299
  • Multiple values and ranges, for example, 201,202,210-299
Table 5 Backend instance list

Parameter

Mandatory

Type

Description

instance_name

Yes

String

Backend instance name

The name must contain 1–64 characters. Only letters, digits, periods (.), hyphens (-), and underscores (_) are allowed.

instance_id

Yes

String

Backend instance ID

The ID must contain 1–64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

weight

Mandatory if type is 2

Integer

Cloud server weight

The larger the weight is, the more requests are forwarded to the backend instance.

This parameter is valid only when the VPC channel type is set to 2. The value range is 1–100.

Example request:

{
  "balance_strategy": 1,
  "name": "vpc_001",
  "port": 15565,
  "type": 2,
  "member_type": "instance",
  "vpc_health_config": {
    "http_code": "205",
    "path": "/hc",
    "port": 15563,
    "protocol": "http",
    "threshold_abnormal": 5,
    "threshold_normal": 5,
    "time_interval": 200,
    "time_out": 30
  },
  "vpc_instances": [
    {
      "instance_id": "instance01",
      "instance_name": "instance_name01",
      "weight": 10
    }
  ]
}

Response

Table 6 Parameter description

Parameter

Type

Description

id

String

VPC channel ID

name

String

VPC channel name

type

Integer

VPC channel type, which can be:

  • 2: fast channel with the load balancing function

member_type

String

Member type of the VPC channel, which can be:

  • ip (not supported currently)
  • instance

This parameter is valid only when the VPC channel type is set to 2.

status

Integer

VPC channel status, which can be:

  • 1: normal
  • 2: abnormal

port

Integer

Host port of the VPC channel

balance_strategy

Integer

Distribution algorithm, which can be:

  • 1: WRR
  • 2: WLC
  • 3: SH
  • 4: URI hashing

create_time

Timestamp

Time when the VPC channel is created

Example response:

{
  "name": "vpc_001",
  "type": 2,
  "member_type": "instance",
  "port": 15565,
  "balance_strategy": 1,
  "id": "c3e6a7d85d9e47be89dfcc3cd37405d7",
  "create_time": "2018-07-27T12:30:48.027484Z",
  "status": 1
}

Status Codes

Table 7 Status codes

Status Code

Description

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found

500

Server Internal Error

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback