get Function
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",
});
Content copied to clipboard
import pulumi
import pulumi_gcp as gcp
my_function = gcp.cloudfunctionsv2.get_function(name="function",
location="us-central1")
Content copied to clipboard
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",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
my-function:
fn::invoke:
function: gcp:cloudfunctionsv2:getFunction
arguments:
name: function
location: us-central1
Content copied to clipboard
Return
A collection of values returned by getFunction.
Parameters
argument
A collection of arguments for invoking getFunction.
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.