List parameters

This page describes how to retrieve a list of all the parameters within a project.

Listing parameters is useful when you want to get a complete view of all the parameters that you have stored in Parameter Manager, including their names, types, and descriptions. You can also generate reports or gather information about your parameter configurations for auditing purposes.

Required roles

To get the permissions that you need to list parameters, 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.

List all parameters

To list all parameters in a project, folder, or organization, use the following command:

gcloud

List global parameters

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

  • PROJECT_ID: the Google Cloud project ID

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud beta parametermanager parameters list --location=global --project=PROJECT_ID

Windows (PowerShell)

gcloud beta parametermanager parameters list --location=global --project=PROJECT_ID

Windows (cmd.exe)

gcloud beta parametermanager parameters list --location=global --project=PROJECT_ID

You should receive a response similar to the following:

projects/production-1/locations/global/parameters/allowed_ip_ranges                         UNFORMATTED  {'iamPolicyUidPrincipal': 'principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/global/parameters/d81462f3-f333-49d6-8a37-18ba24ad21b3'}  2024-10-23T09:58:00.195567192Z  2024-10-23T09:58:00.521576004Z
projects/production-1/locations/global/parameters/app_config                                FORMATTED  {'iamPolicyUidPrincipal': 'principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/global/parameters/4d3737fa-ab28-47f3-8ca7-4ea4d3de6305'}  2024-10-25T13:54:53.162338414Z  2024-10-25T13:54:53.444576707Z

List regional parameters

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

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

Execute the following command:

Linux, macOS, or Cloud Shell

gcloud beta parametermanager parameters list --location=LOCATION --project=PROJECT_ID

Windows (PowerShell)

gcloud beta parametermanager parameters list --location=LOCATION --project=PROJECT_ID

Windows (cmd.exe)

gcloud beta parametermanager parameters list --location=LOCATION --project=PROJECT_ID

You should receive a response similar to the following:

projects/production-1/locations/us-central1/parameters/allowed_ip_ranges                        UNFORMATTED  {'iamPolicyUidPrincipal': 'principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/us-central1/parameters/d81462f3-f333-49d6-8a37-18ba24ad21b3'}  2024-10-23T09:58:00.195567192Z  2024-10-23T09:58:00.521576004Z
projects/production-1/locations/us-central1/parameters/app_config                                FORMATTED  {'iamPolicyUidPrincipal': 'principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/us-central1/parameters/4d3737fa-ab28-47f3-8ca7-4ea4d3de6305'}  2024-10-25T13:54:53.162338414Z  2024-10-25T13:54:53.444576707Z

REST

List global parameters

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

  • PROJECT_ID: the Google Cloud project ID

HTTP method and URL:

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

Request JSON body:

{}

To send your request, choose one of these options:

curl

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"

PowerShell

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" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{
  "parameters": [
    {
      "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"
      }
    },
    {
      "name": "projects/production-1/locations/global/parameters/allowed_ip_ranges",
      "createTime": "2024-10-15T08:31:53.250487112Z",
      "updateTime": "2024-10-15T08:31:53.576010644Z",
      "format": "UNFORMATTED",
      "policyMember": {
        "iamPolicyUidPrincipal": "principal://parametermanager.googleapis.com/projects/567445493557/uid/locations/global/parameters/c0100d79-7c8d-4da3-8eb6-fe2a35843d9b"
      }
    }
  ]
}

List regional parameters

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

  • LOCATION: the Google Cloud location of the parameters
  • PROJECT_ID: the Google Cloud project ID

HTTP method and URL:

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

Request JSON body:

{}

To send your request, choose one of these options:

curl

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"

PowerShell

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" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{
  "parameters": [
    {
      "name": "projects/production-1/locations/us-central1/parameters/app_config",
      "createTime": "2024-10-30T05:27:28.934719122Z",
      "updateTime": "2024-10-30T05:27:29.010260475Z",
      "format": "YAML",
      "policyMember": {
        "iamPolicyUidPrincipal": "principal://parametermanager.googleapis.com/projects/463050620945/uid/locations/us-central1/parameters/6ffe4045-0778-490a-a786-d77b124e2613"
      }
    },
    {
      "name": "projects/production-1/locations/us-central1/parameters/allowed_ip_ranges",
      "createTime": "2024-10-29T06:18:23.070009070Z",
      "updateTime": "2024-10-29T06:18:23.123580038Z",
      "format": "UNFORMATTED",
      "policyMember": {
        "iamPolicyUidPrincipal": "principal://parametermanager.googleapis.com/projects/463050620945/uid/locations/us-central1/parameters/a7d81e39-3f53-4794-b3c6-484800a18c32"
      }
    }
  ]
}

What's next