Renaming a Dedicated WAF Engine

Function

This API is used to rename a dedicated WAF engine

URI

PUT /v1/{project_id}/premium-waf/instance/{instance_id}

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

instance_id

Yes

String

ID of the dedicated WAF instance. It can be obtained by calling the WAF ListInstance API

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header).

Content-Type

Yes

String

Content type. Default value: application/json;charset=utf8

Default: application/json;charset=utf8

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

instancename

Yes

String

New name of the dedicated WAF engine

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

id

String

ID of the dedicated WAF engine

instance_name

String

Name of the dedicated WAF engine.

instancename

String

Name of the dedicated WAF engine. This parameter is repeated and can be ignored.

region

String

Region where a dedicated engine is to be created. Its value is EU-DE.

zone

String

available_zone ID.

arch

String

CPU architecture

cpu_flavor

String

ECS specifications and the dedicated WAF instance specifications. You can view details about the supported specifications on the WAF console.

vpc_id

String

ID of the VPC where the dedicated engine is located

subnet_id

String

Subnet ID of the VPC where the dedicated engine is located.

service_ip

String

Service plane IP address of the dedicated engine

service_ipv6

String

IPv6 address of the dedicated WAF instance on the service plane. This parameter is displayed when ipv6_enable is set to true.

security_group_ids

Array of strings

Security groups bound to the dedicated engine ECS

status

Integer

Billing status of dedicated WAF engine. The value can be 0, 1, or 2.

  • 0: The billing is normal.

  • 1: The billing account is frozen. Resources and data will be retained, but the cloud services cannot be used by the account.

  • 2: The billing is terminated. Resources and data will be cleared.

run_status

Integer

Running status of the dedicated engine. The value can be 0 (creating), 1 (running), 2 (deleting), 3 (deleted), 4 (creation failed), 5 (frozen), 6 (abnormal), 7 (updating), or 8 (update failed).

access_status

Integer

Access status of the dedicated engine. The value can be 0 or 1.

  • 0: the dedicated engine is not connected.

  • 1: the dedicated engine is connected.

upgradable

Integer

Whether the dedicated engine can be upgraded.

  • 0: the dedicated engine is non-upgradable

  • 1: the dedicated engine is upgradable

cloudServiceType

String

Cloud service code. This is a unique code used to distinguish cloud services from each other. You can ignore it.

resourceType

String

Cloud service resource type. Cloud services are purchased by resource type. You can ignore it.

resourceSpecCode

String

Resource specifications code. This code is used to identify the resource specifications the dedicated engine uses. You can ignore it.

specification

String

Dedicated engine ECS specifications, for example, 8 vCPUs | 16 GB. 8vCPUs | 16GB maps to waf.instance.enterprise, and 2vCPUs | 4GB to waf.instance. professional.

server_id

String

ID of the ECS hosting the dedicated engine.

serverId

String

ID of the ECS housing the dedicated engine. This parameter can be ignored because it is the same as server_id.

create_time

Long

Timestamp when the dedicated WAF engine was created.

data_volume_size

Integer

Size of the data disk, in GB.

res_tenant_type

Integer

Type of the dedicated WAF instance If the type is Network Interface, the value is 1.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 401

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Example Requests

PUT https://{endpoint}/v1/{project_id}/premium-waf/instance/{instance_id}

{
  "instancename" : "0412elb"
}

Example Responses

Status code: 200

Request succeeded.

{
  "id" : "0619871acb764d48a112695e8f7cbb10",
  "region" : "region-01-7",
  "zone" : "region-01-7a",
  "specification" : "8vCPUs | 16GB",
  "arch" : "x86",
  "upgradable" : 0,
  "status" : 0,
  "serverId" : "477353dc-8687-4bf4-b45b-1d7fee74fa63",
  "server_id" : "477353dc-8687-4bf4-b45b-1d7fee74fa63",
  "cloudServiceType" : "hws.service.type.waf",
  "resourceType" : "hws.resource.type.waf.instance",
  "resourceSpecCode" : "waf.instance.enterprise",
  "vpc_id" : "13718074-a3f9-408d-82aa-3c41ef55e589",
  "subnet_id" : "74d1b5a6-c7eb-4e9a-8372-181212552fcc",
  "service_ip" : "192.168.10.68",
  "security_group_ids" : [ "34287bdb-7aba-471a-b041-27427f1af76a" ],
  "cpu_flavor" : "Si2.2xlarge.2",
  "run_status" : 2,
  "access_status" : 1,
  "instancename" : "0412elb",
  "instance_name" : "0412elb"
}

Status Codes

Status Code

Description

200

Request succeeded.

400

Request failed.

401

The token does not have required permissions.

500

Internal server error.

Error Codes

See Error Codes.