1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. parametermanager
  5. getParameter
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

gcp.parametermanager.getParameter

Explore with Pulumi AI

Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const parameterDatasource = gcp.parametermanager.getParameter({
    parameterId: "foobar",
});
Copy
import pulumi
import pulumi_gcp as gcp

parameter_datasource = gcp.parametermanager.get_parameter(parameter_id="foobar")
Copy
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.LookupParameter(ctx, &parametermanager.LookupParameterArgs{
			ParameterId: "foobar",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var parameterDatasource = Gcp.ParameterManager.GetParameter.Invoke(new()
    {
        ParameterId = "foobar",
    });

});
Copy
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.GetParameterArgs;
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 parameterDatasource = ParametermanagerFunctions.getParameter(GetParameterArgs.builder()
            .parameterId("foobar")
            .build());

    }
}
Copy
variables:
  parameterDatasource:
    fn::invoke:
      function: gcp:parametermanager:getParameter
      arguments:
        parameterId: foobar
Copy

Using getParameter

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 getParameter(args: GetParameterArgs, opts?: InvokeOptions): Promise<GetParameterResult>
function getParameterOutput(args: GetParameterOutputArgs, opts?: InvokeOptions): Output<GetParameterResult>
Copy
def get_parameter(parameter_id: Optional[str] = None,
                  project: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> GetParameterResult
def get_parameter_output(parameter_id: Optional[pulumi.Input[str]] = None,
                  project: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[GetParameterResult]
Copy
func LookupParameter(ctx *Context, args *LookupParameterArgs, opts ...InvokeOption) (*LookupParameterResult, error)
func LookupParameterOutput(ctx *Context, args *LookupParameterOutputArgs, opts ...InvokeOption) LookupParameterResultOutput
Copy

> Note: This function is named LookupParameter in the Go SDK.

public static class GetParameter 
{
    public static Task<GetParameterResult> InvokeAsync(GetParameterArgs args, InvokeOptions? opts = null)
    public static Output<GetParameterResult> Invoke(GetParameterInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetParameterResult> getParameter(GetParameterArgs args, InvokeOptions options)
public static Output<GetParameterResult> getParameter(GetParameterArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: gcp:parametermanager/getParameter:getParameter
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

ParameterId This property is required. string
The name of the parameter.
Project string
The ID of the project in which the resource belongs.
ParameterId This property is required. string
The name of the parameter.
Project string
The ID of the project in which the resource belongs.
parameterId This property is required. String
The name of the parameter.
project String
The ID of the project in which the resource belongs.
parameterId This property is required. string
The name of the parameter.
project string
The ID of the project in which the resource belongs.
parameter_id This property is required. str
The name of the parameter.
project str
The ID of the project in which the resource belongs.
parameterId This property is required. String
The name of the parameter.
project String
The ID of the project in which the resource belongs.

getParameter Result

The following output properties are available:

CreateTime string
EffectiveLabels Dictionary<string, string>
Format string
Id string
The provider-assigned unique ID for this managed resource.
Labels Dictionary<string, string>
Name string
ParameterId string
PolicyMembers List<GetParameterPolicyMember>
PulumiLabels Dictionary<string, string>
UpdateTime string
Project string
CreateTime string
EffectiveLabels map[string]string
Format string
Id string
The provider-assigned unique ID for this managed resource.
Labels map[string]string
Name string
ParameterId string
PolicyMembers []GetParameterPolicyMember
PulumiLabels map[string]string
UpdateTime string
Project string
createTime String
effectiveLabels Map<String,String>
format String
id String
The provider-assigned unique ID for this managed resource.
labels Map<String,String>
name String
parameterId String
policyMembers List<GetParameterPolicyMember>
pulumiLabels Map<String,String>
updateTime String
project String
createTime string
effectiveLabels {[key: string]: string}
format string
id string
The provider-assigned unique ID for this managed resource.
labels {[key: string]: string}
name string
parameterId string
policyMembers GetParameterPolicyMember[]
pulumiLabels {[key: string]: string}
updateTime string
project string
create_time str
effective_labels Mapping[str, str]
format str
id str
The provider-assigned unique ID for this managed resource.
labels Mapping[str, str]
name str
parameter_id str
policy_members Sequence[GetParameterPolicyMember]
pulumi_labels Mapping[str, str]
update_time str
project str
createTime String
effectiveLabels Map<String>
format String
id String
The provider-assigned unique ID for this managed resource.
labels Map<String>
name String
parameterId String
policyMembers List<Property Map>
pulumiLabels Map<String>
updateTime String
project String

Supporting Types

GetParameterPolicyMember

IamPolicyNamePrincipal This property is required. string
IAM policy binding member referring to a Google Cloud resource by user-assigned name. If a resource is deleted and recreated with the same name, the binding will be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/name/locations/global/parameters/{{parameter_id}}'
IamPolicyUidPrincipal This property is required. string
IAM policy binding member referring to a Google Cloud resource by system-assigned unique identifier. If a resource is deleted and recreated with the same name, the binding will not be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/uid/locations/global/parameters/{{uid}}'
IamPolicyNamePrincipal This property is required. string
IAM policy binding member referring to a Google Cloud resource by user-assigned name. If a resource is deleted and recreated with the same name, the binding will be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/name/locations/global/parameters/{{parameter_id}}'
IamPolicyUidPrincipal This property is required. string
IAM policy binding member referring to a Google Cloud resource by system-assigned unique identifier. If a resource is deleted and recreated with the same name, the binding will not be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/uid/locations/global/parameters/{{uid}}'
iamPolicyNamePrincipal This property is required. String
IAM policy binding member referring to a Google Cloud resource by user-assigned name. If a resource is deleted and recreated with the same name, the binding will be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/name/locations/global/parameters/{{parameter_id}}'
iamPolicyUidPrincipal This property is required. String
IAM policy binding member referring to a Google Cloud resource by system-assigned unique identifier. If a resource is deleted and recreated with the same name, the binding will not be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/uid/locations/global/parameters/{{uid}}'
iamPolicyNamePrincipal This property is required. string
IAM policy binding member referring to a Google Cloud resource by user-assigned name. If a resource is deleted and recreated with the same name, the binding will be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/name/locations/global/parameters/{{parameter_id}}'
iamPolicyUidPrincipal This property is required. string
IAM policy binding member referring to a Google Cloud resource by system-assigned unique identifier. If a resource is deleted and recreated with the same name, the binding will not be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/uid/locations/global/parameters/{{uid}}'
iam_policy_name_principal This property is required. str
IAM policy binding member referring to a Google Cloud resource by user-assigned name. If a resource is deleted and recreated with the same name, the binding will be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/name/locations/global/parameters/{{parameter_id}}'
iam_policy_uid_principal This property is required. str
IAM policy binding member referring to a Google Cloud resource by system-assigned unique identifier. If a resource is deleted and recreated with the same name, the binding will not be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/uid/locations/global/parameters/{{uid}}'
iamPolicyNamePrincipal This property is required. String
IAM policy binding member referring to a Google Cloud resource by user-assigned name. If a resource is deleted and recreated with the same name, the binding will be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/name/locations/global/parameters/{{parameter_id}}'
iamPolicyUidPrincipal This property is required. String
IAM policy binding member referring to a Google Cloud resource by system-assigned unique identifier. If a resource is deleted and recreated with the same name, the binding will not be applicable to the new resource. Format: 'principal://parametermanager.googleapis.com/projects/{{project}}/uid/locations/global/parameters/{{uid}}'

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi