Class InstanceAdminStubSettings

java.lang.Object
com.google.api.gax.rpc.StubSettings<InstanceAdminStubSettings>
com.google.cloud.spanner.admin.instance.v1.stub.InstanceAdminStubSettings

@Generated("by gapic-generator-java") public class InstanceAdminStubSettings extends com.google.api.gax.rpc.StubSettings<InstanceAdminStubSettings>
Settings class to configure an instance of InstanceAdminStub.

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
 InstanceAdminStubSettings.Builder instanceAdminSettingsBuilder =
     InstanceAdminStubSettings.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());
 InstanceAdminStubSettings 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
 InstanceAdminStubSettings.Builder instanceAdminSettingsBuilder =
     InstanceAdminStubSettings.newBuilder();
 TimedRetryAlgorithm timedRetryAlgorithm =
     OperationalTimedPollAlgorithm.create(
         RetrySettings.newBuilder()
             .setInitialRetryDelayDuration(Duration.ofMillis(500))
             .setRetryDelayMultiplier(1.5)
             .setMaxRetryDelayDuration(Duration.ofMillis(5000))
             .setTotalTimeoutDuration(Duration.ofHours(24))
             .build());
 instanceAdminSettingsBuilder
     .createClusterOperationSettings()
     .setPollingAlgorithm(timedRetryAlgorithm)
     .build();
 
  • Constructor Details

  • Method Details

    • listInstanceConfigsSettings

      public com.google.api.gax.rpc.PagedCallSettings<ListInstanceConfigsRequest,ListInstanceConfigsResponse,InstanceAdminClient.ListInstanceConfigsPagedResponse> listInstanceConfigsSettings()
      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,CreateInstanceConfigMetadata> createInstanceConfigOperationSettings()
      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,UpdateInstanceConfigMetadata> updateInstanceConfigOperationSettings()
      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,InstanceAdminClient.ListInstanceConfigOperationsPagedResponse> listInstanceConfigOperationsSettings()
      Returns the object with the settings used for calls to listInstanceConfigOperations.
    • listInstancesSettings

      public com.google.api.gax.rpc.PagedCallSettings<ListInstancesRequest,ListInstancesResponse,InstanceAdminClient.ListInstancesPagedResponse> listInstancesSettings()
      Returns the object with the settings used for calls to listInstances.
    • listInstancePartitionsSettings

      public com.google.api.gax.rpc.PagedCallSettings<ListInstancePartitionsRequest,ListInstancePartitionsResponse,InstanceAdminClient.ListInstancePartitionsPagedResponse> listInstancePartitionsSettings()
      Returns the object with the settings used for calls to listInstancePartitions.
    • getInstanceSettings

      public com.google.api.gax.rpc.UnaryCallSettings<GetInstanceRequest,Instance> 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,CreateInstanceMetadata> createInstanceOperationSettings()
      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,UpdateInstanceMetadata> updateInstanceOperationSettings()
      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,CreateInstancePartitionMetadata> createInstancePartitionOperationSettings()
      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,UpdateInstancePartitionMetadata> updateInstancePartitionOperationSettings()
      Returns the object with the settings used for calls to updateInstancePartition.
    • listInstancePartitionOperationsSettings

      public com.google.api.gax.rpc.PagedCallSettings<ListInstancePartitionOperationsRequest,ListInstancePartitionOperationsResponse,InstanceAdminClient.ListInstancePartitionOperationsPagedResponse> listInstancePartitionOperationsSettings()
      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,MoveInstanceMetadata> moveInstanceOperationSettings()
      Returns the object with the settings used for calls to moveInstance.
    • createStub

      public InstanceAdminStub createStub() throws IOException
      Throws:
      IOException
    • getServiceName

      public String getServiceName()
      Returns the default service name.
      Overrides:
      getServiceName in class com.google.api.gax.rpc.StubSettings<InstanceAdminStubSettings>
    • defaultExecutorProviderBuilder

      public static com.google.api.gax.core.InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder()
      Returns a builder for the default ExecutorProvider for this service.
    • getDefaultEndpoint

      @ObsoleteApi("Use getEndpoint() instead") public static String getDefaultEndpoint()
      Returns the default service endpoint.
    • getDefaultMtlsEndpoint

      public static String getDefaultMtlsEndpoint()
      Returns the default mTLS service endpoint.
    • getDefaultServiceScopes

      public static List<String> 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()
    • defaultGrpcApiClientHeaderProviderBuilder

      public static com.google.api.gax.rpc.ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder()
    • defaultHttpJsonApiClientHeaderProviderBuilder

      public static com.google.api.gax.rpc.ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder()
    • defaultApiClientHeaderProviderBuilder

      public static com.google.api.gax.rpc.ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder()
    • newBuilder

      public static InstanceAdminStubSettings.Builder newBuilder()
      Returns a new gRPC builder for this class.
    • newHttpJsonBuilder

      public static InstanceAdminStubSettings.Builder newHttpJsonBuilder()
      Returns a new REST builder for this class.
    • newBuilder

      public static InstanceAdminStubSettings.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:
      toBuilder in class com.google.api.gax.rpc.StubSettings<InstanceAdminStubSettings>