Module serverless

@pulumi/gcp > serverless

class Function

extends ComponentResource

constructor

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

Returns 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>): 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

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 environmentVariables

environmentVariables?: pulumi.Input<{[key: string]: any}>;

A set of key/value environment variable pairs to assign to 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<{[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 runtime in which the function is going to run. If empty, defaults to "nodejs6".

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 = (req: express.Request, resp: express.Response) => void;