Fork me on GitHub

Module serverless

@pulumi/gcp > serverless



class Function

Function is a higher-level API for creating and managing GCP Cloud Function resources implemented by a given handler.


new Function(name: string, options: FunctionOptions, func: Handler, opts?: pulumi.ResourceOptions)

method getProvider

getProvider(moduleMember: string): ProviderResource | undefined

method isInstance

static isInstance(obj: any): boolean

method registerOutputs

protected registerOutputs(outputs: Inputs | Promise<Inputs> | Output<Inputs> | undefined): void

property bucket

public bucket: storage.Bucket;

property bucketObject

public bucketObject: storage.BucketObject;

property function

public function: cloudfunctions.Function;

property options

public options: FunctionOptions;

property urn

urn: Output<URN>;

urn is the stable logical URN used to distinctly address a resource, both before and after deployments.

interface FunctionOptions

FunctionOptions provides configuration options for the serverless Function.

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 excludePackages

excludePackages?: string[];

The packages relative to the program folder to not include the Function upload. This can be used to override the default serialization logic that includes all packages referenced by project.json (except @pulumi packages). Default is [].

property labels

labels?: pulumi.Input<{ ... }>;

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 timeout

timeout?: pulumi.Input<number>;

Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.

type Handler

type Handler = { ... };

Handler is the signature for a serverless function. For HTTP Function it accepts Request and Response from Express. See