Package com.google.cloud.functions.v2beta (2.17.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 and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 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.v2beta.BuildConfig

BuildConfig.Builder

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

Protobuf type google.cloud.functions.v2beta.BuildConfig

CreateFunctionRequest

Request for the CreateFunction method.

Protobuf type google.cloud.functions.v2beta.CreateFunctionRequest

CreateFunctionRequest.Builder

Request for the CreateFunction method.

Protobuf type google.cloud.functions.v2beta.CreateFunctionRequest

DeleteFunctionRequest

Request for the DeleteFunction method.

Protobuf type google.cloud.functions.v2beta.DeleteFunctionRequest

DeleteFunctionRequest.Builder

Request for the DeleteFunction method.

Protobuf type google.cloud.functions.v2beta.DeleteFunctionRequest

EventFilter

Filters events based on exact matches on the CloudEvents attributes.

Protobuf type google.cloud.functions.v2beta.EventFilter

EventFilter.Builder

Filters events based on exact matches on the CloudEvents attributes.

Protobuf type google.cloud.functions.v2beta.EventFilter

EventTrigger

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

Protobuf type google.cloud.functions.v2beta.EventTrigger

EventTrigger.Builder

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

Protobuf type google.cloud.functions.v2beta.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.v2beta.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.v2beta.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 and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 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 and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 FunctionServiceSettings functionServiceSettings =
     FunctionServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 FunctionServiceClient functionServiceClient =
     FunctionServiceClient.create(functionServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 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 and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 FunctionServiceSettings functionServiceSettings =
     FunctionServiceSettings.newHttpJsonBuilder().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

A stub to allow clients to do synchronous rpc calls to service FunctionService.

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

A stub to allow clients to do ListenableFuture-style rpc calls to service FunctionService.

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

Base class for the server implementation of the service FunctionService.

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

A stub to allow clients to do asynchronous rpc calls to service FunctionService.

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 and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 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.v2beta.GenerateDownloadUrlRequest

GenerateDownloadUrlRequest.Builder

Request of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v2beta.GenerateDownloadUrlRequest

GenerateDownloadUrlResponse

Response of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v2beta.GenerateDownloadUrlResponse

GenerateDownloadUrlResponse.Builder

Response of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v2beta.GenerateDownloadUrlResponse

GenerateUploadUrlRequest

Request of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v2beta.GenerateUploadUrlRequest

GenerateUploadUrlRequest.Builder

Request of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v2beta.GenerateUploadUrlRequest

GenerateUploadUrlResponse

Response of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v2beta.GenerateUploadUrlResponse

GenerateUploadUrlResponse.Builder

Response of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v2beta.GenerateUploadUrlResponse

GetFunctionRequest

Request for the GetFunction method.

Protobuf type google.cloud.functions.v2beta.GetFunctionRequest

GetFunctionRequest.Builder

Request for the GetFunction method.

Protobuf type google.cloud.functions.v2beta.GetFunctionRequest

ListFunctionsRequest

Request for the ListFunctions method.

Protobuf type google.cloud.functions.v2beta.ListFunctionsRequest

ListFunctionsRequest.Builder

Request for the ListFunctions method.

Protobuf type google.cloud.functions.v2beta.ListFunctionsRequest

ListFunctionsResponse

Response for the ListFunctions method.

Protobuf type google.cloud.functions.v2beta.ListFunctionsResponse

ListFunctionsResponse.Builder

Response for the ListFunctions method.

Protobuf type google.cloud.functions.v2beta.ListFunctionsResponse

ListRuntimesRequest

Request for the ListRuntimes method.

Protobuf type google.cloud.functions.v2beta.ListRuntimesRequest

ListRuntimesRequest.Builder

Request for the ListRuntimes method.

Protobuf type google.cloud.functions.v2beta.ListRuntimesRequest

ListRuntimesResponse

Response for the ListRuntimes method.

Protobuf type google.cloud.functions.v2beta.ListRuntimesResponse

ListRuntimesResponse.Builder

Response for the ListRuntimes method.

Protobuf type google.cloud.functions.v2beta.ListRuntimesResponse

ListRuntimesResponse.Runtime

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

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

ListRuntimesResponse.Runtime.Builder

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

Protobuf type google.cloud.functions.v2beta.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.v2beta.OperationMetadata

OperationMetadata.Builder

Represents the metadata of the long-running operation.

Protobuf type google.cloud.functions.v2beta.OperationMetadata

RepoSource

Location of the source in a Google Cloud Source Repository.

Protobuf type google.cloud.functions.v2beta.RepoSource

RepoSource.Builder

Location of the source in a Google Cloud Source Repository.

Protobuf type google.cloud.functions.v2beta.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.v2beta.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.v2beta.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.v2beta.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.v2beta.SecretVolume

SecretVolume.SecretVersion

Configuration for a single version.

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

SecretVolume.SecretVersion.Builder

Configuration for a single version.

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

ServiceConfig

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

Protobuf type google.cloud.functions.v2beta.ServiceConfig

ServiceConfig.Builder

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

Protobuf type google.cloud.functions.v2beta.ServiceConfig

Source

The location of the function source code.

Protobuf type google.cloud.functions.v2beta.Source

Source.Builder

The location of the function source code.

Protobuf type google.cloud.functions.v2beta.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.v2beta.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.v2beta.SourceProvenance

Stage

Each Stage of the deployment process

Protobuf type google.cloud.functions.v2beta.Stage

Stage.Builder

Each Stage of the deployment process

Protobuf type google.cloud.functions.v2beta.Stage

StateMessage

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

Protobuf type google.cloud.functions.v2beta.StateMessage

StateMessage.Builder

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

Protobuf type google.cloud.functions.v2beta.StateMessage

StorageSource

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

Protobuf type google.cloud.functions.v2beta.StorageSource

StorageSource.Builder

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

Protobuf type google.cloud.functions.v2beta.StorageSource

UpdateFunctionRequest

Request for the UpdateFunction method.

Protobuf type google.cloud.functions.v2beta.UpdateFunctionRequest

UpdateFunctionRequest.Builder

Request for the UpdateFunction method.

Protobuf type google.cloud.functions.v2beta.UpdateFunctionRequest

Interfaces

BuildConfigOrBuilder

CreateFunctionRequestOrBuilder

DeleteFunctionRequestOrBuilder

EventFilterOrBuilder

EventTriggerOrBuilder

FunctionOrBuilder

FunctionServiceGrpc.AsyncService

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.

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.v2beta.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.v2beta.EventTrigger.RetryPolicy

Function.State

Describes the current state of the function.

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

ListRuntimesResponse.RuntimeStage

The various stages that a runtime can be in.

Protobuf enum google.cloud.functions.v2beta.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.v2beta.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.v2beta.ServiceConfig.VpcConnectorEgressSettings

Source.SourceCase

Stage.Name

Possible names for a Stage

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

Stage.State

Possible states for a Stage

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

StateMessage.Severity

Severity of the state message.

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