gcp.cloudfunctionsv2.getFunction

Get information about a Google Cloud Function (2nd gen). For more information see:

Example Usage

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var my_function = Gcp.CloudFunctionsV2.GetFunction.Invoke(new()
    {
        Location = "us-central1",
        Name = "function",
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/cloudfunctionsv2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudfunctionsv2.LookupFunction(ctx, &cloudfunctionsv2.LookupFunctionArgs{
			Location: "us-central1",
			Name:     "function",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.cloudfunctionsv2.Cloudfunctionsv2Functions;
import com.pulumi.gcp.cloudfunctionsv2.inputs.GetFunctionArgs;
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 my-function = Cloudfunctionsv2Functions.getFunction(GetFunctionArgs.builder()
            .location("us-central1")
            .name("function")
            .build());

    }
}
import pulumi
import pulumi_gcp as gcp

my_function = gcp.cloudfunctionsv2.get_function(location="us-central1",
    name="function")
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const my-function = gcp.cloudfunctionsv2.getFunction({
    location: "us-central1",
    name: "function",
});
variables:
  my-function:
    fn::invoke:
      Function: gcp:cloudfunctionsv2:getFunction
      Arguments:
        location: us-central1
        name: function

Using getFunction

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 getFunction(args: GetFunctionArgs, opts?: InvokeOptions): Promise<GetFunctionResult>
function getFunctionOutput(args: GetFunctionOutputArgs, opts?: InvokeOptions): Output<GetFunctionResult>
def get_function(location: Optional[str] = None,
                 name: Optional[str] = None,
                 project: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetFunctionResult
def get_function_output(location: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 project: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetFunctionResult]
func LookupFunction(ctx *Context, args *LookupFunctionArgs, opts ...InvokeOption) (*LookupFunctionResult, error)
func LookupFunctionOutput(ctx *Context, args *LookupFunctionOutputArgs, opts ...InvokeOption) LookupFunctionResultOutput

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

public static class GetFunction 
{
    public static Task<GetFunctionResult> InvokeAsync(GetFunctionArgs args, InvokeOptions? opts = null)
    public static Output<GetFunctionResult> Invoke(GetFunctionInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFunctionResult> getFunction(GetFunctionArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: gcp:cloudfunctionsv2/getFunction:getFunction
  arguments:
    # arguments dictionary

The following arguments are supported:

Location string

The location in which the resource belongs.

Name string

The name of a Cloud Function (2nd gen).

Project string

The project in which the resource belongs. If it is not provided, the provider project is used.

Location string

The location in which the resource belongs.

Name string

The name of a Cloud Function (2nd gen).

Project string

The project in which the resource belongs. If it is not provided, the provider project is used.

location String

The location in which the resource belongs.

name String

The name of a Cloud Function (2nd gen).

project String

The project in which the resource belongs. If it is not provided, the provider project is used.

location string

The location in which the resource belongs.

name string

The name of a Cloud Function (2nd gen).

project string

The project in which the resource belongs. If it is not provided, the provider project is used.

location str

The location in which the resource belongs.

name str

The name of a Cloud Function (2nd gen).

project str

The project in which the resource belongs. If it is not provided, the provider project is used.

location String

The location in which the resource belongs.

name String

The name of a Cloud Function (2nd gen).

project String

The project in which the resource belongs. If it is not provided, the provider project is used.

getFunction Result

The following output properties are available:

BuildConfigs List<GetFunctionBuildConfig>
Description string
Environment string
EventTriggers List<GetFunctionEventTrigger>
Id string

The provider-assigned unique ID for this managed resource.

Labels Dictionary<string, string>
Location string
Name string
ServiceConfigs List<GetFunctionServiceConfig>
State string
UpdateTime string
Project string
BuildConfigs []GetFunctionBuildConfig
Description string
Environment string
EventTriggers []GetFunctionEventTrigger
Id string

The provider-assigned unique ID for this managed resource.

Labels map[string]string
Location string
Name string
ServiceConfigs []GetFunctionServiceConfig
State string
UpdateTime string
Project string
buildConfigs List<GetFunctionBuildConfig>
description String
environment String
eventTriggers List<GetFunctionEventTrigger>
id String

The provider-assigned unique ID for this managed resource.

labels Map<String,String>
location String
name String
serviceConfigs List<GetFunctionServiceConfig>
state String
updateTime String
project String
buildConfigs GetFunctionBuildConfig[]
description string
environment string
eventTriggers GetFunctionEventTrigger[]
id string

The provider-assigned unique ID for this managed resource.

labels {[key: string]: string}
location string
name string
serviceConfigs GetFunctionServiceConfig[]
state string
updateTime string
project string
buildConfigs List<Property Map>
description String
environment String
eventTriggers List<Property Map>
id String

The provider-assigned unique ID for this managed resource.

labels Map<String>
location String
name String
serviceConfigs List<Property Map>
state String
updateTime String
project String

Supporting Types

GetFunctionBuildConfig

GetFunctionBuildConfigSource

GetFunctionBuildConfigSourceRepoSource

BranchName string
CommitSha string
Dir string
InvertRegex bool
ProjectId string
RepoName string
TagName string
BranchName string
CommitSha string
Dir string
InvertRegex bool
ProjectId string
RepoName string
TagName string
branchName String
commitSha String
dir String
invertRegex Boolean
projectId String
repoName String
tagName String
branchName string
commitSha string
dir string
invertRegex boolean
projectId string
repoName string
tagName string
branchName String
commitSha String
dir String
invertRegex Boolean
projectId String
repoName String
tagName String

GetFunctionBuildConfigSourceStorageSource

Bucket string
Generation int
Object string
Bucket string
Generation int
Object string
bucket String
generation Integer
object String
bucket string
generation number
object string
bucket String
generation Number
object String

GetFunctionEventTrigger

GetFunctionEventTriggerEventFilter

Attribute string
Operator string
Value string
Attribute string
Operator string
Value string
attribute String
operator String
value String
attribute string
operator string
value string
attribute String
operator String
value String

GetFunctionServiceConfig

GetFunctionServiceConfigSecretEnvironmentVariable

Key string
ProjectId string
Secret string
Version string
Key string
ProjectId string
Secret string
Version string
key String
projectId String
secret String
version String
key string
projectId string
secret string
version string
key String
projectId String
secret String
version String

GetFunctionServiceConfigSecretVolume

GetFunctionServiceConfigSecretVolumeVersion

Path string
Version string
Path string
Version string
path String
version String
path string
version string
path str
version str
path String
version String

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.