View parameter details

This page describes how to view the metadata of a specific parameter. Metadata can include the following:

  • The parameter name.
  • Timestamp indicating when the parameter was created and updated.
  • The format in which the parameter value is stored (for example, YAML).
  • The system-generated unique ID representing the built-in identity of the parameter.

Required roles

To get the permissions that you need to view parameter details, ask your administrator to grant you the Parameter Manager Parameter Viewer (roles/parametermanager.parameterViewer) IAM role on the project, folder, or organization. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

View parameter details

To view the details of a specific parameter, use the following command:

Before using any of the command data below, make the following replacements:

  • PARAMETER_ID: the name of the parameter

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud beta parametermanager parameters describe PARAMETER_ID --location=global
gcloud beta parametermanager parameters describe PARAMETER_ID --location=global
gcloud beta parametermanager parameters describe PARAMETER_ID --location=global

You should receive a response similar to the following:

createTime: '2024-11-14T06:07:35.529019883Z'
format: UNFORMATTED
name: projects/production-1/locations/global/parameters/app_config
policyMember:
  iamPolicyUidPrincipal: principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/global/parameters/307fa2aa-c769-496f-9362-f908d14bac71
updateTime: '2024-11-14T06:07:35.992040677Z'

Before using any of the command data below, make the following replacements:

  • PARAMETER_ID: the name of the parameter
  • LOCATION: the Google Cloud location of the parameter

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud beta parametermanager parameters describe PARAMETER_ID --location=LOCATION
gcloud beta parametermanager parameters describe PARAMETER_ID --location=LOCATION
gcloud beta parametermanager parameters describe PARAMETER_ID --location=LOCATION

You should receive a response similar to the following:

createTime: '2024-11-14T06:07:35.529019883Z'
format: UNFORMATTED
name: projects/production-1/locations/us-central1/parameters/app_config
policyMember:
  iamPolicyUidPrincipal: principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/us-central1/parameters/307fa2aa-c769-496f-9362-f908d14bac71
updateTime: '2024-11-14T06:07:35.992040677Z'

Before using any of the request data, make the following replacements:

  • PROJECT_ID: the Google Cloud project ID
  • PARAMETER_ID: the name of the parameter

HTTP method and URL:

GET https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/global/parameters/PARAMETER_ID

Request JSON body:

{}

To send your request, choose one of these options:

Save the request body in a file named request.json, and execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/global/parameters/PARAMETER_ID"

Save the request body in a file named request.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://parametermanager.googleapis.com/v1/projects/PROJECT_ID/locations/global/parameters/PARAMETER_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{
  "name": "projects/production-1/locations/global/parameters/app_config",
  "createTime": "2024-10-15T08:39:05.191747694Z",
  "updateTime": "2024-10-15T08:39:05.530311092Z",
  "format": "YAML",
  "policyMember": {
    "iamPolicyUidPrincipal": "principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/global/parameters/c86ca5bc-f4c2-439d-b62c-d578b4b78b12"
  }
}

Before using any of the request data, make the following replacements:

  • LOCATION: the Google Cloud location of the parameter
  • PROJECT_ID: the Google Cloud project ID
  • PARAMETER_ID: the name of the parameter

HTTP method and URL:

GET https://parametermanager.LOCATION.rep.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/parameters/PARAMETER_ID

Request JSON body:

{}

To send your request, choose one of these options:

Save the request body in a file named request.json, and execute the following command:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://parametermanager.LOCATION.rep.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/parameters/PARAMETER_ID"

Save the request body in a file named request.json, and execute the following command:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://parametermanager.LOCATION.rep.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/parameters/PARAMETER_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{
  "name": "projects/production-1/locations/us-central1/parameters/app_config",
  "createTime": "2024-10-15T08:39:05.191747694Z",
  "updateTime": "2024-10-15T08:39:05.530311092Z",
  "format": "YAML",
  "policyMember": {
    "iamPolicyUidPrincipal": "principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/global/parameters/c86ca5bc-f4c2-439d-b62c-d578b4b78b12"
  }
}

The response is the parameter object, which contains the metadata of the parameter.

What's next