get Function
Get information about a Google Cloud Function. For more information see the official documentation and API.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const my-function = gcp.cloudfunctions.getFunction({
name: "function",
});
Content copied to clipboard
import pulumi
import pulumi_gcp as gcp
my_function = gcp.cloudfunctions.get_function(name="function")
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.CloudFunctions.GetFunction.Invoke(new()
{
Name = "function",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudfunctions"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := cloudfunctions.LookupFunction(ctx, &cloudfunctions.LookupFunctionArgs{
Name: "function",
}, 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.cloudfunctions.CloudfunctionsFunctions;
import com.pulumi.gcp.cloudfunctions.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 = CloudfunctionsFunctions.getFunction(GetFunctionArgs.builder()
.name("function")
.build());
}
}
Content copied to clipboard
variables:
my-function:
fn::invoke:
Function: gcp:cloudfunctions:getFunction
Arguments:
name: function
Content copied to clipboard
Return
A collection of values returned by getFunction.
Parameters
argument
A collection of arguments for invoking getFunction.
suspend fun getFunction(name: String, project: String? = null, region: String? = null): GetFunctionResult
Return
A collection of values returned by getFunction.
Parameters
name
The name of a Cloud Function.
project
The project in which the resource belongs. If it is not provided, the provider project is used.
region
The region in which the resource belongs. If it is not provided, the provider region 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.cloudfunctions.kotlin.inputs.GetFunctionPlainArgs.