TogglePublicSlb

更新时间:
复制 MD 格式

Switches an Internet-facing SLB instance on or off.

Operation description

danger After you release an instance, Alibaba Cloud reclaims all physical resources used by the instance. All associated data is permanently lost and cannot be recovered.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /webapi/gateway/togglePublicSlb HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

InstanceId

string

No

Instance ID.

c-b25e21e24388****

GatewayId

string

No

Private gateway ID.

gw-0002xci9buu68ongixvk

EnablePublicSlb

boolean

No

Is Internet-facing SLB enabled?

  • Enable: true

  • Disable: false

true

Response elements

Element

Type

Description

Example

object

HttpStatusCode

integer

HTTP request status code.

200

RequestId

string

Request ID.

32A44F0D-BFF6-5664-999A-218BBDE7****

Success

boolean

Is the request successful?

false

ErrCode

string

Error code.

InvalidParams

ErrMessage

string

Error message.

Invalid params: [instance not exists].

Data

boolean

Returned data.

24151320976****

Examples

Success response

JSON format

{
  "HttpStatusCode": 200,
  "RequestId": "32A44F0D-BFF6-5664-999A-218BBDE7****",
  "Success": false,
  "ErrCode": "InvalidParams",
  "ErrMessage": "Invalid params: [instance not exists].",
  "Data": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.