All Products
Search
Document Center

Bastionhost:GetNetworkDomain

Last Updated:Apr 03, 2026

Retrieves the details of a specified network domain.

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 parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The ID of the Bastionhost instance.

Note

Call the DescribeInstances operation to get this parameter.

bastionhost-cn-i7m2btk6g48

RegionId

string

No

The region ID of the Bastionhost instance.

Note

For more information about region IDs, see Regions and zones.

cn-hangzhou

NetworkDomainId

string

Yes

The ID of the network domain to query.

Note

Call the ListNetworkDomains operation to get this parameter.

3

CheckProxyState

string

No

Indicates whether to immediately recheck the status of the proxy server. Valid values:

  • true: Immediately rechecks the status of the proxy server and returns the latest ProxyState and ProxyStateErrorCode.

  • false: (Default) Returns the currently recorded status without rechecking the proxy server.

false

Response elements

Element

Type

Description

Example

object

NetworkDomain

object

The details of the network domain.

Comment

string

The comment for the network domain.

comment

Default

boolean

Specifies whether the network domain is built-in. Valid values:

  • true: Yes

  • false: No

false

NetworkDomainId

string

The ID of the network domain.

2

NetworkDomainName

string

The name of the network domain.

SSH Proxy

NetworkDomainType

string

The type of the network domain. Valid values:

  • Direct: direct connection

  • Proxy: proxy

Proxy

Proxies

array<object>

A list of proxy servers.

object

A proxy server.

ProxyType

string

The proxy method. Valid values:

  • SSHProxy: SSH proxy

  • HTTPProxy: HTTP proxy

  • Socks5Proxy: SOCKS5 proxy

HTTPProxy

NodeType

string

The node type of the proxy server. Valid values:

  • Master: primary proxy server

  • Slave: secondary proxy server

Master

Address

string

The address of the proxy server.

47.102.**.**

Port

integer

The port of the proxy server.

22

User

string

The username of the proxy server.

root

HasPassword

boolean

Specifies whether a password is set for the proxy server. Valid values:

  • true: A password is set.

  • false: No password is set.

true

ProxyState

string

The status of the proxy server. Valid values:

  • Available: available

  • Unavailable: unavailable

Unavailable

ProxyStateErrorCode

string

The error code that is returned if the proxy server is unavailable. Valid values:

  • CHECK_PWD_FAILED: Incorrect password.

  • CHECK_PWD_TIMEOUT: Password verification timeout.

  • CHECK_PWD_NETWORK_ERR: Network error.

  • UNEXPECTED: Unknown error.

CHECK_PWD_TIMEOUT

RequestId

string

The ID of the request.

05F59944-2E24-595C-B21A-8C9955E60FAF

Examples

Success response

JSON format

{
  "NetworkDomain": {
    "Comment": "comment",
    "Default": false,
    "NetworkDomainId": "2",
    "NetworkDomainName": "SSH Proxy",
    "NetworkDomainType": "Proxy",
    "Proxies": [
      {
        "ProxyType": "HTTPProxy",
        "NodeType": "Master",
        "Address": "47.102.**.**",
        "Port": 22,
        "User": "root",
        "HasPassword": true,
        "ProxyState": "Unavailable",
        "ProxyStateErrorCode": "CHECK_PWD_TIMEOUT"
      }
    ]
  },
  "RequestId": "05F59944-2E24-595C-B21A-8C9955E60FAF"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The argument is invalid. The argument is invalid.
500 InternalError An unknown error occurred. An unknown error occurred.
404 NetworkDomainNotFound The network domain is not found. The network domain is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.