Google Cloud v8.27.0 published on Thursday, Apr 17, 2025 by Pulumi
gcp.parametermanager.getParameterVersion
Explore with Pulumi AI
Get the value and metadata from a Parameter Manager Parameter version. For more information see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const basic = gcp.parametermanager.getParameterVersion({
    parameter: "test-parameter",
    parameterVersionId: "test-parameter-version",
});
import pulumi
import pulumi_gcp as gcp
basic = gcp.parametermanager.get_parameter_version(parameter="test-parameter",
    parameter_version_id="test-parameter-version")
package main
import (
	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/parametermanager"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := parametermanager.LookupParameterVersion(ctx, ¶metermanager.LookupParameterVersionArgs{
			Parameter:          "test-parameter",
			ParameterVersionId: "test-parameter-version",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() => 
{
    var basic = Gcp.ParameterManager.GetParameterVersion.Invoke(new()
    {
        Parameter = "test-parameter",
        ParameterVersionId = "test-parameter-version",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.parametermanager.ParametermanagerFunctions;
import com.pulumi.gcp.parametermanager.inputs.GetParameterVersionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var basic = ParametermanagerFunctions.getParameterVersion(GetParameterVersionArgs.builder()
            .parameter("test-parameter")
            .parameterVersionId("test-parameter-version")
            .build());
    }
}
variables:
  basic:
    fn::invoke:
      function: gcp:parametermanager:getParameterVersion
      arguments:
        parameter: test-parameter
        parameterVersionId: test-parameter-version
Using getParameterVersion
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getParameterVersion(args: GetParameterVersionArgs, opts?: InvokeOptions): Promise<GetParameterVersionResult>
function getParameterVersionOutput(args: GetParameterVersionOutputArgs, opts?: InvokeOptions): Output<GetParameterVersionResult>def get_parameter_version(parameter: Optional[str] = None,
                          parameter_version_id: Optional[str] = None,
                          project: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetParameterVersionResult
def get_parameter_version_output(parameter: Optional[pulumi.Input[str]] = None,
                          parameter_version_id: Optional[pulumi.Input[str]] = None,
                          project: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetParameterVersionResult]func LookupParameterVersion(ctx *Context, args *LookupParameterVersionArgs, opts ...InvokeOption) (*LookupParameterVersionResult, error)
func LookupParameterVersionOutput(ctx *Context, args *LookupParameterVersionOutputArgs, opts ...InvokeOption) LookupParameterVersionResultOutput> Note: This function is named LookupParameterVersion in the Go SDK.
public static class GetParameterVersion 
{
    public static Task<GetParameterVersionResult> InvokeAsync(GetParameterVersionArgs args, InvokeOptions? opts = null)
    public static Output<GetParameterVersionResult> Invoke(GetParameterVersionInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetParameterVersionResult> getParameterVersion(GetParameterVersionArgs args, InvokeOptions options)
public static Output<GetParameterVersionResult> getParameterVersion(GetParameterVersionArgs args, InvokeOptions options)
fn::invoke:
  function: gcp:parametermanager/getParameterVersion:getParameterVersion
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Parameter string
 - The parameter for obtaining the Parameter Version.
This can be either the reference of the parameter as in 
projects/{{project}}/locations/global/parameters/{{parameter_id}}or only the name of the parameter as in{{parameter_id}}. - Parameter
Version stringId  - The version of the parameter to get.
 - Project string
 - The project for retrieving the Parameter Version. If it's not specified, the provider project will be used.
 
- Parameter string
 - The parameter for obtaining the Parameter Version.
This can be either the reference of the parameter as in 
projects/{{project}}/locations/global/parameters/{{parameter_id}}or only the name of the parameter as in{{parameter_id}}. - Parameter
Version stringId  - The version of the parameter to get.
 - Project string
 - The project for retrieving the Parameter Version. If it's not specified, the provider project will be used.
 
- parameter String
 - The parameter for obtaining the Parameter Version.
This can be either the reference of the parameter as in 
projects/{{project}}/locations/global/parameters/{{parameter_id}}or only the name of the parameter as in{{parameter_id}}. - parameter
Version StringId  - The version of the parameter to get.
 - project String
 - The project for retrieving the Parameter Version. If it's not specified, the provider project will be used.
 
- parameter string
 - The parameter for obtaining the Parameter Version.
This can be either the reference of the parameter as in 
projects/{{project}}/locations/global/parameters/{{parameter_id}}or only the name of the parameter as in{{parameter_id}}. - parameter
Version stringId  - The version of the parameter to get.
 - project string
 - The project for retrieving the Parameter Version. If it's not specified, the provider project will be used.
 
- parameter str
 - The parameter for obtaining the Parameter Version.
This can be either the reference of the parameter as in 
projects/{{project}}/locations/global/parameters/{{parameter_id}}or only the name of the parameter as in{{parameter_id}}. - parameter_
version_ strid  - The version of the parameter to get.
 - project str
 - The project for retrieving the Parameter Version. If it's not specified, the provider project will be used.
 
- parameter String
 - The parameter for obtaining the Parameter Version.
This can be either the reference of the parameter as in 
projects/{{project}}/locations/global/parameters/{{parameter_id}}or only the name of the parameter as in{{parameter_id}}. - parameter
Version StringId  - The version of the parameter to get.
 - project String
 - The project for retrieving the Parameter Version. If it's not specified, the provider project will be used.
 
getParameterVersion Result
The following output properties are available:
- Create
Time string - The time at which the Parameter Version was created.
 - Disabled bool
 - The current state of the Parameter Version.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Kms
Key stringVersion  - The resource name of the Cloud KMS CryptoKeyVersion used to decrypt parameter version payload. Format 
projects/{{project}}/locations/global/keyRings/{{key_ring}}/cryptoKeys/{{crypto_key}}/cryptoKeyVersions/{{crypto_key_version}} - Name string
 - The resource name of the ParameterVersion. Format:
projects/{{project}}/locations/global/parameters/{{parameter_id}}/versions/{{parameter_version_id}} - Parameter string
 - Parameter
Data string - The parameter data.
 - Parameter
Version stringId  - Project string
 - Update
Time string - The time at which the Parameter Version was last updated.
 
- Create
Time string - The time at which the Parameter Version was created.
 - Disabled bool
 - The current state of the Parameter Version.
 - Id string
 - The provider-assigned unique ID for this managed resource.
 - Kms
Key stringVersion  - The resource name of the Cloud KMS CryptoKeyVersion used to decrypt parameter version payload. Format 
projects/{{project}}/locations/global/keyRings/{{key_ring}}/cryptoKeys/{{crypto_key}}/cryptoKeyVersions/{{crypto_key_version}} - Name string
 - The resource name of the ParameterVersion. Format:
projects/{{project}}/locations/global/parameters/{{parameter_id}}/versions/{{parameter_version_id}} - Parameter string
 - Parameter
Data string - The parameter data.
 - Parameter
Version stringId  - Project string
 - Update
Time string - The time at which the Parameter Version was last updated.
 
- create
Time String - The time at which the Parameter Version was created.
 - disabled Boolean
 - The current state of the Parameter Version.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - kms
Key StringVersion  - The resource name of the Cloud KMS CryptoKeyVersion used to decrypt parameter version payload. Format 
projects/{{project}}/locations/global/keyRings/{{key_ring}}/cryptoKeys/{{crypto_key}}/cryptoKeyVersions/{{crypto_key_version}} - name String
 - The resource name of the ParameterVersion. Format:
projects/{{project}}/locations/global/parameters/{{parameter_id}}/versions/{{parameter_version_id}} - parameter String
 - parameter
Data String - The parameter data.
 - parameter
Version StringId  - project String
 - update
Time String - The time at which the Parameter Version was last updated.
 
- create
Time string - The time at which the Parameter Version was created.
 - disabled boolean
 - The current state of the Parameter Version.
 - id string
 - The provider-assigned unique ID for this managed resource.
 - kms
Key stringVersion  - The resource name of the Cloud KMS CryptoKeyVersion used to decrypt parameter version payload. Format 
projects/{{project}}/locations/global/keyRings/{{key_ring}}/cryptoKeys/{{crypto_key}}/cryptoKeyVersions/{{crypto_key_version}} - name string
 - The resource name of the ParameterVersion. Format:
projects/{{project}}/locations/global/parameters/{{parameter_id}}/versions/{{parameter_version_id}} - parameter string
 - parameter
Data string - The parameter data.
 - parameter
Version stringId  - project string
 - update
Time string - The time at which the Parameter Version was last updated.
 
- create_
time str - The time at which the Parameter Version was created.
 - disabled bool
 - The current state of the Parameter Version.
 - id str
 - The provider-assigned unique ID for this managed resource.
 - kms_
key_ strversion  - The resource name of the Cloud KMS CryptoKeyVersion used to decrypt parameter version payload. Format 
projects/{{project}}/locations/global/keyRings/{{key_ring}}/cryptoKeys/{{crypto_key}}/cryptoKeyVersions/{{crypto_key_version}} - name str
 - The resource name of the ParameterVersion. Format:
projects/{{project}}/locations/global/parameters/{{parameter_id}}/versions/{{parameter_version_id}} - parameter str
 - parameter_
data str - The parameter data.
 - parameter_
version_ strid  - project str
 - update_
time str - The time at which the Parameter Version was last updated.
 
- create
Time String - The time at which the Parameter Version was created.
 - disabled Boolean
 - The current state of the Parameter Version.
 - id String
 - The provider-assigned unique ID for this managed resource.
 - kms
Key StringVersion  - The resource name of the Cloud KMS CryptoKeyVersion used to decrypt parameter version payload. Format 
projects/{{project}}/locations/global/keyRings/{{key_ring}}/cryptoKeys/{{crypto_key}}/cryptoKeyVersions/{{crypto_key_version}} - name String
 - The resource name of the ParameterVersion. Format:
projects/{{project}}/locations/global/parameters/{{parameter_id}}/versions/{{parameter_version_id}} - parameter String
 - parameter
Data String - The parameter data.
 - parameter
Version StringId  - project String
 - update
Time String - The time at which the Parameter Version was last updated.
 
Package Details
- Repository
 - Google Cloud (GCP) Classic pulumi/pulumi-gcp
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
google-betaTerraform Provider.