Google Cloud Location API
Use the post /v1/cckm/google/get-locations
API to get the list of Google Cloud locations. A Google Cloud location is required when fetching the Google Cloud key rings from a project linked with a Google Cloud connection on the CipherTrust Manager.
Syntax
curl -k '<IP>/api/v1/cckm/google/get-locations' -H 'Authorization: Bearer AUTHTOKEN' -H 'Content-Type: application/json' --data-binary $'{\n "project_id": "<project_id>",\n "connection": "<connection_name>",\n "page_size": <page_size>\n}' --compressed
Request Parameters
Parameter | Type | Description |
---|---|---|
AUTHTOKEN | string | Authorization token. |
connection | string | Name or ID of the Google Cloud connection on the CipherTrust Manager. |
project_id | string | Name or ID of the Google Cloud project. To determine the project ID, run the post /v1/cckm/google/get-projects or get /v1/cckm/google/projects API. Refer to Fetching a Project from GCP or Viewing Google Cloud Projects. |
page_size | number | Number of the Google Cloud locations to list. |
page_token | string | Token that you can use to get the list of remaining locations beyond the number set in page_size . For example, if the total number of locations is 20 , and you have page_size to 11 , then specify page_token to view the remaining 9 locations. |
Example Request
curl -k 'https://127.0.0.1/api/v1/cckm/google/get-locations' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhOGY3N2IxZS1lOTY2LTQwMjEtODRjMC01YjZiNjAzMTBmOWEiLCJzdWIiOiJsb2NhbHwzM2Y5ZDFmNi04MjJiLTQ0NTItOGM4MC1mYzM0ZGYyZTI3OGQiLCJpc3MiOiJreWxvIiwiYWNjIjoia3lsbyIsInByZWZlcnJlZF91c2VybmFtZSI6ImFkbWluIiwiY3VzdCI6eyJkb21haW5faWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAiLCJncm91cHMiOlsiYWRtaW4iXSwic2lkIjoiNjcyMjMzMDAtYjU2ZC00ZmVmLTkwMDEtZGE1NGY2ZDdiMzY4Iiwiem9uZV9pZCI6IjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCJ9LCJqd3RpZCI6ImFmMTFhYjM0LTFiNmQtNGY0Zi04ZTEzLTAxOGQ2ZGJlOTZlZiIsImlhdCI6MTYyMDE5NTM4OSwiZXhwIjoxNjIwMTk1Njg5fQ.PLhevpNJb6SRNJwkSZ8k_n_YpZlyU6-Fv8kkYfvsh3Q' -H 'Content-Type: application/json' --data-binary $'{\n "project_id": "gemalto-kyloeng",\n "connection": "gcp-connection",\n "page_size": 1\n}' --compressed
Example Response
{
"locations": [
{
"name": "projects/gemalto-kyloeng/locations/asia",
"locationId": "asia",
"display_name": "Oregon",
"labels": {
"cloud.googleapis.com/country": "SG",
"cloud.googleapis.com/location": "asia"
},
"metadata": {
"@type": "type.googleapis.com/google.cloud.kms.v1.LocationMetadata",
"ekmAvailable": "",
"hsmAvailable": ""
}
}
],
"nextPageToken": "ALm5f_Qnkr95DYaUoqXP_edv9mihqU08NjRC7zByYNACIuUuWb_xxrMz_lXKrg",
"connection": "gcp-connection"
}
The output shows the list and details of Google Cloud locations linked with a Google Cloud project ID.
Response Codes
Response Code | Description |
---|---|
2xx | Success |
4xx | Client errors |
5xx | Server errors |
Refer to HTTP status codes for details.