# GetUDBAccessInfo - GetUDBAccessInfo

## Overview

Returns the private and public access information of a UDB instance, including the public address, port, bandwidth and whitelist, as well as the  private VPC, subnet, private IP, private domain and port






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `GetUDBAccessInfo`.                      | **Yes** |
| **PublicKey**  | string  | AccessKey ID, obtained from [Console](https://console.dezai.com/uaccount/api_manage)                                              | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [Region and Zone List](/docs/api/summary/regionlist) |**Yes**|
| **Zone** | string | Zone. See [Region and Zone List](/docs/api/summary/regionlist) |**Yes**|
| **ProjectId** | string | Project ID. Leave it blank for the default project. Sub-accounts must fill in. Please refer to the [GetProjectList API](/docs/api/summary/get_project_list) |**Yes**|
| **DBId** | string | InstanceID |**Yes**|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|
| **ExternalInfo** | array[[*ExternalInfo*](#externalinfo)] | Public access information of the instance, including the status, address, port, bandwidth and whitelist |**Yes**|
| **PrivateInfo** | array[[*PrivateInfo*](#privateinfo)] | Private access information of the instance, including the VPC, subnet, private IP, private domain and port |**Yes**|

#### Data Model


#### ExternalInfo

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Status** | string | Status of the public access, as a string enum; see the table below for values |No|
| **ExternalAddress** | string | Public access address; an empty string when public access is not enabled |No|
| **ExternalPort** | int | Public access port; 0 when public access is not enabled |No|
| **Bindwidth** | int | Public bandwidth in Mbps, taken from the EIP bandwidth; 0 when no EIP exists |No|
| **WhiteList** | string | Whitelist for public access, with multiple IPs separated by commas, taken from the NLB whitelist |No|
| **Support** | int | Whether the instance supports public access: 1 supported; currently always 1 |No|

#### PrivateInfo

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **VPCId** | string | VPC ID of the instance's private network |No|
| **SubnetId** | string | Subnet ID of the instance's private network |No|
| **PrivateIP** | string | Private service IP (VIP) of the instance |No|
| **PrivateDomain** | string | Private domain of the instance; an empty string when no private domain is enabled |No|
| **PrivatePort** | int | Status of the private domain, a string enum sharing the same values as Status; returns NetworkConnectionDisabled when no private domain is<br />enabled |No|
| **PrivateDomainStatus** | string | Private service port of the instance |No|

## Example

### Request Example
    
```
https://apiucloud.dezai.com/?Action=GetUDBAccessInfo
&Region=cn-zj
&Zone=cn-zj-01
&ProjectId=jfYVSckZ
&DBId=nbQrcarW
```

### Response Example
    
```json
{
  "Action": "GetUDBAccessInfoResponse",
  "ExternalInfo": [
    {
      "Bindwidth": 3,
      "ExternalAddress": "RCdpDkLM",
      "ExternalPort": 3,
      "Status": "iQFLtuBU",
      "Support": 5,
      "WhiteList": "zOsIWYbP"
    }
  ],
  "Message": "EKNTQNRV",
  "PrivateInfo": [
    {
      "PrivateDomain": "AXTyTYtL",
      "PrivateIP": "xijCIWfz",
      "PrivatePort": 4,
      "SubnetId": "vEhrqbTk",
      "VPCId": "mDliIGzu"
    }
  ],
  "RetCode": 0
}
```





