Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com> Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
12 KiB
Batch Adding or Deleting Whitelist Records
Function
This API is used to batch add or delete whitelist records of a VPC endpoint service.
URI
POST /v1/{project_id}/vpc-endpoint-services/{vpc_endpoint_service_id}/permissions/action
Parameter |
Mandatory |
Description |
---|---|---|
project_id |
Yes |
Specifies the project ID. For details about how to obtain the project ID, see Obtaining a Project ID. |
vpc_endpoint_service_id |
Yes |
Specifies the ID of the VPC endpoint service. |
Request
- Parameter description
Table 2 Request parameters Parameter
Mandatory
Type
Description
permissions
Yes
Array of strings
Lists the whitelist records.
The record is in the iam:domain::domain_id format.
Fields are described as follows:
- iam:domain:: is fixed.
- domain_id indicates the domain ID of the target user.
The value contains 1 to 64 characters, including letters, digits, and asterisks (*). If you enter an asterisk, this VPC endpoint service allows access from any VPC endpoints.
Example: iam:domain::6e9dfd51d1124e8d8498dce894923a0dd
action
Yes
String
Specifies the operation to be performed.
The value is add or remove.
- Example request
This request is to add a whitelist record to the VPC endpoint service whose ID is 4189d3c2-8882-4871-a3c2-d380272eed88.
POST https://{endpoint}/v1/{project_id}/vpc-endpoint-services/4189d3c2-8882-4871-a3c2-d380272eed88/permissions/action
{ "permissions": [ "iam:domain::fc973eea581490997e82ea11a1d0101" ], "action":"add" }
This request is to delete a whitelist record from the VPC endpoint service whose ID is 4189d3c2-8882-4871-a3c2-d380272eed88.
POST https://{endpoint}/v1/{project_id}/vpc-endpoint-services/4189d3c2-8882-4871-a3c2-d380272eed88/permissions/action
{ "permissions": [ "iam:domain::5fc973eea581490997e82ea11a1d0101" ], "action":"remove" }
Response
- Parameter description
Table 3 Response parameter Parameter
Type
Description
permissions
Array of strings
Lists the whitelist records.
The permission format is iam:domain:: 6e9dfd51d1124e8d8498dce894923a0d or *. * indicates all users can connect to the VPC endpoint service. 6e9dfd51d1124e8d8498dce894923a0d indicates the domain ID of the user.
- Example response
{ "permissions": [ "iam:domain::5fc973eea581490997e82ea11a1d0101", "iam:domain::5fc973eea581490997e82ea11a1d0102" ] }
Status Codes
See Status Codes.