The BackupDR Service v1
Package
@google-cloud/backupdrConstructors
(constructor)(opts, gaxInstance)
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);Construct an instance of BackupDRClient.
| Parameters | |
|---|---|
| Name | Description |
opts |
ClientOptions
|
gaxInstance |
typeof gax | typeof fallback
: loaded instance of |
Properties
apiEndpoint
get apiEndpoint(): string;The DNS address for this API service.
apiEndpoint
static get apiEndpoint(): string;The DNS address for this API service - same as servicePath.
auth
auth: gax.GoogleAuth;backupDRStub
backupDRStub?: Promise<{
[name: string]: Function;
}>;descriptors
descriptors: Descriptors;iamClient
iamClient: IamClient;innerApiCalls
innerApiCalls: {
[name: string]: Function;
};locationsClient
locationsClient: LocationsClient;operationsClient
operationsClient: gax.OperationsClient;pathTemplates
pathTemplates: {
[name: string]: gax.PathTemplate;
};port
static get port(): number;The port for this API service.
scopes
static get scopes(): string[];The scopes needed to make gRPC calls for every method defined in this service.
servicePath
static get servicePath(): string;The DNS address for this API service.
universeDomain
get universeDomain(): string;warn
warn: (code: string, message: string, warnType?: string) => void;Methods
backupPath(project, location, backupvault, datasource, backup)
backupPath(project: string, location: string, backupvault: string, datasource: string, backup: string): string;Return a fully-qualified backup resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupvault |
string
|
datasource |
string
|
backup |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
backupPlanAssociationPath(project, location, backupPlanAssociation)
backupPlanAssociationPath(project: string, location: string, backupPlanAssociation: string): string;Return a fully-qualified backupPlanAssociation resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupPlanAssociation |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
backupPlanPath(project, location, backupPlan)
backupPlanPath(project: string, location: string, backupPlan: string): string;Return a fully-qualified backupPlan resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupPlan |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
backupPlanRevisionPath(project, location, backupPlan, revision)
backupPlanRevisionPath(project: string, location: string, backupPlan: string, revision: string): string;Return a fully-qualified backupPlanRevision resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupPlan |
string
|
revision |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
backupVaultPath(project, location, backupvault)
backupVaultPath(project: string, location: string, backupvault: string): string;Return a fully-qualified backupVault resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupvault |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
cancelOperation(request, optionsOrCallback, callback)
cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.
| Parameters | |
|---|---|
| Name | Description |
request |
CancelOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
|
callback |
Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
checkCreateBackupPlanAssociationProgress(name)
checkCreateBackupPlanAssociationProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlanAssociation, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by createBackupPlanAssociation().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlanAssociation, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The backup plan association project and location in the format
* `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
* map to GCP regions, for example **us-central1**.
*/
// const parent = 'abc123'
/**
* Required. The name of the backup plan association to create. The name must
* be unique for the specified project and location.
*/
// const backupPlanAssociationId = 'abc123'
/**
* Required. The resource being created
*/
// const backupPlanAssociation = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callCreateBackupPlanAssociation() {
// Construct request
const request = {
parent,
backupPlanAssociationId,
backupPlanAssociation,
};
// Run request
const [operation] = await backupdrClient.createBackupPlanAssociation(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateBackupPlanAssociation();
checkCreateBackupPlanProgress(name)
checkCreateBackupPlanProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlan, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by createBackupPlan().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlan, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The `BackupPlan` project and location in the format
* `projects/{project}/locations/{location}`. In Cloud BackupDR locations
* map to GCP regions, for example **us-central1**.
*/
// const parent = 'abc123'
/**
* Required. The name of the `BackupPlan` to create. The name must be unique
* for the specified project and location.The name must start with a lowercase
* letter followed by up to 62 lowercase letters, numbers, or hyphens.
* Pattern, /[a-z][a-z0-9-]{,62}/.
*/
// const backupPlanId = 'abc123'
/**
* Required. The `BackupPlan` resource object to create.
*/
// const backupPlan = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callCreateBackupPlan() {
// Construct request
const request = {
parent,
backupPlanId,
backupPlan,
};
// Run request
const [operation] = await backupdrClient.createBackupPlan(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateBackupPlan();
checkCreateBackupVaultProgress(name)
checkCreateBackupVaultProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.BackupVault, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by createBackupVault().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.BackupVault, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Value for parent.
*/
// const parent = 'abc123'
/**
* Required. ID of the requesting object
* If auto-generating ID server-side, remove this field and
* backup_vault_id from the method_signature of Create RPC
*/
// const backupVaultId = 'abc123'
/**
* Required. The resource being created
*/
// const backupVault = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. Only validate the request, but do not perform mutations.
* The default is 'false'.
*/
// const validateOnly = true
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callCreateBackupVault() {
// Construct request
const request = {
parent,
backupVaultId,
backupVault,
};
// Run request
const [operation] = await backupdrClient.createBackupVault(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateBackupVault();
checkCreateManagementServerProgress(name)
checkCreateManagementServerProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.ManagementServer, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by createManagementServer().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.ManagementServer, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The management server project and location in the format
* 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
* locations map to Google Cloud regions, for example **us-central1**.
*/
// const parent = 'abc123'
/**
* Required. The name of the management server to create. The name must be
* unique for the specified project and location.
*/
// const managementServerId = 'abc123'
/**
* Required. A management server
* resource google.cloud.backupdr.v1.ManagementServer
*/
// const managementServer = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callCreateManagementServer() {
// Construct request
const request = {
parent,
managementServerId,
managementServer,
};
// Run request
const [operation] = await backupdrClient.createManagementServer(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateManagementServer();
checkDeleteBackupPlanAssociationProgress(name)
checkDeleteBackupPlanAssociationProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteBackupPlanAssociation().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the backup plan association resource, in the format
* `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteBackupPlanAssociation() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteBackupPlanAssociation(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackupPlanAssociation();
checkDeleteBackupPlanProgress(name)
checkDeleteBackupPlanProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteBackupPlan().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the `BackupPlan` to delete.
* Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteBackupPlan() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteBackupPlan(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackupPlan();
checkDeleteBackupProgress(name)
checkDeleteBackupProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.Backup, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteBackup().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.Backup, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the resource.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackup();
checkDeleteBackupVaultProgress(name)
checkDeleteBackupVaultProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteBackupVault().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the resource.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. If set to true, any data source from this backup vault will also
* be deleted.
*/
// const force = true
/**
* The current etag of the backup vault.
* If an etag is provided and does not match the current etag of the
* connection, deletion will be blocked.
*/
// const etag = 'abc123'
/**
* Optional. Only validate the request, but do not perform mutations.
* The default is 'false'.
*/
// const validateOnly = true
/**
* Optional. If true and the BackupVault is not found, the request will
* succeed but no action will be taken.
*/
// const allowMissing = true
/**
* Optional. If set to true, backupvault deletion will proceed even if there
* are backup plans referencing the backupvault. The default is 'false'.
*/
// const ignoreBackupPlanReferences = true
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteBackupVault() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteBackupVault(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackupVault();
checkDeleteManagementServerProgress(name)
checkDeleteManagementServerProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by deleteManagementServer().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the resource
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteManagementServer() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteManagementServer(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteManagementServer();
checkInitializeServiceProgress(name)
checkInitializeServiceProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.InitializeServiceResponse, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by initializeService().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.InitializeServiceResponse, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the serviceConfig used to initialize the
* service. Format:
* `projects/{project_id}/locations/{location}/serviceConfig`.
*/
// const name = 'abc123'
/**
* Required. The resource type to which the default service config will be
* applied. Examples include, "compute.googleapis.com/Instance" and
* "storage.googleapis.com/Bucket".
*/
// const resourceType = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. The configuration for initializing a Cloud SQL instance.
*/
// const cloudSqlInstanceInitializationConfig = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callInitializeService() {
// Construct request
const request = {
name,
resourceType,
};
// Run request
const [operation] = await backupdrClient.initializeService(request);
const [response] = await operation.promise();
console.log(response);
}
callInitializeService();
checkRestoreBackupProgress(name)
checkRestoreBackupProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.RestoreBackupResponse, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by restoreBackup().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.RestoreBackupResponse, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the Backup instance, in the format
* 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Compute Engine target environment to be used during restore.
*/
// const computeInstanceTargetEnvironment = {}
/**
* Disk target environment to be used during restore.
*/
// const diskTargetEnvironment = {}
/**
* Region disk target environment to be used during restore.
*/
// const regionDiskTargetEnvironment = {}
/**
* Compute Engine instance properties to be overridden during restore.
*/
// const computeInstanceRestoreProperties = {}
/**
* Disk properties to be overridden during restore.
*/
// const diskRestoreProperties = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callRestoreBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.restoreBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callRestoreBackup();
checkTriggerBackupProgress(name)
checkTriggerBackupProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlanAssociation, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by triggerBackup().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlanAssociation, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the backup plan association resource, in the format
* `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
*/
// const name = 'abc123'
/**
* Required. backup rule_id for which a backup needs to be triggered.
*/
// const ruleId = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callTriggerBackup() {
// Construct request
const request = {
name,
ruleId,
};
// Run request
const [operation] = await backupdrClient.triggerBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callTriggerBackup();
checkUpdateBackupPlanAssociationProgress(name)
checkUpdateBackupPlanAssociationProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlanAssociation, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by updateBackupPlanAssociation().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlanAssociation, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource being updated
*/
// const backupPlanAssociation = {}
/**
* Required. The list of fields to update.
* Field mask is used to specify the fields to be overwritten in the
* BackupPlanAssociation resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
* Currently backup_plan_association.backup_plan is the only supported field.
*/
// const updateMask = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateBackupPlanAssociation() {
// Construct request
const request = {
backupPlanAssociation,
updateMask,
};
// Run request
const [operation] = await backupdrClient.updateBackupPlanAssociation(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackupPlanAssociation();
checkUpdateBackupPlanProgress(name)
checkUpdateBackupPlanProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlan, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by updateBackupPlan().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.BackupPlan, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource being updated
*/
// const backupPlan = {}
/**
* Required. The list of fields to update.
* Field mask is used to specify the fields to be overwritten in the
* BackupPlan resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
* Currently, these fields are supported in update: description, schedules,
* retention period, adding and removing Backup Rules.
*/
// const updateMask = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateBackupPlan() {
// Construct request
const request = {
backupPlan,
updateMask,
};
// Run request
const [operation] = await backupdrClient.updateBackupPlan(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackupPlan();
checkUpdateBackupProgress(name)
checkUpdateBackupProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.Backup, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by updateBackup().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.Backup, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* Backup resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
*/
// const updateMask = {}
/**
* Required. The resource being updated
*/
// const backup = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateBackup() {
// Construct request
const request = {
updateMask,
backup,
};
// Run request
const [operation] = await backupdrClient.updateBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackup();
checkUpdateBackupVaultProgress(name)
checkUpdateBackupVaultProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.BackupVault, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by updateBackupVault().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.BackupVault, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* BackupVault resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
*/
// const updateMask = {}
/**
* Required. The resource being updated
*/
// const backupVault = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. Only validate the request, but do not perform mutations.
* The default is 'false'.
*/
// const validateOnly = true
/**
* Optional. If set to true, will not check plan duration against backup vault
* enforcement duration.
*/
// const force = true
/**
* Optional. If set to true, we will force update access restriction even if
* some non compliant data sources are present. The default is 'false'.
*/
// const forceUpdateAccessRestriction = true
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateBackupVault() {
// Construct request
const request = {
updateMask,
backupVault,
};
// Run request
const [operation] = await backupdrClient.updateBackupVault(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackupVault();
checkUpdateDataSourceProgress(name)
checkUpdateDataSourceProgress(name: string): Promise<LROperation<protos.google.cloud.backupdr.v1.DataSource, protos.google.cloud.backupdr.v1.OperationMetadata>>;Check the status of the long running operation returned by updateDataSource().
| Parameter | |
|---|---|
| Name | Description |
name |
string
The operation name that will be passed. |
| Returns | |
|---|---|
| Type | Description |
Promise<LROperation<protos.google.cloud.backupdr.v1.DataSource, protos.google.cloud.backupdr.v1.OperationMetadata>> |
{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* DataSource resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
*/
// const updateMask = {}
/**
* Required. The resource being updated
*/
// const dataSource = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. Enable upsert.
*/
// const allowMissing = true
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateDataSource() {
// Construct request
const request = {
updateMask,
dataSource,
};
// Run request
const [operation] = await backupdrClient.updateDataSource(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateDataSource();
close()
close(): Promise<void>;Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
| Returns | |
|---|---|
| Type | Description |
Promise<void> |
{Promise} A promise that resolves when the client is closed. |
createBackupPlan(request, options)
createBackupPlan(request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Create a BackupPlan
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupPlanRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The `BackupPlan` project and location in the format
* `projects/{project}/locations/{location}`. In Cloud BackupDR locations
* map to GCP regions, for example **us-central1**.
*/
// const parent = 'abc123'
/**
* Required. The name of the `BackupPlan` to create. The name must be unique
* for the specified project and location.The name must start with a lowercase
* letter followed by up to 62 lowercase letters, numbers, or hyphens.
* Pattern, /[a-z][a-z0-9-]{,62}/.
*/
// const backupPlanId = 'abc123'
/**
* Required. The `BackupPlan` resource object to create.
*/
// const backupPlan = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callCreateBackupPlan() {
// Construct request
const request = {
parent,
backupPlanId,
backupPlan,
};
// Run request
const [operation] = await backupdrClient.createBackupPlan(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateBackupPlan();
createBackupPlan(request, options, callback)
createBackupPlan(request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupPlanRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createBackupPlan(request, callback)
createBackupPlan(request: protos.google.cloud.backupdr.v1.ICreateBackupPlanRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupPlanRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createBackupPlanAssociation(request, options)
createBackupPlanAssociation(request?: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Create a BackupPlanAssociation
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupPlanAssociationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The backup plan association project and location in the format
* `projects/{project_id}/locations/{location}`. In Cloud BackupDR locations
* map to GCP regions, for example **us-central1**.
*/
// const parent = 'abc123'
/**
* Required. The name of the backup plan association to create. The name must
* be unique for the specified project and location.
*/
// const backupPlanAssociationId = 'abc123'
/**
* Required. The resource being created
*/
// const backupPlanAssociation = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callCreateBackupPlanAssociation() {
// Construct request
const request = {
parent,
backupPlanAssociationId,
backupPlanAssociation,
};
// Run request
const [operation] = await backupdrClient.createBackupPlanAssociation(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateBackupPlanAssociation();
createBackupPlanAssociation(request, options, callback)
createBackupPlanAssociation(request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupPlanAssociationRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createBackupPlanAssociation(request, callback)
createBackupPlanAssociation(request: protos.google.cloud.backupdr.v1.ICreateBackupPlanAssociationRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupPlanAssociationRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createBackupVault(request, options)
createBackupVault(request?: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Creates a new BackupVault in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupVaultRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Value for parent.
*/
// const parent = 'abc123'
/**
* Required. ID of the requesting object
* If auto-generating ID server-side, remove this field and
* backup_vault_id from the method_signature of Create RPC
*/
// const backupVaultId = 'abc123'
/**
* Required. The resource being created
*/
// const backupVault = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. Only validate the request, but do not perform mutations.
* The default is 'false'.
*/
// const validateOnly = true
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callCreateBackupVault() {
// Construct request
const request = {
parent,
backupVaultId,
backupVault,
};
// Run request
const [operation] = await backupdrClient.createBackupVault(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateBackupVault();
createBackupVault(request, options, callback)
createBackupVault(request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupVaultRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createBackupVault(request, callback)
createBackupVault(request: protos.google.cloud.backupdr.v1.ICreateBackupVaultRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateBackupVaultRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createManagementServer(request, options)
createManagementServer(request?: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Creates a new ManagementServer in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
ICreateManagementServerRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The management server project and location in the format
* 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR
* locations map to Google Cloud regions, for example **us-central1**.
*/
// const parent = 'abc123'
/**
* Required. The name of the management server to create. The name must be
* unique for the specified project and location.
*/
// const managementServerId = 'abc123'
/**
* Required. A management server
* resource google.cloud.backupdr.v1.ManagementServer
*/
// const managementServer = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callCreateManagementServer() {
// Construct request
const request = {
parent,
managementServerId,
managementServer,
};
// Run request
const [operation] = await backupdrClient.createManagementServer(request);
const [response] = await operation.promise();
console.log(response);
}
callCreateManagementServer();
createManagementServer(request, options, callback)
createManagementServer(request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateManagementServerRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
createManagementServer(request, callback)
createManagementServer(request: protos.google.cloud.backupdr.v1.ICreateManagementServerRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ICreateManagementServerRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
dataSourcePath(project, location, backupvault, datasource)
dataSourcePath(project: string, location: string, backupvault: string, datasource: string): string;Return a fully-qualified dataSource resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
backupvault |
string
|
datasource |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
dataSourceReferencePath(project, location, dataSourceReference)
dataSourceReferencePath(project: string, location: string, dataSourceReference: string): string;Return a fully-qualified dataSourceReference resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
dataSourceReference |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
deleteBackup(request, options)
deleteBackup(request?: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a Backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the resource.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackup();
deleteBackup(request, options, callback)
deleteBackup(request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackup(request, callback)
deleteBackup(request: protos.google.cloud.backupdr.v1.IDeleteBackupRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackupPlan(request, options)
deleteBackupPlan(request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a single BackupPlan.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupPlanRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the `BackupPlan` to delete.
* Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteBackupPlan() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteBackupPlan(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackupPlan();
deleteBackupPlan(request, options, callback)
deleteBackupPlan(request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupPlanRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackupPlan(request, callback)
deleteBackupPlan(request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupPlanRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackupPlanAssociation(request, options)
deleteBackupPlanAssociation(request?: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a single BackupPlanAssociation.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupPlanAssociationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the backup plan association resource, in the format
* `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteBackupPlanAssociation() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteBackupPlanAssociation(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackupPlanAssociation();
deleteBackupPlanAssociation(request, options, callback)
deleteBackupPlanAssociation(request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupPlanAssociationRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackupPlanAssociation(request, callback)
deleteBackupPlanAssociation(request: protos.google.cloud.backupdr.v1.IDeleteBackupPlanAssociationRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupPlanAssociationRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackupVault(request, options)
deleteBackupVault(request?: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a BackupVault.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupVaultRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the resource.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. If set to true, any data source from this backup vault will also
* be deleted.
*/
// const force = true
/**
* The current etag of the backup vault.
* If an etag is provided and does not match the current etag of the
* connection, deletion will be blocked.
*/
// const etag = 'abc123'
/**
* Optional. Only validate the request, but do not perform mutations.
* The default is 'false'.
*/
// const validateOnly = true
/**
* Optional. If true and the BackupVault is not found, the request will
* succeed but no action will be taken.
*/
// const allowMissing = true
/**
* Optional. If set to true, backupvault deletion will proceed even if there
* are backup plans referencing the backupvault. The default is 'false'.
*/
// const ignoreBackupPlanReferences = true
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteBackupVault() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteBackupVault(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteBackupVault();
deleteBackupVault(request, options, callback)
deleteBackupVault(request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupVaultRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteBackupVault(request, callback)
deleteBackupVault(request: protos.google.cloud.backupdr.v1.IDeleteBackupVaultRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteBackupVaultRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteManagementServer(request, options)
deleteManagementServer(request?: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, options?: CallOptions): Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Deletes a single ManagementServer.
| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteManagementServerRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the resource
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callDeleteManagementServer() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.deleteManagementServer(request);
const [response] = await operation.promise();
console.log(response);
}
callDeleteManagementServer();
deleteManagementServer(request, options, callback)
deleteManagementServer(request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteManagementServerRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteManagementServer(request, callback)
deleteManagementServer(request: protos.google.cloud.backupdr.v1.IDeleteManagementServerRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IDeleteManagementServerRequest
|
callback |
Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
deleteOperation(request, optionsOrCallback, callback)
deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.
| Parameters | |
|---|---|
| Name | Description |
request |
DeleteOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
|
callback |
Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<protos.google.protobuf.Empty> |
|
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
fetchBackupPlanAssociationsForResourceType(request, options)
fetchBackupPlanAssociationsForResourceType(request?: protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanAssociation[],
protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest | null,
protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeResponse
]>;List BackupPlanAssociations for a given resource type.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupPlanAssociationsForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanAssociation[],
protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest | null,
protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
fetchBackupPlanAssociationsForResourceType(request, options, callback)
fetchBackupPlanAssociationsForResourceType(request: protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupPlanAssociationsForResourceTypeRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanAssociation>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
fetchBackupPlanAssociationsForResourceType(request, callback)
fetchBackupPlanAssociationsForResourceType(request: protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupPlanAssociationsForResourceTypeRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanAssociation>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
fetchBackupPlanAssociationsForResourceTypeAsync(request, options)
fetchBackupPlanAssociationsForResourceTypeAsync(request?: protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IBackupPlanAssociation>;Equivalent to fetchBackupPlanAssociationsForResourceType, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupPlanAssociationsForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IBackupPlanAssociation> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name.
* Format: projects/{project}/locations/{location}
*/
// const parent = 'abc123'
/**
* Required. The type of the GCP resource.
* Ex: sql.googleapis.com/Instance
*/
// const resourceType = 'abc123'
/**
* Optional. The maximum number of BackupPlanAssociations to return. The
* service may return fewer than this value. If unspecified, at most 50
* BackupPlanAssociations will be returned. The maximum value is 100; values
* above 100 will be coerced to 100.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous call of
* `FetchBackupPlanAssociationsForResourceType`.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
* `FetchBackupPlanAssociationsForResourceType` must match
* the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. A filter expression that filters the results fetched in the
* response. The expression must specify the field name, a comparison
* operator, and the value that you want to use for filtering. Supported
* fields:
* * resource
* * backup_plan
* * state
* * data_source
* * cloud_sql_instance_backup_plan_association_properties.instance_create_time
*/
// const filter = 'abc123'
/**
* Optional. A comma-separated list of fields to order by, sorted in ascending
* order. Use "desc" after a field name for descending.
* Supported fields:
* * name
*/
// const orderBy = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callFetchBackupPlanAssociationsForResourceType() {
// Construct request
const request = {
parent,
resourceType,
};
// Run request
const iterable = backupdrClient.fetchBackupPlanAssociationsForResourceTypeAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callFetchBackupPlanAssociationsForResourceType();
fetchBackupPlanAssociationsForResourceTypeStream(request, options)
fetchBackupPlanAssociationsForResourceTypeStream(request?: protos.google.cloud.backupdr.v1.IFetchBackupPlanAssociationsForResourceTypeRequest, options?: CallOptions): Transform;Equivalent to fetchBackupPlanAssociationsForResourceType, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupPlanAssociationsForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
fetchBackupsForResourceType(request, options)
fetchBackupsForResourceType(request?: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackup[],
protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest | null,
protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse
]>;Fetch Backups for a given resource type.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupsForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackup[],
protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest | null,
protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
fetchBackupsForResourceType(request, options, callback)
fetchBackupsForResourceType(request: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackup>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupsForResourceTypeRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackup>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
fetchBackupsForResourceType(request, callback)
fetchBackupsForResourceType(request: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackup>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupsForResourceTypeRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackup>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
fetchBackupsForResourceTypeAsync(request, options)
fetchBackupsForResourceTypeAsync(request?: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IBackup>;Equivalent to fetchBackupsForResourceType, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupsForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IBackup> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Datasources are the parent resource for the backups.
* Format:
* projects/{project}/locations/{location}/backupVaults/{backupVaultId}/dataSources/{datasourceId}
*/
// const parent = 'abc123'
/**
* Required. The type of the GCP resource.
* Ex: sqladmin.googleapis.com/Instance
*/
// const resourceType = 'abc123'
/**
* Optional. The maximum number of Backups to return. The service may
* return fewer than this value. If unspecified, at most 50
* Backups will be returned. The maximum value is 100; values
* above 100 will be coerced to 100.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous call of
* `FetchBackupsForResourceType`.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
* `FetchBackupsForResourceType` must match
* the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. A filter expression that filters the results fetched in the
* response. The expression must specify the field name, a comparison
* operator, and the value that you want to use for filtering. Supported
* fields:
*/
// const filter = 'abc123'
/**
* Optional. A comma-separated list of fields to order by, sorted in ascending
* order. Use "desc" after a field name for descending.
*/
// const orderBy = 'abc123'
/**
* Optional. This parameter is used to specify the view of the backup.
* If not specified, the default view is BASIC.
*/
// const view = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callFetchBackupsForResourceType() {
// Construct request
const request = {
parent,
resourceType,
};
// Run request
const iterable = backupdrClient.fetchBackupsForResourceTypeAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callFetchBackupsForResourceType();
fetchBackupsForResourceTypeStream(request, options)
fetchBackupsForResourceTypeStream(request?: protos.google.cloud.backupdr.v1.IFetchBackupsForResourceTypeRequest, options?: CallOptions): Transform;Equivalent to fetchBackupsForResourceType, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchBackupsForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
fetchDataSourceReferencesForResourceType(request, options)
fetchDataSourceReferencesForResourceType(request?: protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IDataSourceReference[],
protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest | null,
protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeResponse
]>;Fetch DataSourceReferences for a given project, location and resource type.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchDataSourceReferencesForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IDataSourceReference[],
protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest | null,
protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of DataSourceReference. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
fetchDataSourceReferencesForResourceType(request, options, callback)
fetchDataSourceReferencesForResourceType(request: protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSourceReference>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IFetchDataSourceReferencesForResourceTypeRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSourceReference>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
fetchDataSourceReferencesForResourceType(request, callback)
fetchDataSourceReferencesForResourceType(request: protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSourceReference>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IFetchDataSourceReferencesForResourceTypeRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSourceReference>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
fetchDataSourceReferencesForResourceTypeAsync(request, options)
fetchDataSourceReferencesForResourceTypeAsync(request?: protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IDataSourceReference>;Equivalent to fetchDataSourceReferencesForResourceType, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchDataSourceReferencesForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IDataSourceReference> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing DataSourceReference. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name.
* Format: projects/{project}/locations/{location}
*/
// const parent = 'abc123'
/**
* Required. The type of the GCP resource.
* Ex: sql.googleapis.com/Instance
*/
// const resourceType = 'abc123'
/**
* Optional. The maximum number of DataSourceReferences to return. The service
* may return fewer than this value. If unspecified, at most 50
* DataSourceReferences will be returned. The maximum value is 100; values
* above 100 will be coerced to 100.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous call of
* `FetchDataSourceReferencesForResourceType`.
* Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
* `FetchDataSourceReferencesForResourceType` must match
* the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. A filter expression that filters the results fetched in the
* response. The expression must specify the field name, a comparison
* operator, and the value that you want to use for filtering. Supported
* fields:
* * data_source
* * data_source_gcp_resource_info.gcp_resourcename
* * data_source_backup_config_state
* * data_source_backup_count
* * data_source_backup_config_info.last_backup_state
* * data_source_gcp_resource_info.gcp_resourcename
* * data_source_gcp_resource_info.type
* * data_source_gcp_resource_info.location
* * data_source_gcp_resource_info.cloud_sql_instance_properties.instance_create_time
*/
// const filter = 'abc123'
/**
* Optional. A comma-separated list of fields to order by, sorted in ascending
* order. Use "desc" after a field name for descending.
* Supported fields:
* * name
*/
// const orderBy = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callFetchDataSourceReferencesForResourceType() {
// Construct request
const request = {
parent,
resourceType,
};
// Run request
const iterable = backupdrClient.fetchDataSourceReferencesForResourceTypeAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callFetchDataSourceReferencesForResourceType();
fetchDataSourceReferencesForResourceTypeStream(request, options)
fetchDataSourceReferencesForResourceTypeStream(request?: protos.google.cloud.backupdr.v1.IFetchDataSourceReferencesForResourceTypeRequest, options?: CallOptions): Transform;Equivalent to fetchDataSourceReferencesForResourceType, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchDataSourceReferencesForResourceTypeRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing DataSourceReference on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
fetchUsableBackupVaults(request, options)
fetchUsableBackupVaults(request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupVault[],
protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest | null,
protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse
]>;FetchUsableBackupVaults lists usable BackupVaults in a given project and location. Usable BackupVault are the ones that user has backupdr.backupVaults.get permission.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchUsableBackupVaultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupVault[],
protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest | null,
protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
fetchUsableBackupVaults(request, options, callback)
fetchUsableBackupVaults(request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupVault>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IFetchUsableBackupVaultsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupVault>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
fetchUsableBackupVaults(request, callback)
fetchUsableBackupVaults(request: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupVault>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IFetchUsableBackupVaultsRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupVault>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
fetchUsableBackupVaultsAsync(request, options)
fetchUsableBackupVaultsAsync(request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IBackupVault>;Equivalent to fetchUsableBackupVaults, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchUsableBackupVaultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IBackupVault> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve backupvault stores
* information, in the format 'projects/{project_id}/locations/{location}'. In
* Cloud Backup and DR, locations map to Google Cloud regions, for example
* **us-central1**.
* To retrieve backupvault stores for all locations, use "-" for the
* '{location}' value.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Hint for how to order the results.
*/
// const orderBy = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callFetchUsableBackupVaults() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.fetchUsableBackupVaultsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callFetchUsableBackupVaults();
fetchUsableBackupVaultsStream(request, options)
fetchUsableBackupVaultsStream(request?: protos.google.cloud.backupdr.v1.IFetchUsableBackupVaultsRequest, options?: CallOptions): Transform;Equivalent to fetchUsableBackupVaults, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IFetchUsableBackupVaultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
getBackup(request, options)
getBackup(request?: protos.google.cloud.backupdr.v1.IGetBackupRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackup,
protos.google.cloud.backupdr.v1.IGetBackupRequest | undefined,
{} | undefined
]>;Gets details of a Backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackup,
protos.google.cloud.backupdr.v1.IGetBackupRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the data source resource name, in the format
* 'projects/{project_id}/locations/{location}/backupVaults/{backupVault}/dataSources/{datasource}/backups/{backup}'
*/
// const name = 'abc123'
/**
* Optional. Reserved for future use to provide a BASIC & FULL view of Backup
* resource.
*/
// const view = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callGetBackup() {
// Construct request
const request = {
name,
};
// Run request
const response = await backupdrClient.getBackup(request);
console.log(response);
}
callGetBackup();
getBackup(request, options, callback)
getBackup(request: protos.google.cloud.backupdr.v1.IGetBackupRequest, options: CallOptions, callback: Callback<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackup(request, callback)
getBackup(request: protos.google.cloud.backupdr.v1.IGetBackupRequest, callback: Callback<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupRequest
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IGetBackupRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupPlan(request, options)
getBackupPlan(request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupPlan,
protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | undefined,
{} | undefined
]>;Gets details of a single BackupPlan.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupPlan,
protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the `BackupPlan` to retrieve.
* Format: `projects/{project}/locations/{location}/backupPlans/{backup_plan}`
*/
// const name = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callGetBackupPlan() {
// Construct request
const request = {
name,
};
// Run request
const response = await backupdrClient.getBackupPlan(request);
console.log(response);
}
callGetBackupPlan();
getBackupPlan(request, options, callback)
getBackupPlan(request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, options: CallOptions, callback: Callback<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupPlan(request, callback)
getBackupPlan(request: protos.google.cloud.backupdr.v1.IGetBackupPlanRequest, callback: Callback<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanRequest
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IGetBackupPlanRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupPlanAssociation(request, options)
getBackupPlanAssociation(request?: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanAssociation,
protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest | undefined,
{} | undefined
]>;Gets details of a single BackupPlanAssociation.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanAssociationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanAssociation,
protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the backup plan association resource, in the format
* `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
*/
// const name = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callGetBackupPlanAssociation() {
// Construct request
const request = {
name,
};
// Run request
const response = await backupdrClient.getBackupPlanAssociation(request);
console.log(response);
}
callGetBackupPlanAssociation();
getBackupPlanAssociation(request, options, callback)
getBackupPlanAssociation(request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, options: CallOptions, callback: Callback<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanAssociationRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupPlanAssociation(request, callback)
getBackupPlanAssociation(request: protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest, callback: Callback<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanAssociationRequest
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IGetBackupPlanAssociationRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupPlanRevision(request, options)
getBackupPlanRevision(request?: protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanRevision,
protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest | undefined,
{} | undefined
]>;Gets details of a single BackupPlanRevision.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanRevisionRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanRevision,
protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the `BackupPlanRevision` to retrieve.
* Format:
* `projects/{project}/locations/{location}/backupPlans/{backup_plan}/revisions/{revision}`
*/
// const name = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callGetBackupPlanRevision() {
// Construct request
const request = {
name,
};
// Run request
const response = await backupdrClient.getBackupPlanRevision(request);
console.log(response);
}
callGetBackupPlanRevision();
getBackupPlanRevision(request, options, callback)
getBackupPlanRevision(request: protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest, options: CallOptions, callback: Callback<protos.google.cloud.backupdr.v1.IBackupPlanRevision, protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanRevisionRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackupPlanRevision, protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupPlanRevision(request, callback)
getBackupPlanRevision(request: protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest, callback: Callback<protos.google.cloud.backupdr.v1.IBackupPlanRevision, protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupPlanRevisionRequest
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackupPlanRevision, protos.google.cloud.backupdr.v1.IGetBackupPlanRevisionRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupVault(request, options)
getBackupVault(request?: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupVault,
protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | undefined,
{} | undefined
]>;Gets details of a BackupVault.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupVaultRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupVault,
protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the backupvault store resource name, in the format
* 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}'
*/
// const name = 'abc123'
/**
* Optional. Reserved for future use to provide a BASIC & FULL view of Backup
* Vault
*/
// const view = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callGetBackupVault() {
// Construct request
const request = {
name,
};
// Run request
const response = await backupdrClient.getBackupVault(request);
console.log(response);
}
callGetBackupVault();
getBackupVault(request, options, callback)
getBackupVault(request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, options: CallOptions, callback: Callback<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupVaultRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getBackupVault(request, callback)
getBackupVault(request: protos.google.cloud.backupdr.v1.IGetBackupVaultRequest, callback: Callback<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetBackupVaultRequest
|
callback |
Callback<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IGetBackupVaultRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getDataSource(request, options)
getDataSource(request?: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IDataSource,
protos.google.cloud.backupdr.v1.IGetDataSourceRequest | undefined,
{} | undefined
]>;Gets details of a DataSource.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetDataSourceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IDataSource,
protos.google.cloud.backupdr.v1.IGetDataSourceRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the data source resource name, in the format
* 'projects/{project_id}/locations/{location}/backupVaults/{resource_name}/dataSource/{resource_name}'
*/
// const name = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callGetDataSource() {
// Construct request
const request = {
name,
};
// Run request
const response = await backupdrClient.getDataSource(request);
console.log(response);
}
callGetDataSource();
getDataSource(request, options, callback)
getDataSource(request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, options: CallOptions, callback: Callback<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetDataSourceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getDataSource(request, callback)
getDataSource(request: protos.google.cloud.backupdr.v1.IGetDataSourceRequest, callback: Callback<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetDataSourceRequest
|
callback |
Callback<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IGetDataSourceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getDataSourceReference(request, options)
getDataSourceReference(request?: protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IDataSourceReference,
protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest | undefined,
{} | undefined
]>;Gets details of a single DataSourceReference.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetDataSourceReferenceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IDataSourceReference,
protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing DataSourceReference. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The name of the DataSourceReference to retrieve.
* Format:
* projects/{project}/locations/{location}/dataSourceReferences/{data_source_reference}
*/
// const name = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callGetDataSourceReference() {
// Construct request
const request = {
name,
};
// Run request
const response = await backupdrClient.getDataSourceReference(request);
console.log(response);
}
callGetDataSourceReference();
getDataSourceReference(request, options, callback)
getDataSourceReference(request: protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest, options: CallOptions, callback: Callback<protos.google.cloud.backupdr.v1.IDataSourceReference, protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetDataSourceReferenceRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.backupdr.v1.IDataSourceReference, protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getDataSourceReference(request, callback)
getDataSourceReference(request: protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest, callback: Callback<protos.google.cloud.backupdr.v1.IDataSourceReference, protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetDataSourceReferenceRequest
|
callback |
Callback<protos.google.cloud.backupdr.v1.IDataSourceReference, protos.google.cloud.backupdr.v1.IGetDataSourceReferenceRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getIamPolicy(request, options, callback)
getIamPolicy(request: IamProtos.google.iam.v1.GetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
| Parameters | |
|---|---|
| Name | Description |
request |
IamProtos.google.iam.v1.GetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.Policy, google.iam.v1.GetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
| Returns | |
|---|---|
| Type | Description |
Promise<[google.iam.v1.Policy]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
getLocation(request, options, callback)
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;Gets information about a location.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IGetLocationRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
Call options. See CallOptions for more details. |
callback |
Callback<google.cloud.location.ILocation, google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
Promise<google.cloud.location.ILocation> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
const [response] = await client.getLocation(request);
getManagementServer(request, options)
getManagementServer(request?: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IManagementServer,
protos.google.cloud.backupdr.v1.IGetManagementServerRequest | undefined,
{} | undefined
]>;Gets details of a single ManagementServer.
| Parameters | |
|---|---|
| Name | Description |
request |
IGetManagementServerRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IManagementServer,
protos.google.cloud.backupdr.v1.IGetManagementServerRequest | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the management server resource name, in the format
* 'projects/{project_id}/locations/{location}/managementServers/{resource_name}'
*/
// const name = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callGetManagementServer() {
// Construct request
const request = {
name,
};
// Run request
const response = await backupdrClient.getManagementServer(request);
console.log(response);
}
callGetManagementServer();
getManagementServer(request, options, callback)
getManagementServer(request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, options: CallOptions, callback: Callback<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IGetManagementServerRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetManagementServerRequest
|
options |
CallOptions
|
callback |
Callback<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IGetManagementServerRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getManagementServer(request, callback)
getManagementServer(request: protos.google.cloud.backupdr.v1.IGetManagementServerRequest, callback: Callback<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IGetManagementServerRequest | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IGetManagementServerRequest
|
callback |
Callback<protos.google.cloud.backupdr.v1.IManagementServer, protos.google.cloud.backupdr.v1.IGetManagementServerRequest | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
getOperation(request, optionsOrCallback, callback)
getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
| Parameters | |
|---|---|
| Name | Description |
request |
GetOperationRequest
The request object that will be sent. |
optionsOrCallback |
CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
|
callback |
Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
| Returns | |
|---|---|
| Type | Description |
Promise<[protos.google.longrunning.Operation]> |
|
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
getProjectId()
getProjectId(): Promise<string>;| Returns | |
|---|---|
| Type | Description |
Promise<string> |
|
getProjectId(callback)
getProjectId(callback: Callback<string, undefined, undefined>): void;| Parameter | |
|---|---|
| Name | Description |
callback |
Callback<string, undefined, undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
initialize()
initialize(): Promise<{
[name: string]: Function;
}>;Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
| Returns | |
|---|---|
| Type | Description |
Promise<{
[name: string]: Function;
}> |
{Promise} A promise that resolves to an authenticated service stub. |
initializeService(request, options)
initializeService(request?: protos.google.cloud.backupdr.v1.IInitializeServiceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IInitializeServiceResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Initializes the service related config for a project.
| Parameters | |
|---|---|
| Name | Description |
request |
IInitializeServiceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IInitializeServiceResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the serviceConfig used to initialize the
* service. Format:
* `projects/{project_id}/locations/{location}/serviceConfig`.
*/
// const name = 'abc123'
/**
* Required. The resource type to which the default service config will be
* applied. Examples include, "compute.googleapis.com/Instance" and
* "storage.googleapis.com/Bucket".
*/
// const resourceType = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. The configuration for initializing a Cloud SQL instance.
*/
// const cloudSqlInstanceInitializationConfig = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callInitializeService() {
// Construct request
const request = {
name,
resourceType,
};
// Run request
const [operation] = await backupdrClient.initializeService(request);
const [response] = await operation.promise();
console.log(response);
}
callInitializeService();
initializeService(request, options, callback)
initializeService(request: protos.google.cloud.backupdr.v1.IInitializeServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IInitializeServiceResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IInitializeServiceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IInitializeServiceResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
initializeService(request, callback)
initializeService(request: protos.google.cloud.backupdr.v1.IInitializeServiceRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IInitializeServiceResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IInitializeServiceRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IInitializeServiceResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupPlanAssociations(request, options)
listBackupPlanAssociations(request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanAssociation[],
protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest | null,
protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse
]>;Lists BackupPlanAssociations in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanAssociationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanAssociation[],
protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest | null,
protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listBackupPlanAssociations(request, options, callback)
listBackupPlanAssociations(request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanAssociationsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanAssociation>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupPlanAssociations(request, callback)
listBackupPlanAssociations(request: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanAssociation>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanAssociationsRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanAssociation>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupPlanAssociationsAsync(request, options)
listBackupPlanAssociationsAsync(request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IBackupPlanAssociation>;Equivalent to listBackupPlanAssociations, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanAssociationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IBackupPlanAssociation> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve backup Plan
* Associations information, in the format
* `projects/{project_id}/locations/{location}`. In Cloud BackupDR, locations
* map to GCP regions, for example **us-central1**. To retrieve backup plan
* associations for all locations, use "-" for the
* `{location}` value.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Filtering results
*/
// const filter = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callListBackupPlanAssociations() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.listBackupPlanAssociationsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackupPlanAssociations();
listBackupPlanAssociationsStream(request, options)
listBackupPlanAssociationsStream(request?: protos.google.cloud.backupdr.v1.IListBackupPlanAssociationsRequest, options?: CallOptions): Transform;Equivalent to listBackupPlanAssociations, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanAssociationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listBackupPlanRevisions(request, options)
listBackupPlanRevisions(request?: protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanRevision[],
protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest | null,
protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsResponse
]>;Lists BackupPlanRevisions in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanRevisionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupPlanRevision[],
protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest | null,
protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listBackupPlanRevisions(request, options, callback)
listBackupPlanRevisions(request: protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanRevision>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanRevisionsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanRevision>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupPlanRevisions(request, callback)
listBackupPlanRevisions(request: protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanRevision>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanRevisionsRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlanRevision>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupPlanRevisionsAsync(request, options)
listBackupPlanRevisionsAsync(request?: protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IBackupPlanRevision>;Equivalent to listBackupPlanRevisions, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanRevisionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IBackupPlanRevision> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve
* `BackupPlanRevisions` information. Format:
* `projects/{project}/locations/{location}/backupPlans/{backup_plan}`. In
* Cloud BackupDR, locations map to GCP regions, for e.g. **us-central1**.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of `BackupPlans` to return in a single
* response. If not specified, a default value will be chosen by the service.
* Note that the response may include a partial list and a caller should
* only rely on the response's
* next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token
* to determine if there are more instances left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The value of
* next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token
* received from a previous `ListBackupPlans` call.
* Provide this to retrieve the subsequent page in a multi-page list of
* results. When paginating, all other parameters provided to
* `ListBackupPlans` must match the call that provided the page token.
*/
// const pageToken = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callListBackupPlanRevisions() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.listBackupPlanRevisionsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackupPlanRevisions();
listBackupPlanRevisionsStream(request, options)
listBackupPlanRevisionsStream(request?: protos.google.cloud.backupdr.v1.IListBackupPlanRevisionsRequest, options?: CallOptions): Transform;Equivalent to listBackupPlanRevisions, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlanRevisionsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listBackupPlans(request, options)
listBackupPlans(request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupPlan[],
protos.google.cloud.backupdr.v1.IListBackupPlansRequest | null,
protos.google.cloud.backupdr.v1.IListBackupPlansResponse
]>;Lists BackupPlans in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlansRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupPlan[],
protos.google.cloud.backupdr.v1.IListBackupPlansRequest | null,
protos.google.cloud.backupdr.v1.IListBackupPlansResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listBackupPlans(request, options, callback)
listBackupPlans(request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlansRequest, protos.google.cloud.backupdr.v1.IListBackupPlansResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlan>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlansRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlansRequest, protos.google.cloud.backupdr.v1.IListBackupPlansResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlan>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupPlans(request, callback)
listBackupPlans(request: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlansRequest, protos.google.cloud.backupdr.v1.IListBackupPlansResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlan>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlansRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupPlansRequest, protos.google.cloud.backupdr.v1.IListBackupPlansResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupPlan>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupPlansAsync(request, options)
listBackupPlansAsync(request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IBackupPlan>;Equivalent to listBackupPlans, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlansRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IBackupPlan> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve `BackupPlans`
* information. Format: `projects/{project}/locations/{location}`. In Cloud
* BackupDR, locations map to GCP regions, for e.g. **us-central1**. To
* retrieve backup plans for all locations, use "-" for the
* `{location}` value.
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of `BackupPlans` to return in a single
* response. If not specified, a default value will be chosen by the service.
* Note that the response may include a partial list and a caller should
* only rely on the response's
* next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token
* to determine if there are more instances left to be queried.
*/
// const pageSize = 1234
/**
* Optional. The value of
* next_page_token google.cloud.backupdr.v1.ListBackupPlansResponse.next_page_token
* received from a previous `ListBackupPlans` call.
* Provide this to retrieve the subsequent page in a multi-page list of
* results. When paginating, all other parameters provided to
* `ListBackupPlans` must match the call that provided the page token.
*/
// const pageToken = 'abc123'
/**
* Optional. Field match expression used to filter the results.
*/
// const filter = 'abc123'
/**
* Optional. Field by which to sort the results.
*/
// const orderBy = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callListBackupPlans() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.listBackupPlansAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackupPlans();
listBackupPlansStream(request, options)
listBackupPlansStream(request?: protos.google.cloud.backupdr.v1.IListBackupPlansRequest, options?: CallOptions): Transform;Equivalent to listBackupPlans, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupPlansRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listBackups(request, options)
listBackups(request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackup[],
protos.google.cloud.backupdr.v1.IListBackupsRequest | null,
protos.google.cloud.backupdr.v1.IListBackupsResponse
]>;Lists Backups in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackup[],
protos.google.cloud.backupdr.v1.IListBackupsRequest | null,
protos.google.cloud.backupdr.v1.IListBackupsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listBackups(request, options, callback)
listBackups(request: protos.google.cloud.backupdr.v1.IListBackupsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupsRequest, protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackup>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupsRequest, protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackup>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackups(request, callback)
listBackups(request: protos.google.cloud.backupdr.v1.IListBackupsRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupsRequest, protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackup>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupsRequest, protos.google.cloud.backupdr.v1.IListBackupsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackup>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupsAsync(request, options)
listBackupsAsync(request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IBackup>;Equivalent to listBackups, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IBackup> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve backup
* information, in the format
* 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR,
* locations map to Google Cloud regions, for example **us-central1**.
* To retrieve data sources for all locations, use "-" for the
* '{location}' value.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Hint for how to order the results.
*/
// const orderBy = 'abc123'
/**
* Optional. Reserved for future use to provide a BASIC & FULL view of Backup
* resource.
*/
// const view = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callListBackups() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.listBackupsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackups();
listBackupsStream(request, options)
listBackupsStream(request?: protos.google.cloud.backupdr.v1.IListBackupsRequest, options?: CallOptions): Transform;Equivalent to listBackups, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listBackupVaults(request, options)
listBackupVaults(request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IBackupVault[],
protos.google.cloud.backupdr.v1.IListBackupVaultsRequest | null,
protos.google.cloud.backupdr.v1.IListBackupVaultsResponse
]>;Lists BackupVaults in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupVaultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IBackupVault[],
protos.google.cloud.backupdr.v1.IListBackupVaultsRequest | null,
protos.google.cloud.backupdr.v1.IListBackupVaultsResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listBackupVaults(request, options, callback)
listBackupVaults(request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, protos.google.cloud.backupdr.v1.IListBackupVaultsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupVault>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupVaultsRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, protos.google.cloud.backupdr.v1.IListBackupVaultsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupVault>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupVaults(request, callback)
listBackupVaults(request: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, protos.google.cloud.backupdr.v1.IListBackupVaultsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupVault>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupVaultsRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, protos.google.cloud.backupdr.v1.IListBackupVaultsResponse | null | undefined, protos.google.cloud.backupdr.v1.IBackupVault>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listBackupVaultsAsync(request, options)
listBackupVaultsAsync(request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IBackupVault>;Equivalent to listBackupVaults, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupVaultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IBackupVault> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve backupvault stores
* information, in the format 'projects/{project_id}/locations/{location}'. In
* Cloud Backup and DR, locations map to Google Cloud regions, for example
* **us-central1**.
* To retrieve backupvault stores for all locations, use "-" for the
* '{location}' value.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Hint for how to order the results.
*/
// const orderBy = 'abc123'
/**
* Optional. Reserved for future use to provide a BASIC & FULL view of Backup
* Vault.
*/
// const view = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callListBackupVaults() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.listBackupVaultsAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListBackupVaults();
listBackupVaultsStream(request, options)
listBackupVaultsStream(request?: protos.google.cloud.backupdr.v1.IListBackupVaultsRequest, options?: CallOptions): Transform;Equivalent to listBackupVaults, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListBackupVaultsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listDataSourceReferences(request, options)
listDataSourceReferences(request?: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IDataSourceReference[],
protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest | null,
protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse
]>;Lists DataSourceReferences for a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourceReferencesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IDataSourceReference[],
protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest | null,
protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of DataSourceReference. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listDataSourceReferences(request, options, callback)
listDataSourceReferences(request: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSourceReference>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourceReferencesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSourceReference>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listDataSourceReferences(request, callback)
listDataSourceReferences(request: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSourceReference>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourceReferencesRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, protos.google.cloud.backupdr.v1.IListDataSourceReferencesResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSourceReference>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listDataSourceReferencesAsync(request, options)
listDataSourceReferencesAsync(request?: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IDataSourceReference>;Equivalent to listDataSourceReferences, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourceReferencesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IDataSourceReference> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing DataSourceReference. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The parent resource name.
* Format: projects/{project}/locations/{location}
*/
// const parent = 'abc123'
/**
* Optional. The maximum number of DataSourceReferences to return. The service
* may return fewer than this value. If unspecified, at most 50
* DataSourceReferences will be returned. The maximum value is 100; values
* above 100 will be coerced to 100.
*/
// const pageSize = 1234
/**
* Optional. A page token, received from a previous `ListDataSourceReferences`
* call. Provide this to retrieve the subsequent page.
* When paginating, all other parameters provided to
* `ListDataSourceReferences` must match the call that provided the page
* token.
*/
// const pageToken = 'abc123'
/**
* Optional. A filter expression that filters the results listed in the
* response. The expression must specify the field name, a comparison
* operator, and the value that you want to use for filtering.
* The following field and operator combinations are supported:
* * data_source_gcp_resource_info.gcp_resourcename with `=`, `!=`
* * data_source_gcp_resource_info.type with `=`, `!=`
*/
// const filter = 'abc123'
/**
* Optional. A comma-separated list of fields to order by, sorted in ascending
* order. Use "desc" after a field name for descending.
* Supported fields:
* * data_source
* * data_source_gcp_resource_info.gcp_resourcename
*/
// const orderBy = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callListDataSourceReferences() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.listDataSourceReferencesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDataSourceReferences();
listDataSourceReferencesStream(request, options)
listDataSourceReferencesStream(request?: protos.google.cloud.backupdr.v1.IListDataSourceReferencesRequest, options?: CallOptions): Transform;Equivalent to listDataSourceReferences, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourceReferencesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing DataSourceReference on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listDataSources(request, options)
listDataSources(request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IDataSource[],
protos.google.cloud.backupdr.v1.IListDataSourcesRequest | null,
protos.google.cloud.backupdr.v1.IListDataSourcesResponse
]>;Lists DataSources in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourcesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IDataSource[],
protos.google.cloud.backupdr.v1.IListDataSourcesRequest | null,
protos.google.cloud.backupdr.v1.IListDataSourcesResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listDataSources(request, options, callback)
listDataSources(request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListDataSourcesRequest, protos.google.cloud.backupdr.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSource>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourcesRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListDataSourcesRequest, protos.google.cloud.backupdr.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSource>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listDataSources(request, callback)
listDataSources(request: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListDataSourcesRequest, protos.google.cloud.backupdr.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSource>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourcesRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListDataSourcesRequest, protos.google.cloud.backupdr.v1.IListDataSourcesResponse | null | undefined, protos.google.cloud.backupdr.v1.IDataSource>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listDataSourcesAsync(request, options)
listDataSourcesAsync(request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IDataSource>;Equivalent to listDataSources, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourcesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IDataSource> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve data
* sources information, in the format
* 'projects/{project_id}/locations/{location}'. In Cloud Backup and DR,
* locations map to Google Cloud regions, for example **us-central1**.
* To retrieve data sources for all locations, use "-" for the
* '{location}' value.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Hint for how to order the results.
*/
// const orderBy = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callListDataSources() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.listDataSourcesAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListDataSources();
listDataSourcesStream(request, options)
listDataSourcesStream(request?: protos.google.cloud.backupdr.v1.IListDataSourcesRequest, options?: CallOptions): Transform;Equivalent to listDataSources, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListDataSourcesRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listLocationsAsync(request, options)
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;Lists information about the supported locations for this service. Returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
LocationProtos.google.cloud.location.IListLocationsRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<google.cloud.location.ILocation> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
const iterable = client.listLocationsAsync(request);
for await (const response of iterable) {
// process response
}
listManagementServers(request, options)
listManagementServers(request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, options?: CallOptions): Promise<[
protos.google.cloud.backupdr.v1.IManagementServer[],
protos.google.cloud.backupdr.v1.IListManagementServersRequest | null,
protos.google.cloud.backupdr.v1.IListManagementServersResponse
]>;Lists ManagementServers in a given project and location.
| Parameters | |
|---|---|
| Name | Description |
request |
IListManagementServersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
protos.google.cloud.backupdr.v1.IManagementServer[],
protos.google.cloud.backupdr.v1.IListManagementServersRequest | null,
protos.google.cloud.backupdr.v1.IListManagementServersResponse
]> |
{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using |
listManagementServers(request, options, callback)
listManagementServers(request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListManagementServersRequest, protos.google.cloud.backupdr.v1.IListManagementServersResponse | null | undefined, protos.google.cloud.backupdr.v1.IManagementServer>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListManagementServersRequest
|
options |
CallOptions
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListManagementServersRequest, protos.google.cloud.backupdr.v1.IListManagementServersResponse | null | undefined, protos.google.cloud.backupdr.v1.IManagementServer>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listManagementServers(request, callback)
listManagementServers(request: protos.google.cloud.backupdr.v1.IListManagementServersRequest, callback: PaginationCallback<protos.google.cloud.backupdr.v1.IListManagementServersRequest, protos.google.cloud.backupdr.v1.IListManagementServersResponse | null | undefined, protos.google.cloud.backupdr.v1.IManagementServer>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IListManagementServersRequest
|
callback |
PaginationCallback<protos.google.cloud.backupdr.v1.IListManagementServersRequest, protos.google.cloud.backupdr.v1.IListManagementServersResponse | null | undefined, protos.google.cloud.backupdr.v1.IManagementServer>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
listManagementServersAsync(request, options)
listManagementServersAsync(request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.backupdr.v1.IManagementServer>;Equivalent to listManagementServers, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
IListManagementServersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.cloud.backupdr.v1.IManagementServer> |
{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples. |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The project and location for which to retrieve management servers
* information, in the format 'projects/{project_id}/locations/{location}'. In
* Cloud BackupDR, locations map to Google Cloud regions, for example
* **us-central1**. To retrieve management servers for all locations, use "-"
* for the
* '{location}' value.
*/
// const parent = 'abc123'
/**
* Optional. Requested page size. Server may return fewer items than
* requested. If unspecified, server will pick an appropriate default.
*/
// const pageSize = 1234
/**
* Optional. A token identifying a page of results the server should return.
*/
// const pageToken = 'abc123'
/**
* Optional. Filtering results.
*/
// const filter = 'abc123'
/**
* Optional. Hint for how to order the results.
*/
// const orderBy = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callListManagementServers() {
// Construct request
const request = {
parent,
};
// Run request
const iterable = backupdrClient.listManagementServersAsync(request);
for await (const response of iterable) {
console.log(response);
}
}
callListManagementServers();
listManagementServersStream(request, options)
listManagementServersStream(request?: protos.google.cloud.backupdr.v1.IListManagementServersRequest, options?: CallOptions): Transform;Equivalent to listManagementServers, but returns a NodeJS Stream object.
| Parameters | |
|---|---|
| Name | Description |
request |
IListManagementServersRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Transform |
{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using |
listOperationsAsync(request, options)
listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.
For-await-of syntax is used with the iterable to recursively get response element on-demand.
| Parameters | |
|---|---|
| Name | Description |
request |
ListOperationsRequest
The request object that will be sent. |
options |
CallOptions
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable<protos.google.longrunning.IOperation> |
{Object} An iterable Object that conforms to iteration protocols. |
const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)
locationPath(project, location)
locationPath(project: string, location: string): string;Return a fully-qualified location resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
managementServerPath(project, location, managementserver)
managementServerPath(project: string, location: string, managementserver: string): string;Return a fully-qualified managementServer resource name string.
| Parameters | |
|---|---|
| Name | Description |
project |
string
|
location |
string
|
managementserver |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
matchBackupFromBackupName(backupName)
matchBackupFromBackupName(backupName: string): string | number;Parse the backup from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup. |
matchBackupPlanAssociationFromBackupPlanAssociationName(backupPlanAssociationName)
matchBackupPlanAssociationFromBackupPlanAssociationName(backupPlanAssociationName: string): string | number;Parse the backup_plan_association from BackupPlanAssociation resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanAssociationName |
string
A fully-qualified path representing BackupPlanAssociation resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup_plan_association. |
matchBackupPlanFromBackupPlanName(backupPlanName)
matchBackupPlanFromBackupPlanName(backupPlanName: string): string | number;Parse the backup_plan from BackupPlan resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanName |
string
A fully-qualified path representing BackupPlan resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup_plan. |
matchBackupPlanFromBackupPlanRevisionName(backupPlanRevisionName)
matchBackupPlanFromBackupPlanRevisionName(backupPlanRevisionName: string): string | number;Parse the backup_plan from BackupPlanRevision resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanRevisionName |
string
A fully-qualified path representing BackupPlanRevision resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backup_plan. |
matchBackupvaultFromBackupName(backupName)
matchBackupvaultFromBackupName(backupName: string): string | number;Parse the backupvault from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backupvault. |
matchBackupvaultFromBackupVaultName(backupVaultName)
matchBackupvaultFromBackupVaultName(backupVaultName: string): string | number;Parse the backupvault from BackupVault resource.
| Parameter | |
|---|---|
| Name | Description |
backupVaultName |
string
A fully-qualified path representing BackupVault resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backupvault. |
matchBackupvaultFromDataSourceName(dataSourceName)
matchBackupvaultFromDataSourceName(dataSourceName: string): string | number;Parse the backupvault from DataSource resource.
| Parameter | |
|---|---|
| Name | Description |
dataSourceName |
string
A fully-qualified path representing DataSource resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the backupvault. |
matchDatasourceFromBackupName(backupName)
matchDatasourceFromBackupName(backupName: string): string | number;Parse the datasource from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the datasource. |
matchDatasourceFromDataSourceName(dataSourceName)
matchDatasourceFromDataSourceName(dataSourceName: string): string | number;Parse the datasource from DataSource resource.
| Parameter | |
|---|---|
| Name | Description |
dataSourceName |
string
A fully-qualified path representing DataSource resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the datasource. |
matchDataSourceReferenceFromDataSourceReferenceName(dataSourceReferenceName)
matchDataSourceReferenceFromDataSourceReferenceName(dataSourceReferenceName: string): string | number;Parse the data_source_reference from DataSourceReference resource.
| Parameter | |
|---|---|
| Name | Description |
dataSourceReferenceName |
string
A fully-qualified path representing DataSourceReference resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the data_source_reference. |
matchLocationFromBackupName(backupName)
matchLocationFromBackupName(backupName: string): string | number;Parse the location from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromBackupPlanAssociationName(backupPlanAssociationName)
matchLocationFromBackupPlanAssociationName(backupPlanAssociationName: string): string | number;Parse the location from BackupPlanAssociation resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanAssociationName |
string
A fully-qualified path representing BackupPlanAssociation resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromBackupPlanName(backupPlanName)
matchLocationFromBackupPlanName(backupPlanName: string): string | number;Parse the location from BackupPlan resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanName |
string
A fully-qualified path representing BackupPlan resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromBackupPlanRevisionName(backupPlanRevisionName)
matchLocationFromBackupPlanRevisionName(backupPlanRevisionName: string): string | number;Parse the location from BackupPlanRevision resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanRevisionName |
string
A fully-qualified path representing BackupPlanRevision resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromBackupVaultName(backupVaultName)
matchLocationFromBackupVaultName(backupVaultName: string): string | number;Parse the location from BackupVault resource.
| Parameter | |
|---|---|
| Name | Description |
backupVaultName |
string
A fully-qualified path representing BackupVault resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromDataSourceName(dataSourceName)
matchLocationFromDataSourceName(dataSourceName: string): string | number;Parse the location from DataSource resource.
| Parameter | |
|---|---|
| Name | Description |
dataSourceName |
string
A fully-qualified path representing DataSource resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromDataSourceReferenceName(dataSourceReferenceName)
matchLocationFromDataSourceReferenceName(dataSourceReferenceName: string): string | number;Parse the location from DataSourceReference resource.
| Parameter | |
|---|---|
| Name | Description |
dataSourceReferenceName |
string
A fully-qualified path representing DataSourceReference resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromLocationName(locationName)
matchLocationFromLocationName(locationName: string): string | number;Parse the location from Location resource.
| Parameter | |
|---|---|
| Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchLocationFromManagementServerName(managementServerName)
matchLocationFromManagementServerName(managementServerName: string): string | number;Parse the location from ManagementServer resource.
| Parameter | |
|---|---|
| Name | Description |
managementServerName |
string
A fully-qualified path representing ManagementServer resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the location. |
matchManagementserverFromManagementServerName(managementServerName)
matchManagementserverFromManagementServerName(managementServerName: string): string | number;Parse the managementserver from ManagementServer resource.
| Parameter | |
|---|---|
| Name | Description |
managementServerName |
string
A fully-qualified path representing ManagementServer resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the managementserver. |
matchProjectFromBackupName(backupName)
matchProjectFromBackupName(backupName: string): string | number;Parse the project from Backup resource.
| Parameter | |
|---|---|
| Name | Description |
backupName |
string
A fully-qualified path representing Backup resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromBackupPlanAssociationName(backupPlanAssociationName)
matchProjectFromBackupPlanAssociationName(backupPlanAssociationName: string): string | number;Parse the project from BackupPlanAssociation resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanAssociationName |
string
A fully-qualified path representing BackupPlanAssociation resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromBackupPlanName(backupPlanName)
matchProjectFromBackupPlanName(backupPlanName: string): string | number;Parse the project from BackupPlan resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanName |
string
A fully-qualified path representing BackupPlan resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromBackupPlanRevisionName(backupPlanRevisionName)
matchProjectFromBackupPlanRevisionName(backupPlanRevisionName: string): string | number;Parse the project from BackupPlanRevision resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanRevisionName |
string
A fully-qualified path representing BackupPlanRevision resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromBackupVaultName(backupVaultName)
matchProjectFromBackupVaultName(backupVaultName: string): string | number;Parse the project from BackupVault resource.
| Parameter | |
|---|---|
| Name | Description |
backupVaultName |
string
A fully-qualified path representing BackupVault resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromDataSourceName(dataSourceName)
matchProjectFromDataSourceName(dataSourceName: string): string | number;Parse the project from DataSource resource.
| Parameter | |
|---|---|
| Name | Description |
dataSourceName |
string
A fully-qualified path representing DataSource resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromDataSourceReferenceName(dataSourceReferenceName)
matchProjectFromDataSourceReferenceName(dataSourceReferenceName: string): string | number;Parse the project from DataSourceReference resource.
| Parameter | |
|---|---|
| Name | Description |
dataSourceReferenceName |
string
A fully-qualified path representing DataSourceReference resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromLocationName(locationName)
matchProjectFromLocationName(locationName: string): string | number;Parse the project from Location resource.
| Parameter | |
|---|---|
| Name | Description |
locationName |
string
A fully-qualified path representing Location resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromManagementServerName(managementServerName)
matchProjectFromManagementServerName(managementServerName: string): string | number;Parse the project from ManagementServer resource.
| Parameter | |
|---|---|
| Name | Description |
managementServerName |
string
A fully-qualified path representing ManagementServer resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchProjectFromProjectName(projectName)
matchProjectFromProjectName(projectName: string): string | number;Parse the project from Project resource.
| Parameter | |
|---|---|
| Name | Description |
projectName |
string
A fully-qualified path representing Project resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the project. |
matchRevisionFromBackupPlanRevisionName(backupPlanRevisionName)
matchRevisionFromBackupPlanRevisionName(backupPlanRevisionName: string): string | number;Parse the revision from BackupPlanRevision resource.
| Parameter | |
|---|---|
| Name | Description |
backupPlanRevisionName |
string
A fully-qualified path representing BackupPlanRevision resource. |
| Returns | |
|---|---|
| Type | Description |
string | number |
{string} A string representing the revision. |
projectPath(project)
projectPath(project: string): string;Return a fully-qualified project resource name string.
| Parameter | |
|---|---|
| Name | Description |
project |
string
|
| Returns | |
|---|---|
| Type | Description |
string |
{string} Resource name string. |
restoreBackup(request, options)
restoreBackup(request?: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IRestoreBackupResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Restore from a Backup
| Parameters | |
|---|---|
| Name | Description |
request |
IRestoreBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IRestoreBackupResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource name of the Backup instance, in the format
* 'projects/* /locations/* /backupVaults/* /dataSources/* /backups/'.
*/
// const name = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Compute Engine target environment to be used during restore.
*/
// const computeInstanceTargetEnvironment = {}
/**
* Disk target environment to be used during restore.
*/
// const diskTargetEnvironment = {}
/**
* Region disk target environment to be used during restore.
*/
// const regionDiskTargetEnvironment = {}
/**
* Compute Engine instance properties to be overridden during restore.
*/
// const computeInstanceRestoreProperties = {}
/**
* Disk properties to be overridden during restore.
*/
// const diskRestoreProperties = {}
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callRestoreBackup() {
// Construct request
const request = {
name,
};
// Run request
const [operation] = await backupdrClient.restoreBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callRestoreBackup();
restoreBackup(request, options, callback)
restoreBackup(request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IRestoreBackupResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRestoreBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IRestoreBackupResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
restoreBackup(request, callback)
restoreBackup(request: protos.google.cloud.backupdr.v1.IRestoreBackupRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IRestoreBackupResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IRestoreBackupRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IRestoreBackupResponse, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
setIamPolicy(request, options, callback)
setIamPolicy(request: IamProtos.google.iam.v1.SetIamPolicyRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.Policy, IamProtos.google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.Policy]>;Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
| Parameters | |
|---|---|
| Name | Description |
request |
IamProtos.google.iam.v1.SetIamPolicyRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.Policy, google.iam.v1.SetIamPolicyRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
| Returns | |
|---|---|
| Type | Description |
Promise<[google.iam.v1.Policy]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
testIamPermissions(request, options, callback)
testIamPermissions(request: IamProtos.google.iam.v1.TestIamPermissionsRequest, options?: gax.CallOptions | Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>, callback?: Callback<IamProtos.google.iam.v1.TestIamPermissionsResponse, IamProtos.google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>): Promise<[IamProtos.google.iam.v1.TestIamPermissionsResponse]>;Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
| Parameters | |
|---|---|
| Name | Description |
request |
IamProtos.google.iam.v1.TestIamPermissionsRequest
The request object that will be sent. |
options |
CallOptions | Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details. |
callback |
Callback<google.iam.v1.TestIamPermissionsResponse, google.iam.v1.TestIamPermissionsRequest | null | undefined, {} | null | undefined>
The function which will be called with the result of the API call. The second parameter to the callback is an object representing . |
| Returns | |
|---|---|
| Type | Description |
Promise<[google.iam.v1.TestIamPermissionsResponse]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |
triggerBackup(request, options)
triggerBackup(request?: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Triggers a new Backup.
| Parameters | |
|---|---|
| Name | Description |
request |
ITriggerBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Name of the backup plan association resource, in the format
* `projects/{project}/locations/{location}/backupPlanAssociations/{backupPlanAssociationId}`
*/
// const name = 'abc123'
/**
* Required. backup rule_id for which a backup needs to be triggered.
*/
// const ruleId = 'abc123'
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes after the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callTriggerBackup() {
// Construct request
const request = {
name,
ruleId,
};
// Run request
const [operation] = await backupdrClient.triggerBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callTriggerBackup();
triggerBackup(request, options, callback)
triggerBackup(request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ITriggerBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
triggerBackup(request, callback)
triggerBackup(request: protos.google.cloud.backupdr.v1.ITriggerBackupRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
ITriggerBackupRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateBackup(request, options)
updateBackup(request?: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the settings of a Backup.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* Backup resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
*/
// const updateMask = {}
/**
* Required. The resource being updated
*/
// const backup = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateBackup() {
// Construct request
const request = {
updateMask,
backup,
};
// Run request
const [operation] = await backupdrClient.updateBackup(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackup();
updateBackup(request, options, callback)
updateBackup(request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateBackup(request, callback)
updateBackup(request: protos.google.cloud.backupdr.v1.IUpdateBackupRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackup, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateBackupPlan(request, options)
updateBackupPlan(request?: protos.google.cloud.backupdr.v1.IUpdateBackupPlanRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Update a BackupPlan.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupPlanRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource being updated
*/
// const backupPlan = {}
/**
* Required. The list of fields to update.
* Field mask is used to specify the fields to be overwritten in the
* BackupPlan resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
* Currently, these fields are supported in update: description, schedules,
* retention period, adding and removing Backup Rules.
*/
// const updateMask = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateBackupPlan() {
// Construct request
const request = {
backupPlan,
updateMask,
};
// Run request
const [operation] = await backupdrClient.updateBackupPlan(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackupPlan();
updateBackupPlan(request, options, callback)
updateBackupPlan(request: protos.google.cloud.backupdr.v1.IUpdateBackupPlanRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupPlanRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateBackupPlan(request, callback)
updateBackupPlan(request: protos.google.cloud.backupdr.v1.IUpdateBackupPlanRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupPlanRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlan, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateBackupPlanAssociation(request, options)
updateBackupPlanAssociation(request?: protos.google.cloud.backupdr.v1.IUpdateBackupPlanAssociationRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Update a BackupPlanAssociation.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupPlanAssociationRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. The resource being updated
*/
// const backupPlanAssociation = {}
/**
* Required. The list of fields to update.
* Field mask is used to specify the fields to be overwritten in the
* BackupPlanAssociation resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
* Currently backup_plan_association.backup_plan is the only supported field.
*/
// const updateMask = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and t
* he request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateBackupPlanAssociation() {
// Construct request
const request = {
backupPlanAssociation,
updateMask,
};
// Run request
const [operation] = await backupdrClient.updateBackupPlanAssociation(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackupPlanAssociation();
updateBackupPlanAssociation(request, options, callback)
updateBackupPlanAssociation(request: protos.google.cloud.backupdr.v1.IUpdateBackupPlanAssociationRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupPlanAssociationRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateBackupPlanAssociation(request, callback)
updateBackupPlanAssociation(request: protos.google.cloud.backupdr.v1.IUpdateBackupPlanAssociationRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupPlanAssociationRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupPlanAssociation, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateBackupVault(request, options)
updateBackupVault(request?: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the settings of a BackupVault.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupVaultRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* BackupVault resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
*/
// const updateMask = {}
/**
* Required. The resource being updated
*/
// const backupVault = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. Only validate the request, but do not perform mutations.
* The default is 'false'.
*/
// const validateOnly = true
/**
* Optional. If set to true, will not check plan duration against backup vault
* enforcement duration.
*/
// const force = true
/**
* Optional. If set to true, we will force update access restriction even if
* some non compliant data sources are present. The default is 'false'.
*/
// const forceUpdateAccessRestriction = true
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateBackupVault() {
// Construct request
const request = {
updateMask,
backupVault,
};
// Run request
const [operation] = await backupdrClient.updateBackupVault(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateBackupVault();
updateBackupVault(request, options, callback)
updateBackupVault(request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupVaultRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateBackupVault(request, callback)
updateBackupVault(request: protos.google.cloud.backupdr.v1.IUpdateBackupVaultRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateBackupVaultRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IBackupVault, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateDataSource(request, options)
updateDataSource(request?: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, options?: CallOptions): Promise<[
LROperation<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]>;Updates the settings of a DataSource.
| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateDataSourceRequest
The request object that will be sent. |
options |
CallOptions
Call options. See CallOptions for more details. |
| Returns | |
|---|---|
| Type | Description |
Promise<[
LROperation<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IOperationMetadata>,
protos.google.longrunning.IOperation | undefined,
{} | undefined
]> |
{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its |
/**
* 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.
* TODO(developer): Uncomment these variables before running the sample.
*/
/**
* Required. Field mask is used to specify the fields to be overwritten in the
* DataSource resource by the update.
* The fields specified in the update_mask are relative to the resource, not
* the full request. A field will be overwritten if it is in the mask. If the
* user does not provide a mask then the request will fail.
*/
// const updateMask = {}
/**
* Required. The resource being updated
*/
// const dataSource = {}
/**
* Optional. An optional request ID to identify requests. Specify a unique
* request ID so that if you must retry your request, the server will know to
* ignore the request if it has already been completed. The server will
* guarantee that for at least 60 minutes since the first request.
* For example, consider a situation where you make an initial request and
* the request times out. If you make the request again with the same request
* ID, the server can check if original operation with the same request ID
* was received, and if so, will ignore the second request. This prevents
* clients from accidentally creating duplicate commitments.
* The request ID must be a valid UUID with the exception that zero UUID is
* not supported (00000000-0000-0000-0000-000000000000).
*/
// const requestId = 'abc123'
/**
* Optional. Enable upsert.
*/
// const allowMissing = true
// Imports the Backupdr library
const {BackupDRClient} = require('@google-cloud/backupdr').v1;
// Instantiates a client
const backupdrClient = new BackupDRClient();
async function callUpdateDataSource() {
// Construct request
const request = {
updateMask,
dataSource,
};
// Run request
const [operation] = await backupdrClient.updateDataSource(request);
const [response] = await operation.promise();
console.log(response);
}
callUpdateDataSource();
updateDataSource(request, options, callback)
updateDataSource(request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateDataSourceRequest
|
options |
CallOptions
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|
updateDataSource(request, callback)
updateDataSource(request: protos.google.cloud.backupdr.v1.IUpdateDataSourceRequest, callback: Callback<LROperation<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;| Parameters | |
|---|---|
| Name | Description |
request |
IUpdateDataSourceRequest
|
callback |
Callback<LROperation<protos.google.cloud.backupdr.v1.IDataSource, protos.google.cloud.backupdr.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
|
| Returns | |
|---|---|
| Type | Description |
void |
|