Reviewed-by: Topchii, Maria <mtopchii@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
19 KiB
Adding Whitelist Records for a VPC Endpoint Service
Function
This API is used to add whitelist records in batches for a gateway's VPC endpoint service.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/apigw/instances/{instance_id}/vpc-endpoint/permissions/batch-add
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain it, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Gateway ID, which can be obtained from the gateway information on the APIG console. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
permissions |
Yes |
Array of strings |
Whitelist records. Each whitelist record is in the format of "iam:domain::Authorized_account_ID". The account ID contains 32 characters, including only letters (a–f) and digits. An asterisk (*) means that all users have access. Array Length: 1 - 50 |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
x-request-id |
String |
Request ID. |
Parameter |
Type |
Description |
---|---|---|
permissions |
Array of strings |
Whitelist records. Each whitelist record is in the format of "iam:domain::Authorized_account_ID". The account ID contains 32 characters, including only letters (a–f) and digits. An asterisk (*) means that all users have access. Array Length: 1 - 50 |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
x-request-id |
String |
Request ID. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
x-request-id |
String |
Request ID. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 404
Parameter |
Type |
Description |
---|---|---|
x-request-id |
String |
Request ID. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
x-request-id |
String |
Request ID. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
Add whitelist records for a vpc endpoint service.
{ "permissions" : [ "iam:domain::7cc2018e40394f7c9692f1713e76234d" ] }
Example Responses
Status code: 200
OK
{ "permissions" : [ "iam:domain::930ba6b0ea64457e8ed1861e596c7a9a" ] }
Status code: 401
Unauthorized
{ "error_code" : "APIC.7102", "error_msg" : "Incorrect token or token resolution failed" }
Status code: 403
Forbidden
{ "error_code" : "APIC.7106", "error_msg" : "No permissions to request for the method" }
Status code: 404
Resource Not Found
{ "error_code" : "APIC.7314", "error_msg" : "Endpoint service not found" }
Status code: 500
Internal Server Error
{ "error_code" : "APIC.9007", "error_msg" : "Failed to execute VCPEP request" }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Resource Not Found |
500 |
Internal Server Error |
Error Codes
See Error Codes.