The RegionDisks API. v1beta
Package
@google-cloud/computeConstructors
(constructor)(opts, gaxInstance)
constructor(opts?:ClientOptions,gaxInstance?:typeofgax|typeofgax.fallback);
Construct an instance of RegionDisksClient.
| Parameters |
|---|
| Name | Description |
opts | ClientOptions
|
gaxInstance | typeofgax | typeoffallback
: loaded instance ofgoogle-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new RegionDisksClient({fallback: true}, gax); ``` |
Properties
apiEndpoint
The DNS address for this API service.
apiEndpoint
staticgetapiEndpoint():string;
The DNS address for this API service - same as servicePath.
auth
descriptors
innerApiCalls
innerApiCalls:{[name:string]:Function;};
port
The port for this API service.
regionDisksStub
regionDisksStub?:Promise<{[name:string]:Function;}>;
scopes
staticgetscopes():string[];
The scopes needed to make gRPC calls for every method defined in this service.
servicePath
staticgetservicePath():string;
The DNS address for this API service.
universeDomain
getuniverseDomain():string;
warn
warn:(code:string,message:string,warnType?:string)=>void;
Methods
addResourcePolicies(request, options)
addResourcePolicies(request?:protos.google.cloud.compute.v1beta.IAddResourcePoliciesRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * The disk name for this request. */// const disk = 'abc123'/** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * The body resource for this request */// const regionDisksAddResourcePoliciesRequestResource = {}/** * 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. * 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 Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallAddResourcePolicies(){// Construct requestconstrequest={disk,project,region,regionDisksAddResourcePoliciesRequestResource,};// Run requestconstresponse=awaitcomputeClient.addResourcePolicies(request);console.log(response);}callAddResourcePolicies();
addResourcePolicies(request, options, callback)
addResourcePolicies(request:protos.google.cloud.compute.v1beta.IAddResourcePoliciesRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IAddResourcePoliciesRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
addResourcePolicies(request, callback)
addResourcePolicies(request:protos.google.cloud.compute.v1beta.IAddResourcePoliciesRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IAddResourcePoliciesRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
bulkInsert(request, options)
bulkInsert(request?:protos.google.cloud.compute.v1beta.IBulkInsertRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Bulk create a set of disks.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * The body resource for this request */// const bulkInsertDiskResourceResource = {}/** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * 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. * 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 Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallBulkInsert(){// Construct requestconstrequest={bulkInsertDiskResourceResource,project,region,};// Run requestconstresponse=awaitcomputeClient.bulkInsert(request);console.log(response);}callBulkInsert();
bulkInsert(request, options, callback)
bulkInsert(request:protos.google.cloud.compute.v1beta.IBulkInsertRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IBulkInsertRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
bulkInsert(request, callback)
bulkInsert(request:protos.google.cloud.compute.v1beta.IBulkInsertRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IBulkInsertRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
close()
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. |
createSnapshot(request, options)
createSnapshot(request?:protos.google.cloud.compute.v1beta.ICreateSnapshotRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Creates a snapshot of a specified persistent disk. For regular snapshot creation, consider using snapshots.insert instead, as that method supports more features, such as creating snapshots in a project different from the source disk project.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * Name of the regional persistent disk to snapshot. */// const disk = 'abc123'/** * Project ID for this request. */// const project = 'my-project'/** * Name of the region for this request. */// const region = 'us-central1'/** * 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. * 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'/** * The body resource for this request */// const snapshotResource = {}// Imports the Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallCreateSnapshot(){// Construct requestconstrequest={disk,project,region,snapshotResource,};// Run requestconstresponse=awaitcomputeClient.createSnapshot(request);console.log(response);}callCreateSnapshot();
createSnapshot(request, options, callback)
createSnapshot(request:protos.google.cloud.compute.v1beta.ICreateSnapshotRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.ICreateSnapshotRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
createSnapshot(request, callback)
createSnapshot(request:protos.google.cloud.compute.v1beta.ICreateSnapshotRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.ICreateSnapshotRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
delete(request, options)
delete(request?:protos.google.cloud.compute.v1beta.IDeleteRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete anysnapshots previously made from the disk. You must separatelydelete snapshots.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * Name of the regional persistent disk to delete. */// const disk = 'abc123'/** * Project ID for this request. */// const project = 'my-project'/** * Name of the region for this request. */// const region = 'us-central1'/** * 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. * 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 Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallDelete(){// Construct requestconstrequest={disk,project,region,};// Run requestconstresponse=awaitcomputeClient.delete(request);console.log(response);}callDelete();
delete(request, options, callback)
delete(request:protos.google.cloud.compute.v1beta.IDeleteRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IDeleteRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
delete(request, callback)
delete(request:protos.google.cloud.compute.v1beta.IDeleteRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IDeleteRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
get(request, options)
get(request?:protos.google.cloud.compute.v1beta.IGetRegionDiskRequest,options?:CallOptions):Promise<[protos.google.cloud.compute.v1beta.IDisk,protos.google.cloud.compute.v1beta.IGetRegionDiskRequest|undefined,{}|undefined]>;
Returns a specified regional persistent disk.
Example/** * 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. *//** * Name of the regional persistent disk to return. */// const disk = 'abc123'/** * Project ID for this request. */// const project = 'my-project'/** * Name of the region for this request. */// const region = 'us-central1'// Imports the Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallGet(){// Construct requestconstrequest={disk,project,region,};// Run requestconstresponse=awaitcomputeClient.get(request);console.log(response);}callGet();
get(request, options, callback)
get(request:protos.google.cloud.compute.v1beta.IGetRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IDisk,protos.google.cloud.compute.v1beta.IGetRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
get(request, callback)
get(request:protos.google.cloud.compute.v1beta.IGetRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IDisk,protos.google.cloud.compute.v1beta.IGetRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
getIamPolicy(request, options)
getIamPolicy(request?:protos.google.cloud.compute.v1beta.IGetIamPolicyRegionDiskRequest,options?:CallOptions):Promise<[protos.google.cloud.compute.v1beta.IPolicy,protos.google.cloud.compute.v1beta.IGetIamPolicyRegionDiskRequest|undefined,{}|undefined]>;
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Example/** * 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. *//** * Requested IAM Policy version. */// const optionsRequestedPolicyVersion = 1234/** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * Name or id of the resource for this request. */// const resource = 'abc123'// Imports the Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallGetIamPolicy(){// Construct requestconstrequest={project,region,resource,};// Run requestconstresponse=awaitcomputeClient.getIamPolicy(request);console.log(response);}callGetIamPolicy();
getIamPolicy(request, options, callback)
getIamPolicy(request:protos.google.cloud.compute.v1beta.IGetIamPolicyRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IPolicy,protos.google.cloud.compute.v1beta.IGetIamPolicyRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
getIamPolicy(request, callback)
getIamPolicy(request:protos.google.cloud.compute.v1beta.IGetIamPolicyRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IPolicy,protos.google.cloud.compute.v1beta.IGetIamPolicyRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
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. |
insert(request, options)
insert(request?:protos.google.cloud.compute.v1beta.IInsertRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Creates a persistent regional disk in the specified project using the data included in the request.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * The body resource for this request */// const diskResource = {}/** * Project ID for this request. */// const project = 'my-project'/** * Name of the region for this request. */// const region = 'us-central1'/** * 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. * 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'/** * Source image to restore onto a disk. This field is optional. */// const sourceImage = 'abc123'// Imports the Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallInsert(){// Construct requestconstrequest={diskResource,project,region,};// Run requestconstresponse=awaitcomputeClient.insert(request);console.log(response);}callInsert();
insert(request, options, callback)
insert(request:protos.google.cloud.compute.v1beta.IInsertRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IInsertRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
insert(request, callback)
insert(request:protos.google.cloud.compute.v1beta.IInsertRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IInsertRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
list(request, options)
list(request?:protos.google.cloud.compute.v1beta.IListRegionDisksRequest,options?:CallOptions):Promise<[protos.google.cloud.compute.v1beta.IDisk[],protos.google.cloud.compute.v1beta.IListRegionDisksRequest|null,protos.google.cloud.compute.v1beta.IDiskList]>;
Retrieves the list of persistent disks contained within the specified region.
list(request, options, callback)
list(request:protos.google.cloud.compute.v1beta.IListRegionDisksRequest,options:CallOptions,callback:PaginationCallback<protos.google.cloud.compute.v1beta.IListRegionDisksRequest,protos.google.cloud.compute.v1beta.IDiskList|null|undefined,protos.google.cloud.compute.v1beta.IDisk>):void;
| Returns |
|---|
| Type | Description |
void | |
list(request, callback)
list(request:protos.google.cloud.compute.v1beta.IListRegionDisksRequest,callback:PaginationCallback<protos.google.cloud.compute.v1beta.IListRegionDisksRequest,protos.google.cloud.compute.v1beta.IDiskList|null|undefined,protos.google.cloud.compute.v1beta.IDisk>):void;
| Returns |
|---|
| Type | Description |
void | |
listAsync(request, options)
listAsync(request?:protos.google.cloud.compute.v1beta.IListRegionDisksRequest,options?:CallOptions):AsyncIterable<protos.google.cloud.compute.v1beta.IDisk>;
Equivalent tolist, but returns an iterable object.
for-await-of syntax is used with the iterable to get response elements on-demand.
| Returns |
|---|
| Type | Description |
AsyncIterable<protos.google.cloud.compute.v1beta.IDisk> | {Object} An iterable Object that allowsasync 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 thedocumentation for more details and examples. |
Example/** * 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. *//***Afilterexpressionthatfiltersresourceslistedintheresponse.Most*Computeresourcessupporttwotypesoffilterexpressions:*expressionsthatsupportregularexpressionsandexpressionsthatfollow*APIimprovementproposalAIP-160.*Thesetwotypesoffilterexpressionscannotbemixedinonerequest.*IfyouwanttouseAIP-160,yourexpressionmustspecifythefieldname,an*operator,andthevaluethatyouwanttouseforfiltering.Thevalue*mustbeastring,anumber,oraboolean.Theoperator*mustbeeither`=`,`!=`,`>`,`<`,><=`, `="">=` or `:`. * For example, if you are filtering Compute Engine instances, you can * exclude instances named `example-instance` by specifying * `name!=example-instance`. * The `:*` comparison can be used to test whether a key has been defined. * For example, to find all objects with `owner` label use: * * labels.owner:* *
- You can also filter nested fields. For example, you could specify
scheduling.automaticRestart = false to include instances only- if they are not scheduled for automatic restarts. You can use filtering
- on nested fields to filter based onresource labels.
- To filter on multiple expressions, provide each separate expression within
- parentheses. For example:
- (scheduling.automaticRestart = true)
- (cpuPlatform = "Intel Skylake")
- By default, each expression is an
AND expression. However, you - can include
AND andOR expressions explicitly. - For example:
- (cpuPlatform = "Intel Skylake") OR
- (cpuPlatform = "Intel Broadwell") AND
- (scheduling.automaticRestart = true)
- If you want to use a regular expression, use the
eq (equal) orne - (not equal) operator against a single un-parenthesized expression with or
- without quotes or against multiple parenthesized expressions. Examples:
fieldname eq unquoted literalfieldname eq 'single quoted literal'fieldname eq "double quoted literal"(fieldname1 eq literal) (fieldname2 ne "literal")- The literal value is interpreted as a regular expression using GoogleRE2 library syntax.
- The literal value must match the entire field.
- For example, to filter for instances that do not end with name "instance",
- you would use
name ne .*instance. - You cannot combine constraints on multiple fields using regular
- expressions./// const filter = 'abc123'/*
- The maximum number of results per page that should be returned.
- If the number of available results is larger than
maxResults, - Compute Engine returns a
nextPageToken that can be used to get - the next page of results in subsequent list requests. Acceptable values are
0 to500, inclusive. (Default:500)/// const maxResults = 1234/*- Sorts list results by a certain order. By default, results
- are returned in alphanumerical order based on the resource name.
- You can also sort results in descending order based on the creation
- timestamp using
orderBy="creationTimestamp desc". This sorts - results based on the
creationTimestamp field in - reverse chronological order (newest result first). Use this to sort
- resources like operations so that the newest operation is returned first.
- Currently, only sorting by
name or creationTimestamp desc is supported./// const orderBy = 'abc123'/*- Specifies a page token to use. Set
pageToken to the nextPageToken returned by a previous list request to get- the next page of results./// const pageToken = 'abc123'/*
- Project ID for this request./// const project = 'my-project'/*
- Name of the region for this request./// const region = 'us-central1'/*
- Opt-in for partial success behavior which provides partial results in case
- of failure. The default value is false.
- For example, when partial success behavior is enabled, aggregatedList for a
- single zone scope either returns all resources in the zone or no resources,
with an error code.*/// const returnPartialSuccess = true
// Imports the Compute libraryconst {RegionDisksClient} = require('@google-cloud/compute').v1beta;
// Instantiates a clientconst computeClient = new RegionDisksClient();
async function callList() {// Construct requestconst request = {project,region,};
// Run requestconst iterable = computeClient.listAsync(request);for await (const response of iterable) { console.log(response);}}
callList();
listStream(request, options)
listStream(request?:protos.google.cloud.compute.v1beta.IListRegionDisksRequest,options?:CallOptions):Transform;
Equivalent tolist, but returns a NodeJS Stream object.
| 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 usinglistAsync() method described below for async iteration which you can stop as needed. Please see thedocumentation for more details and examples. |
removeResourcePolicies(request, options)
removeResourcePolicies(request?:protos.google.cloud.compute.v1beta.IRemoveResourcePoliciesRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Removes resource policies from a regional disk.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * The disk name for this request. */// const disk = 'abc123'/** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * The body resource for this request */// const regionDisksRemoveResourcePoliciesRequestResource = {}/** * 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. * 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 Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallRemoveResourcePolicies(){// Construct requestconstrequest={disk,project,region,regionDisksRemoveResourcePoliciesRequestResource,};// Run requestconstresponse=awaitcomputeClient.removeResourcePolicies(request);console.log(response);}callRemoveResourcePolicies();
removeResourcePolicies(request, options, callback)
removeResourcePolicies(request:protos.google.cloud.compute.v1beta.IRemoveResourcePoliciesRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IRemoveResourcePoliciesRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
removeResourcePolicies(request, callback)
removeResourcePolicies(request:protos.google.cloud.compute.v1beta.IRemoveResourcePoliciesRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IRemoveResourcePoliciesRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
resize(request, options)
resize(request?:protos.google.cloud.compute.v1beta.IResizeRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Resizes the specified regional persistent disk.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * Name of the regional persistent disk. */// const disk = 'abc123'/** * The project ID for this request. */// const project = 'my-project'/** * Name of the region for this request. */// const region = 'us-central1'/** * The body resource for this request */// const regionDisksResizeRequestResource = {}/** * 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. * 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 Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallResize(){// Construct requestconstrequest={disk,project,region,regionDisksResizeRequestResource,};// Run requestconstresponse=awaitcomputeClient.resize(request);console.log(response);}callResize();
resize(request, options, callback)
resize(request:protos.google.cloud.compute.v1beta.IResizeRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IResizeRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
resize(request, callback)
resize(request:protos.google.cloud.compute.v1beta.IResizeRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IResizeRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
setIamPolicy(request, options)
setIamPolicy(request?:protos.google.cloud.compute.v1beta.ISetIamPolicyRegionDiskRequest,options?:CallOptions):Promise<[protos.google.cloud.compute.v1beta.IPolicy,protos.google.cloud.compute.v1beta.ISetIamPolicyRegionDiskRequest|undefined,{}|undefined]>;
Sets the access control policy on the specified resource. Replaces any existing policy.
Example/** * 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. *//** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * The body resource for this request */// const regionSetPolicyRequestResource = {}/** * Name or id of the resource for this request. */// const resource = 'abc123'// Imports the Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallSetIamPolicy(){// Construct requestconstrequest={project,region,regionSetPolicyRequestResource,resource,};// Run requestconstresponse=awaitcomputeClient.setIamPolicy(request);console.log(response);}callSetIamPolicy();
setIamPolicy(request, options, callback)
setIamPolicy(request:protos.google.cloud.compute.v1beta.ISetIamPolicyRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IPolicy,protos.google.cloud.compute.v1beta.ISetIamPolicyRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
setIamPolicy(request, callback)
setIamPolicy(request:protos.google.cloud.compute.v1beta.ISetIamPolicyRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IPolicy,protos.google.cloud.compute.v1beta.ISetIamPolicyRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
setLabels(request, options)
setLabels(request?:protos.google.cloud.compute.v1beta.ISetLabelsRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Sets the labels on the target regional disk.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * Project ID for this request. */// const project = 'my-project'/** * The region for this request. */// const region = 'us-central1'/** * The body resource for this request */// const regionSetLabelsRequestResource = {}/** * 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. * 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'/** * Name or id of the resource for this request. */// const resource = 'abc123'// Imports the Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallSetLabels(){// Construct requestconstrequest={project,region,regionSetLabelsRequestResource,resource,};// Run requestconstresponse=awaitcomputeClient.setLabels(request);console.log(response);}callSetLabels();
setLabels(request, options, callback)
setLabels(request:protos.google.cloud.compute.v1beta.ISetLabelsRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.ISetLabelsRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
setLabels(request, callback)
setLabels(request:protos.google.cloud.compute.v1beta.ISetLabelsRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.ISetLabelsRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
startAsyncReplication(request, options)
startAsyncReplication(request?:protos.google.cloud.compute.v1beta.IStartAsyncReplicationRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Starts asynchronous replication. Must be invoked on the primary disk.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * The name of the persistent disk. */// const disk = 'abc123'/** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * The body resource for this request */// const regionDisksStartAsyncReplicationRequestResource = {}/** * 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. * 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 Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallStartAsyncReplication(){// Construct requestconstrequest={disk,project,region,regionDisksStartAsyncReplicationRequestResource,};// Run requestconstresponse=awaitcomputeClient.startAsyncReplication(request);console.log(response);}callStartAsyncReplication();
startAsyncReplication(request, options, callback)
startAsyncReplication(request:protos.google.cloud.compute.v1beta.IStartAsyncReplicationRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IStartAsyncReplicationRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
startAsyncReplication(request, callback)
startAsyncReplication(request:protos.google.cloud.compute.v1beta.IStartAsyncReplicationRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IStartAsyncReplicationRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
stopAsyncReplication(request, options)
stopAsyncReplication(request?:protos.google.cloud.compute.v1beta.IStopAsyncReplicationRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * The name of the persistent disk. */// const disk = 'abc123'/** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * 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. * 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 Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallStopAsyncReplication(){// Construct requestconstrequest={disk,project,region,};// Run requestconstresponse=awaitcomputeClient.stopAsyncReplication(request);console.log(response);}callStopAsyncReplication();
stopAsyncReplication(request, options, callback)
stopAsyncReplication(request:protos.google.cloud.compute.v1beta.IStopAsyncReplicationRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IStopAsyncReplicationRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
stopAsyncReplication(request, callback)
stopAsyncReplication(request:protos.google.cloud.compute.v1beta.IStopAsyncReplicationRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IStopAsyncReplicationRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
stopGroupAsyncReplication(request, options)
stopGroupAsyncReplication(request?:protos.google.cloud.compute.v1beta.IStopGroupAsyncReplicationRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * The body resource for this request */// const disksStopGroupAsyncReplicationResourceResource = {}/** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. This must be the region of the * primary or secondary disks in the consistency group. */// const region = 'us-central1'/** * 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. * 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 Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallStopGroupAsyncReplication(){// Construct requestconstrequest={disksStopGroupAsyncReplicationResourceResource,project,region,};// Run requestconstresponse=awaitcomputeClient.stopGroupAsyncReplication(request);console.log(response);}callStopGroupAsyncReplication();
stopGroupAsyncReplication(request, options, callback)
stopGroupAsyncReplication(request:protos.google.cloud.compute.v1beta.IStopGroupAsyncReplicationRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IStopGroupAsyncReplicationRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
stopGroupAsyncReplication(request, callback)
stopGroupAsyncReplication(request:protos.google.cloud.compute.v1beta.IStopGroupAsyncReplicationRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IStopGroupAsyncReplicationRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
testIamPermissions(request, options)
testIamPermissions(request?:protos.google.cloud.compute.v1beta.ITestIamPermissionsRegionDiskRequest,options?:CallOptions):Promise<[protos.google.cloud.compute.v1beta.ITestPermissionsResponse,protos.google.cloud.compute.v1beta.ITestIamPermissionsRegionDiskRequest|undefined,{}|undefined]>;
Returns permissions that a caller has on the specified resource.
Example/** * 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. *//** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * Name or id of the resource for this request. */// const resource = 'abc123'/** * The body resource for this request */// const testPermissionsRequestResource = {}// Imports the Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallTestIamPermissions(){// Construct requestconstrequest={project,region,resource,testPermissionsRequestResource,};// Run requestconstresponse=awaitcomputeClient.testIamPermissions(request);console.log(response);}callTestIamPermissions();
testIamPermissions(request, options, callback)
testIamPermissions(request:protos.google.cloud.compute.v1beta.ITestIamPermissionsRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.ITestPermissionsResponse,protos.google.cloud.compute.v1beta.ITestIamPermissionsRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
testIamPermissions(request, callback)
testIamPermissions(request:protos.google.cloud.compute.v1beta.ITestIamPermissionsRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.ITestPermissionsResponse,protos.google.cloud.compute.v1beta.ITestIamPermissionsRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
update(request, options)
update(request?:protos.google.cloud.compute.v1beta.IUpdateRegionDiskRequest,options?:CallOptions):Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation,null>,protos.google.cloud.compute.v1beta.IOperation|undefined,{}|undefined]>;
Update the specified disk with the data included in the request. Update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.
| Returns |
|---|
| Type | Description |
Promise<[LROperation<protos.google.cloud.compute.v1beta.IOperation, null>,protos.google.cloud.compute.v1beta.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. Please see thedocumentation for more details and examples. This method is considered to be in beta. This means while stable it is still a work-in-progress and under active development, and might get backwards-incompatible changes at any time..promise() is not supported yet. |
Example/** * 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. *//** * The disk name for this request. */// const disk = 'abc123'/** * The body resource for this request */// const diskResource = {}/** */// const paths = 'abc123'/** * Project ID for this request. */// const project = 'my-project'/** * The name of the region for this request. */// const region = 'us-central1'/** * 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. * 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'/** * update_mask indicates fields to be updated as part of this request. */// const updateMask = 'abc123'// Imports the Compute libraryconst{RegionDisksClient}=require('@google-cloud/compute').v1beta;// Instantiates a clientconstcomputeClient=newRegionDisksClient();asyncfunctioncallUpdate(){// Construct requestconstrequest={disk,diskResource,project,region,};// Run requestconstresponse=awaitcomputeClient.update(request);console.log(response);}callUpdate();
update(request, options, callback)
update(request:protos.google.cloud.compute.v1beta.IUpdateRegionDiskRequest,options:CallOptions,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IUpdateRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |
update(request, callback)
update(request:protos.google.cloud.compute.v1beta.IUpdateRegionDiskRequest,callback:Callback<protos.google.cloud.compute.v1beta.IOperation,protos.google.cloud.compute.v1beta.IUpdateRegionDiskRequest|null|undefined,{}|null|undefined>):void;
| Returns |
|---|
| Type | Description |
void | |