[][src]Struct gcp_client::google::cloud::functions::v1beta2::CloudFunction

pub struct CloudFunction {
    pub name: String,
    pub status: i32,
    pub latest_operation: String,
    pub entry_point: String,
    pub runtime: String,
    pub timeout: Option<Duration>,
    pub available_memory_mb: i32,
    pub service_account: String,
    pub update_time: Option<Timestamp>,
    pub version_id: i64,
    pub labels: HashMap<String, String>,
    pub environment_variables: HashMap<String, String>,
    pub max_instances: i32,
    pub network: String,
    pub vpc_connector: String,
    pub source_code: Option<SourceCode>,
    pub trigger: Option<Trigger>,
}

Describes a Cloud Function that contains user computation executed in response to an event. It encapsulate function and triggers configurations.

Fields

name: String

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

status: i32

Output only. Status of the function deployment.

latest_operation: String

Output only. Name of the most recent operation modifying the function. If the function status is DEPLOYING or DELETING, then it points to the active operation.

entry_point: String

The name of the function (as defined in source code) that will be executed. Defaults to the resource name suffix, if not specified. For backward compatibility, if function with given name is not found, then the system will try to use function named "function". For Node.js this is name of a function exported by the module specified in source_location.

runtime: String

The runtime in which to run the function. Required when deploying a new function, optional when updating an existing function. For a complete list of possible choices, see the gcloud command reference.

timeout: Option<Duration>

The function execution timeout. Execution is considered failed and can be terminated if the function is not completed at the end of the timeout period. Defaults to 60 seconds.

available_memory_mb: i32

The amount of memory in MB available for a function. Defaults to 256MB.

service_account: String

The email of the function's service account. If empty, defaults to {project_id}@appspot.gserviceaccount.com.

update_time: Option<Timestamp>

Output only. The last update timestamp of a Cloud Function.

version_id: i64

Output only. The version identifier of the Cloud Function. Each deployment attempt results in a new version of a function being created.

labels: HashMap<String, String>

Labels associated with this Cloud Function.

environment_variables: HashMap<String, String>

Environment variables that shall be available during function execution.

max_instances: i32

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

network: String

The VPC Network that this cloud function can connect to. It can be either the fully-qualified URI, or the short name of the network resource. If the short network name is used, the network must belong to the same project. Otherwise, it must belong to a project within the same organization. The format of this field is either projects/{project}/global/networks/{network} or {network}, where {project} is a project id where the network is defined, and {network} is the short name of the network.

This field is mutually exclusive with vpc_connector and will be replaced by it.

See the VPC documentation for more information on connecting Cloud projects.

vpc_connector: 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/*

This field is mutually exclusive with network field and will eventually replace it.

See the VPC documentation for more information on connecting Cloud projects.

source_code: Option<SourceCode>

The location of the function source code.

trigger: Option<Trigger>

An event that triggers the function.

Implementations

impl CloudFunction[src]

pub fn status(&self) -> CloudFunctionStatus[src]

Returns the enum value of status, or the default if the field is set to an invalid enum value.

pub fn set_status(&mut self, value: CloudFunctionStatus)[src]

Sets status to the provided enum value.

Trait Implementations

impl Clone for CloudFunction[src]

impl Debug for CloudFunction[src]

impl Default for CloudFunction[src]

impl Message for CloudFunction[src]

impl PartialEq<CloudFunction> for CloudFunction[src]

impl StructuralPartialEq for CloudFunction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]