BindNlb

Updated at:

Binds a Network Load Balancer (NLB) to an application.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:BindNlb

create

*All Resource

*

None None

Request syntax

POST /pop/v1/sam/app/nlb HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

No

The ID of the application.

7171a6ca-d1cd-4928-8642-7d5cfe69****

NlbId

string

No

The ID of the NLB instance.

nlb-7z7jjbzz44d82c9***

Listeners

string

No

The JSON array string of the listeners to be configured. The structure of each listener is as follows:

  • Port: Integer type, required. The load balancing listener port. Valid values: 0 to 65535.

  • TargetPort: Integer type, required. The listening port of the container in the instance. Valid values: 0 to 65535.

  • Protocol: String type, required. The listening protocol. Valid values: TCP, UDP, and TCPSSL.

  • CertIds: String type, optional. The list of server certificates. This parameter takes effect only for TCPSSL listeners.

[{"Port":80,"TargetPort":8080,"Protocol":"TCP"}]

ZoneMappings

string

No

The JSON string of the zone and vSwitch mapping list. You can add up to 10 zones. If the current region supports two or more zones, you must add at least two zones. The structure of a ZoneMapping is as follows:

  • VSwitchId: String type. The vSwitch corresponding to the zone. Each zone can use only one vSwitch and one subnet.

  • ZoneId: String type. The zone ID of the Network Load Balancer (NLB) instance.

vsw-sersdf**** cn-hangzhou-a

AddressType

string

No

The address type. Valid values:

  • Internet: public network address.

  • Intranet: private network address.

Internet

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

91F93257-7A4A-4BD3-9A7E-2F6EAE6D****

Message

string

The additional information. Valid values:

  • If the request is successful, success is returned.

  • If the request fails, a specific error code is returned.

success

TraceId

string

The trace ID, which is used to accurately query the call information.

0a06dfe717389800573793090e0589

Data

object

The returned result.

ChangeOrderId

string

The ID of the change order, which is used to query the execution status of the task.

ba386059-69b1-4e65-b1e5-0682d9fa****

ErrorCode

string

The error code. Valid values:

  • If the request is successful, the ErrorCode parameter is not returned.

  • If the request fails, the ErrorCode parameter is returned. For more information, see the Error codes section in this topic.

Code

string

The HTTP status code. Valid values:

  • 2xx: success.

  • 3xx: redirection.

  • 4xx: request error.

  • 5xx: server error.

200

Success

boolean

Indicates whether the applications were stopped in batches successfully. Valid values:

  • true: The applications were stopped successfully.

  • false: The applications failed to be stopped.

true

Examples

Success response

JSON format

{
  "RequestId": "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "Message": "success",
  "TraceId": "0a06dfe717389800573793090e0589",
  "Data": {
    "ChangeOrderId": "ba386059-69b1-4e65-b1e5-0682d9fa****"
  },
  "ErrorCode": "",
  "Code": "200",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.