Disks

google.cloud.compute.v1. Disks

Represents a Disks

Constructor

new Disks(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new Disks service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

addResourcePolicies(request, callback) → {undefined}

Calls AddResourcePolicies.

Parameters:
Name Type Description
request google.cloud.compute.v1.IAddResourcePoliciesDiskRequest

AddResourcePoliciesDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.AddResourcePoliciesCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

addResourcePolicies(request) → {Promise.<google.cloud.compute.v1.Operation>}

Calls AddResourcePolicies.

Parameters:
Name Type Description
request google.cloud.compute.v1.IAddResourcePoliciesDiskRequest

AddResourcePoliciesDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Operation>

Promise

aggregatedList(request, callback) → {undefined}

Calls AggregatedList.

Parameters:
Name Type Description
request google.cloud.compute.v1.IAggregatedListDisksRequest

AggregatedListDisksRequest message or plain object

callback google.cloud.compute.v1.Disks.AggregatedListCallback

Node-style callback called with the error, if any, and DiskAggregatedList

Returns:
Type Description
undefined

aggregatedList(request) → {Promise.<google.cloud.compute.v1.DiskAggregatedList>}

Calls AggregatedList.

Parameters:
Name Type Description
request google.cloud.compute.v1.IAggregatedListDisksRequest

AggregatedListDisksRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.DiskAggregatedList>

Promise

createSnapshot(request, callback) → {undefined}

Calls CreateSnapshot.

Parameters:
Name Type Description
request google.cloud.compute.v1.ICreateSnapshotDiskRequest

CreateSnapshotDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.CreateSnapshotCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

createSnapshot(request) → {Promise.<google.cloud.compute.v1.Operation>}

Calls CreateSnapshot.

Parameters:
Name Type Description
request google.cloud.compute.v1.ICreateSnapshotDiskRequest

CreateSnapshotDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Operation>

Promise

delete(request, callback) → {undefined}

Calls Delete.

Parameters:
Name Type Description
request google.cloud.compute.v1.IDeleteDiskRequest

DeleteDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.DeleteCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

delete(request) → {Promise.<google.cloud.compute.v1.Operation>}

Calls Delete.

Parameters:
Name Type Description
request google.cloud.compute.v1.IDeleteDiskRequest

DeleteDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Operation>

Promise

get(request, callback) → {undefined}

Calls Get.

Parameters:
Name Type Description
request google.cloud.compute.v1.IGetDiskRequest

GetDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.GetCallback

Node-style callback called with the error, if any, and Disk

Returns:
Type Description
undefined

get(request) → {Promise.<google.cloud.compute.v1.Disk>}

Calls Get.

Parameters:
Name Type Description
request google.cloud.compute.v1.IGetDiskRequest

GetDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Disk>

Promise

getIamPolicy(request, callback) → {undefined}

Calls GetIamPolicy.

Parameters:
Name Type Description
request google.cloud.compute.v1.IGetIamPolicyDiskRequest

GetIamPolicyDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.GetIamPolicyCallback

Node-style callback called with the error, if any, and Policy

Returns:
Type Description
undefined

getIamPolicy(request) → {Promise.<google.cloud.compute.v1.Policy>}

Calls GetIamPolicy.

Parameters:
Name Type Description
request google.cloud.compute.v1.IGetIamPolicyDiskRequest

GetIamPolicyDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Policy>

Promise

insert(request, callback) → {undefined}

Calls Insert.

Parameters:
Name Type Description
request google.cloud.compute.v1.IInsertDiskRequest

InsertDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.InsertCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

insert(request) → {Promise.<google.cloud.compute.v1.Operation>}

Calls Insert.

Parameters:
Name Type Description
request google.cloud.compute.v1.IInsertDiskRequest

InsertDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Operation>

Promise

list(request, callback) → {undefined}

Calls List.

Parameters:
Name Type Description
request google.cloud.compute.v1.IListDisksRequest

ListDisksRequest message or plain object

callback google.cloud.compute.v1.Disks.ListCallback

Node-style callback called with the error, if any, and DiskList

Returns:
Type Description
undefined

list(request) → {Promise.<google.cloud.compute.v1.DiskList>}

Calls List.

Parameters:
Name Type Description
request google.cloud.compute.v1.IListDisksRequest

ListDisksRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.DiskList>

Promise

removeResourcePolicies(request, callback) → {undefined}

Calls RemoveResourcePolicies.

Parameters:
Name Type Description
request google.cloud.compute.v1.IRemoveResourcePoliciesDiskRequest

RemoveResourcePoliciesDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.RemoveResourcePoliciesCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

removeResourcePolicies(request) → {Promise.<google.cloud.compute.v1.Operation>}

Calls RemoveResourcePolicies.

Parameters:
Name Type Description
request google.cloud.compute.v1.IRemoveResourcePoliciesDiskRequest

RemoveResourcePoliciesDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Operation>

Promise

resize(request, callback) → {undefined}

Calls Resize.

Parameters:
Name Type Description
request google.cloud.compute.v1.IResizeDiskRequest

ResizeDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.ResizeCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

resize(request) → {Promise.<google.cloud.compute.v1.Operation>}

Calls Resize.

Parameters:
Name Type Description
request google.cloud.compute.v1.IResizeDiskRequest

ResizeDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Operation>

Promise

setIamPolicy(request, callback) → {undefined}

Calls SetIamPolicy.

Parameters:
Name Type Description
request google.cloud.compute.v1.ISetIamPolicyDiskRequest

SetIamPolicyDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.SetIamPolicyCallback

Node-style callback called with the error, if any, and Policy

Returns:
Type Description
undefined

setIamPolicy(request) → {Promise.<google.cloud.compute.v1.Policy>}

Calls SetIamPolicy.

Parameters:
Name Type Description
request google.cloud.compute.v1.ISetIamPolicyDiskRequest

SetIamPolicyDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Policy>

Promise

setLabels(request, callback) → {undefined}

Calls SetLabels.

Parameters:
Name Type Description
request google.cloud.compute.v1.ISetLabelsDiskRequest

SetLabelsDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.SetLabelsCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

setLabels(request) → {Promise.<google.cloud.compute.v1.Operation>}

Calls SetLabels.

Parameters:
Name Type Description
request google.cloud.compute.v1.ISetLabelsDiskRequest

SetLabelsDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Operation>

Promise

testIamPermissions(request, callback) → {undefined}

Calls TestIamPermissions.

Parameters:
Name Type Description
request google.cloud.compute.v1.ITestIamPermissionsDiskRequest

TestIamPermissionsDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.TestIamPermissionsCallback

Node-style callback called with the error, if any, and TestPermissionsResponse

Returns:
Type Description
undefined

testIamPermissions(request) → {Promise.<google.cloud.compute.v1.TestPermissionsResponse>}

Calls TestIamPermissions.

Parameters:
Name Type Description
request google.cloud.compute.v1.ITestIamPermissionsDiskRequest

TestIamPermissionsDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.TestPermissionsResponse>

Promise

update(request, callback) → {undefined}

Calls Update.

Parameters:
Name Type Description
request google.cloud.compute.v1.IUpdateDiskRequest

UpdateDiskRequest message or plain object

callback google.cloud.compute.v1.Disks.UpdateCallback

Node-style callback called with the error, if any, and Operation

Returns:
Type Description
undefined

update(request) → {Promise.<google.cloud.compute.v1.Operation>}

Calls Update.

Parameters:
Name Type Description
request google.cloud.compute.v1.IUpdateDiskRequest

UpdateDiskRequest message or plain object

Returns:
Type Description
Promise.<google.cloud.compute.v1.Operation>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {Disks}

Creates new Disks service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
Disks

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

AddResourcePoliciesCallback(error, responseopt)

Callback as used by addResourcePolicies.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Operation <optional>

Operation

AggregatedListCallback(error, responseopt)

Callback as used by aggregatedList.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.DiskAggregatedList <optional>

DiskAggregatedList

CreateSnapshotCallback(error, responseopt)

Callback as used by createSnapshot.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Operation <optional>

Operation

DeleteCallback(error, responseopt)

Callback as used by delete_.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Operation <optional>

Operation

GetCallback(error, responseopt)

Callback as used by get.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Disk <optional>

Disk

GetIamPolicyCallback(error, responseopt)

Callback as used by getIamPolicy.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Policy <optional>

Policy

InsertCallback(error, responseopt)

Callback as used by insert.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Operation <optional>

Operation

ListCallback(error, responseopt)

Callback as used by list.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.DiskList <optional>

DiskList

RemoveResourcePoliciesCallback(error, responseopt)

Callback as used by removeResourcePolicies.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Operation <optional>

Operation

ResizeCallback(error, responseopt)

Callback as used by resize.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Operation <optional>

Operation

SetIamPolicyCallback(error, responseopt)

Callback as used by setIamPolicy.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Policy <optional>

Policy

SetLabelsCallback(error, responseopt)

Callback as used by setLabels.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Operation <optional>

Operation

TestIamPermissionsCallback(error, responseopt)

Callback as used by testIamPermissions.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.TestPermissionsResponse <optional>

TestPermissionsResponse

UpdateCallback(error, responseopt)

Callback as used by update.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.cloud.compute.v1.Operation <optional>

Operation