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:
getFunction Result
The following output properties are available:
- Build
Configs List<GetFunction Build Config> - Description string
- Environment string
- Event
Triggers List<GetFunction Event Trigger> - Id string
The provider-assigned unique ID for this managed resource.
- Labels Dictionary<string, string>
- Location string
- Name string
- Service
Configs List<GetFunction Service Config> - State string
- Update
Time string - Project string
- Build
Configs []GetFunction Build Config - Description string
- Environment string
- Event
Triggers []GetFunction Event Trigger - Id string
The provider-assigned unique ID for this managed resource.
- Labels map[string]string
- Location string
- Name string
- Service
Configs []GetFunction Service Config - State string
- Update
Time string - Project string
- build
Configs List<GetFunction Build Config> - description String
- environment String
- event
Triggers List<GetFunction Event Trigger> - id String
The provider-assigned unique ID for this managed resource.
- labels Map<String,String>
- location String
- name String
- service
Configs List<GetFunction Service Config> - state String
- update
Time String - project String
- build
Configs GetFunction Build Config[] - description string
- environment string
- event
Triggers GetFunction Event Trigger[] - id string
The provider-assigned unique ID for this managed resource.
- labels {[key: string]: string}
- location string
- name string
- service
Configs GetFunction Service Config[] - state string
- update
Time string - project string
- build_
configs Sequence[GetFunction Build Config] - description str
- environment str
- event_
triggers Sequence[GetFunction Event Trigger] - id str
The provider-assigned unique ID for this managed resource.
- labels Mapping[str, str]
- location str
- name str
- service_
configs Sequence[GetFunction Service Config] - state str
- update_
time str - project str
- build
Configs List<Property Map> - description String
- environment String
- event
Triggers List<Property Map> - id String
The provider-assigned unique ID for this managed resource.
- labels Map<String>
- location String
- name String
- service
Configs List<Property Map> - state String
- update
Time String - project String
Supporting Types
GetFunctionBuildConfig
- Build string
- Docker
Repository string - Entry
Point string - Environment
Variables Dictionary<string, string> - Runtime string
- Sources
List<Get
Function Build Config Source> - Worker
Pool string
- Build string
- Docker
Repository string - Entry
Point string - Environment
Variables map[string]string - Runtime string
- Sources
[]Get
Function Build Config Source - Worker
Pool string
- build String
- docker
Repository String - entry
Point String - environment
Variables Map<String,String> - runtime String
- sources
List<Get
Function Build Config Source> - worker
Pool String
- build string
- docker
Repository string - entry
Point string - environment
Variables {[key: string]: string} - runtime string
- sources
Get
Function Build Config Source[] - worker
Pool string
- build str
- docker_
repository str - entry_
point str - environment_
variables Mapping[str, str] - runtime str
- sources
Sequence[Get
Function Build Config Source] - worker_
pool str
- build String
- docker
Repository String - entry
Point String - environment
Variables Map<String> - runtime String
- sources List<Property Map>
- worker
Pool String
GetFunctionBuildConfigSource
GetFunctionBuildConfigSourceRepoSource
- Branch
Name string - Commit
Sha string - Dir string
- Invert
Regex bool - Project
Id string - Repo
Name string - Tag
Name string
- Branch
Name string - Commit
Sha string - Dir string
- Invert
Regex bool - Project
Id string - Repo
Name string - Tag
Name string
- branch
Name String - commit
Sha String - dir String
- invert
Regex Boolean - project
Id String - repo
Name String - tag
Name String
- branch
Name string - commit
Sha string - dir string
- invert
Regex boolean - project
Id string - repo
Name string - tag
Name string
- branch_
name str - commit_
sha str - dir str
- invert_
regex bool - project_
id str - repo_
name str - tag_
name str
- branch
Name String - commit
Sha String - dir String
- invert
Regex Boolean - project
Id String - repo
Name String - tag
Name 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 str
- generation int
- object str
- bucket String
- generation Number
- object String
GetFunctionEventTrigger
- Event
Filters List<GetFunction Event Trigger Event Filter> - Event
Type string - Pubsub
Topic string - Retry
Policy string - Service
Account stringEmail - Trigger string
- Trigger
Region string
- Event
Filters []GetFunction Event Trigger Event Filter - Event
Type string - Pubsub
Topic string - Retry
Policy string - Service
Account stringEmail - Trigger string
- Trigger
Region string
- event
Filters List<GetFunction Event Trigger Event Filter> - event
Type String - pubsub
Topic String - retry
Policy String - service
Account StringEmail - trigger String
- trigger
Region String
- event
Filters GetFunction Event Trigger Event Filter[] - event
Type string - pubsub
Topic string - retry
Policy string - service
Account stringEmail - trigger string
- trigger
Region string
- event
Filters List<Property Map> - event
Type String - pubsub
Topic String - retry
Policy String - service
Account StringEmail - trigger String
- trigger
Region String
GetFunctionEventTriggerEventFilter
GetFunctionServiceConfig
- All
Traffic boolOn Latest Revision - Available
Cpu string - Available
Memory string - Environment
Variables Dictionary<string, string> - Gcf
Uri string - Ingress
Settings string - Max
Instance intCount - Max
Instance intRequest Concurrency - Min
Instance intCount - Secret
Environment List<GetVariables Function Service Config Secret Environment Variable> - Secret
Volumes List<GetFunction Service Config Secret Volume> - Service string
- Service
Account stringEmail - Timeout
Seconds int - Uri string
- Vpc
Connector string - Vpc
Connector stringEgress Settings
- All
Traffic boolOn Latest Revision - Available
Cpu string - Available
Memory string - Environment
Variables map[string]string - Gcf
Uri string - Ingress
Settings string - Max
Instance intCount - Max
Instance intRequest Concurrency - Min
Instance intCount - Secret
Environment []GetVariables Function Service Config Secret Environment Variable - Secret
Volumes []GetFunction Service Config Secret Volume - Service string
- Service
Account stringEmail - Timeout
Seconds int - Uri string
- Vpc
Connector string - Vpc
Connector stringEgress Settings
- all
Traffic BooleanOn Latest Revision - available
Cpu String - available
Memory String - environment
Variables Map<String,String> - gcf
Uri String - ingress
Settings String - max
Instance IntegerCount - max
Instance IntegerRequest Concurrency - min
Instance IntegerCount - secret
Environment List<GetVariables Function Service Config Secret Environment Variable> - secret
Volumes List<GetFunction Service Config Secret Volume> - service String
- service
Account StringEmail - timeout
Seconds Integer - uri String
- vpc
Connector String - vpc
Connector StringEgress Settings
- all
Traffic booleanOn Latest Revision - available
Cpu string - available
Memory string - environment
Variables {[key: string]: string} - gcf
Uri string - ingress
Settings string - max
Instance numberCount - max
Instance numberRequest Concurrency - min
Instance numberCount - secret
Environment GetVariables Function Service Config Secret Environment Variable[] - secret
Volumes GetFunction Service Config Secret Volume[] - service string
- service
Account stringEmail - timeout
Seconds number - uri string
- vpc
Connector string - vpc
Connector stringEgress Settings
- all_
traffic_ boolon_ latest_ revision - available_
cpu str - available_
memory str - environment_
variables Mapping[str, str] - gcf_
uri str - ingress_
settings str - max_
instance_ intcount - max_
instance_ intrequest_ concurrency - min_
instance_ intcount - secret_
environment_ Sequence[Getvariables Function Service Config Secret Environment Variable] - secret_
volumes Sequence[GetFunction Service Config Secret Volume] - service str
- service_
account_ stremail - timeout_
seconds int - uri str
- vpc_
connector str - vpc_
connector_ stregress_ settings
- all
Traffic BooleanOn Latest Revision - available
Cpu String - available
Memory String - environment
Variables Map<String> - gcf
Uri String - ingress
Settings String - max
Instance NumberCount - max
Instance NumberRequest Concurrency - min
Instance NumberCount - secret
Environment List<Property Map>Variables - secret
Volumes List<Property Map> - service String
- service
Account StringEmail - timeout
Seconds Number - uri String
- vpc
Connector String - vpc
Connector StringEgress Settings
GetFunctionServiceConfigSecretEnvironmentVariable
- key str
- project_
id str - secret str
- version str
GetFunctionServiceConfigSecretVolume
- Mount
Path string - Project
Id string - Secret string
- Versions
List<Get
Function Service Config Secret Volume Version>
- Mount
Path string - Project
Id string - Secret string
- Versions
[]Get
Function Service Config Secret Volume Version
- mount
Path String - project
Id String - secret String
- versions
List<Get
Function Service Config Secret Volume Version>
- mount
Path string - project
Id string - secret string
- versions
Get
Function Service Config Secret Volume Version[]
- mount
Path String - project
Id String - secret String
- versions List<Property Map>
GetFunctionServiceConfigSecretVolumeVersion
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.