Package com.google.cloud.functions.v1 (2.4.0)

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

CloudFunctionsServiceClient

Service Description: A service that application uses to manipulate triggers and functions.

Sample for CloudFunctionsServiceClient:


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

Classes

CallFunctionRequest

Request for the CallFunction method.

Protobuf type google.cloud.functions.v1.CallFunctionRequest

CallFunctionRequest.Builder

Request for the CallFunction method.

Protobuf type google.cloud.functions.v1.CallFunctionRequest

CallFunctionResponse

Response of CallFunction method.

Protobuf type google.cloud.functions.v1.CallFunctionResponse

CallFunctionResponse.Builder

Response of CallFunction method.

Protobuf type google.cloud.functions.v1.CallFunctionResponse

CloudFunction

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

Protobuf type google.cloud.functions.v1.CloudFunction

CloudFunction.Builder

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

Protobuf type google.cloud.functions.v1.CloudFunction

CloudFunctionName

CloudFunctionName.Builder

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

CloudFunctionsServiceClient

Service Description: A service that application uses to manipulate triggers and functions.

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 (CloudFunctionsServiceClient cloudFunctionsServiceClient =
     CloudFunctionsServiceClient.create()) {
   CloudFunctionName name = CloudFunctionName.of("[PROJECT]", "[LOCATION]", "[FUNCTION]");
   CloudFunction response = cloudFunctionsServiceClient.getFunction(name);
 }
 

