Get tag keys
You can perform this workflow to retrieve all the tag keys in the specified project and region.
Choose the workflow to use based on the type of Cloud Volumes ONTAP deployment:
Get tag keys for single node
You can use this workflow to retrieve the tag keys in a single node working environment.
Step 1. Select the project
Perform the workflow Get projects and choose projectId
value of the required project for projectId
query parameter.
Step 2. Select the region
Perform the Get regions workflow and choose the zone: name
value of the required region for the zone
query parameter.
Step 3. Get the tag keys
This REST API call uses the following method and endpoint.
HTTP method | Path |
---|---|
GET |
/occm/api/gcp/vsa/metadata/tag-keys |
curl --location --request GET 'https://cloudmanager.cloud.netapp.com/occm/api/gcp/vsa/metadata/tag-keys?projectId=<PROJECT_ID>&zone=<ZONE>' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>' --header 'Content-Type: application/json'
The JSON input example includes the minimum list of parameters.
Query parameters:
-
<PROJECT_ID>
projectId
string -
<ZONE>
zone
string
The JSON output example includes the list of labels in the specified project and zone.
[ { "key": "working-environment-id", "values": [ "vsaworkingenvironment-sfrf3wvj", "vsaworkingenvironment-2qkd75xv" ] }, { "key": "count-down", "values": [ "3", "0", "2" ] }, { "key": "username", "values": [ "administrator" ] }, { "key": "keepme", "values": [ "10" ] }, { "key": "cloud-ontap-version", "values": [ "9_9_0x4" ] }, { "key": "cloud-ontap-dm", "values": [ "zivgcp01we02-deployment", "zivgcp01we03-deployment" ] }, { "key": "platform-serial-number", "values": [ "00000030xxx000009", "00000000000000096011" ] } ] }, { "key": "netapp:cloud-compliance:cloudManager:ClientId", "values": [ "sNwn2FzHxFrucwz8xxxxxI7aRNqTC" ] } ]
Get tag keys for high availability pair
You can use this workflow to retrieve the tag keys in an HA working environment.
Step 1. Select the project
Perform the workflow Get projects and choose projectId
value of the required project for projectId
query parameter.
Step 2. Select the region
Perform the Get regions workflow and choose the zone: name
value of the required region for the zone
query parameter.
3. Get the tag keys
HTTP method | Path |
---|---|
GET |
/occm/api/gcp/ha/metadata/tag-keys |
curl --location --request GET 'https://cloudmanager.cloud.netapp.com/occm/api/gcp/ha/metadata/tag-keys?projectId=<PROJECT_ID>&zone=<ZONE>' --header 'x-agent-id: <AGENT_ID>' --header 'Authorization: Bearer <ACCESS_TOKEN>' --header 'Content-Type: application/json'
The JSON input example includes the minimum list of parameters.
Query parameters:
-
<PROJECT_ID>
projectId
string -
<ZONE>
zone
string
The JSON output example includes the list of tag keys.
[ { "key": "working-environment-id", "values": [ "vsaworkingenvironment-sfrf3wvj", "vsaworkingenvironment-2qkd75xv" ] }, { "key": "count-down", "values": [ "3", "0", "2" ] }, { "key": "username", "values": [ "administrator" ] }, { "key": "keepme", "values": [ "10" ] }, { "key": "cloud-ontap-version", "values": [ "9_9_0x4" ] }, { "key": "cloud-ontap-dm", "values": [ "zivgcp01we02-deployment", "zivgcp01we03-deployment" ] }, { "key": "platform-serial-number", "values": [ "xxxxxxxxxxxxxxx", "000000xx00096011" ] } ] }, { "key": "netapp:cloud-compliance:cloudManager:ClientId", "values": [ "sNwn2FzHxFrucwxxxxxYI7aRNqTC" ] } ]