cloudfunctions

class pulumi_gcp.cloudfunctions.Function(resource_name, opts=None, available_memory_mb=None, description=None, entry_point=None, environment_variables=None, event_trigger=None, https_trigger_url=None, labels=None, name=None, project=None, region=None, retry_on_failure=None, runtime=None, source_archive_bucket=None, source_archive_object=None, timeout=None, trigger_bucket=None, trigger_http=None, trigger_topic=None, __name__=None, __opts__=None)

Creates a new Cloud Function. For more information see the official documentation and API.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • available_memory_mb (pulumi.Input[int]) – Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB.
  • description (pulumi.Input[str]) – Description of the function.
  • entry_point (pulumi.Input[str]) – Name of a JavaScript function that will be executed when the Google Cloud Function is triggered.
  • environment_variables (pulumi.Input[dict]) – A set of key/value environment variable pairs to assign to the function.
  • event_trigger (pulumi.Input[dict]) – A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.
  • https_trigger_url (pulumi.Input[str]) – URL which triggers function execution. Returned only if trigger_http is used.
  • labels (pulumi.Input[dict]) – A set of key/value label pairs to assign to the function.
  • name (pulumi.Input[str]) – A user-defined name of the function. Function names must be unique globally.
  • project (pulumi.Input[str]) – Project of the function. If it is not provided, the provider project is used.
  • region (pulumi.Input[str]) – Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used.
  • retry_on_failure (pulumi.Input[bool]) – Whether the function should be retried on failure. This only applies to bucket and topic triggers, not HTTPS triggers. Deprecated. Use event_trigger.failure_policy.retry instead.
  • runtime (pulumi.Input[str]) – The runtime in which the function is going to run. If empty, defaults to "nodejs6".
  • source_archive_bucket (pulumi.Input[str]) – The GCS bucket containing the zip archive which contains the function.
  • source_archive_object (pulumi.Input[str]) – The source archive object (file) in archive bucket.
  • timeout (pulumi.Input[int]) – Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
  • trigger_bucket (pulumi.Input[str]) – Google Cloud Storage bucket name. Every change in files in this bucket will trigger function execution. Cannot be used with trigger_http and trigger_topic. Deprecated. Use event_trigger instead.
  • trigger_http (pulumi.Input[bool]) – 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.
  • trigger_topic (pulumi.Input[str]) – Name of Pub/Sub topic. Every message published in this topic will trigger function execution with message contents passed as input data. Cannot be used with trigger_http and trigger_bucket. Deprecated. Use event_trigger instead.
available_memory_mb = None

Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB.

description = None

Description of the function.

entry_point = None

Name of a JavaScript function that will be executed when the Google Cloud Function is triggered.

environment_variables = None

A set of key/value environment variable pairs to assign to the function.

event_trigger = None

A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http.

https_trigger_url = None

URL which triggers function execution. Returned only if trigger_http is used.

labels = None

A set of key/value label pairs to assign to the function.

name = None

A user-defined name of the function. Function names must be unique globally.

project = None

Project of the function. If it is not provided, the provider project is used.

region = None

Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used.

retry_on_failure = None

Whether the function should be retried on failure. This only applies to bucket and topic triggers, not HTTPS triggers. Deprecated. Use event_trigger.failure_policy.retry instead.

runtime = None

The runtime in which the function is going to run. If empty, defaults to "nodejs6".

source_archive_bucket = None

The GCS bucket containing the zip archive which contains the function.

source_archive_object = None

The source archive object (file) in archive bucket.

timeout = None

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

trigger_bucket = None

Google Cloud Storage bucket name. Every change in files in this bucket will trigger function execution. Cannot be used with trigger_http and trigger_topic. Deprecated. Use event_trigger instead.

trigger_http = None

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.

trigger_topic = None

Name of Pub/Sub topic. Every message published in this topic will trigger function execution with message contents passed as input data. Cannot be used with trigger_http and trigger_bucket. Deprecated. Use event_trigger instead.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_gcp.cloudfunctions.GetFunctionResult(available_memory_mb=None, description=None, entry_point=None, environment_variables=None, event_triggers=None, https_trigger_url=None, labels=None, retry_on_failure=None, runtime=None, source_archive_bucket=None, source_archive_object=None, timeout=None, trigger_bucket=None, trigger_http=None, trigger_topic=None, id=None)

A collection of values returned by getFunction.

available_memory_mb = None

Available memory (in MB) to the function.

description = None

Description of the function.

entry_point = None

Name of a JavaScript function that will be executed when the Google Cloud Function is triggered.

event_triggers = None

A source that fires events in response to a condition in another service. Structure is documented below.

https_trigger_url = None

If function is triggered by HTTP, trigger URL is set here.

labels = None

A map of labels applied to this function.

runtime = None

The runtime in which the function is running.

source_archive_bucket = None

The GCS bucket containing the zip archive which contains the function.

source_archive_object = None

The source archive object (file) in archive bucket.

timeout = None

Function execution timeout (in seconds).

trigger_bucket = None

If function is triggered by bucket, bucket name is set here. Deprecated. Use event_trigger instead.

trigger_http = None

If function is triggered by HTTP, this boolean is set.

trigger_topic = None

If function is triggered by Pub/Sub topic, name of topic is set here. Deprecated. Use event_trigger instead.

id = None

id is the provider-assigned unique ID for this managed resource.

pulumi_gcp.cloudfunctions.get_function(name=None, project=None, region=None)

Get information about a Google Cloud Function. For more information see the official documentation and API.