Note: close() needs to be called on the CloudFunctionsServiceClient 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 CloudFunctionsServiceSettings 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.
 CloudFunctionsServiceSettings cloudFunctionsServiceSettings =
     CloudFunctionsServiceSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 CloudFunctionsServiceClient cloudFunctionsServiceClient =
     CloudFunctionsServiceClient.create(cloudFunctionsServiceSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 CloudFunctionsServiceSettings cloudFunctionsServiceSettings =
     CloudFunctionsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
 CloudFunctionsServiceClient cloudFunctionsServiceClient =
     CloudFunctionsServiceClient.create(cloudFunctionsServiceSettings);
 

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

CloudFunctionsServiceClient.ListFunctionsFixedSizeCollection

CloudFunctionsServiceClient.ListFunctionsPage

CloudFunctionsServiceClient.ListFunctionsPagedResponse

CloudFunctionsServiceGrpc

A service that application uses to manipulate triggers and functions.

CloudFunctionsServiceGrpc.CloudFunctionsServiceBlockingStub

A service that application uses to manipulate triggers and functions.

CloudFunctionsServiceGrpc.CloudFunctionsServiceFutureStub

A service that application uses to manipulate triggers and functions.

CloudFunctionsServiceGrpc.CloudFunctionsServiceImplBase

A service that application uses to manipulate triggers and functions.

CloudFunctionsServiceGrpc.CloudFunctionsServiceStub

A service that application uses to manipulate triggers and functions.

CloudFunctionsServiceSettings

Settings class to configure an instance of CloudFunctionsServiceClient.

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.
 CloudFunctionsServiceSettings.Builder cloudFunctionsServiceSettingsBuilder =
     CloudFunctionsServiceSettings.newBuilder();
 cloudFunctionsServiceSettingsBuilder
     .getFunctionSettings()
     .setRetrySettings(
         cloudFunctionsServiceSettingsBuilder
             .getFunctionSettings()
             .getRetrySettings()
             .toBuilder()
             .setTotalTimeout(Duration.ofSeconds(30))
             .build());
 CloudFunctionsServiceSettings cloudFunctionsServiceSettings =
     cloudFunctionsServiceSettingsBuilder.build();
 

CloudFunctionsServiceSettings.Builder

Builder for CloudFunctionsServiceSettings.

CreateFunctionRequest

Request for the CreateFunction method.

Protobuf type google.cloud.functions.v1.CreateFunctionRequest

CreateFunctionRequest.Builder

Request for the CreateFunction method.

Protobuf type google.cloud.functions.v1.CreateFunctionRequest

DeleteFunctionRequest

Request for the DeleteFunction method.

Protobuf type google.cloud.functions.v1.DeleteFunctionRequest

DeleteFunctionRequest.Builder

Request for the DeleteFunction method.

Protobuf type google.cloud.functions.v1.DeleteFunctionRequest

EventTrigger

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

Protobuf type google.cloud.functions.v1.EventTrigger

EventTrigger.Builder

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

Protobuf type google.cloud.functions.v1.EventTrigger

FailurePolicy

Describes the policy in case of function's execution failure. If empty, then defaults to ignoring failures (i.e. not retrying them).

Protobuf type google.cloud.functions.v1.FailurePolicy

FailurePolicy.Builder

Describes the policy in case of function's execution failure. If empty, then defaults to ignoring failures (i.e. not retrying them).

Protobuf type google.cloud.functions.v1.FailurePolicy

FailurePolicy.Retry

Describes the retry policy in case of function's execution failure. A function execution will be retried on any failure. A failed execution will be retried up to 7 days with an exponential backoff (capped at 10 seconds). Retried execution is charged as any other execution.

Protobuf type google.cloud.functions.v1.FailurePolicy.Retry

FailurePolicy.Retry.Builder

Describes the retry policy in case of function's execution failure. A function execution will be retried on any failure. A failed execution will be retried up to 7 days with an exponential backoff (capped at 10 seconds). Retried execution is charged as any other execution.

Protobuf type google.cloud.functions.v1.FailurePolicy.Retry

FunctionsOperationsProto

FunctionsProto

GenerateDownloadUrlRequest

Request of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v1.GenerateDownloadUrlRequest

GenerateDownloadUrlRequest.Builder

Request of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v1.GenerateDownloadUrlRequest

GenerateDownloadUrlResponse

Response of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v1.GenerateDownloadUrlResponse

GenerateDownloadUrlResponse.Builder

Response of GenerateDownloadUrl method.

Protobuf type google.cloud.functions.v1.GenerateDownloadUrlResponse

GenerateUploadUrlRequest

Request of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v1.GenerateUploadUrlRequest

GenerateUploadUrlRequest.Builder

Request of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v1.GenerateUploadUrlRequest

GenerateUploadUrlResponse

Response of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v1.GenerateUploadUrlResponse

GenerateUploadUrlResponse.Builder

Response of GenerateSourceUploadUrl method.

Protobuf type google.cloud.functions.v1.GenerateUploadUrlResponse

GetFunctionRequest

Request for the GetFunction method.

Protobuf type google.cloud.functions.v1.GetFunctionRequest

GetFunctionRequest.Builder

Request for the GetFunction method.

Protobuf type google.cloud.functions.v1.GetFunctionRequest

HttpsTrigger

Describes HttpsTrigger, could be used to connect web hooks to function.

Protobuf type google.cloud.functions.v1.HttpsTrigger

HttpsTrigger.Builder

Describes HttpsTrigger, could be used to connect web hooks to function.

Protobuf type google.cloud.functions.v1.HttpsTrigger

ListFunctionsRequest

Request for the ListFunctions method.

Protobuf type google.cloud.functions.v1.ListFunctionsRequest

ListFunctionsRequest.Builder

Request for the ListFunctions method.

Protobuf type google.cloud.functions.v1.ListFunctionsRequest

ListFunctionsResponse

Response for the ListFunctions method.

Protobuf type google.cloud.functions.v1.ListFunctionsResponse

ListFunctionsResponse.Builder

Response for the ListFunctions method.

Protobuf type google.cloud.functions.v1.ListFunctionsResponse

LocationName

LocationName.Builder

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

OperationMetadataV1

Metadata describing an Operation

Protobuf type google.cloud.functions.v1.OperationMetadataV1

OperationMetadataV1.Builder

Metadata describing an Operation

Protobuf type google.cloud.functions.v1.OperationMetadataV1

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. Secret value is not a part of the configuration. Secret values are only fetched when a new clone starts.

Protobuf type google.cloud.functions.v1.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. Secret value is not a part of the configuration. Secret values are only fetched when a new clone starts.

Protobuf type google.cloud.functions.v1.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. Secret value is not a part of the configuration. Every filesystem read operation performs a lookup in secret manager to retrieve the secret value.

Protobuf type google.cloud.functions.v1.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. Secret value is not a part of the configuration. Every filesystem read operation performs a lookup in secret manager to retrieve the secret value.

Protobuf type google.cloud.functions.v1.SecretVolume

SecretVolume.SecretVersion

Configuration for a single version.

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

SecretVolume.SecretVersion.Builder

Configuration for a single version.

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

SourceRepository

Describes SourceRepository, used to represent parameters related to source repository where a function is hosted.

Protobuf type google.cloud.functions.v1.SourceRepository

SourceRepository.Builder

Describes SourceRepository, used to represent parameters related to source repository where a function is hosted.

Protobuf type google.cloud.functions.v1.SourceRepository

UpdateFunctionRequest

Request for the UpdateFunction method.

Protobuf type google.cloud.functions.v1.UpdateFunctionRequest

UpdateFunctionRequest.Builder

Request for the UpdateFunction method.

Protobuf type google.cloud.functions.v1.UpdateFunctionRequest

Interfaces

CallFunctionRequestOrBuilder

CallFunctionResponseOrBuilder

CloudFunctionOrBuilder

CreateFunctionRequestOrBuilder

DeleteFunctionRequestOrBuilder

EventTriggerOrBuilder

FailurePolicy.RetryOrBuilder

FailurePolicyOrBuilder

GenerateDownloadUrlRequestOrBuilder

GenerateDownloadUrlResponseOrBuilder

GenerateUploadUrlRequestOrBuilder

GenerateUploadUrlResponseOrBuilder

GetFunctionRequestOrBuilder

HttpsTriggerOrBuilder

ListFunctionsRequestOrBuilder

ListFunctionsResponseOrBuilder

OperationMetadataV1OrBuilder

SecretEnvVarOrBuilder

SecretVolume.SecretVersionOrBuilder

SecretVolumeOrBuilder

SourceRepositoryOrBuilder

UpdateFunctionRequestOrBuilder

Enums

CloudFunction.IngressSettings

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

Protobuf enum google.cloud.functions.v1.CloudFunction.IngressSettings

CloudFunction.SourceCodeCase

CloudFunction.TriggerCase

CloudFunction.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.v1.CloudFunction.VpcConnectorEgressSettings

CloudFunctionStatus

Describes the current stage of a deployment.

Protobuf enum google.cloud.functions.v1.CloudFunctionStatus

FailurePolicy.ActionCase

HttpsTrigger.SecurityLevel

Available security level settings. This controls the methods to enforce security (HTTPS) on a URL. If unspecified, SECURE_OPTIONAL will be used.

Protobuf enum google.cloud.functions.v1.HttpsTrigger.SecurityLevel

OperationType

A type of an operation.

Protobuf enum google.cloud.functions.v1.OperationType