Batch Adding or Deleting Whitelist Records of a VPC Endpoint Service
Function
This API is used to batch add to or delete whitelist records from a VPC endpoint service. Note: Your account is in the whitelist of your own VPC endpoint service by default.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/vpc-endpoint-services/{vpc_endpoint_service_id}/permissions/action
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. Minimum: 1 Maximum: 64 |
vpc_endpoint_service_id |
Yes |
String |
Specifies the ID of the VPC endpoint service. Minimum: 1 Maximum: 64 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. |
Content-Type |
No |
String |
Specifies the MIME type of the request body. Default value application/json is recommended. For APIs used to upload objects or images, the MIME type varies depending on the flow type. Default: application/json |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
permissions |
Yes |
Array of strings |
Specifies the permissions. The permission formats are as follows:
You can also enter an asterisk for domain_id or org_path, which indicates that this VPC endpoint service allows accesses from any VPC endpoints. Example:
Minimum: 1 Maximum: 1024 Array Length: 1 - 50 |
permission_type |
No |
String |
Specifies the whitelist type of the VPC endpoint service.
|
action |
Yes |
String |
Specifies the action to be performed, which can be add or remove. Minimum: 1 Maximum: 32 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
permissions |
Array of strings |
Specifies the permissions. The permission formats are as follows:
You can also enter an asterisk for domain_id or org_path, which indicates that this VPC endpoint service allows accesses from any VPC endpoints. Example:
Minimum: 0 Maximum: 32 |
permission_type |
String |
Specifies the whitelist type of the VPC endpoint service.
|
Example Requests
- Adding a Whitelist for a VPC Endpoint Service
POST https://{endpoint}/v1/{project_id}/vpc-endpoint-services/4189d3c2-8882-4871-a3c2- d380272eed88/permissions/action { "permissions" : [ "iam:domain::fc973eea581490997e82ea11a1d0101" ], "action" : "add" }
- Removing a VPC Endpoint Service from the Whitelist
POST https://{endpoint}/v1/{project_id}/vpc-endpoint-services/4189d3c2-8882-4871-a3c2- d380272eed88/permissions/action { "permissions" : [ "iam:domain::fc973eea581490997e82ea11a1d0101" ], "action" : "remove" }
Example Responses
Status code: 200
The server has successfully processed the request.
{ "permissions" : [ "iam:domain::5fc973eea581490997e82ea11a1d0101", "iam:domain::5fc973eea581490997e82ea11a1d0102" ] }
Status Codes
Status Code |
Description |
---|---|
200 |
The server has successfully processed the request. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot