use of com.google.bigtable.admin.v2.Instance in project java-bigtable by googleapis.
the class BaseBigtableInstanceAdminClient method deleteInstance.
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Delete an instance from a project.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
* BaseBigtableInstanceAdminClient.create()) {
* String name = InstanceName.of("[PROJECT]", "[INSTANCE]").toString();
* baseBigtableInstanceAdminClient.deleteInstance(name);
* }
* }</pre>
*
* @param name Required. The unique name of the instance to be deleted. Values are of the form
* `projects/{project}/instances/{instance}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteInstance(String name) {
DeleteInstanceRequest request = DeleteInstanceRequest.newBuilder().setName(name).build();
deleteInstance(request);
}
use of com.google.bigtable.admin.v2.Instance in project java-bigtable by googleapis.
the class BaseBigtableInstanceAdminClient method deleteCluster.
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a cluster from an instance.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
* BaseBigtableInstanceAdminClient.create()) {
* String name = ClusterName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]").toString();
* baseBigtableInstanceAdminClient.deleteCluster(name);
* }
* }</pre>
*
* @param name Required. The unique name of the cluster to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteCluster(String name) {
DeleteClusterRequest request = DeleteClusterRequest.newBuilder().setName(name).build();
deleteCluster(request);
}
use of com.google.bigtable.admin.v2.Instance in project java-bigtable by googleapis.
the class BaseBigtableInstanceAdminClient method deleteAppProfile.
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes an app profile from an instance.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient =
* BaseBigtableInstanceAdminClient.create()) {
* String name = AppProfileName.of("[PROJECT]", "[INSTANCE]", "[APP_PROFILE]").toString();
* baseBigtableInstanceAdminClient.deleteAppProfile(name);
* }
* }</pre>
*
* @param name Required. The unique name of the app profile to be deleted. Values are of the form
* `projects/{project}/instances/{instance}/appProfiles/{app_profile}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteAppProfile(String name) {
DeleteAppProfileRequest request = DeleteAppProfileRequest.newBuilder().setName(name).build();
deleteAppProfile(request);
}
use of com.google.bigtable.admin.v2.Instance in project java-bigtable by googleapis.
the class BaseBigtableTableAdminClient method deleteBackup.
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a pending or completed Cloud Bigtable backup.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
* BaseBigtableTableAdminClient.create()) {
* BackupName name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]");
* baseBigtableTableAdminClient.deleteBackup(name);
* }
* }</pre>
*
* @param name Required. Name of the backup to delete. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteBackup(BackupName name) {
DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
deleteBackup(request);
}
use of com.google.bigtable.admin.v2.Instance in project java-bigtable by googleapis.
the class BaseBigtableTableAdminClient method deleteBackup.
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Deletes a pending or completed Cloud Bigtable backup.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet has been automatically generated for illustrative purposes only.
* // It may require modifications to work in your environment.
* try (BaseBigtableTableAdminClient baseBigtableTableAdminClient =
* BaseBigtableTableAdminClient.create()) {
* String name = BackupName.of("[PROJECT]", "[INSTANCE]", "[CLUSTER]", "[BACKUP]").toString();
* baseBigtableTableAdminClient.deleteBackup(name);
* }
* }</pre>
*
* @param name Required. Name of the backup to delete. Values are of the form
* `projects/{project}/instances/{instance}/clusters/{cluster}/backups/{backup}`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final void deleteBackup(String name) {
DeleteBackupRequest request = DeleteBackupRequest.newBuilder().setName(name).build();
deleteBackup(request);
}
Aggregations