Package com.google.cloud.functions.v2alpha (2.5.0)

A client to Cloud Functions API

The interfaces provided are listed below, along with usage samples.

FunctionServiceClient

Service Description: Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data.

A **function** is a resource which describes a function that should be executed and how it is triggered.

Sample for FunctionServiceClient:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (FunctionServiceClient functionServiceClient = FunctionServiceClient.create()) {
   FunctionName name = FunctionName.of("[PROJECT]", "[LOCATION]", "[FUNCTION]");
   Function response = functionServiceClient.getFunction(name);
 }
 

Classes

BuildConfig

Describes the Build step of the function that builds a container from the given source.

Protobuf type google.cloud.functions.v2alpha.BuildConfig

BuildConfig.Builder

Describes the Build step of the function that builds a container from the given source.

Protobuf type google.cloud.functions.v2alpha.BuildConfig

CreateFunctionRequest

Request for the CreateFunction method.

Protobuf type google.cloud.functions.v2alpha.CreateFunctionRequest

CreateFunctionRequest.Builder

Request for the CreateFunction method.

Protobuf type google.cloud.functions.v2alpha.CreateFunctionRequest

DeleteFunctionRequest

Request for the DeleteFunction method.

Protobuf type google.cloud.functions.v2alpha.DeleteFunctionRequest

DeleteFunctionRequest.Builder

Request for the DeleteFunction method.

Protobuf type google.cloud.functions.v2alpha.DeleteFunctionRequest

EventFilter

Filters events based on exact matches on the CloudEvents attributes.

Protobuf type google.cloud.functions.v2alpha.EventFilter

EventFilter.Builder

Filters events based on exact matches on the CloudEvents attributes.

Protobuf type google.cloud.functions.v2alpha.EventFilter

EventTrigger

Describes EventTrigger, used to request events to be sent from another service.

Protobuf type google.cloud.functions.v2alpha.EventTrigger

EventTrigger.Builder

Describes EventTrigger, used to request events to be sent from another service.

Protobuf type google.cloud.functions.v2alpha.EventTrigger

Function

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

Protobuf type google.cloud.functions.v2alpha.Function

Function.Builder

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

Protobuf type google.cloud.functions.v2alpha.Function

FunctionName

FunctionName.Builder

Builder for projects/{project}/locations/{location}/functions/{function}.

FunctionServiceClient

Service Description: Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data.

A **function** is a resource which describes a function that should be executed and how it is triggered.

This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (FunctionServiceClient functionServiceClient = FunctionServiceClient.create()) {
   FunctionName name = FunctionName.of("[PROJECT]", "[LOCATION]", "[FUNCTION]");
   Function response = functionServiceClient.getFunction(name);
 }
 

