All Products
Search
Document Center

Bastionhost:GetNetworkDomain

Last Updated:Nov 27, 2024

Queries the detailed information about a network domain.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
yundun-bastionhost:GetNetworkDomain
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The bastion host ID.

Note You can call the DescribeInstances operation to query the bastion host ID.
bastionhost-cn-i7m2btk6g48
RegionIdstringNo

The region ID of the bastion host.

Note For more information about the mapping between region IDs and region names, see Regions and zones.
cn-hangzhou
NetworkDomainIdstringYes

The ID of the network domain to query.

Note You can call the ListNetworkDomains operation to query the network domain ID.
3

Response parameters

ParameterTypeDescriptionExample
object
NetworkDomainobject

The detailed information about the network domain.

Commentstring

The remarks of the network domain.

comment
Defaultboolean

Indicates whether the network domain is a built-in network domain.

  • true
  • false
false
NetworkDomainIdstring

The network domain ID.

2
NetworkDomainNamestring

The name of the network domain.

SSH Proxy
NetworkDomainTypestring

The connection mode of the network domain. Valid values:

  • Direct
  • Proxy
Proxy
Proxiesarray<object>

The information about the proxy servers.

itemobject
ProxyTypestring

The proxy type. Valid values:

  • SSHProxy
  • HTTPProxy
  • Socks5Proxy
HTTPProxy
NodeTypestring

The node type of the proxy server. Valid values:

  • Master: primary proxy server.
  • Slave: secondary proxy server.
Master
Addressstring

The IP address of the proxy server.

47.102.**.**
Portinteger

The port of the proxy server.

22
Userstring

The username of the proxy server.

root
HasPasswordboolean

Indicates whether the proxy server has a password. Valid values:

  • true
  • false
true
ProxyStatestring

The status of the proxy server.

  • Available
  • Unavailable
Unavailable
ProxyStateErrorCodestring

The error code that indicates the status of the proxy server.

  • CHECK_PWD_FAILED: The password is invalid.
  • CHECK_PWD_TIMEOUT: The password verification session timed out.
  • CHECK_PWD_NETWORK_ERR: A network error occurred.
  • UNEXPECTED: An unknown error occurred.
CHECK_PWD_TIMEOUT
RequestIdstring

The request ID.

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

Examples

Sample success responses

JSONformat

{
  "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 codeError codeError messageDescription
400InvalidParameterThe argument is invalid.The argument is invalid.
404NetworkDomainNotFoundThe network domain is not found.The network domain is not found.
500InternalErrorAn unknown error occurred.An unknown error occurred.

For a list of error codes, visit the Service error codes.