Modify the security group of MongoDB instance
API Introduction
Call the modifySecurityGroup API to modify the security group of MongoDB instance.
API Restrictions
None
URI
POST /v1/extApi/modifySecurityGroup
Path Parameter
None
Query Parameter
None
Request Parameters
Request Header Parameter
None
Request Body Parameter
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
spuInstId | Yes | String | Instance ID | 7eb8d17d789047d2892d9f1ec89a20ac | |
oldSecurityGroupId | Yes | String | Old user security group id | b625798c-06d7-4e57-b0c1-95f2d9a9eb4f | |
targetSecurityGroupId | Yes | String | Target user security group id | aa8ddfb7-f042-4c57-bb25-7df09d5c732a | |
targetSecurityGroupName | Yes | String | Target user security group name | sgs-95601111 |
Response Parameter
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
statusCode | Yes | Integer | Response code value range: 800 indicates success, 900 indicates failure | 800 | |
message | Yes | String | Response information | The security group is modified successfully | |
returnObj | Yes | Object | Return object. |
Sample Request
Request Header
None
Request Body
{
"spuInstId":"7eb8d17d789047d2892d9f1ec89a20ac",
"oldSecurityGroupId":"b625798c-06d7-4e57-b0c1-95f2d9a9eb4f",
"targetSecurityGroupId":"aa8ddfb7-f042-4c57-bb25-7df09d5c732a",
"targetSecurityGroupName":"sgs-95601111"
}Response Example
{
"statusCode": 800,
"message": "the security group is modified successfully",
"returnObj": null
}Status Code
Status Code | Description |
800 | Indicate that the request succeeded |
900 | Indicates that the request failed |
Error Codes
None
Query the Security Group List Information of the IAAS Layer
API Introduction
Call describeSecurityGroup to query the security group list information.
API Restrictions
None
URI
GET /v1/extApi/describeSecurityGroup
Path Parameter
None
Query Parameter
Parameter | Required or Not | Parameter Type | Description | Lower-level Object | |
spuInstId | Yes | String | Instance ID | 7eb8d17d789047d2892d9f1ec89a20a | |
pageNow | No | Integer | Current page | If left blank, default to 1 | |
pageSize | No | Integer | Number of current pages | If left blank, default to 10 |
Request Parameters
Request Header Parameter
None
Response Parameter
Parameter | Required or Not | Parameter Type | Description | Lower-level Object | |
statusCode | Yes | Integer | Response Code Value range: 800 indicates success, 900 indicates failure | 800 | |
message | Yes | String | Response information | The iaas layer security group list is queried successfully | |
returnObj | Yes | Object | Return object array | returnObj |
Table returnObj
Parameter | Required or Not | Parameter Type | Description | Lower-level Object | |
code | Yes | Integer | API call status code, 0 indicates success, non 0 indicates failure | 0 | |
data | Yes | Object | Return object. | data |
Table data
Parameter | Required or Not | Parameter Type | Description | Lower-level Object | |
lastPage | Yes | Integer | Last page | 8 | |
navigatepageNums | Yes | Integer[] | Number of navigation pages | ||
startRow | Yes | Object | The line number of the first element of the current page in the database | returnObj | |
hasNextPage | Yes | Boolean | Whether there is a next page | ||
prePage | Yes | Integer | Previous page | ||
nextPage | Yes | Integer | Next Page | ||
endRow | Yes | Integer | The line number of the last element of the current page in the database | ||
pageSize | Yes | Integer | Number per page | ||
list | Yes | Object[] | list | ||
pageNum | Yes | Integer | Current page | ||
navigatePages | Yes | Integer | Number of navigation pages | ||
total | Yes | Long | Total number of records. | ||
pages | Yes | Integer | Total number of pages. | ||
firstPage | Yes | Integer | First page | ||
size | Yes | Integer | Number of current pages | ||
isLastPage | Yes | Boolean | Whether it is the last page | ||
hasPreviousPage | Yes | Boolean | Whether there is a previous page | ||
isFirstPage | Yes | Boolean | Whether it is the first page |
Table list
Parameter | Required or Not | Parameter Type | Description | Example | Lower-level Object |
regionId | Yes | String | Resource pool ID | 100054c0416811e9a6690242ac110002 | |
resSecurityGroupId | Yes | String | Security group ID | 3d510445-8ec4-48e7-95b6-2db12c89ed95 | |
vpcId | Yes | String | vpc ID | ||
name | Yes | String | Security Group Name | sgs-95601111 | |
zoneId | Yes | String | zone ID | 100054c0416811e9a6690242ac110002 | |
zoneName | Yes | String | zone name | Baoding os |
Sample Request
Request Header
None
Request parameter query
GET /v1/extApi/describeSecurityGroup?spuInstId=7eb8d17d789047d2892d9f1ec89a20ac&pageNow=1&pageSize=10
Response Example
{
"statusCode": 800,
"message": "the iaas layer security group list is queried successfully",
"returnObj": {
"code": 0,
"data": {
"startRow": 0,
"navigatepageNums": [
1
],
"lastPage": 1,
"prePage": 0,
"hasNextPage": false,
"nextPage": 0,
"pageSize": 10,
"endRow": 3,
"list": [
{
"regionId": "100054c0416811e9a6690242ac110002",
"resSecurityGroupId": "3d510445-8ec4-48e7-95b6-2db12c89ed95",
"vpcId": null,
"name": "sgs-htap",
"zoneId": "100054c0416811e9a6690242ac110002",
"zoneName": "Baoding os"
},
{
"regionId": "100054c0416811e9a6690242ac110002",
"resSecurityGroupId": "aa8ddfb7-f042-4c57-bb25-7df09d5c732a",
"vpcId": null,
"name": "sgs-95601111",
"zoneId": "100054c0416811e9a6690242ac110002",
"zoneName": "Baoding os"
},
{
"regionId": "100054c0416811e9a6690242ac110002",
"resSecurityGroupId": "b625798c-06d7-4e57-b0c1-95f2d9a9eb4f",
"vpcId": null,
"name": "sgs-eb3e",
"zoneId": "100054c0416811e9a6690242ac110002",
"zoneName": "Baoding os"
},
{
"regionId": "100054c0416811e9a6690242ac110002",
"resSecurityGroupId": "f2036ce1-029c-426a-b6af-6afef5dbd487",
"vpcId": null,
"name": "default",
"zoneId": "100054c0416811e9a6690242ac110002",
"zoneName": "Baoding os"
}
],
"pageNum": 1,
"navigatePages": 8,
"total": 4,
"navigateFirstPage": 1,
"pages": 1,
"size": 4,
"firstPage": 1,
"isLastPage": true,
"hasPreviousPage": false,
"navigateLastPage": 1,
"isFirstPage": true
}
}
}Status Code
Status Code | Description |
800 | Indicate that the request succeeded |
900 | Indicates that the request failed |
Error Codes
None