Get Security Group Bound Resources - DescribeSecGroupResource
Overview
Get Security Group Bound Resources
💡 Query the resources bound to a single security group (return resource details), support pagination query (paginate the bound resources).
Definition
Public Parameters
Parameter Name | Type | Description Information | Required |
---|---|---|---|
Action | string | Corresponding API command name, the current API is DescribeSecGroupResource . | Yes |
PublicKey | string | The user’s public key can be obtained from Console | 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 Region and Availability Zone List | Yes |
ProjectId | string | Project ID. Leave blank for the default project, sub-accounts must fill in. Please refer to GetProjectList API | No |
SecGroupId | string | Security Group Resource ID. | No |
Limit | int | Pagination query length. Default is 20. | No |
Offset | int | Pagination query starting position offset. Default is 0 | 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[SecGroupResourceInfo] | Refer to SecGroupResourceInfo for details. | Yes |
TotalCount | int | Total number of resources bound to the security group | No |
Data Model
SecGroupResourceInfo
Field Name | Type | Description Information | Required |
---|---|---|---|
Zone | int | Availability Zone | No |
SubResourceName | string | The name of the bound virtual network card | No |
SubResourceId | string | ID of the virtual network card bound to the resource | No |
SubResourceType | string | The type of the bound virtual network card, ‘uni’, virtual network card. | No |
Name | string | Name | No |
PrivateIp | string | Private IP | No |
ResourceId | string | Resource ID | No |
ResourceType | string | Resource Type. “unatgw”, NAT Gateway; “uhost”, UHost; “upm”, Physical Cloud Host; “hadoophost”, Hadoop Node; “fortresshost”, Bastion Host; “udhost”, UDSet Host; “udockhost”, Container; “dbaudit”, Database Audit; “uni”, Virtual Network Interface. | No |
Tag | string | Business Group | No |
Example
Request Example
https://api.genesissai.com/?Action=DescribeSecGroupResource
&Region=cn-zj
&ProjectId=8
&VPCId=HyexAArD
&SecGroupId.n=VTqSSEeQ
&Limit=8
&Offset=9
Response Example
{
"Action": "DescribeSecGroupResourceResponse",
"DataSet": [
{
"CreateTime": "FoMZwgfr",
"Name": "UwordIJs",
"Remark": "QBoDnpRT",
"Rule": [
{
"Direction": "jNHxLDwL",
"DstPort": "NpGQxxzK",
"IPRange": "ucVuYjCx",
"IPVersion": "rMVegzTz",
"Priority": "jmnsFfZh",
"ProtocolType": "jZBVvGxk",
"Remark": "XCgCJCZq",
"RuleAction": "rpnbLSKM",
"RuleId": "UcATLSQb"
}
],
"SecGroupId": "QqLcgWZc",
"Tag": "OjmPShak",
"VPCId": "yuAobWcz"
}
],
"RetCode": 0,
"TotalCount": 6
}