Class FunctionServiceSettings (2.8.0)

publicclass FunctionServiceSettingsextendsClientSettings<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.BuilderfunctionServiceSettingsBuilder=
FunctionServiceSettings.newBuilder();
functionServiceSettingsBuilder
.getFunctionSettings()
.setRetrySettings(
functionServiceSettingsBuilder.getFunctionSettings().getRetrySettings().toBuilder()
.setTotalTimeout(Duration.ofSeconds(30))
.build());
FunctionServiceSettingsfunctionServiceSettings=functionServiceSettingsBuilder.build();

Inheritance

java.lang.Object > ClientSettings > FunctionServiceSettings

Static Methods

create(FunctionServiceStubSettings stub)

publicstaticfinalFunctionServiceSettingscreate(FunctionServiceStubSettingsstub)
Parameter
Name Description
Returns
Type Description
Exceptions
Type Description

defaultApiClientHeaderProviderBuilder()

publicstaticApiClientHeaderProvider.BuilderdefaultApiClientHeaderProviderBuilder()
Returns
Type Description

defaultCredentialsProviderBuilder()

publicstaticGoogleCredentialsProvider.BuilderdefaultCredentialsProviderBuilder()

Returns a builder for the default credentials for this service.

Returns
Type Description

defaultExecutorProviderBuilder()

publicstaticInstantiatingExecutorProvider.BuilderdefaultExecutorProviderBuilder()

Returns a builder for the default ExecutorProvider for this service.

Returns
Type Description

defaultGrpcTransportProviderBuilder()

publicstaticInstantiatingGrpcChannelProvider.BuilderdefaultGrpcTransportProviderBuilder()

Returns a builder for the default gRPC ChannelProvider for this service.

Returns
Type Description

defaultHttpJsonTransportProviderBuilder()

publicstaticInstantiatingHttpJsonChannelProvider.BuilderdefaultHttpJsonTransportProviderBuilder()

Returns a builder for the default REST ChannelProvider for this service.

Returns
Type Description

defaultTransportChannelProvider()

publicstaticTransportChannelProviderdefaultTransportChannelProvider()
Returns
Type Description

getDefaultEndpoint()

publicstaticStringgetDefaultEndpoint()

Returns the default service endpoint.

Returns
Type Description

getDefaultServiceScopes()

publicstaticList<String>getDefaultServiceScopes()

Returns the default service scopes.

Returns
Type Description

newBuilder()

publicstaticFunctionServiceSettings.BuildernewBuilder()

Returns a new gRPC builder for this class.

Returns
Type Description

newBuilder(ClientContext clientContext)

publicstaticFunctionServiceSettings.BuildernewBuilder(ClientContextclientContext)

Returns a new builder for this class.

Parameter
Name Description
clientContext ClientContext
Returns
Type Description

newHttpJsonBuilder()

publicstaticFunctionServiceSettings.BuildernewHttpJsonBuilder()

Returns a new REST builder for this class.

Returns
Type Description

Constructors

FunctionServiceSettings(FunctionServiceSettings.Builder settingsBuilder)

protectedFunctionServiceSettings(FunctionServiceSettings.BuildersettingsBuilder)
Parameter
Name Description

Methods

createFunctionOperationSettings()

publicOperationCallSettings<CreateFunctionRequest,Function,OperationMetadata>createFunctionOperationSettings()

Returns the object with the settings used for calls to createFunction.

Returns
Type Description

createFunctionSettings()

publicUnaryCallSettings<CreateFunctionRequest,Operation>createFunctionSettings()

Returns the object with the settings used for calls to createFunction.

Returns
Type Description

deleteFunctionOperationSettings()

publicOperationCallSettings<DeleteFunctionRequest,Empty,OperationMetadata>deleteFunctionOperationSettings()

Returns the object with the settings used for calls to deleteFunction.

Returns
Type Description

deleteFunctionSettings()

publicUnaryCallSettings<DeleteFunctionRequest,Operation>deleteFunctionSettings()

Returns the object with the settings used for calls to deleteFunction.

Returns
Type Description

generateDownloadUrlSettings()

publicUnaryCallSettings<GenerateDownloadUrlRequest,GenerateDownloadUrlResponse>generateDownloadUrlSettings()

Returns the object with the settings used for calls to generateDownloadUrl.

Returns
Type Description

generateUploadUrlSettings()

publicUnaryCallSettings<GenerateUploadUrlRequest,GenerateUploadUrlResponse>generateUploadUrlSettings()

Returns the object with the settings used for calls to generateUploadUrl.

Returns
Type Description

getFunctionSettings()

publicUnaryCallSettings<GetFunctionRequest,Function>getFunctionSettings()

Returns the object with the settings used for calls to getFunction.

Returns
Type Description

getIamPolicySettings()

publicUnaryCallSettings<GetIamPolicyRequest,Policy>getIamPolicySettings()

Returns the object with the settings used for calls to getIamPolicy.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>

listFunctionsSettings()

publicPagedCallSettings<ListFunctionsRequest,ListFunctionsResponse,FunctionServiceClient.ListFunctionsPagedResponse>listFunctionsSettings()

Returns the object with the settings used for calls to listFunctions.

Returns
Type Description

listLocationsSettings()

publicPagedCallSettings<ListLocationsRequest,ListLocationsResponse,FunctionServiceClient.ListLocationsPagedResponse>listLocationsSettings()

Returns the object with the settings used for calls to listLocations.

Returns
Type Description
PagedCallSettings<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse,ListLocationsPagedResponse>

listRuntimesSettings()

publicUnaryCallSettings<ListRuntimesRequest,ListRuntimesResponse>listRuntimesSettings()

Returns the object with the settings used for calls to listRuntimes.

Returns
Type Description

setIamPolicySettings()

publicUnaryCallSettings<SetIamPolicyRequest,Policy>setIamPolicySettings()

Returns the object with the settings used for calls to setIamPolicy.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>

testIamPermissionsSettings()

publicUnaryCallSettings<TestIamPermissionsRequest,TestIamPermissionsResponse>testIamPermissionsSettings()

Returns the object with the settings used for calls to testIamPermissions.

Returns
Type Description
UnaryCallSettings<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>

toBuilder()

publicFunctionServiceSettings.BuildertoBuilder()

Returns a builder containing all the values of this settings class.

Returns
Type Description
Overrides

updateFunctionOperationSettings()

publicOperationCallSettings<UpdateFunctionRequest,Function,OperationMetadata>updateFunctionOperationSettings()

Returns the object with the settings used for calls to updateFunction.

Returns
Type Description

updateFunctionSettings()

publicUnaryCallSettings<UpdateFunctionRequest,Operation>updateFunctionSettings()

Returns the object with the settings used for calls to updateFunction.

Returns
Type Description

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.