Module cloudfunctions

cloudfunctions

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-gcp repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-google repo.
class pulumi_gcp.cloudfunctions.AwaitableGetFunctionResult(available_memory_mb=None, description=None, entry_point=None, environment_variables=None, event_triggers=None, https_trigger_url=None, labels=None, max_instances=None, name=None, project=None, region=None, runtime=None, service_account_email=None, source_archive_bucket=None, source_archive_object=None, source_repositories=None, timeout=None, trigger_bucket=None, trigger_http=None, trigger_topic=None, id=None)
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, max_instances=None, name=None, project=None, region=None, runtime=None, service_account_email=None, source_archive_bucket=None, source_archive_object=None, source_repository=None, timeout=None, trigger_http=None, __props__=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[float]) – 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 the 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.
  • max_instances (pulumi.Input[float]) – The limit on the maximum number of function instances that may coexist at a given time.
  • 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.
  • runtime (pulumi.Input[str]) – The runtime in which the function is going to run. One of "nodejs6", "nodejs8", "nodejs10", "python37", "go111". If empty, defaults to "nodejs6". It’s recommended that you override the default, as "nodejs6" is deprecated.
  • service_account_email (pulumi.Input[str]) – If provided, the self-provided service account to run the function with.
  • 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.
  • source_repository (pulumi.Input[dict]) – Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below.
  • timeout (pulumi.Input[float]) – Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
  • 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.
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 the 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.

max_instances = None

The limit on the maximum number of function instances that may coexist at a given time.

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.

runtime = None

The runtime in which the function is going to run. One of "nodejs6", "nodejs8", "nodejs10", "python37", "go111". If empty, defaults to "nodejs6". It’s recommended that you override the default, as "nodejs6" is deprecated.

service_account_email = None

If provided, the self-provided service account to run the function with.

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.

source_repository = None

Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below.

timeout = None

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

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.

static get(resource_name, id, opts=None, available_memory_mb=None, description=None, entry_point=None, environment_variables=None, event_trigger=None, https_trigger_url=None, labels=None, max_instances=None, name=None, project=None, region=None, runtime=None, service_account_email=None, source_archive_bucket=None, source_archive_object=None, source_repository=None, timeout=None, trigger_http=None)

Get an existing Function resource’s state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param str id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[float] available_memory_mb: Memory (in MB), available to the function. Default value is 256MB. Allowed values are: 128MB, 256MB, 512MB, 1024MB, and 2048MB. :param pulumi.Input[str] description: Description of the function. :param pulumi.Input[str] entry_point: Name of the function that will be executed when the Google Cloud Function is triggered. :param pulumi.Input[dict] environment_variables: A set of key/value environment variable pairs to assign to the function. :param pulumi.Input[dict] event_trigger: A source that fires events in response to a condition in another service. Structure is documented below. Cannot be used with trigger_http. :param pulumi.Input[str] https_trigger_url: URL which triggers function execution. Returned only if trigger_http is used. :param pulumi.Input[dict] labels: A set of key/value label pairs to assign to the function. :param pulumi.Input[float] max_instances: The limit on the maximum number of function instances that may coexist at a given time. :param pulumi.Input[str] name: A user-defined name of the function. Function names must be unique globally. :param pulumi.Input[str] project: Project of the function. If it is not provided, the provider project is used. :param pulumi.Input[str] region: Region of function. Currently can be only “us-central1”. If it is not provided, the provider region is used. :param pulumi.Input[str] runtime: The runtime in which the function is going to run. One

of "nodejs6", "nodejs8", "nodejs10", "python37", "go111". If empty, defaults to "nodejs6". It’s recommended that you override the default, as "nodejs6" is deprecated.
Parameters:
  • service_account_email (pulumi.Input[str]) – If provided, the self-provided service account to run the function with.
  • 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.
  • source_repository (pulumi.Input[dict]) – Represents parameters related to source repository where a function is hosted. Cannot be set alongside source_archive_bucket or source_archive_object. Structure is documented below.
  • timeout (pulumi.Input[float]) – Timeout (in seconds) for the function. Default value is 60 seconds. Cannot be more than 540 seconds.
  • 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.
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, max_instances=None, name=None, project=None, region=None, runtime=None, service_account_email=None, source_archive_bucket=None, source_archive_object=None, source_repositories=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.

name = None

The name of the Cloud 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_http = None

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

id = None

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

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

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