Note: close() needs to be called on the FunctionServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of FunctionServiceSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 FunctionServiceSettings functionServiceSettings =
     FunctionServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 FunctionServiceClient functionServiceClient =
     FunctionServiceClient.create(functionServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 FunctionServiceSettings functionServiceSettings =
     FunctionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 FunctionServiceClient functionServiceClient =
     FunctionServiceClient.create(functionServiceSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 FunctionServiceSettings functionServiceSettings =
     FunctionServiceSettings.newBuilder()
         .setTransportChannelProvider(
             FunctionServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
         .build();
 FunctionServiceClient functionServiceClient =
     FunctionServiceClient.create(functionServiceSettings);
 

Please refer to the GitHub repository's samples for more quickstart code snippets.

FunctionServiceClient.ListFunctionsFixedSizeCollection

FunctionServiceClient.ListFunctionsPage

FunctionServiceClient.ListFunctionsPagedResponse

FunctionServiceClient.ListLocationsFixedSizeCollection

FunctionServiceClient.ListLocationsPage

FunctionServiceClient.ListLocationsPagedResponse

FunctionServiceGrpc

Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data. A function is a resource which describes a function that should be executed and how it is triggered.

FunctionServiceGrpc.FunctionServiceBlockingStub

Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data. A function is a resource which describes a function that should be executed and how it is triggered.

FunctionServiceGrpc.FunctionServiceFutureStub

Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data. A function is a resource which describes a function that should be executed and how it is triggered.

FunctionServiceGrpc.FunctionServiceImplBase

Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data. A function is a resource which describes a function that should be executed and how it is triggered.

FunctionServiceGrpc.FunctionServiceStub

Google Cloud Functions is used to deploy functions that are executed by Google in response to various events. Data connected with that event is passed to a function as the input data. A function is a resource which describes a function that should be executed and how it is triggered.

FunctionServiceSettings

Settings class to configure an instance of FunctionServiceClient.

The default instance has everything set to sensible defaults:

  • The default service address (cloudfunctions.googleapis.com) and default port (443) are used.
  • Credentials are acquired automatically through Application Default Credentials.
  • Retries are configured for idempotent methods but not for non-idempotent methods.

The builder of this class is recursive, so contained classes are themselves builders. When build() is called, the tree of builders is called to create the complete settings object.

For example, to set the total timeout of getFunction to 30 seconds:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 FunctionServiceSettings.Builder functionServiceSettingsBuilder =
     FunctionServiceSettings.newBuilder();
 functionServiceSettingsBuilder
     .getFunctionSettings()
     .setRetrySettings(
         functionServiceSettingsBuilder
             .getFunctionSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 FunctionServiceSettings functionServiceSettings = functionServiceSettingsBuilder.build();
 

FunctionServiceSettings.Builder

Builder for FunctionServiceSettings.

FunctionsProto

GenerateDownloadUrlRequest

Request of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v2alpha.GenerateDownloadUrlRequest

GenerateDownloadUrlRequest.Builder

Request of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v2alpha.GenerateDownloadUrlRequest

GenerateDownloadUrlResponse

Response of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v2alpha.GenerateDownloadUrlResponse

GenerateDownloadUrlResponse.Builder

Response of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v2alpha.GenerateDownloadUrlResponse

GenerateUploadUrlRequest

Request of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v2alpha.GenerateUploadUrlRequest

GenerateUploadUrlRequest.Builder

Request of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v2alpha.GenerateUploadUrlRequest

GenerateUploadUrlResponse

Response of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v2alpha.GenerateUploadUrlResponse

GenerateUploadUrlResponse.Builder

Response of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v2alpha.GenerateUploadUrlResponse

GetFunctionRequest

Request for the GetFunction method.

Protobuf type google.cloud.functions.v2alpha.GetFunctionRequest

GetFunctionRequest.Builder

Request for the GetFunction method.

Protobuf type google.cloud.functions.v2alpha.GetFunctionRequest

ListFunctionsRequest

Request for the ListFunctions method.

Protobuf type google.cloud.functions.v2alpha.ListFunctionsRequest

ListFunctionsRequest.Builder

Request for the ListFunctions method.

Protobuf type google.cloud.functions.v2alpha.ListFunctionsRequest

ListFunctionsResponse

Response for the ListFunctions method.

Protobuf type google.cloud.functions.v2alpha.ListFunctionsResponse

ListFunctionsResponse.Builder

Response for the ListFunctions method.

Protobuf type google.cloud.functions.v2alpha.ListFunctionsResponse

ListRuntimesRequest

Request for the ListRuntimes method.

Protobuf type google.cloud.functions.v2alpha.ListRuntimesRequest

ListRuntimesRequest.Builder

Request for the ListRuntimes method.

Protobuf type google.cloud.functions.v2alpha.ListRuntimesRequest

ListRuntimesResponse

Response for the ListRuntimes method.

Protobuf type google.cloud.functions.v2alpha.ListRuntimesResponse

ListRuntimesResponse.Builder

Response for the ListRuntimes method.

Protobuf type google.cloud.functions.v2alpha.ListRuntimesResponse

ListRuntimesResponse.Runtime

Describes a runtime and any special information (e.g., deprecation status) related to it.

Protobuf type google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime

ListRuntimesResponse.Runtime.Builder

Describes a runtime and any special information (e.g., deprecation status) related to it.

Protobuf type google.cloud.functions.v2alpha.ListRuntimesResponse.Runtime

LocationName

LocationName.Builder

Builder for projects/{project}/locations/{location}.

OperationMetadata

Represents the metadata of the long-running operation.

Protobuf type google.cloud.functions.v2alpha.OperationMetadata

OperationMetadata.Builder

Represents the metadata of the long-running operation.

Protobuf type google.cloud.functions.v2alpha.OperationMetadata

RepoSource

Location of the source in a Google Cloud Source Repository.

Protobuf type google.cloud.functions.v2alpha.RepoSource

RepoSource.Builder

Location of the source in a Google Cloud Source Repository.

Protobuf type google.cloud.functions.v2alpha.RepoSource

SecretEnvVar

Configuration for a secret environment variable. It has the information necessary to fetch the secret value from secret manager and expose it as an environment variable.

Protobuf type google.cloud.functions.v2alpha.SecretEnvVar

SecretEnvVar.Builder

Configuration for a secret environment variable. It has the information necessary to fetch the secret value from secret manager and expose it as an environment variable.

Protobuf type google.cloud.functions.v2alpha.SecretEnvVar

SecretVolume

Configuration for a secret volume. It has the information necessary to fetch the secret value from secret manager and make it available as files mounted at the requested paths within the application container.

Protobuf type google.cloud.functions.v2alpha.SecretVolume

SecretVolume.Builder

Configuration for a secret volume. It has the information necessary to fetch the secret value from secret manager and make it available as files mounted at the requested paths within the application container.

Protobuf type google.cloud.functions.v2alpha.SecretVolume

SecretVolume.SecretVersion

Configuration for a single version.

Protobuf type google.cloud.functions.v2alpha.SecretVolume.SecretVersion

SecretVolume.SecretVersion.Builder

Configuration for a single version.

Protobuf type google.cloud.functions.v2alpha.SecretVolume.SecretVersion

ServiceConfig

Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).

Protobuf type google.cloud.functions.v2alpha.ServiceConfig

ServiceConfig.Builder

Describes the Service being deployed. Currently Supported : Cloud Run (fully managed).

Protobuf type google.cloud.functions.v2alpha.ServiceConfig

Source

The location of the function source code.

Protobuf type google.cloud.functions.v2alpha.Source

Source.Builder

The location of the function source code.

Protobuf type google.cloud.functions.v2alpha.Source

SourceProvenance

Provenance of the source. Ways to find the original source, or verify that some source was used for this build.

Protobuf type google.cloud.functions.v2alpha.SourceProvenance

SourceProvenance.Builder

Provenance of the source. Ways to find the original source, or verify that some source was used for this build.

Protobuf type google.cloud.functions.v2alpha.SourceProvenance

Stage

Each Stage of the deployment process

Protobuf type google.cloud.functions.v2alpha.Stage

Stage.Builder

Each Stage of the deployment process

Protobuf type google.cloud.functions.v2alpha.Stage

StateMessage

Informational messages about the state of the Cloud Function or Operation.

Protobuf type google.cloud.functions.v2alpha.StateMessage

StateMessage.Builder

Informational messages about the state of the Cloud Function or Operation.

Protobuf type google.cloud.functions.v2alpha.StateMessage

StorageSource

Location of the source in an archive file in Google Cloud Storage.

Protobuf type google.cloud.functions.v2alpha.StorageSource

StorageSource.Builder

Location of the source in an archive file in Google Cloud Storage.

Protobuf type google.cloud.functions.v2alpha.StorageSource

UpdateFunctionRequest

Request for the UpdateFunction method.

Protobuf type google.cloud.functions.v2alpha.UpdateFunctionRequest

UpdateFunctionRequest.Builder

Request for the UpdateFunction method.

Protobuf type google.cloud.functions.v2alpha.UpdateFunctionRequest

Interfaces

BuildConfigOrBuilder

CreateFunctionRequestOrBuilder

DeleteFunctionRequestOrBuilder

EventFilterOrBuilder

EventTriggerOrBuilder

FunctionOrBuilder

GenerateDownloadUrlRequestOrBuilder

GenerateDownloadUrlResponseOrBuilder

GenerateUploadUrlRequestOrBuilder

GenerateUploadUrlResponseOrBuilder

GetFunctionRequestOrBuilder

ListFunctionsRequestOrBuilder

ListFunctionsResponseOrBuilder

ListRuntimesRequestOrBuilder

ListRuntimesResponse.RuntimeOrBuilder

ListRuntimesResponseOrBuilder

OperationMetadataOrBuilder

RepoSourceOrBuilder

SecretEnvVarOrBuilder

SecretVolume.SecretVersionOrBuilder

SecretVolumeOrBuilder

ServiceConfigOrBuilder

SourceOrBuilder

SourceProvenanceOrBuilder

StageOrBuilder

StateMessageOrBuilder

StorageSourceOrBuilder

UpdateFunctionRequestOrBuilder

Enums

Environment

The environment the function is hosted on.

Protobuf enum google.cloud.functions.v2alpha.Environment

EventTrigger.RetryPolicy

Describes the retry policy in case of function's execution failure. Retried execution is charged as any other execution.

Protobuf enum google.cloud.functions.v2alpha.EventTrigger.RetryPolicy

Function.State

Describes the current state of the function.

Protobuf enum google.cloud.functions.v2alpha.Function.State

ListRuntimesResponse.RuntimeStage

The various stages that a runtime can be in.

Protobuf enum google.cloud.functions.v2alpha.ListRuntimesResponse.RuntimeStage

RepoSource.RevisionCase

ServiceConfig.IngressSettings

Available ingress settings. This controls what traffic can reach the function. If unspecified, ALLOW_ALL will be used.

Protobuf enum google.cloud.functions.v2alpha.ServiceConfig.IngressSettings

ServiceConfig.VpcConnectorEgressSettings

Available egress settings. This controls what traffic is diverted through the VPC Access Connector resource. By default PRIVATE_RANGES_ONLY will be used.

Protobuf enum google.cloud.functions.v2alpha.ServiceConfig.VpcConnectorEgressSettings

Source.SourceCase

Stage.Name

Possible names for a Stage

Protobuf enum google.cloud.functions.v2alpha.Stage.Name

Stage.State

Possible states for a Stage

Protobuf enum google.cloud.functions.v2alpha.Stage.State

StateMessage.Severity

Severity of the state message.

Protobuf enum google.cloud.functions.v2alpha.StateMessage.Severity