Class InstanceAdminSettings
java.lang.Object
com.google.api.gax.rpc.ClientSettings<InstanceAdminSettings>
com.google.cloud.spanner.admin.instance.v1.InstanceAdminSettings
@Generated("by gapic-generator-java")
public class InstanceAdminSettings
extends com.google.api.gax.rpc.ClientSettings<InstanceAdminSettings>
Settings class to configure an instance of
InstanceAdminClient.
The default instance has everything set to sensible defaults:
- The default service address (spanner.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 [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) of getInstanceConfig:
// 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
InstanceAdminSettings.Builder instanceAdminSettingsBuilder = InstanceAdminSettings.newBuilder();
instanceAdminSettingsBuilder
.getInstanceConfigSettings()
.setRetrySettings(
instanceAdminSettingsBuilder
.getInstanceConfigSettings()
.getRetrySettings()
.toBuilder()
.setInitialRetryDelayDuration(Duration.ofSeconds(1))
.setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
.setMaxAttempts(5)
.setMaxRetryDelayDuration(Duration.ofSeconds(30))
.setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.5)
.setTotalTimeoutDuration(Duration.ofSeconds(300))
.build());
InstanceAdminSettings instanceAdminSettings = instanceAdminSettingsBuilder.build();
Please refer to the [Client Side Retry
Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
additional support in setting retries.
To configure the RetrySettings of a Long Running Operation method, create an OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to configure the RetrySettings for createInstanceConfig:
// 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
InstanceAdminSettings.Builder instanceAdminSettingsBuilder = InstanceAdminSettings.newBuilder();
TimedRetryAlgorithm timedRetryAlgorithm =
OperationalTimedPollAlgorithm.create(
RetrySettings.newBuilder()
.setInitialRetryDelayDuration(Duration.ofMillis(500))
.setRetryDelayMultiplier(1.5)
.setMaxRetryDelay(Duration.ofMillis(5000))
.setTotalTimeoutDuration(Duration.ofHours(24))
.build());
instanceAdminSettingsBuilder
.createClusterOperationSettings()
.setPollingAlgorithm(timedRetryAlgorithm)
.build();
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for InstanceAdminSettings. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstanceAdminSettings(InstanceAdminSettings.Builder settingsBuilder) -
Method Summary
Modifier and TypeMethodDescriptionstatic final InstanceAdminSettingscom.google.api.gax.rpc.OperationCallSettings<CreateInstanceConfigRequest,InstanceConfig, CreateInstanceConfigMetadata> Returns the object with the settings used for calls to createInstanceConfig.com.google.api.gax.rpc.UnaryCallSettings<CreateInstanceConfigRequest,com.google.longrunning.Operation> Returns the object with the settings used for calls to createInstanceConfig.com.google.api.gax.rpc.OperationCallSettings<CreateInstanceRequest,Instance, CreateInstanceMetadata> Returns the object with the settings used for calls to createInstance.com.google.api.gax.rpc.OperationCallSettings<CreateInstancePartitionRequest,InstancePartition, CreateInstancePartitionMetadata> Returns the object with the settings used for calls to createInstancePartition.com.google.api.gax.rpc.UnaryCallSettings<CreateInstancePartitionRequest,com.google.longrunning.Operation> Returns the object with the settings used for calls to createInstancePartition.com.google.api.gax.rpc.UnaryCallSettings<CreateInstanceRequest,com.google.longrunning.Operation> Returns the object with the settings used for calls to createInstance.static com.google.api.gax.rpc.ApiClientHeaderProvider.Builderstatic com.google.api.gax.core.GoogleCredentialsProvider.BuilderReturns a builder for the default credentials for this service.static com.google.api.gax.core.InstantiatingExecutorProvider.BuilderReturns a builder for the default ExecutorProvider for this service.static com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.BuilderReturns a builder for the default gRPC ChannelProvider for this service.static com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider.BuilderReturns a builder for the default REST ChannelProvider for this service.static com.google.api.gax.rpc.TransportChannelProvidercom.google.api.gax.rpc.UnaryCallSettings<DeleteInstanceConfigRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteInstanceConfig.com.google.api.gax.rpc.UnaryCallSettings<DeleteInstancePartitionRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteInstancePartition.com.google.api.gax.rpc.UnaryCallSettings<DeleteInstanceRequest,com.google.protobuf.Empty> Returns the object with the settings used for calls to deleteInstance.static StringReturns the default service endpoint.Returns the default service scopes.com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> Returns the object with the settings used for calls to getIamPolicy.com.google.api.gax.rpc.UnaryCallSettings<GetInstanceConfigRequest,InstanceConfig> Returns the object with the settings used for calls to getInstanceConfig.com.google.api.gax.rpc.UnaryCallSettings<GetInstancePartitionRequest,InstancePartition> Returns the object with the settings used for calls to getInstancePartition.com.google.api.gax.rpc.UnaryCallSettings<GetInstanceRequest,Instance> Returns the object with the settings used for calls to getInstance.com.google.api.gax.rpc.PagedCallSettings<ListInstanceConfigOperationsRequest,ListInstanceConfigOperationsResponse, InstanceAdminClient.ListInstanceConfigOperationsPagedResponse> Returns the object with the settings used for calls to listInstanceConfigOperations.com.google.api.gax.rpc.PagedCallSettings<ListInstanceConfigsRequest,ListInstanceConfigsResponse, InstanceAdminClient.ListInstanceConfigsPagedResponse> Returns the object with the settings used for calls to listInstanceConfigs.com.google.api.gax.rpc.PagedCallSettings<ListInstancePartitionOperationsRequest,ListInstancePartitionOperationsResponse, InstanceAdminClient.ListInstancePartitionOperationsPagedResponse> Returns the object with the settings used for calls to listInstancePartitionOperations.com.google.api.gax.rpc.PagedCallSettings<ListInstancePartitionsRequest,ListInstancePartitionsResponse, InstanceAdminClient.ListInstancePartitionsPagedResponse> Returns the object with the settings used for calls to listInstancePartitions.com.google.api.gax.rpc.PagedCallSettings<ListInstancesRequest,ListInstancesResponse, InstanceAdminClient.ListInstancesPagedResponse> Returns the object with the settings used for calls to listInstances.com.google.api.gax.rpc.OperationCallSettings<MoveInstanceRequest,MoveInstanceResponse, MoveInstanceMetadata> Returns the object with the settings used for calls to moveInstance.com.google.api.gax.rpc.UnaryCallSettings<MoveInstanceRequest,com.google.longrunning.Operation> Returns the object with the settings used for calls to moveInstance.Returns a new gRPC builder for this class.newBuilder(com.google.api.gax.rpc.ClientContext clientContext) Returns a new builder for this class.Returns a new REST builder for this class.com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> Returns the object with the settings used for calls to setIamPolicy.com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> Returns the object with the settings used for calls to testIamPermissions.Returns a builder containing all the values of this settings class.com.google.api.gax.rpc.OperationCallSettings<UpdateInstanceConfigRequest,InstanceConfig, UpdateInstanceConfigMetadata> Returns the object with the settings used for calls to updateInstanceConfig.com.google.api.gax.rpc.UnaryCallSettings<UpdateInstanceConfigRequest,com.google.longrunning.Operation> Returns the object with the settings used for calls to updateInstanceConfig.com.google.api.gax.rpc.OperationCallSettings<UpdateInstanceRequest,Instance, UpdateInstanceMetadata> Returns the object with the settings used for calls to updateInstance.com.google.api.gax.rpc.OperationCallSettings<UpdateInstancePartitionRequest,InstancePartition, UpdateInstancePartitionMetadata> Returns the object with the settings used for calls to updateInstancePartition.com.google.api.gax.rpc.UnaryCallSettings<UpdateInstancePartitionRequest,com.google.longrunning.Operation> Returns the object with the settings used for calls to updateInstancePartition.com.google.api.gax.rpc.UnaryCallSettings<UpdateInstanceRequest,com.google.longrunning.Operation> Returns the object with the settings used for calls to updateInstance.Methods inherited from class com.google.api.gax.rpc.ClientSettings
getBackgroundExecutorProvider, getClock, getCredentialsProvider, getEndpoint, getExecutorProvider, getGdchApiAudience, getHeaderProvider, getInternalHeaderProvider, getQuotaProjectId, getStubSettings, getTransportChannelProvider, getUniverseDomain, getWatchdogCheckInterval, getWatchdogCheckIntervalDuration, getWatchdogProvider, toString
-
Constructor Details
-
InstanceAdminSettings
- Throws:
IOException
-
-
Method Details
-
listInstanceConfigsSettings
public com.google.api.gax.rpc.PagedCallSettings<ListInstanceConfigsRequest,ListInstanceConfigsResponse, listInstanceConfigsSettings()InstanceAdminClient.ListInstanceConfigsPagedResponse> Returns the object with the settings used for calls to listInstanceConfigs. -
getInstanceConfigSettings
public com.google.api.gax.rpc.UnaryCallSettings<GetInstanceConfigRequest,InstanceConfig> getInstanceConfigSettings()Returns the object with the settings used for calls to getInstanceConfig. -
createInstanceConfigSettings
public com.google.api.gax.rpc.UnaryCallSettings<CreateInstanceConfigRequest,com.google.longrunning.Operation> createInstanceConfigSettings()Returns the object with the settings used for calls to createInstanceConfig. -
createInstanceConfigOperationSettings
public com.google.api.gax.rpc.OperationCallSettings<CreateInstanceConfigRequest,InstanceConfig, createInstanceConfigOperationSettings()CreateInstanceConfigMetadata> Returns the object with the settings used for calls to createInstanceConfig. -
updateInstanceConfigSettings
public com.google.api.gax.rpc.UnaryCallSettings<UpdateInstanceConfigRequest,com.google.longrunning.Operation> updateInstanceConfigSettings()Returns the object with the settings used for calls to updateInstanceConfig. -
updateInstanceConfigOperationSettings
public com.google.api.gax.rpc.OperationCallSettings<UpdateInstanceConfigRequest,InstanceConfig, updateInstanceConfigOperationSettings()UpdateInstanceConfigMetadata> Returns the object with the settings used for calls to updateInstanceConfig. -
deleteInstanceConfigSettings
public com.google.api.gax.rpc.UnaryCallSettings<DeleteInstanceConfigRequest,com.google.protobuf.Empty> deleteInstanceConfigSettings()Returns the object with the settings used for calls to deleteInstanceConfig. -
listInstanceConfigOperationsSettings
public com.google.api.gax.rpc.PagedCallSettings<ListInstanceConfigOperationsRequest,ListInstanceConfigOperationsResponse, listInstanceConfigOperationsSettings()InstanceAdminClient.ListInstanceConfigOperationsPagedResponse> Returns the object with the settings used for calls to listInstanceConfigOperations. -
listInstancesSettings
public com.google.api.gax.rpc.PagedCallSettings<ListInstancesRequest,ListInstancesResponse, listInstancesSettings()InstanceAdminClient.ListInstancesPagedResponse> Returns the object with the settings used for calls to listInstances. -
listInstancePartitionsSettings
public com.google.api.gax.rpc.PagedCallSettings<ListInstancePartitionsRequest,ListInstancePartitionsResponse, listInstancePartitionsSettings()InstanceAdminClient.ListInstancePartitionsPagedResponse> Returns the object with the settings used for calls to listInstancePartitions. -
getInstanceSettings
Returns the object with the settings used for calls to getInstance. -
createInstanceSettings
public com.google.api.gax.rpc.UnaryCallSettings<CreateInstanceRequest,com.google.longrunning.Operation> createInstanceSettings()Returns the object with the settings used for calls to createInstance. -
createInstanceOperationSettings
public com.google.api.gax.rpc.OperationCallSettings<CreateInstanceRequest,Instance, createInstanceOperationSettings()CreateInstanceMetadata> Returns the object with the settings used for calls to createInstance. -
updateInstanceSettings
public com.google.api.gax.rpc.UnaryCallSettings<UpdateInstanceRequest,com.google.longrunning.Operation> updateInstanceSettings()Returns the object with the settings used for calls to updateInstance. -
updateInstanceOperationSettings
public com.google.api.gax.rpc.OperationCallSettings<UpdateInstanceRequest,Instance, updateInstanceOperationSettings()UpdateInstanceMetadata> Returns the object with the settings used for calls to updateInstance. -
deleteInstanceSettings
public com.google.api.gax.rpc.UnaryCallSettings<DeleteInstanceRequest,com.google.protobuf.Empty> deleteInstanceSettings()Returns the object with the settings used for calls to deleteInstance. -
setIamPolicySettings
public com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicySettings()Returns the object with the settings used for calls to setIamPolicy. -
getIamPolicySettings
public com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicySettings()Returns the object with the settings used for calls to getIamPolicy. -
testIamPermissionsSettings
public com.google.api.gax.rpc.UnaryCallSettings<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsSettings()Returns the object with the settings used for calls to testIamPermissions. -
getInstancePartitionSettings
public com.google.api.gax.rpc.UnaryCallSettings<GetInstancePartitionRequest,InstancePartition> getInstancePartitionSettings()Returns the object with the settings used for calls to getInstancePartition. -
createInstancePartitionSettings
public com.google.api.gax.rpc.UnaryCallSettings<CreateInstancePartitionRequest,com.google.longrunning.Operation> createInstancePartitionSettings()Returns the object with the settings used for calls to createInstancePartition. -
createInstancePartitionOperationSettings
public com.google.api.gax.rpc.OperationCallSettings<CreateInstancePartitionRequest,InstancePartition, createInstancePartitionOperationSettings()CreateInstancePartitionMetadata> Returns the object with the settings used for calls to createInstancePartition. -
deleteInstancePartitionSettings
public com.google.api.gax.rpc.UnaryCallSettings<DeleteInstancePartitionRequest,com.google.protobuf.Empty> deleteInstancePartitionSettings()Returns the object with the settings used for calls to deleteInstancePartition. -
updateInstancePartitionSettings
public com.google.api.gax.rpc.UnaryCallSettings<UpdateInstancePartitionRequest,com.google.longrunning.Operation> updateInstancePartitionSettings()Returns the object with the settings used for calls to updateInstancePartition. -
updateInstancePartitionOperationSettings
public com.google.api.gax.rpc.OperationCallSettings<UpdateInstancePartitionRequest,InstancePartition, updateInstancePartitionOperationSettings()UpdateInstancePartitionMetadata> Returns the object with the settings used for calls to updateInstancePartition. -
listInstancePartitionOperationsSettings
public com.google.api.gax.rpc.PagedCallSettings<ListInstancePartitionOperationsRequest,ListInstancePartitionOperationsResponse, listInstancePartitionOperationsSettings()InstanceAdminClient.ListInstancePartitionOperationsPagedResponse> Returns the object with the settings used for calls to listInstancePartitionOperations. -
moveInstanceSettings
public com.google.api.gax.rpc.UnaryCallSettings<MoveInstanceRequest,com.google.longrunning.Operation> moveInstanceSettings()Returns the object with the settings used for calls to moveInstance. -
moveInstanceOperationSettings
public com.google.api.gax.rpc.OperationCallSettings<MoveInstanceRequest,MoveInstanceResponse, moveInstanceOperationSettings()MoveInstanceMetadata> Returns the object with the settings used for calls to moveInstance. -
create
- Throws:
IOException
-
defaultExecutorProviderBuilder
public static com.google.api.gax.core.InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()Returns a builder for the default ExecutorProvider for this service. -
getDefaultEndpoint
Returns the default service endpoint. -
getDefaultServiceScopes
Returns the default service scopes. -
defaultCredentialsProviderBuilder
public static com.google.api.gax.core.GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder()Returns a builder for the default credentials for this service. -
defaultGrpcTransportProviderBuilder
public static com.google.api.gax.grpc.InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder()Returns a builder for the default gRPC ChannelProvider for this service. -
defaultHttpJsonTransportProviderBuilder
@BetaApi public static com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider.Builder defaultHttpJsonTransportProviderBuilder()Returns a builder for the default REST ChannelProvider for this service. -
defaultTransportChannelProvider
public static com.google.api.gax.rpc.TransportChannelProvider defaultTransportChannelProvider() -
defaultApiClientHeaderProviderBuilder
public static com.google.api.gax.rpc.ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() -
newBuilder
Returns a new gRPC builder for this class. -
newHttpJsonBuilder
Returns a new REST builder for this class. -
newBuilder
public static InstanceAdminSettings.Builder newBuilder(com.google.api.gax.rpc.ClientContext clientContext) Returns a new builder for this class. -
toBuilder
Returns a builder containing all the values of this settings class.- Specified by:
toBuilderin classcom.google.api.gax.rpc.ClientSettings<InstanceAdminSettings>
-