Obtain the resource list that can add snat rules (exit rules) - GetAvailableResourceForSnatRule
Overview
Get the list of resources available for adding snat rules (exit rules)
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is GetAvailableResourceForSnatRule . | Yes |
PublicKey | string | The user's public key can be obtained from Console (opens in a new tab) | Yes |
Signature | string | User signature generated based on public key and API command, see Signature Algorithm | Yes |
Request Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Region | string | Region. See List of Regions and Availability Zones | Yes |
ProjectId | string | Project ID. If not filled in, the default project is used, sub-accounts must be filled in. Please refer to the GetProjectList interface. | Yes |
NATGWId | string | NAT Gateway Id | Yes |
Offset | int | Data offset, default is 0 | No |
Limit | int | Data pagination value, default is 20 | No |
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 |
DataSet | array[GetAvailableResourceForSnatRuleDataSet] | Details of the returned resources | Yes |
TotalCount | int | Total | Yes |
Data Model
GetAvailableResourceForSnatRuleDataSet
Field Name | Type | Description Information | Required |
---|---|---|---|
ResourceId | string | Resource ID | No |
ResourceName | string | Resource Name | No |
PrivateIP | string | Intranet IP of the Resource | No |
ResourceType | string | Resource Type | No |
SubnetworkId | string | ID of the resource's VPC | No |
VPCId | string | ID of the subnet to which the resource belongs | No |
Example
Request Example
https://api.ucloud-global.com/?Action=GetAvailableResourceForSnatRule
&Region=yyhASOAY
&ProjectId=UWaRmWcE
&NATGWId=XwXkQMAW
&Offset=2
&Limit=1
Response Example
{
"Action": "GetAvailableResourceForSnatRuleResponse",
"DataSet": [
{
"PrivateIP": "uHuoyYFI",
"ResourceId": "qXdXUnTs",
"ResourceName": "TseFpSYi",
"ResourceType": "uOcvcHeb",
"SubnetworkId": "dmBHMzcz",
"VPCId": "pzVhVEUB"
},
{
"PrivateIP": "kxPAXSCn",
"ResourceId": "JqMVhUhu",
"ResourceName": "qoyOPJia",
"ResourceType": "VqTetHsQ",
"SubnetworkId": "BkrGxoip",
"VPCId": "zBHWnLVr"
},
{
"PrivateIP": "LVnKUGoN",
"ResourceId": "XRrQUIbo",
"ResourceName": "NSJCiYYr",
"ResourceType": "CyXwCcqN",
"SubnetworkId": "ZbsfHYSG",
"VPCId": "eWCSjACm"
},
{
"PrivateIP": "laqANTXC",
"ResourceId": "dwdCkTls",
"ResourceName": "TckJOsbL",
"ResourceType": "fiZizgtR",
"SubnetworkId": "GRpEqNJs",
"VPCId": "kVEJGGak"
},
{
"PrivateIP": "zmlVqWEt",
"ResourceId": "KRkaFsvA",
"ResourceName": "TdbSIpnW",
"ResourceType": "DpNUxHHD",
"SubnetworkId": "csUhLeYX",
"VPCId": "dIvkrHDA"
},
{
"PrivateIP": "YLAmlLKq",
"ResourceId": "NdiwmcLU",
"ResourceName": "fjzxuLRW",
"ResourceType": "rxJeUYnO",
"SubnetworkId": "nGnpcIsX",
"VPCId": "EfWodcJo"
},
{
"PrivateIP": "RGaCxTVB",
"ResourceId": "cVcquAJG",
"ResourceName": "dBMRGKCo",
"ResourceType": "UMzQqjRh",
"SubnetworkId": "llqWelBB",
"VPCId": "nWKYxJzx"
}
],
"RetCode": 0,
"TotalCount": 2
}