getFunction

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

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my-function = gcp.cloudfunctionsv2.getFunction({
name: "function",
location: "us-central1",
});
import pulumi
import pulumi_gcp as gcp
my_function = gcp.cloudfunctionsv2.get_function(name="function",
location="us-central1")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var my_function = Gcp.CloudFunctionsV2.GetFunction.Invoke(new()
{
Name = "function",
Location = "us-central1",
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/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{
Name: "function",
Location: "us-central1",
}, 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()
.name("function")
.location("us-central1")
.build());
}
}
variables:
my-function:
fn::invoke:
Function: gcp:cloudfunctionsv2:getFunction
Arguments:
name: function
location: us-central1

Return

A collection of values returned by getFunction.

Parameters

argument

A collection of arguments for invoking getFunction.


suspend fun getFunction(location: String, name: String, project: String? = null): GetFunctionResult

Return

A collection of values returned by getFunction.

Parameters

location

The location in which the resource belongs.

name

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

project

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

See also


suspend fun getFunction(argument: suspend GetFunctionPlainArgsBuilder.() -> Unit): GetFunctionResult

Return

A collection of values returned by getFunction.

Parameters

argument

Builder for com.pulumi.gcp.cloudfunctionsv2.kotlin.inputs.GetFunctionPlainArgs.

See also