Module cloudfunctions
This page documents the language specification for the gcp package. If you're looking for help working with the inputs, outputs, or functions of gcp resources in a Pulumi program, please see the resource documentation for examples and API reference.
Resources
Functions
Others
- Callback
- CallbackFactory
- CallbackFunctionArgs
- Context
- FailurePolicy
- FunctionArgs
- FunctionIamBindingArgs
- FunctionIamBindingState
- FunctionIamMemberArgs
- FunctionIamMemberState
- FunctionIamPolicyArgs
- FunctionIamPolicyState
- FunctionState
- GetFunctionArgs
- GetFunctionResult
- HttpCallback
- HttpCallbackFactory
- HttpCallbackFunction
- HttpCallbackFunctionArgs
Resources
Resource CallbackFunction
class CallbackFunction extends ComponentResourceA CallbackFunction is a special type of gcp.cloudfunctions.Function that can be created out of an actual JavaScript function instance. The function instance will be analyzed and packaged up (including dependencies) into a form that can be used by Cloud Functions. See https://github.com/pulumi/docs/blob/master/reference/serializing-functions.md for additional details on this process.
Note: CallbackFunctions create Google Cloud Functions that uses the [nodejs8] runtime.
Importantly, calls follow the (data, context) => ... form, not the (event, callback) => ...
form that is used with the [nodejs6] runtime. This also adds support for asynchronous functions
as well. See
https://cloud.google.com/functions/docs/writing/background#functions_background_parameters-node8
for more details.
constructor
new CallbackFunction(name: string, args: CallbackFunctionArgs, opts: ComponentResourceOptions)method getData
protected getData(): Promise<TData>Retrieves the data produces by [initialize]. The data is immediately available in a
derived class’s constructor after the super(...) call to ComponentResource.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod initialize
protected initialize(args: Inputs): Promise<TData>Can be overridden by a subclass to asynchronously initialize data for this Component
automatically when constructed. The data will be available immediately for subclass
constructors to use. To access the data use .getData.
method isInstance
static isInstance(obj: any): obj is ComponentResourceReturns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method registerOutputs
protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): voidregisterOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
ComponentResources can call this at the end of their constructor to indicate that they are
done creating child resources. This is not strictly necessary as this will automatically be
called after the initialize method completes.
property bucket
public bucket: Bucket;Bucket and BucketObject storing all the files that comprise the Function. The contents of these files will be generated automatically from the JavaScript callback function passed in as well as the package.json file for your pulumi app.
property bucketObject
public bucketObject: BucketObject;property function
public function: Function;Underlying raw resource for the Function that is created.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource Function
class Function extends CustomResourceCreates a new Cloud Function. For more information see the official documentation and API.
Warning: As of November 1, 2019, newly created Functions are private-by-default and will require appropriate IAM permissions to be invoked. See below examples for how to set up the appropriate permissions, or view the Cloud Functions IAM resources for Cloud Functions.
Example Usage - Public Function
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const bucket = new gcp.storage.Bucket("bucket", {});
const archive = new gcp.storage.BucketObject("archive", {
bucket: bucket.name,
source: new pulumi.asset.FileAsset("./path/to/zip/file/which/contains/code"),
});
const _function = new gcp.cloudfunctions.Function("function", {
description: "My function",
runtime: "nodejs10",
availableMemoryMb: 128,
sourceArchiveBucket: bucket.name,
sourceArchiveObject: archive.name,
triggerHttp: true,
entryPoint: "helloGET",
});
// IAM entry for all users to invoke the function
const invoker = new gcp.cloudfunctions.FunctionIamMember("invoker", {
project: _function.project,
region: _function.region,
cloudFunction: _function.name,
role: "roles/cloudfunctions.invoker",
member: "allUsers",
});Example Usage - Single User
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const bucket = new gcp.storage.Bucket("bucket", {});
const archive = new gcp.storage.BucketObject("archive", {
bucket: bucket.name,
source: new pulumi.asset.FileAsset("./path/to/zip/file/which/contains/code"),
});
const _function = new gcp.cloudfunctions.Function("function", {
description: "My function",
runtime: "nodejs10",
availableMemoryMb: 128,
sourceArchiveBucket: bucket.name,
sourceArchiveObject: archive.name,
triggerHttp: true,
timeout: 60,
entryPoint: "helloGET",
labels: {
"my-label": "my-label-value",
},
environmentVariables: {
MY_ENV_VAR: "my-env-var-value",
},
});
// IAM entry for a single user to invoke the function
const invoker = new gcp.cloudfunctions.FunctionIamMember("invoker", {
project: _function.project,
region: _function.region,
cloudFunction: _function.name,
role: "roles/cloudfunctions.invoker",
member: "user:myFunctionInvoker@example.com",
});constructor
new Function(name: string, args: FunctionArgs, opts?: pulumi.CustomResourceOptions)Create a Function resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FunctionState, opts?: pulumi.CustomResourceOptions): FunctionGet an existing Function resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is FunctionReturns true if the given object is an instance of Function. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property availableMemoryMb
public availableMemoryMb: pulumi.Output<number | undefined>;Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB.
property description
public description: pulumi.Output<string | undefined>;Description of the function.
property entryPoint
public entryPoint: pulumi.Output<string | undefined>;Name of the function that will be executed when the Google Cloud Function is triggered.
property environmentVariables
public environmentVariables: pulumi.Output<{[key: string]: any} | undefined>;A set of key/value environment variable pairs to assign to the function.
property eventTrigger
public eventTrigger: pulumi.Output<FunctionEventTrigger>;A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with triggerHttp.
property httpsTriggerUrl
public httpsTriggerUrl: pulumi.Output<string>;URL which triggers function execution. Returned only if triggerHttp is used.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property ingressSettings
public ingressSettings: pulumi.Output<string | undefined>;String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL and ALLOW_INTERNAL_ONLY. Changes to this field will recreate the cloud function.
property labels
public labels: pulumi.Output<{[key: string]: any} | undefined>;A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.
property maxInstances
public maxInstances: pulumi.Output<number | undefined>;The limit on the maximum number of function instances that may coexist at a given time.
property name
public name: pulumi.Output<string>;A user-defined name of the function. Function names must be unique globally.
property project
public project: pulumi.Output<string>;Project of the function. If it is not provided, the provider project is used.
property region
public region: pulumi.Output<string>;Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used.
property runtime
public runtime: pulumi.Output<string>;The runtime in which the function is going to run.
Eg. "nodejs8", "nodejs10", "python37", "go111".
property serviceAccountEmail
public serviceAccountEmail: pulumi.Output<string>;If provided, the self-provided service account to run the function with.
property sourceArchiveBucket
public sourceArchiveBucket: pulumi.Output<string | undefined>;The GCS bucket containing the zip archive which contains the function.
property sourceArchiveObject
public sourceArchiveObject: pulumi.Output<string | undefined>;The source archive object (file) in archive bucket.
property sourceRepository
public sourceRepository: pulumi.Output<FunctionSourceRepository | undefined>;Represents parameters related to source repository where a function is hosted.
Cannot be set alongside sourceArchiveBucket or sourceArchiveObject. Structure is documented below.
property timeout
public timeout: pulumi.Output<number | undefined>;Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
property triggerHttp
public triggerHttp: pulumi.Output<boolean | undefined>;Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as httpsTriggerUrl. Cannot be used with triggerBucket and triggerTopic.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
property vpcConnector
public vpcConnector: pulumi.Output<string | undefined>;The VPC Network Connector that this cloud function can connect to. It can be either the fully-qualified URI, or the short name of the network connector resource. The format of this field is projects/*/locations/*/connectors/*.
property vpcConnectorEgressSettings
public vpcConnectorEgressSettings: pulumi.Output<string>;The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
Resource FunctionIamBinding
class FunctionIamBinding extends CustomResourceThree different resources help you manage your IAM policy for Cloud Functions CloudFunction. Each of these resources serves a different use case:
gcp.cloudfunctions.FunctionIamPolicy: Authoritative. Sets the IAM policy for the cloudfunction and replaces any existing policy already attached.gcp.cloudfunctions.FunctionIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the cloudfunction are preserved.gcp.cloudfunctions.FunctionIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the cloudfunction are preserved.
Note:
gcp.cloudfunctions.FunctionIamPolicycannot be used in conjunction withgcp.cloudfunctions.FunctionIamBindingandgcp.cloudfunctions.FunctionIamMemberor they will fight over what your policy should be.Note:
gcp.cloudfunctions.FunctionIamBindingresources can be used in conjunction withgcp.cloudfunctions.FunctionIamMemberresources only if they do not grant privilege to the same role.
google_cloudfunctions_function_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/viewer",
members: ["user:jane@example.com"],
}],
});
const policy = new gcp.cloudfunctions.FunctionIamPolicy("policy", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
policyData: admin.then(admin => admin.policyData),
});google_cloudfunctions_function_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const binding = new gcp.cloudfunctions.FunctionIamBinding("binding", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
role: "roles/viewer",
members: ["user:jane@example.com"],
});google_cloudfunctions_function_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.cloudfunctions.FunctionIamMember("member", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
role: "roles/viewer",
member: "user:jane@example.com",
});constructor
new FunctionIamBinding(name: string, args: FunctionIamBindingArgs, opts?: pulumi.CustomResourceOptions)Create a FunctionIamBinding resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FunctionIamBindingState, opts?: pulumi.CustomResourceOptions): FunctionIamBindingGet an existing FunctionIamBinding resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is FunctionIamBindingReturns true if the given object is an instance of FunctionIamBinding. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property cloudFunction
public cloudFunction: pulumi.Output<string>;Used to find the parent resource to bind the IAM policy to
property condition
public condition: pulumi.Output<FunctionIamBindingCondition | undefined>;property etag
public etag: pulumi.Output<string>;(Computed) The etag of the IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property members
public members: pulumi.Output<string[]>;property project
public project: pulumi.Output<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
public region: pulumi.Output<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
property role
public role: pulumi.Output<string>;The role that should be applied. Only one
gcp.cloudfunctions.FunctionIamBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource FunctionIamMember
class FunctionIamMember extends CustomResourceThree different resources help you manage your IAM policy for Cloud Functions CloudFunction. Each of these resources serves a different use case:
gcp.cloudfunctions.FunctionIamPolicy: Authoritative. Sets the IAM policy for the cloudfunction and replaces any existing policy already attached.gcp.cloudfunctions.FunctionIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the cloudfunction are preserved.gcp.cloudfunctions.FunctionIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the cloudfunction are preserved.
Note:
gcp.cloudfunctions.FunctionIamPolicycannot be used in conjunction withgcp.cloudfunctions.FunctionIamBindingandgcp.cloudfunctions.FunctionIamMemberor they will fight over what your policy should be.Note:
gcp.cloudfunctions.FunctionIamBindingresources can be used in conjunction withgcp.cloudfunctions.FunctionIamMemberresources only if they do not grant privilege to the same role.
google_cloudfunctions_function_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/viewer",
members: ["user:jane@example.com"],
}],
});
const policy = new gcp.cloudfunctions.FunctionIamPolicy("policy", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
policyData: admin.then(admin => admin.policyData),
});google_cloudfunctions_function_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const binding = new gcp.cloudfunctions.FunctionIamBinding("binding", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
role: "roles/viewer",
members: ["user:jane@example.com"],
});google_cloudfunctions_function_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.cloudfunctions.FunctionIamMember("member", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
role: "roles/viewer",
member: "user:jane@example.com",
});constructor
new FunctionIamMember(name: string, args: FunctionIamMemberArgs, opts?: pulumi.CustomResourceOptions)Create a FunctionIamMember resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FunctionIamMemberState, opts?: pulumi.CustomResourceOptions): FunctionIamMemberGet an existing FunctionIamMember resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is FunctionIamMemberReturns true if the given object is an instance of FunctionIamMember. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property cloudFunction
public cloudFunction: pulumi.Output<string>;Used to find the parent resource to bind the IAM policy to
property condition
public condition: pulumi.Output<FunctionIamMemberCondition | undefined>;property etag
public etag: pulumi.Output<string>;(Computed) The etag of the IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property member
public member: pulumi.Output<string>;property project
public project: pulumi.Output<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
public region: pulumi.Output<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
property role
public role: pulumi.Output<string>;The role that should be applied. Only one
gcp.cloudfunctions.FunctionIamBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Resource FunctionIamPolicy
class FunctionIamPolicy extends CustomResourceThree different resources help you manage your IAM policy for Cloud Functions CloudFunction. Each of these resources serves a different use case:
gcp.cloudfunctions.FunctionIamPolicy: Authoritative. Sets the IAM policy for the cloudfunction and replaces any existing policy already attached.gcp.cloudfunctions.FunctionIamBinding: Authoritative for a given role. Updates the IAM policy to grant a role to a list of members. Other roles within the IAM policy for the cloudfunction are preserved.gcp.cloudfunctions.FunctionIamMember: Non-authoritative. Updates the IAM policy to grant a role to a new member. Other members for the role for the cloudfunction are preserved.
Note:
gcp.cloudfunctions.FunctionIamPolicycannot be used in conjunction withgcp.cloudfunctions.FunctionIamBindingandgcp.cloudfunctions.FunctionIamMemberor they will fight over what your policy should be.Note:
gcp.cloudfunctions.FunctionIamBindingresources can be used in conjunction withgcp.cloudfunctions.FunctionIamMemberresources only if they do not grant privilege to the same role.
google_cloudfunctions_function_iam_policy
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const admin = gcp.organizations.getIAMPolicy({
binding: [{
role: "roles/viewer",
members: ["user:jane@example.com"],
}],
});
const policy = new gcp.cloudfunctions.FunctionIamPolicy("policy", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
policyData: admin.then(admin => admin.policyData),
});google_cloudfunctions_function_iam_binding
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const binding = new gcp.cloudfunctions.FunctionIamBinding("binding", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
role: "roles/viewer",
members: ["user:jane@example.com"],
});google_cloudfunctions_function_iam_member
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const member = new gcp.cloudfunctions.FunctionIamMember("member", {
project: google_cloudfunctions_function["function"].project,
region: google_cloudfunctions_function["function"].region,
cloudFunction: google_cloudfunctions_function["function"].name,
role: "roles/viewer",
member: "user:jane@example.com",
});constructor
new FunctionIamPolicy(name: string, args: FunctionIamPolicyArgs, opts?: pulumi.CustomResourceOptions)Create a FunctionIamPolicy resource with the given unique name, arguments, and options.
nameThe unique name of the resource.argsThe arguments to use to populate this resource's properties.optsA bag of options that control this resource's behavior.
method get
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: FunctionIamPolicyState, opts?: pulumi.CustomResourceOptions): FunctionIamPolicyGet an existing FunctionIamPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod isInstance
public static isInstance(obj: any): obj is FunctionIamPolicyReturns true if the given object is an instance of FunctionIamPolicy. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
property cloudFunction
public cloudFunction: pulumi.Output<string>;Used to find the parent resource to bind the IAM policy to
property etag
public etag: pulumi.Output<string>;(Computed) The etag of the IAM policy.
property id
id: Output<ID>;id is the provider-assigned unique ID for this managed resource. It is set during deployments and may be missing (undefined) during planning phases.
property policyData
public policyData: pulumi.Output<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
public project: pulumi.Output<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
public region: pulumi.Output<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
Functions
Function getFunction
getFunction(args: GetFunctionArgs, opts?: pulumi.InvokeOptions): Promise<GetFunctionResult>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 myFunction = pulumi.output(gcp.cloudfunctions.getFunction({
name: "function",
}, { async: true }));Others
type Callback
type Callback = (data: D, context: C, callback: (error?: any, result?: R) => void) => Promise<R> | void;Callback is the signature for an Google Cloud Function entrypoint.
[data] is the data passed in by specific services calling the Function (like storage, or pubsub). The shape of it will be specific to individual services.
[context] Cloud Functions uses this parameter to provide details of your Function’s execution. For more information, see https://cloud.google.com/functions/docs/writing/background#function_parameters
[callback] A callback to signal completion of the function’s execution. Follows the “errback” convention, which interprets the first argument as an error.
You must signal when background functions have completed. Otherwise, your function can continue to run and be forcibly terminated by the system. You can signal function completion by:
- Invoking the callback argument,
- Returning a Promise,
- Wrapping your function using the async keyword (which causes your function to implicitly return a Promise), or
- Returning a value.
If invoking the callback argument or synchronously returning a value, ensure that all asynchronous processes have completed first. If returning a Promise, Cloud Functions ensures that the Promise is settled before terminating.
type CallbackFactory
type CallbackFactory = () => Callback<D, C, R>;CallbackFactory is the signature for a function that will be called once to produce the entrypoint function that GCP Cloud Function will invoke. It can be used to initialize expensive state once that can then be used across all invocations of the Function (as long as the Function is using the same warm node instance).
interface CallbackFunctionArgs
interface CallbackFunctionArgsArguments that control both how a user function is serialized and how the final Cloud Function is created. Can be used to override values if the defaults are not desirable.
property availableMemoryMb
availableMemoryMb?: pulumi.Input<number>;Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB.
property bucket
bucket?: storage.Bucket;The bucket to use as the sourceArchiveBucket for the generated CloudFunctions Function source to be placed in. A fresh [storage.BucketObject] will be made there containing the serialized code.
property callback
callback?: Function;The Javascript callback to use as the entrypoint for the GCP CloudFunction out of. Either [callback] or [callbackFactory] must be provided.
property callbackFactory
callbackFactory?: Function;The Javascript function instance that will be called to produce the callback function that is the entrypoint for the GCP Cloud Function. Either [callback] or [callbackFactory] must be provided.
This form is useful when there is expensive initialization work that should only be executed once. The factory-function will be invoked once when the final GCP Cloud Function module is loaded. It can run whatever code it needs, and will end by returning the actual function that Function will call into each time the Cloud Function is invoked.
property codePathOptions
codePathOptions?: pulumi.runtime.CodePathOptions;Options to control which paths/packages should be included or excluded in the zip file containing the code for the GCP Function.
property description
description?: pulumi.Input<string>;Description of the function.
property environmentVariables
environmentVariables?: pulumi.Input<{[key: string]: any}>;A set of key/value environment variable pairs to assign to the function.
property eventTrigger
eventTrigger?: pulumi.Input<{
eventType: pulumi.Input<string>;
failurePolicy?: pulumi.Input<FailurePolicy>;
resource: pulumi.Input<string>;
}>;A source that fires events in response to a condition in another service. Structure is
documented below. Cannot be used with trigger_http.
property httpsTriggerUrl
httpsTriggerUrl?: pulumi.Input<string>;URL which triggers function execution. Returned only if trigger_http is used.
property iamMember
iamMember?: pulumi.Input<string>;The specific member to grant access to the function. If not specifiedm then we default to allUsers.
Available options are allAuthenticatedUsers, user:{emailid}, serviceAccount:{emailid},
group:{emailid} and domain:{domain}:
property iamRole
iamRole?: pulumi.Input<string>;The specific role to attach to the function. If not specified, then we default to roles/cloudfunctions.invoker.
Role must be in the format roles/{role-name}
property labels
labels?: pulumi.Input<{[key: string]: any}>;A set of key/value label pairs to assign to the function.
property project
project?: pulumi.Input<string>;Project of the function. If it is not provided, the provider project is used.
property region
region?: pulumi.Input<string>;Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used.
property runtime
runtime?: pulumi.Input<string>;The specific runtime for the function. If not specified, a default will be applied
property serviceAccountEmail
serviceAccountEmail?: pulumi.Input<string>;If provided, the self-provided service account to run the function with.
property timeout
timeout?: pulumi.Input<number>;Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
property triggerHttp
triggerHttp?: pulumi.Input<boolean>;Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as https_trigger_url. Cannot be used with trigger_bucket and trigger_topic.
interface Context
interface ContextGoogle Cloud Functions uses this parameter to provide details of your Function’s execution. For more information, see https://cloud.google.com/functions/docs/writing/background#function_parameters
property eventId
eventId: string;A unique ID for the event. For example: “70172329041928”.
property eventType
eventType: string;The type of the event. For example: “google.pubsub.topic.publish”.
property resource
resource: any;The resource that emitted the event. See derived contexts for more specific information about the shape of this property.
property timestamp
timestamp: string;The date/time this event was created. For example: “2018-04-09T07:56:12.975Z”.
interface FailurePolicy
interface FailurePolicyDescribes the policy in case of function’s execution failure. If empty, then defaults to ignoring failures (i.e. not retrying them).
property retry
retry: pulumi.Input<boolean>;Whether the function should be retried on failure.
If true, a function execution will be retried on any failure. A failed execution will be retried up to 7 days with an exponential backoff (capped at 10 seconds). Retried execution is charged as any other execution.
interface FunctionArgs
interface FunctionArgsThe set of arguments for constructing a Function resource.
property availableMemoryMb
availableMemoryMb?: pulumi.Input<number>;Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB.
property description
description?: pulumi.Input<string>;Description of the function.
property entryPoint
entryPoint?: pulumi.Input<string>;Name of the function that will be executed when the Google Cloud Function is triggered.
property environmentVariables
environmentVariables?: pulumi.Input<{[key: string]: any}>;A set of key/value environment variable pairs to assign to the function.
property eventTrigger
eventTrigger?: pulumi.Input<FunctionEventTrigger>;A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with triggerHttp.
property httpsTriggerUrl
httpsTriggerUrl?: pulumi.Input<string>;URL which triggers function execution. Returned only if triggerHttp is used.
property ingressSettings
ingressSettings?: pulumi.Input<string>;String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL and ALLOW_INTERNAL_ONLY. Changes to this field will recreate the cloud function.
property labels
labels?: pulumi.Input<{[key: string]: any}>;A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.
property maxInstances
maxInstances?: pulumi.Input<number>;The limit on the maximum number of function instances that may coexist at a given time.
property name
name?: pulumi.Input<string>;A user-defined name of the function. Function names must be unique globally.
property project
project?: pulumi.Input<string>;Project of the function. If it is not provided, the provider project is used.
property region
region?: pulumi.Input<string>;Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used.
property runtime
runtime: pulumi.Input<string>;The runtime in which the function is going to run.
Eg. "nodejs8", "nodejs10", "python37", "go111".
property serviceAccountEmail
serviceAccountEmail?: pulumi.Input<string>;If provided, the self-provided service account to run the function with.
property sourceArchiveBucket
sourceArchiveBucket?: pulumi.Input<string>;The GCS bucket containing the zip archive which contains the function.
property sourceArchiveObject
sourceArchiveObject?: pulumi.Input<string>;The source archive object (file) in archive bucket.
property sourceRepository
sourceRepository?: pulumi.Input<FunctionSourceRepository>;Represents parameters related to source repository where a function is hosted.
Cannot be set alongside sourceArchiveBucket or sourceArchiveObject. Structure is documented below.
property timeout
timeout?: pulumi.Input<number>;Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
property triggerHttp
triggerHttp?: pulumi.Input<boolean>;Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as httpsTriggerUrl. Cannot be used with triggerBucket and triggerTopic.
property vpcConnector
vpcConnector?: pulumi.Input<string>;The VPC Network Connector that this cloud function can connect to. It can be either the fully-qualified URI, or the short name of the network connector resource. The format of this field is projects/*/locations/*/connectors/*.
property vpcConnectorEgressSettings
vpcConnectorEgressSettings?: pulumi.Input<string>;The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
interface FunctionIamBindingArgs
interface FunctionIamBindingArgsThe set of arguments for constructing a FunctionIamBinding resource.
property cloudFunction
cloudFunction: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
property condition
condition?: pulumi.Input<FunctionIamBindingCondition>;property members
members: pulumi.Input<pulumi.Input<string>[]>;property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
region?: pulumi.Input<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
property role
role: pulumi.Input<string>;The role that should be applied. Only one
gcp.cloudfunctions.FunctionIamBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
interface FunctionIamBindingState
interface FunctionIamBindingStateInput properties used for looking up and filtering FunctionIamBinding resources.
property cloudFunction
cloudFunction?: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
property condition
condition?: pulumi.Input<FunctionIamBindingCondition>;property etag
etag?: pulumi.Input<string>;(Computed) The etag of the IAM policy.
property members
members?: pulumi.Input<pulumi.Input<string>[]>;property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
region?: pulumi.Input<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
property role
role?: pulumi.Input<string>;The role that should be applied. Only one
gcp.cloudfunctions.FunctionIamBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
interface FunctionIamMemberArgs
interface FunctionIamMemberArgsThe set of arguments for constructing a FunctionIamMember resource.
property cloudFunction
cloudFunction: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
property condition
condition?: pulumi.Input<FunctionIamMemberCondition>;property member
member: pulumi.Input<string>;property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
region?: pulumi.Input<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
property role
role: pulumi.Input<string>;The role that should be applied. Only one
gcp.cloudfunctions.FunctionIamBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
interface FunctionIamMemberState
interface FunctionIamMemberStateInput properties used for looking up and filtering FunctionIamMember resources.
property cloudFunction
cloudFunction?: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
property condition
condition?: pulumi.Input<FunctionIamMemberCondition>;property etag
etag?: pulumi.Input<string>;(Computed) The etag of the IAM policy.
property member
member?: pulumi.Input<string>;property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
region?: pulumi.Input<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
property role
role?: pulumi.Input<string>;The role that should be applied. Only one
gcp.cloudfunctions.FunctionIamBinding can be used per role. Note that custom roles must be of the format
[projects|organizations]/{parent-name}/roles/{role-name}.
interface FunctionIamPolicyArgs
interface FunctionIamPolicyArgsThe set of arguments for constructing a FunctionIamPolicy resource.
property cloudFunction
cloudFunction: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
property policyData
policyData: pulumi.Input<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
region?: pulumi.Input<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
interface FunctionIamPolicyState
interface FunctionIamPolicyStateInput properties used for looking up and filtering FunctionIamPolicy resources.
property cloudFunction
cloudFunction?: pulumi.Input<string>;Used to find the parent resource to bind the IAM policy to
property etag
etag?: pulumi.Input<string>;(Computed) The etag of the IAM policy.
property policyData
policyData?: pulumi.Input<string>;The policy data generated by
a gcp.organizations.getIAMPolicy data source.
property project
project?: pulumi.Input<string>;The ID of the project in which the resource belongs. If it is not provided, the project will be parsed from the identifier of the parent resource. If no project is provided in the parent identifier and no project is specified, the provider project is used.
property region
region?: pulumi.Input<string>;The location of this cloud function. Used to find the parent resource to bind the IAM policy to. If not specified, the value will be parsed from the identifier of the parent resource. If no region is provided in the parent identifier and no region is specified, it is taken from the provider configuration.
interface FunctionState
interface FunctionStateInput properties used for looking up and filtering Function resources.
property availableMemoryMb
availableMemoryMb?: pulumi.Input<number>;Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB.
property description
description?: pulumi.Input<string>;Description of the function.
property entryPoint
entryPoint?: pulumi.Input<string>;Name of the function that will be executed when the Google Cloud Function is triggered.
property environmentVariables
environmentVariables?: pulumi.Input<{[key: string]: any}>;A set of key/value environment variable pairs to assign to the function.
property eventTrigger
eventTrigger?: pulumi.Input<FunctionEventTrigger>;A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with triggerHttp.
property httpsTriggerUrl
httpsTriggerUrl?: pulumi.Input<string>;URL which triggers function execution. Returned only if triggerHttp is used.
property ingressSettings
ingressSettings?: pulumi.Input<string>;String value that controls what traffic can reach the function. Allowed values are ALLOW_ALL and ALLOW_INTERNAL_ONLY. Changes to this field will recreate the cloud function.
property labels
labels?: pulumi.Input<{[key: string]: any}>;A set of key/value label pairs to assign to the function. Label keys must follow the requirements at https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements.
property maxInstances
maxInstances?: pulumi.Input<number>;The limit on the maximum number of function instances that may coexist at a given time.
property name
name?: pulumi.Input<string>;A user-defined name of the function. Function names must be unique globally.
property project
project?: pulumi.Input<string>;Project of the function. If it is not provided, the provider project is used.
property region
region?: pulumi.Input<string>;Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used.
property runtime
runtime?: pulumi.Input<string>;The runtime in which the function is going to run.
Eg. "nodejs8", "nodejs10", "python37", "go111".
property serviceAccountEmail
serviceAccountEmail?: pulumi.Input<string>;If provided, the self-provided service account to run the function with.
property sourceArchiveBucket
sourceArchiveBucket?: pulumi.Input<string>;The GCS bucket containing the zip archive which contains the function.
property sourceArchiveObject
sourceArchiveObject?: pulumi.Input<string>;The source archive object (file) in archive bucket.
property sourceRepository
sourceRepository?: pulumi.Input<FunctionSourceRepository>;Represents parameters related to source repository where a function is hosted.
Cannot be set alongside sourceArchiveBucket or sourceArchiveObject. Structure is documented below.
property timeout
timeout?: pulumi.Input<number>;Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
property triggerHttp
triggerHttp?: pulumi.Input<boolean>;Boolean variable. Any HTTP request (of a supported type) to the endpoint will trigger function execution. Supported HTTP request types are: POST, PUT, GET, DELETE, and OPTIONS. Endpoint is returned as httpsTriggerUrl. Cannot be used with triggerBucket and triggerTopic.
property vpcConnector
vpcConnector?: pulumi.Input<string>;The VPC Network Connector that this cloud function can connect to. It can be either the fully-qualified URI, or the short name of the network connector resource. The format of this field is projects/*/locations/*/connectors/*.
property vpcConnectorEgressSettings
vpcConnectorEgressSettings?: pulumi.Input<string>;The egress settings for the connector, controlling what traffic is diverted through it. Allowed values are ALL_TRAFFIC and PRIVATE_RANGES_ONLY. Defaults to PRIVATE_RANGES_ONLY. If unset, this field preserves the previously set value.
interface GetFunctionArgs
interface GetFunctionArgsA collection of arguments for invoking getFunction.
property name
name: string;The name of a Cloud Function.
property project
project?: undefined | string;The project in which the resource belongs. If it is not provided, the provider project is used.
property region
region?: undefined | string;The region in which the resource belongs. If it is not provided, the provider region is used.
interface GetFunctionResult
interface GetFunctionResultA collection of values returned by getFunction.
property availableMemoryMb
availableMemoryMb: number;Available memory (in MB) to the function.
property description
description: string;Description of the function.
property entryPoint
entryPoint: string;Name of a JavaScript function that will be executed when the Google Cloud Function is triggered.
property environmentVariables
environmentVariables: {[key: string]: any};property eventTriggers
eventTriggers: GetFunctionEventTrigger[];A source that fires events in response to a condition in another service. Structure is documented below.
property httpsTriggerUrl
httpsTriggerUrl: string;If function is triggered by HTTP, trigger URL is set here.
property id
id: string;The provider-assigned unique ID for this managed resource.
property ingressSettings
ingressSettings: string;Controls what traffic can reach the function.
property labels
labels: {[key: string]: any};A map of labels applied to this function.
property maxInstances
maxInstances: number;property name
name: string;The name of the Cloud Function.
property project
project?: undefined | string;property region
region?: undefined | string;property runtime
runtime: string;The runtime in which the function is running.
property serviceAccountEmail
serviceAccountEmail: string;The service account email to be assumed by the cloud function.
property sourceArchiveBucket
sourceArchiveBucket: string;The GCS bucket containing the zip archive which contains the function.
property sourceArchiveObject
sourceArchiveObject: string;The source archive object (file) in archive bucket.
property sourceRepositories
sourceRepositories: GetFunctionSourceRepository[];property timeout
timeout: number;Function execution timeout (in seconds).
property triggerHttp
triggerHttp: boolean;If function is triggered by HTTP, this boolean is set.
property vpcConnector
vpcConnector: string;The VPC Network Connector that this cloud function can connect to.
property vpcConnectorEgressSettings
vpcConnectorEgressSettings: string;The egress settings for the connector, controlling what traffic is diverted through it.
type HttpCallback
type HttpCallback = (req: express.Request, res: express.Response) => void;HttpCallback is the signature for an http triggered GCP CloudFunction entrypoint.
[req] is the data passed in by specific services calling the CloudFunction. See https://expressjs.com/en/api.html#req for more details.
[res] is the object that be used to supply the response. See https://expressjs.com/en/api.html#res for more details.
type HttpCallbackFactory
type HttpCallbackFactory = () => HttpCallback;class HttpCallbackFunction
class HttpCallbackFunction extends CallbackFunctionAn http-triggered Cloud-Function that, when invoked, will execute the code supplied by a user-provided JavaScript-Function. To handle HTTP, Cloud Functions uses Express 4.16.3.
You invoke HTTP functions from standard HTTP requests. These HTTP requests wait for the response and support handling of common HTTP request methods like GET, PUT, POST, DELETE and OPTIONS. When you use Cloud Functions, a TLS certificate is automatically provisioned for you, so all HTTP functions can be invoked via a secure connection.
See more information at: https://cloud.google.com/functions/docs/writing/http
constructor
new HttpCallbackFunction(name: string, callback: HttpCallback, opts?: pulumi.ComponentResourceOptions)new HttpCallbackFunction(name: string, args: HttpCallbackFunctionArgs, opts?: pulumi.ComponentResourceOptions)method getData
protected getData(): Promise<TData>Retrieves the data produces by [initialize]. The data is immediately available in a
derived class’s constructor after the super(...) call to ComponentResource.
method getProvider
getProvider(moduleMember: string): ProviderResource | undefinedmethod initialize
protected initialize(args: Inputs): Promise<TData>Can be overridden by a subclass to asynchronously initialize data for this Component
automatically when constructed. The data will be available immediately for subclass
constructors to use. To access the data use .getData.
method isInstance
static isInstance(obj: any): obj is ComponentResourceReturns true if the given object is an instance of CustomResource. This is designed to work even when multiple copies of the Pulumi SDK have been loaded into the same process.
method registerOutputs
protected registerOutputs(outputs?: Inputs | Promise<Inputs> | Output<Inputs>): voidregisterOutputs registers synthetic outputs that a component has initialized, usually by allocating other child sub-resources and propagating their resulting property values.
ComponentResources can call this at the end of their constructor to indicate that they are
done creating child resources. This is not strictly necessary as this will automatically be
called after the initialize method completes.
property bucket
public bucket: Bucket;Bucket and BucketObject storing all the files that comprise the Function. The contents of these files will be generated automatically from the JavaScript callback function passed in as well as the package.json file for your pulumi app.
property bucketObject
public bucketObject: BucketObject;property function
public function: Function;Underlying raw resource for the Function that is created.
property httpsTriggerUrl
public httpsTriggerUrl: pulumi.Output<string>;URL which triggers function execution.
property urn
urn: Output<URN>;urn is the stable logical URN used to distinctly address a resource, both before and after deployments.
interface HttpCallbackFunctionArgs
interface HttpCallbackFunctionArgs extends CallbackFunctionArgsSpecialized arguments to use when specifically creating an [HttpCallbackFunction].
property availableMemoryMb
availableMemoryMb?: pulumi.Input<number>;Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB.
property bucket
bucket?: storage.Bucket;The bucket to use as the sourceArchiveBucket for the generated CloudFunctions Function source to be placed in. A fresh [storage.BucketObject] will be made there containing the serialized code.
property callback
callback?: HttpCallback;The Javascript callback to use as the entrypoint for the GCP CloudFunction out of. Either [callback] or [callbackFactory] must be provided.
property callbackFactory
callbackFactory?: HttpCallbackFactory;The Javascript function instance that will be called to produce the callback function that is the entrypoint for the GCP CloudFunction. Either [callback] or [callbackFactory] must be provided.
This form is useful when there is expensive initialization work that should only be executed once. The factory-function will be invoked once when the final GCP CloudFunction module is loaded. It can run whatever code it needs, and will end by returning the actual function that Function will call into each time the Function is invoked.
property codePathOptions
codePathOptions?: pulumi.runtime.CodePathOptions;Options to control which paths/packages should be included or excluded in the zip file containing the code for the GCP Function.
property description
description?: pulumi.Input<string>;Description of the function.
property environmentVariables
environmentVariables?: pulumi.Input<{[key: string]: any}>;A set of key/value environment variable pairs to assign to the function.
property eventTrigger
eventTrigger?: undefined;property httpsTriggerUrl
httpsTriggerUrl?: pulumi.Input<string>;URL which triggers function execution. Returned only if trigger_http is used.
property iamMember
iamMember?: pulumi.Input<string>;The specific member to grant access to the function. If not specifiedm then we default to allUsers.
Available options are allAuthenticatedUsers, user:{emailid}, serviceAccount:{emailid},
group:{emailid} and domain:{domain}:
property iamRole
iamRole?: pulumi.Input<string>;The specific role to attach to the function. If not specified, then we default to roles/cloudfunctions.invoker.
Role must be in the format roles/{role-name}
property labels
labels?: pulumi.Input<{[key: string]: any}>;A set of key/value label pairs to assign to the function.
property project
project?: pulumi.Input<string>;Project of the function. If it is not provided, the provider project is used.
property region
region?: pulumi.Input<string>;Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used.
property runtime
runtime?: pulumi.Input<string>;The specific runtime for the function. If not specified, a default will be applied
property serviceAccountEmail
serviceAccountEmail?: pulumi.Input<string>;If provided, the self-provided service account to run the function with.
property timeout
timeout?: pulumi.Input<number>;Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
property triggerHttp
triggerHttp?: undefined;