@Generated(value="by gapic-generator") @BetaApi public class BaseBigtableInstanceAdminClient extends Object implements BackgroundResource
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:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
Instance response = baseBigtableInstanceAdminClient.getInstance(name);
}
Note: close() needs to be called on the baseBigtableInstanceAdminClient 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:
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 BaseBigtableInstanceAdminSettings to create(). For example:
To customize credentials:
BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings =
BaseBigtableInstanceAdminSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
BaseBigtableInstanceAdminClient.create(baseBigtableInstanceAdminSettings);
To customize the endpoint:
BaseBigtableInstanceAdminSettings baseBigtableInstanceAdminSettings =
BaseBigtableInstanceAdminSettings.newBuilder().setEndpoint(myEndpoint).build();
BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
BaseBigtableInstanceAdminClient.create(baseBigtableInstanceAdminSettings);
Modifier and Type | Class and Description |
---|---|
static class |
BaseBigtableInstanceAdminClient.ListAppProfilesFixedSizeCollection |
static class |
BaseBigtableInstanceAdminClient.ListAppProfilesPage |
static class |
BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse |
Modifier | Constructor and Description |
---|---|
protected |
BaseBigtableInstanceAdminClient(BaseBigtableInstanceAdminSettings settings)
Constructs an instance of BaseBigtableInstanceAdminClient, using the given settings.
|
protected |
BaseBigtableInstanceAdminClient(BigtableInstanceAdminStub stub) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static BaseBigtableInstanceAdminClient |
create()
Constructs an instance of BaseBigtableInstanceAdminClient with default settings.
|
static BaseBigtableInstanceAdminClient |
create(BaseBigtableInstanceAdminSettings settings)
Constructs an instance of BaseBigtableInstanceAdminClient, using the given settings.
|
static BaseBigtableInstanceAdminClient |
create(BigtableInstanceAdminStub stub)
Constructs an instance of BaseBigtableInstanceAdminClient, using the given stub for making
calls.
|
com.google.bigtable.admin.v2.AppProfile |
createAppProfile(com.google.bigtable.admin.v2.CreateAppProfileRequest request)
Creates an app profile within an instance.
|
com.google.bigtable.admin.v2.AppProfile |
createAppProfile(com.google.bigtable.admin.v2.InstanceName parent,
String appProfileId,
com.google.bigtable.admin.v2.AppProfile appProfile)
Creates an app profile within an instance.
|
com.google.bigtable.admin.v2.AppProfile |
createAppProfile(String parent,
String appProfileId,
com.google.bigtable.admin.v2.AppProfile appProfile)
Creates an app profile within an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.CreateAppProfileRequest,com.google.bigtable.admin.v2.AppProfile> |
createAppProfileCallable()
Creates an app profile within an instance.
|
OperationFuture<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.CreateClusterMetadata> |
createClusterAsync(com.google.bigtable.admin.v2.CreateClusterRequest request)
Creates a cluster within an instance.
|
OperationFuture<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.CreateClusterMetadata> |
createClusterAsync(com.google.bigtable.admin.v2.InstanceName parent,
String clusterId,
com.google.bigtable.admin.v2.Cluster cluster)
Creates a cluster within an instance.
|
OperationFuture<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.CreateClusterMetadata> |
createClusterAsync(String parent,
String clusterId,
com.google.bigtable.admin.v2.Cluster cluster)
Creates a cluster within an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.CreateClusterRequest,Operation> |
createClusterCallable()
Creates a cluster within an instance.
|
OperationCallable<com.google.bigtable.admin.v2.CreateClusterRequest,com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.CreateClusterMetadata> |
createClusterOperationCallable()
Creates a cluster within an instance.
|
OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.CreateInstanceMetadata> |
createInstanceAsync(com.google.bigtable.admin.v2.CreateInstanceRequest request)
Create an instance within a project.
|
OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.CreateInstanceMetadata> |
createInstanceAsync(com.google.bigtable.admin.v2.ProjectName parent,
String instanceId,
com.google.bigtable.admin.v2.Instance instance,
Map<String,com.google.bigtable.admin.v2.Cluster> clusters)
Create an instance within a project.
|
OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.CreateInstanceMetadata> |
createInstanceAsync(String parent,
String instanceId,
com.google.bigtable.admin.v2.Instance instance,
Map<String,com.google.bigtable.admin.v2.Cluster> clusters)
Create an instance within a project.
|
UnaryCallable<com.google.bigtable.admin.v2.CreateInstanceRequest,Operation> |
createInstanceCallable()
Create an instance within a project.
|
OperationCallable<com.google.bigtable.admin.v2.CreateInstanceRequest,com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.CreateInstanceMetadata> |
createInstanceOperationCallable()
Create an instance within a project.
|
void |
deleteAppProfile(com.google.bigtable.admin.v2.AppProfileName name)
Deletes an app profile from an instance.
|
void |
deleteAppProfile(com.google.bigtable.admin.v2.DeleteAppProfileRequest request)
Deletes an app profile from an instance.
|
void |
deleteAppProfile(String name)
Deletes an app profile from an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.DeleteAppProfileRequest,Empty> |
deleteAppProfileCallable()
Deletes an app profile from an instance.
|
void |
deleteCluster(com.google.bigtable.admin.v2.ClusterName name)
Deletes a cluster from an instance.
|
void |
deleteCluster(com.google.bigtable.admin.v2.DeleteClusterRequest request)
Deletes a cluster from an instance.
|
void |
deleteCluster(String name)
Deletes a cluster from an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.DeleteClusterRequest,Empty> |
deleteClusterCallable()
Deletes a cluster from an instance.
|
void |
deleteInstance(com.google.bigtable.admin.v2.DeleteInstanceRequest request)
Delete an instance from a project.
|
void |
deleteInstance(com.google.bigtable.admin.v2.InstanceName name)
Delete an instance from a project.
|
void |
deleteInstance(String name)
Delete an instance from a project.
|
UnaryCallable<com.google.bigtable.admin.v2.DeleteInstanceRequest,Empty> |
deleteInstanceCallable()
Delete an instance from a project.
|
com.google.bigtable.admin.v2.AppProfile |
getAppProfile(com.google.bigtable.admin.v2.AppProfileName name)
Gets information about an app profile.
|
com.google.bigtable.admin.v2.AppProfile |
getAppProfile(com.google.bigtable.admin.v2.GetAppProfileRequest request)
Gets information about an app profile.
|
com.google.bigtable.admin.v2.AppProfile |
getAppProfile(String name)
Gets information about an app profile.
|
UnaryCallable<com.google.bigtable.admin.v2.GetAppProfileRequest,com.google.bigtable.admin.v2.AppProfile> |
getAppProfileCallable()
Gets information about an app profile.
|
com.google.bigtable.admin.v2.Cluster |
getCluster(com.google.bigtable.admin.v2.ClusterName name)
Gets information about a cluster.
|
com.google.bigtable.admin.v2.Cluster |
getCluster(com.google.bigtable.admin.v2.GetClusterRequest request)
Gets information about a cluster.
|
com.google.bigtable.admin.v2.Cluster |
getCluster(String name)
Gets information about a cluster.
|
UnaryCallable<com.google.bigtable.admin.v2.GetClusterRequest,com.google.bigtable.admin.v2.Cluster> |
getClusterCallable()
Gets information about a cluster.
|
com.google.iam.v1.Policy |
getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Gets the access control policy for an instance resource.
|
com.google.iam.v1.Policy |
getIamPolicy(String resource)
Gets the access control policy for an instance resource.
|
UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> |
getIamPolicyCallable()
Gets the access control policy for an instance resource.
|
com.google.bigtable.admin.v2.Instance |
getInstance(com.google.bigtable.admin.v2.GetInstanceRequest request)
Gets information about an instance.
|
com.google.bigtable.admin.v2.Instance |
getInstance(com.google.bigtable.admin.v2.InstanceName name)
Gets information about an instance.
|
com.google.bigtable.admin.v2.Instance |
getInstance(String name)
Gets information about an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.GetInstanceRequest,com.google.bigtable.admin.v2.Instance> |
getInstanceCallable()
Gets information about an instance.
|
OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
BaseBigtableInstanceAdminSettings |
getSettings() |
BigtableInstanceAdminStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse |
listAppProfiles(com.google.bigtable.admin.v2.InstanceName parent)
Lists information about app profiles in an instance.
|
BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse |
listAppProfiles(com.google.bigtable.admin.v2.ListAppProfilesRequest request)
Lists information about app profiles in an instance.
|
BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse |
listAppProfiles(String parent)
Lists information about app profiles in an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.ListAppProfilesRequest,com.google.bigtable.admin.v2.ListAppProfilesResponse> |
listAppProfilesCallable()
Lists information about app profiles in an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.ListAppProfilesRequest,BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse> |
listAppProfilesPagedCallable()
Lists information about app profiles in an instance.
|
com.google.bigtable.admin.v2.ListClustersResponse |
listClusters(com.google.bigtable.admin.v2.InstanceName parent)
Lists information about clusters in an instance.
|
com.google.bigtable.admin.v2.ListClustersResponse |
listClusters(com.google.bigtable.admin.v2.ListClustersRequest request)
Lists information about clusters in an instance.
|
com.google.bigtable.admin.v2.ListClustersResponse |
listClusters(String parent)
Lists information about clusters in an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.ListClustersRequest,com.google.bigtable.admin.v2.ListClustersResponse> |
listClustersCallable()
Lists information about clusters in an instance.
|
com.google.bigtable.admin.v2.ListInstancesResponse |
listInstances(com.google.bigtable.admin.v2.ListInstancesRequest request)
Lists information about instances in a project.
|
com.google.bigtable.admin.v2.ListInstancesResponse |
listInstances(com.google.bigtable.admin.v2.ProjectName parent)
Lists information about instances in a project.
|
com.google.bigtable.admin.v2.ListInstancesResponse |
listInstances(String parent)
Lists information about instances in a project.
|
UnaryCallable<com.google.bigtable.admin.v2.ListInstancesRequest,com.google.bigtable.admin.v2.ListInstancesResponse> |
listInstancesCallable()
Lists information about instances in a project.
|
OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.UpdateInstanceMetadata> |
partialUpdateInstanceAsync(com.google.bigtable.admin.v2.Instance instance,
FieldMask updateMask)
Partially updates an instance within a project.
|
OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.UpdateInstanceMetadata> |
partialUpdateInstanceAsync(com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request)
Partially updates an instance within a project.
|
UnaryCallable<com.google.bigtable.admin.v2.PartialUpdateInstanceRequest,Operation> |
partialUpdateInstanceCallable()
Partially updates an instance within a project.
|
OperationCallable<com.google.bigtable.admin.v2.PartialUpdateInstanceRequest,com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.UpdateInstanceMetadata> |
partialUpdateInstanceOperationCallable()
Partially updates an instance within a project.
|
com.google.iam.v1.Policy |
setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sets the access control policy on an instance resource.
|
com.google.iam.v1.Policy |
setIamPolicy(String resource,
com.google.iam.v1.Policy policy)
Sets the access control policy on an instance resource.
|
UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> |
setIamPolicyCallable()
Sets the access control policy on an instance resource.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(String resource,
List<String> permissions)
Returns permissions that the caller has on the specified instance resource.
|
com.google.iam.v1.TestIamPermissionsResponse |
testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Returns permissions that the caller has on the specified instance resource.
|
UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> |
testIamPermissionsCallable()
Returns permissions that the caller has on the specified instance resource.
|
OperationFuture<com.google.bigtable.admin.v2.AppProfile,com.google.bigtable.admin.v2.UpdateAppProfileMetadata> |
updateAppProfileAsync(com.google.bigtable.admin.v2.AppProfile appProfile,
FieldMask updateMask)
Updates an app profile within an instance.
|
OperationFuture<com.google.bigtable.admin.v2.AppProfile,com.google.bigtable.admin.v2.UpdateAppProfileMetadata> |
updateAppProfileAsync(com.google.bigtable.admin.v2.UpdateAppProfileRequest request)
Updates an app profile within an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.UpdateAppProfileRequest,Operation> |
updateAppProfileCallable()
Updates an app profile within an instance.
|
OperationCallable<com.google.bigtable.admin.v2.UpdateAppProfileRequest,com.google.bigtable.admin.v2.AppProfile,com.google.bigtable.admin.v2.UpdateAppProfileMetadata> |
updateAppProfileOperationCallable()
Updates an app profile within an instance.
|
OperationFuture<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.UpdateClusterMetadata> |
updateClusterAsync(com.google.bigtable.admin.v2.Cluster request)
Updates a cluster within an instance.
|
UnaryCallable<com.google.bigtable.admin.v2.Cluster,Operation> |
updateClusterCallable()
Updates a cluster within an instance.
|
OperationCallable<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.UpdateClusterMetadata> |
updateClusterOperationCallable()
Updates a cluster within an instance.
|
protected BaseBigtableInstanceAdminClient(BaseBigtableInstanceAdminSettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") protected BaseBigtableInstanceAdminClient(BigtableInstanceAdminStub stub)
public static final BaseBigtableInstanceAdminClient create() throws IOException
IOException
public static final BaseBigtableInstanceAdminClient create(BaseBigtableInstanceAdminSettings settings) throws IOException
IOException
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public static final BaseBigtableInstanceAdminClient create(BigtableInstanceAdminStub stub)
public final BaseBigtableInstanceAdminSettings getSettings()
@BetaApi(value="A restructuring of stub classes is planned, so this may break in the future") public BigtableInstanceAdminStub getStub()
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationsClient getOperationsClient()
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.CreateInstanceMetadata> createInstanceAsync(com.google.bigtable.admin.v2.ProjectName parent, String instanceId, com.google.bigtable.admin.v2.Instance instance, Map<String,com.google.bigtable.admin.v2.Cluster> clusters)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String instanceId = "";
Instance instance = Instance.newBuilder().build();
Map<String, Cluster> clusters = new HashMap<>();
Instance response = baseBigtableInstanceAdminClient.createInstanceAsync(parent, instanceId, instance, clusters).get();
}
parent
- The unique name of the project in which to create the new instance. Values are of
the form `projects/<project>`.instanceId
- The ID to be used when referring to the new instance within its project,
e.g., just `myinstance` rather than `projects/myproject/instances/myinstance`.instance
- The instance to create. Fields marked `OutputOnly` must be left blank.clusters
- The clusters to be created within the instance, mapped by desired cluster ID,
e.g., just `mycluster` rather than
`projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly`
must be left blank. Currently, at most two clusters can be specified.ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.CreateInstanceMetadata> createInstanceAsync(String parent, String instanceId, com.google.bigtable.admin.v2.Instance instance, Map<String,com.google.bigtable.admin.v2.Cluster> clusters)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String instanceId = "";
Instance instance = Instance.newBuilder().build();
Map<String, Cluster> clusters = new HashMap<>();
Instance response = baseBigtableInstanceAdminClient.createInstanceAsync(parent.toString(), instanceId, instance, clusters).get();
}
parent
- The unique name of the project in which to create the new instance. Values are of
the form `projects/<project>`.instanceId
- The ID to be used when referring to the new instance within its project,
e.g., just `myinstance` rather than `projects/myproject/instances/myinstance`.instance
- The instance to create. Fields marked `OutputOnly` must be left blank.clusters
- The clusters to be created within the instance, mapped by desired cluster ID,
e.g., just `mycluster` rather than
`projects/myproject/instances/myinstance/clusters/mycluster`. Fields marked `OutputOnly`
must be left blank. Currently, at most two clusters can be specified.ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.CreateInstanceMetadata> createInstanceAsync(com.google.bigtable.admin.v2.CreateInstanceRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String instanceId = "";
Instance instance = Instance.newBuilder().build();
Map<String, Cluster> clusters = new HashMap<>();
CreateInstanceRequest request = CreateInstanceRequest.newBuilder()
.setParent(parent.toString())
.setInstanceId(instanceId)
.setInstance(instance)
.putAllClusters(clusters)
.build();
Instance response = baseBigtableInstanceAdminClient.createInstanceAsync(request).get();
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi(value="The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable<com.google.bigtable.admin.v2.CreateInstanceRequest,com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.CreateInstanceMetadata> createInstanceOperationCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String instanceId = "";
Instance instance = Instance.newBuilder().build();
Map<String, Cluster> clusters = new HashMap<>();
CreateInstanceRequest request = CreateInstanceRequest.newBuilder()
.setParent(parent.toString())
.setInstanceId(instanceId)
.setInstance(instance)
.putAllClusters(clusters)
.build();
OperationFuture<Instance, CreateInstanceMetadata> future = baseBigtableInstanceAdminClient.createInstanceOperationCallable().futureCall(request);
// Do something
Instance response = future.get();
}
public final UnaryCallable<com.google.bigtable.admin.v2.CreateInstanceRequest,Operation> createInstanceCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
String instanceId = "";
Instance instance = Instance.newBuilder().build();
Map<String, Cluster> clusters = new HashMap<>();
CreateInstanceRequest request = CreateInstanceRequest.newBuilder()
.setParent(parent.toString())
.setInstanceId(instanceId)
.setInstance(instance)
.putAllClusters(clusters)
.build();
ApiFuture<Operation> future = baseBigtableInstanceAdminClient.createInstanceCallable().futureCall(request);
// Do something
Operation response = future.get();
}
public final com.google.bigtable.admin.v2.Instance getInstance(com.google.bigtable.admin.v2.InstanceName name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
Instance response = baseBigtableInstanceAdminClient.getInstance(name);
}
name
- The unique name of the requested instance. Values are of the form
`projects/<project>/instances/<instance>`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.Instance getInstance(String name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
Instance response = baseBigtableInstanceAdminClient.getInstance(name.toString());
}
name
- The unique name of the requested instance. Values are of the form
`projects/<project>/instances/<instance>`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.Instance getInstance(com.google.bigtable.admin.v2.GetInstanceRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
GetInstanceRequest request = GetInstanceRequest.newBuilder()
.setName(name.toString())
.build();
Instance response = baseBigtableInstanceAdminClient.getInstance(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.GetInstanceRequest,com.google.bigtable.admin.v2.Instance> getInstanceCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
GetInstanceRequest request = GetInstanceRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Instance> future = baseBigtableInstanceAdminClient.getInstanceCallable().futureCall(request);
// Do something
Instance response = future.get();
}
public final com.google.bigtable.admin.v2.ListInstancesResponse listInstances(com.google.bigtable.admin.v2.ProjectName parent)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListInstancesResponse response = baseBigtableInstanceAdminClient.listInstances(parent);
}
parent
- The unique name of the project for which a list of instances is requested. Values
are of the form `projects/<project>`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.ListInstancesResponse listInstances(String parent)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListInstancesResponse response = baseBigtableInstanceAdminClient.listInstances(parent.toString());
}
parent
- The unique name of the project for which a list of instances is requested. Values
are of the form `projects/<project>`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.ListInstancesResponse listInstances(com.google.bigtable.admin.v2.ListInstancesRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListInstancesRequest request = ListInstancesRequest.newBuilder()
.setParent(parent.toString())
.build();
ListInstancesResponse response = baseBigtableInstanceAdminClient.listInstances(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.ListInstancesRequest,com.google.bigtable.admin.v2.ListInstancesResponse> listInstancesCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ProjectName parent = ProjectName.of("[PROJECT]");
ListInstancesRequest request = ListInstancesRequest.newBuilder()
.setParent(parent.toString())
.build();
ApiFuture<ListInstancesResponse> future = baseBigtableInstanceAdminClient.listInstancesCallable().futureCall(request);
// Do something
ListInstancesResponse response = future.get();
}
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.UpdateInstanceMetadata> partialUpdateInstanceAsync(com.google.bigtable.admin.v2.Instance instance, FieldMask updateMask)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
Instance instance = Instance.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Instance response = baseBigtableInstanceAdminClient.partialUpdateInstanceAsync(instance, updateMask).get();
}
instance
- The Instance which will (partially) replace the current value.updateMask
- The subset of Instance fields which should be replaced. Must be explicitly
set.ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.UpdateInstanceMetadata> partialUpdateInstanceAsync(com.google.bigtable.admin.v2.PartialUpdateInstanceRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
Instance instance = Instance.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
PartialUpdateInstanceRequest request = PartialUpdateInstanceRequest.newBuilder()
.setInstance(instance)
.setUpdateMask(updateMask)
.build();
Instance response = baseBigtableInstanceAdminClient.partialUpdateInstanceAsync(request).get();
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi(value="The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable<com.google.bigtable.admin.v2.PartialUpdateInstanceRequest,com.google.bigtable.admin.v2.Instance,com.google.bigtable.admin.v2.UpdateInstanceMetadata> partialUpdateInstanceOperationCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
Instance instance = Instance.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
PartialUpdateInstanceRequest request = PartialUpdateInstanceRequest.newBuilder()
.setInstance(instance)
.setUpdateMask(updateMask)
.build();
OperationFuture<Instance, UpdateInstanceMetadata> future = baseBigtableInstanceAdminClient.partialUpdateInstanceOperationCallable().futureCall(request);
// Do something
Instance response = future.get();
}
public final UnaryCallable<com.google.bigtable.admin.v2.PartialUpdateInstanceRequest,Operation> partialUpdateInstanceCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
Instance instance = Instance.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
PartialUpdateInstanceRequest request = PartialUpdateInstanceRequest.newBuilder()
.setInstance(instance)
.setUpdateMask(updateMask)
.build();
ApiFuture<Operation> future = baseBigtableInstanceAdminClient.partialUpdateInstanceCallable().futureCall(request);
// Do something
Operation response = future.get();
}
public final void deleteInstance(com.google.bigtable.admin.v2.InstanceName name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
baseBigtableInstanceAdminClient.deleteInstance(name);
}
name
- The unique name of the instance to be deleted. Values are of the form
`projects/<project>/instances/<instance>`.ApiException
- if the remote call failspublic final void deleteInstance(String name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
baseBigtableInstanceAdminClient.deleteInstance(name.toString());
}
name
- The unique name of the instance to be deleted. Values are of the form
`projects/<project>/instances/<instance>`.ApiException
- if the remote call failspublic final void deleteInstance(com.google.bigtable.admin.v2.DeleteInstanceRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder()
.setName(name.toString())
.build();
baseBigtableInstanceAdminClient.deleteInstance(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.DeleteInstanceRequest,Empty> deleteInstanceCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName name = InstanceName.of("[PROJECT]", "[INSTANCE]");
DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Void> future = baseBigtableInstanceAdminClient.deleteInstanceCallable().futureCall(request);
// Do something
future.get();
}
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.CreateClusterMetadata> createClusterAsync(com.google.bigtable.admin.v2.InstanceName parent, String clusterId, com.google.bigtable.admin.v2.Cluster cluster)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String clusterId = "";
Cluster cluster = Cluster.newBuilder().build();
Cluster response = baseBigtableInstanceAdminClient.createClusterAsync(parent, clusterId, cluster).get();
}
parent
- The unique name of the instance in which to create the new cluster. Values are of
the form `projects/<project>/instances/<instance>`.clusterId
- The ID to be used when referring to the new cluster within its instance, e.g.,
just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`.cluster
- The cluster to be created. Fields marked `OutputOnly` must be left blank.ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.CreateClusterMetadata> createClusterAsync(String parent, String clusterId, com.google.bigtable.admin.v2.Cluster cluster)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String clusterId = "";
Cluster cluster = Cluster.newBuilder().build();
Cluster response = baseBigtableInstanceAdminClient.createClusterAsync(parent.toString(), clusterId, cluster).get();
}
parent
- The unique name of the instance in which to create the new cluster. Values are of
the form `projects/<project>/instances/<instance>`.clusterId
- The ID to be used when referring to the new cluster within its instance, e.g.,
just `mycluster` rather than `projects/myproject/instances/myinstance/clusters/mycluster`.cluster
- The cluster to be created. Fields marked `OutputOnly` must be left blank.ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.CreateClusterMetadata> createClusterAsync(com.google.bigtable.admin.v2.CreateClusterRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String clusterId = "";
Cluster cluster = Cluster.newBuilder().build();
CreateClusterRequest request = CreateClusterRequest.newBuilder()
.setParent(parent.toString())
.setClusterId(clusterId)
.setCluster(cluster)
.build();
Cluster response = baseBigtableInstanceAdminClient.createClusterAsync(request).get();
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi(value="The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable<com.google.bigtable.admin.v2.CreateClusterRequest,com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.CreateClusterMetadata> createClusterOperationCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String clusterId = "";
Cluster cluster = Cluster.newBuilder().build();
CreateClusterRequest request = CreateClusterRequest.newBuilder()
.setParent(parent.toString())
.setClusterId(clusterId)
.setCluster(cluster)
.build();
OperationFuture<Cluster, CreateClusterMetadata> future = baseBigtableInstanceAdminClient.createClusterOperationCallable().futureCall(request);
// Do something
Cluster response = future.get();
}
public final UnaryCallable<com.google.bigtable.admin.v2.CreateClusterRequest,Operation> createClusterCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String clusterId = "";
Cluster cluster = Cluster.newBuilder().build();
CreateClusterRequest request = CreateClusterRequest.newBuilder()
.setParent(parent.toString())
.setClusterId(clusterId)
.setCluster(cluster)
.build();
ApiFuture<Operation> future = baseBigtableInstanceAdminClient.createClusterCallable().futureCall(request);
// Do something
Operation response = future.get();
}
public final com.google.bigtable.admin.v2.Cluster getCluster(com.google.bigtable.admin.v2.ClusterName name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
Cluster response = baseBigtableInstanceAdminClient.getCluster(name);
}
name
- The unique name of the requested cluster. Values are of the form
`projects/<project>/instances/<instance>/clusters/<cluster>`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.Cluster getCluster(String name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
Cluster response = baseBigtableInstanceAdminClient.getCluster(name.toString());
}
name
- The unique name of the requested cluster. Values are of the form
`projects/<project>/instances/<instance>/clusters/<cluster>`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.Cluster getCluster(com.google.bigtable.admin.v2.GetClusterRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
GetClusterRequest request = GetClusterRequest.newBuilder()
.setName(name.toString())
.build();
Cluster response = baseBigtableInstanceAdminClient.getCluster(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.GetClusterRequest,com.google.bigtable.admin.v2.Cluster> getClusterCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
GetClusterRequest request = GetClusterRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Cluster> future = baseBigtableInstanceAdminClient.getClusterCallable().futureCall(request);
// Do something
Cluster response = future.get();
}
public final com.google.bigtable.admin.v2.ListClustersResponse listClusters(com.google.bigtable.admin.v2.InstanceName parent)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
ListClustersResponse response = baseBigtableInstanceAdminClient.listClusters(parent);
}
parent
- The unique name of the instance for which a list of clusters is requested. Values
are of the form `projects/<project>/instances/<instance>`. Use
`<instance> = '-'` to list Clusters for all Instances in a project, e.g.,
`projects/myproject/instances/-`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.ListClustersResponse listClusters(String parent)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
ListClustersResponse response = baseBigtableInstanceAdminClient.listClusters(parent.toString());
}
parent
- The unique name of the instance for which a list of clusters is requested. Values
are of the form `projects/<project>/instances/<instance>`. Use
`<instance> = '-'` to list Clusters for all Instances in a project, e.g.,
`projects/myproject/instances/-`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.ListClustersResponse listClusters(com.google.bigtable.admin.v2.ListClustersRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
ListClustersRequest request = ListClustersRequest.newBuilder()
.setParent(parent.toString())
.build();
ListClustersResponse response = baseBigtableInstanceAdminClient.listClusters(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.ListClustersRequest,com.google.bigtable.admin.v2.ListClustersResponse> listClustersCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
ListClustersRequest request = ListClustersRequest.newBuilder()
.setParent(parent.toString())
.build();
ApiFuture<ListClustersResponse> future = baseBigtableInstanceAdminClient.listClustersCallable().futureCall(request);
// Do something
ListClustersResponse response = future.get();
}
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.UpdateClusterMetadata> updateClusterAsync(com.google.bigtable.admin.v2.Cluster request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
int serveNodes = 0;
Cluster request = Cluster.newBuilder()
.setName(name.toString())
.setServeNodes(serveNodes)
.build();
Cluster response = baseBigtableInstanceAdminClient.updateClusterAsync(request).get();
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi(value="The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable<com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.Cluster,com.google.bigtable.admin.v2.UpdateClusterMetadata> updateClusterOperationCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
int serveNodes = 0;
Cluster request = Cluster.newBuilder()
.setName(name.toString())
.setServeNodes(serveNodes)
.build();
OperationFuture<Cluster, UpdateClusterMetadata> future = baseBigtableInstanceAdminClient.updateClusterOperationCallable().futureCall(request);
// Do something
Cluster response = future.get();
}
public final UnaryCallable<com.google.bigtable.admin.v2.Cluster,Operation> updateClusterCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
int serveNodes = 0;
Cluster request = Cluster.newBuilder()
.setName(name.toString())
.setServeNodes(serveNodes)
.build();
ApiFuture<Operation> future = baseBigtableInstanceAdminClient.updateClusterCallable().futureCall(request);
// Do something
Operation response = future.get();
}
public final void deleteCluster(com.google.bigtable.admin.v2.ClusterName name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
baseBigtableInstanceAdminClient.deleteCluster(name);
}
name
- The unique name of the cluster to be deleted. Values are of the form
`projects/<project>/instances/<instance>/clusters/<cluster>`.ApiException
- if the remote call failspublic final void deleteCluster(String name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
baseBigtableInstanceAdminClient.deleteCluster(name.toString());
}
name
- The unique name of the cluster to be deleted. Values are of the form
`projects/<project>/instances/<instance>/clusters/<cluster>`.ApiException
- if the remote call failspublic final void deleteCluster(com.google.bigtable.admin.v2.DeleteClusterRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
.setName(name.toString())
.build();
baseBigtableInstanceAdminClient.deleteCluster(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.DeleteClusterRequest,Empty> deleteClusterCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
ClusterName name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]");
DeleteClusterRequest request = DeleteClusterRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<Void> future = baseBigtableInstanceAdminClient.deleteClusterCallable().futureCall(request);
// Do something
future.get();
}
public final com.google.bigtable.admin.v2.AppProfile createAppProfile(com.google.bigtable.admin.v2.InstanceName parent, String appProfileId, com.google.bigtable.admin.v2.AppProfile appProfile)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String appProfileId = "";
AppProfile appProfile = AppProfile.newBuilder().build();
AppProfile response = baseBigtableInstanceAdminClient.createAppProfile(parent, appProfileId, appProfile);
}
parent
- The unique name of the instance in which to create the new app profile. Values
are of the form `projects/<project>/instances/<instance>`.appProfileId
- The ID to be used when referring to the new app profile within its
instance, e.g., just `myprofile` rather than
`projects/myproject/instances/myinstance/appProfiles/myprofile`.appProfile
- The app profile to be created. Fields marked `OutputOnly` will be ignored.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.AppProfile createAppProfile(String parent, String appProfileId, com.google.bigtable.admin.v2.AppProfile appProfile)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String appProfileId = "";
AppProfile appProfile = AppProfile.newBuilder().build();
AppProfile response = baseBigtableInstanceAdminClient.createAppProfile(parent.toString(), appProfileId, appProfile);
}
parent
- The unique name of the instance in which to create the new app profile. Values
are of the form `projects/<project>/instances/<instance>`.appProfileId
- The ID to be used when referring to the new app profile within its
instance, e.g., just `myprofile` rather than
`projects/myproject/instances/myinstance/appProfiles/myprofile`.appProfile
- The app profile to be created. Fields marked `OutputOnly` will be ignored.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.AppProfile createAppProfile(com.google.bigtable.admin.v2.CreateAppProfileRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String appProfileId = "";
AppProfile appProfile = AppProfile.newBuilder().build();
CreateAppProfileRequest request = CreateAppProfileRequest.newBuilder()
.setParent(parent.toString())
.setAppProfileId(appProfileId)
.setAppProfile(appProfile)
.build();
AppProfile response = baseBigtableInstanceAdminClient.createAppProfile(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.CreateAppProfileRequest,com.google.bigtable.admin.v2.AppProfile> createAppProfileCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
String appProfileId = "";
AppProfile appProfile = AppProfile.newBuilder().build();
CreateAppProfileRequest request = CreateAppProfileRequest.newBuilder()
.setParent(parent.toString())
.setAppProfileId(appProfileId)
.setAppProfile(appProfile)
.build();
ApiFuture<AppProfile> future = baseBigtableInstanceAdminClient.createAppProfileCallable().futureCall(request);
// Do something
AppProfile response = future.get();
}
public final com.google.bigtable.admin.v2.AppProfile getAppProfile(com.google.bigtable.admin.v2.AppProfileName name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
AppProfile response = baseBigtableInstanceAdminClient.getAppProfile(name);
}
name
- The unique name of the requested app profile. Values are of the form
`projects/<project>/instances/<instance>/appProfiles/<app_profile>`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.AppProfile getAppProfile(String name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
AppProfile response = baseBigtableInstanceAdminClient.getAppProfile(name.toString());
}
name
- The unique name of the requested app profile. Values are of the form
`projects/<project>/instances/<instance>/appProfiles/<app_profile>`.ApiException
- if the remote call failspublic final com.google.bigtable.admin.v2.AppProfile getAppProfile(com.google.bigtable.admin.v2.GetAppProfileRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
GetAppProfileRequest request = GetAppProfileRequest.newBuilder()
.setName(name.toString())
.build();
AppProfile response = baseBigtableInstanceAdminClient.getAppProfile(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.GetAppProfileRequest,com.google.bigtable.admin.v2.AppProfile> getAppProfileCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
GetAppProfileRequest request = GetAppProfileRequest.newBuilder()
.setName(name.toString())
.build();
ApiFuture<AppProfile> future = baseBigtableInstanceAdminClient.getAppProfileCallable().futureCall(request);
// Do something
AppProfile response = future.get();
}
public final BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse listAppProfiles(com.google.bigtable.admin.v2.InstanceName parent)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
for (AppProfile element : baseBigtableInstanceAdminClient.listAppProfiles(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent
- The unique name of the instance for which a list of app profiles is requested.
Values are of the form `projects/<project>/instances/<instance>`. Use
`<instance> = '-'` to list AppProfiles for all Instances in a project, e.g.,
`projects/myproject/instances/-`.ApiException
- if the remote call failspublic final BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse listAppProfiles(String parent)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
for (AppProfile element : baseBigtableInstanceAdminClient.listAppProfiles(parent.toString()).iterateAll()) {
// doThingsWith(element);
}
}
parent
- The unique name of the instance for which a list of app profiles is requested.
Values are of the form `projects/<project>/instances/<instance>`. Use
`<instance> = '-'` to list AppProfiles for all Instances in a project, e.g.,
`projects/myproject/instances/-`.ApiException
- if the remote call failspublic final BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse listAppProfiles(com.google.bigtable.admin.v2.ListAppProfilesRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
ListAppProfilesRequest request = ListAppProfilesRequest.newBuilder()
.setParent(parent.toString())
.build();
for (AppProfile element : baseBigtableInstanceAdminClient.listAppProfiles(request).iterateAll()) {
// doThingsWith(element);
}
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.ListAppProfilesRequest,BaseBigtableInstanceAdminClient.ListAppProfilesPagedResponse> listAppProfilesPagedCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
ListAppProfilesRequest request = ListAppProfilesRequest.newBuilder()
.setParent(parent.toString())
.build();
ApiFuture<ListAppProfilesPagedResponse> future = baseBigtableInstanceAdminClient.listAppProfilesPagedCallable().futureCall(request);
// Do something
for (AppProfile element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final UnaryCallable<com.google.bigtable.admin.v2.ListAppProfilesRequest,com.google.bigtable.admin.v2.ListAppProfilesResponse> listAppProfilesCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
InstanceName parent = InstanceName.of("[PROJECT]", "[INSTANCE]");
ListAppProfilesRequest request = ListAppProfilesRequest.newBuilder()
.setParent(parent.toString())
.build();
while (true) {
ListAppProfilesResponse response = baseBigtableInstanceAdminClient.listAppProfilesCallable().call(request);
for (AppProfile element : response.getAppProfilesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.AppProfile,com.google.bigtable.admin.v2.UpdateAppProfileMetadata> updateAppProfileAsync(com.google.bigtable.admin.v2.AppProfile appProfile, FieldMask updateMask)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfile appProfile = AppProfile.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AppProfile response = baseBigtableInstanceAdminClient.updateAppProfileAsync(appProfile, updateMask).get();
}
appProfile
- The app profile which will (partially) replace the current value.updateMask
- The subset of app profile fields which should be replaced. If unset, all
fields will be replaced.ApiException
- if the remote call fails@BetaApi(value="The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<com.google.bigtable.admin.v2.AppProfile,com.google.bigtable.admin.v2.UpdateAppProfileMetadata> updateAppProfileAsync(com.google.bigtable.admin.v2.UpdateAppProfileRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfile appProfile = AppProfile.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
UpdateAppProfileRequest request = UpdateAppProfileRequest.newBuilder()
.setAppProfile(appProfile)
.setUpdateMask(updateMask)
.build();
AppProfile response = baseBigtableInstanceAdminClient.updateAppProfileAsync(request).get();
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call fails@BetaApi(value="The surface for use by generated code is not stable yet and may change in the future.") public final OperationCallable<com.google.bigtable.admin.v2.UpdateAppProfileRequest,com.google.bigtable.admin.v2.AppProfile,com.google.bigtable.admin.v2.UpdateAppProfileMetadata> updateAppProfileOperationCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfile appProfile = AppProfile.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
UpdateAppProfileRequest request = UpdateAppProfileRequest.newBuilder()
.setAppProfile(appProfile)
.setUpdateMask(updateMask)
.build();
OperationFuture<AppProfile, UpdateAppProfileMetadata> future = baseBigtableInstanceAdminClient.updateAppProfileOperationCallable().futureCall(request);
// Do something
AppProfile response = future.get();
}
public final UnaryCallable<com.google.bigtable.admin.v2.UpdateAppProfileRequest,Operation> updateAppProfileCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfile appProfile = AppProfile.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
UpdateAppProfileRequest request = UpdateAppProfileRequest.newBuilder()
.setAppProfile(appProfile)
.setUpdateMask(updateMask)
.build();
ApiFuture<Operation> future = baseBigtableInstanceAdminClient.updateAppProfileCallable().futureCall(request);
// Do something
Operation response = future.get();
}
public final void deleteAppProfile(com.google.bigtable.admin.v2.AppProfileName name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
baseBigtableInstanceAdminClient.deleteAppProfile(name);
}
name
- The unique name of the app profile to be deleted. Values are of the form
`projects/<project>/instances/<instance>/appProfiles/<app_profile>`.ApiException
- if the remote call failspublic final void deleteAppProfile(String name)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
baseBigtableInstanceAdminClient.deleteAppProfile(name.toString());
}
name
- The unique name of the app profile to be deleted. Values are of the form
`projects/<project>/instances/<instance>/appProfiles/<app_profile>`.ApiException
- if the remote call failspublic final void deleteAppProfile(com.google.bigtable.admin.v2.DeleteAppProfileRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
boolean ignoreWarnings = false;
DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder()
.setName(name.toString())
.setIgnoreWarnings(ignoreWarnings)
.build();
baseBigtableInstanceAdminClient.deleteAppProfile(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.bigtable.admin.v2.DeleteAppProfileRequest,Empty> deleteAppProfileCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
AppProfileName name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]");
boolean ignoreWarnings = false;
DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder()
.setName(name.toString())
.setIgnoreWarnings(ignoreWarnings)
.build();
ApiFuture<Void> future = baseBigtableInstanceAdminClient.deleteAppProfileCallable().futureCall(request);
// Do something
future.get();
}
public final com.google.iam.v1.Policy getIamPolicy(String resource)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
Policy response = baseBigtableInstanceAdminClient.getIamPolicy(formattedResource);
}
resource
- REQUIRED: The resource for which the policy is being requested. `resource` is
usually specified as a path. For example, a Project resource is specified as
`projects/{project}`.ApiException
- if the remote call failspublic final com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
.setResource(formattedResource)
.build();
Policy response = baseBigtableInstanceAdminClient.getIamPolicy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy> getIamPolicyCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
.setResource(formattedResource)
.build();
ApiFuture<Policy> future = baseBigtableInstanceAdminClient.getIamPolicyCallable().futureCall(request);
// Do something
Policy response = future.get();
}
public final com.google.iam.v1.Policy setIamPolicy(String resource, com.google.iam.v1.Policy policy)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
Policy policy = Policy.newBuilder().build();
Policy response = baseBigtableInstanceAdminClient.setIamPolicy(formattedResource, policy);
}
resource
- REQUIRED: The resource for which the policy is being specified. `resource` is
usually specified as a path. For example, a Project resource is specified as
`projects/{project}`.policy
- REQUIRED: The complete policy to be applied to the `resource`. The size of the
policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
Platform services (such as Projects) might reject them.ApiException
- if the remote call failspublic final com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
Policy policy = Policy.newBuilder().build();
SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
.setResource(formattedResource)
.setPolicy(policy)
.build();
Policy response = baseBigtableInstanceAdminClient.setIamPolicy(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy> setIamPolicyCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
Policy policy = Policy.newBuilder().build();
SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
.setResource(formattedResource)
.setPolicy(policy)
.build();
ApiFuture<Policy> future = baseBigtableInstanceAdminClient.setIamPolicyCallable().futureCall(request);
// Do something
Policy response = future.get();
}
public final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(String resource, List<String> permissions)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
List<String> permissions = new ArrayList<>();
TestIamPermissionsResponse response = baseBigtableInstanceAdminClient.testIamPermissions(formattedResource, permissions);
}
resource
- REQUIRED: The resource for which the policy detail is being requested.
`resource` is usually specified as a path. For example, a Project resource is specified as
`projects/{project}`.permissions
- The set of permissions to check for the `resource`. Permissions with
wildcards (such as '*' or 'storage.*') are not allowed. For more information see
[IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).ApiException
- if the remote call failspublic final com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request)
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
List<String> permissions = new ArrayList<>();
TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
.setResource(formattedResource)
.addAllPermissions(permissions)
.build();
TestIamPermissionsResponse response = baseBigtableInstanceAdminClient.testIamPermissions(request);
}
request
- The request object containing all of the parameters for the API call.ApiException
- if the remote call failspublic final UnaryCallable<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse> testIamPermissionsCallable()
Sample code:
try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient.create()) {
String formattedResource = InstanceName.format("[PROJECT]", "[INSTANCE]");
List<String> permissions = new ArrayList<>();
TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
.setResource(formattedResource)
.addAllPermissions(permissions)
.build();
ApiFuture<TestIamPermissionsResponse> future = baseBigtableInstanceAdminClient.testIamPermissionsCallable().futureCall(request);
// Do something
TestIamPermissionsResponse response = future.get();
}
public final void close()
close
in interface AutoCloseable
public void shutdown()
shutdown
in interface BackgroundResource
public boolean isShutdown()
isShutdown
in interface BackgroundResource
public boolean isTerminated()
isTerminated
in interface BackgroundResource
public void shutdownNow()
shutdownNow
in interface BackgroundResource
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
awaitTermination
in interface BackgroundResource
InterruptedException
Copyright © 2019 Google LLC. All rights reserved.