Show / Hide Table of Contents

Class DisksResource

The "disks" collection of methods.

Inheritance
object
DisksResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Compute.alpha
Assembly: Google.Apis.Compute.alpha.dll
Syntax
public class DisksResource

Constructors

DisksResource(IClientService)

Constructs a new resource.

Declaration
public DisksResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

AddResourcePolicies(DisksAddResourcePoliciesRequest, string, string, string)

Adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Declaration
public virtual DisksResource.AddResourcePoliciesRequest AddResourcePolicies(DisksAddResourcePoliciesRequest body, string project, string zone, string disk)
Parameters
Type Name Description
DisksAddResourcePoliciesRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

The disk name for this request.

Returns
Type Description
DisksResource.AddResourcePoliciesRequest

AggregatedList(string)

Retrieves an aggregated list of persistent disks. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.

Declaration
public virtual DisksResource.AggregatedListRequest AggregatedList(string project)
Parameters
Type Name Description
string project

Project ID for this request.

Returns
Type Description
DisksResource.AggregatedListRequest

BulkInsert(BulkInsertDiskResource, string, string)

Bulk create a set of disks.

Declaration
public virtual DisksResource.BulkInsertRequest BulkInsert(BulkInsertDiskResource body, string project, string zone)
Parameters
Type Name Description
BulkInsertDiskResource body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

Returns
Type Description
DisksResource.BulkInsertRequest

BulkSetLabels(BulkZoneSetLabelsRequest, string, string)

Sets the labels on many disks at once. To learn more about labels, read the Labeling Resources documentation.

Declaration
public virtual DisksResource.BulkSetLabelsRequest BulkSetLabels(BulkZoneSetLabelsRequest body, string project, string zone)
Parameters
Type Name Description
BulkZoneSetLabelsRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

Returns
Type Description
DisksResource.BulkSetLabelsRequest

CreateSnapshot(Snapshot, string, string, string)

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.

Declaration
public virtual DisksResource.CreateSnapshotRequest CreateSnapshot(Snapshot body, string project, string zone, string disk)
Parameters
Type Name Description
Snapshot body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

Name of the persistent disk to snapshot.

Returns
Type Description
DisksResource.CreateSnapshotRequest

Delete(string, string, string)

Deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Declaration
public virtual DisksResource.DeleteRequest Delete(string project, string zone, string disk)
Parameters
Type Name Description
string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

Name of the persistent disk to delete.

Returns
Type Description
DisksResource.DeleteRequest

Get(string, string, string)

Returns the specified persistent disk.

Declaration
public virtual DisksResource.GetRequest Get(string project, string zone, string disk)
Parameters
Type Name Description
string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

Name of the persistent disk to return.

Returns
Type Description
DisksResource.GetRequest

GetAsyncReplicationStatus(string, string, string)

Gets the status of current async replication for a given device.

Declaration
public virtual DisksResource.GetAsyncReplicationStatusRequest GetAsyncReplicationStatus(string project, string zone, string disk)
Parameters
Type Name Description
string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

Name of the Disk resource whose Async replication details are requested. Name should conform to RFC1035 or be an unsigned long integer.

Returns
Type Description
DisksResource.GetAsyncReplicationStatusRequest

GetIamPolicy(string, string, string)

Gets the access control policy for a resource. May be empty if no such policy or resource exists.

Declaration
public virtual DisksResource.GetIamPolicyRequest GetIamPolicy(string project, string zone, string resource)
Parameters
Type Name Description
string project

Project ID for this request.

string zone

The name of the zone for this request.

string resource

Name or id of the resource for this request.

Returns
Type Description
DisksResource.GetIamPolicyRequest

Insert(Disk, string, string)

Creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Declaration
public virtual DisksResource.InsertRequest Insert(Disk body, string project, string zone)
Parameters
Type Name Description
Disk body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

Returns
Type Description
DisksResource.InsertRequest

List(string, string)

Retrieves a list of persistent disks contained within the specified zone.

Declaration
public virtual DisksResource.ListRequest List(string project, string zone)
Parameters
Type Name Description
string project

Project ID for this request.

string zone

The name of the zone for this request.

Returns
Type Description
DisksResource.ListRequest

RemoveResourcePolicies(DisksRemoveResourcePoliciesRequest, string, string, string)

Removes resource policies from a disk.

Declaration
public virtual DisksResource.RemoveResourcePoliciesRequest RemoveResourcePolicies(DisksRemoveResourcePoliciesRequest body, string project, string zone, string disk)
Parameters
Type Name Description
DisksRemoveResourcePoliciesRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

The disk name for this request.

Returns
Type Description
DisksResource.RemoveResourcePoliciesRequest

Resize(DisksResizeRequest, string, string, string)

Resizes the specified persistent disk. You can only increase the size of the disk.

Declaration
public virtual DisksResource.ResizeRequest Resize(DisksResizeRequest body, string project, string zone, string disk)
Parameters
Type Name Description
DisksResizeRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

The name of the persistent disk.

Returns
Type Description
DisksResource.ResizeRequest

SetIamPolicy(ZoneSetPolicyRequest, string, string, string)

Sets the access control policy on the specified resource. Replaces any existing policy.

Declaration
public virtual DisksResource.SetIamPolicyRequest SetIamPolicy(ZoneSetPolicyRequest body, string project, string zone, string resource)
Parameters
Type Name Description
ZoneSetPolicyRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string resource

Name or id of the resource for this request.

Returns
Type Description
DisksResource.SetIamPolicyRequest

SetLabels(ZoneSetLabelsRequest, string, string, string)

Sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.

Declaration
public virtual DisksResource.SetLabelsRequest SetLabels(ZoneSetLabelsRequest body, string project, string zone, string resource)
Parameters
Type Name Description
ZoneSetLabelsRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string resource

Name or id of the resource for this request.

Returns
Type Description
DisksResource.SetLabelsRequest

StartAsyncReplication(DisksStartAsyncReplicationRequest, string, string, string)

Starts asynchronous replication. Must be invoked on the primary disk.

Declaration
public virtual DisksResource.StartAsyncReplicationRequest StartAsyncReplication(DisksStartAsyncReplicationRequest body, string project, string zone, string disk)
Parameters
Type Name Description
DisksStartAsyncReplicationRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

The name of the persistent disk.

Returns
Type Description
DisksResource.StartAsyncReplicationRequest

StopAsyncReplication(string, string, string)

Stops asynchronous replication. Can be invoked either on the primary or on the secondary disk.

Declaration
public virtual DisksResource.StopAsyncReplicationRequest StopAsyncReplication(string project, string zone, string disk)
Parameters
Type Name Description
string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

The name of the persistent disk.

Returns
Type Description
DisksResource.StopAsyncReplicationRequest

StopGroupAsyncReplication(DisksStopGroupAsyncReplicationResource, string, string)

Stops asynchronous replication for a consistency group of disks. Can be invoked either in the primary or secondary scope.

Declaration
public virtual DisksResource.StopGroupAsyncReplicationRequest StopGroupAsyncReplication(DisksStopGroupAsyncReplicationResource body, string project, string zone)
Parameters
Type Name Description
DisksStopGroupAsyncReplicationResource body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request. This must be the zone of the primary or secondary disks in the consistency group.

Returns
Type Description
DisksResource.StopGroupAsyncReplicationRequest

TestIamPermissions(TestPermissionsRequest, string, string, string)

Returns permissions that a caller has on the specified resource.

Declaration
public virtual DisksResource.TestIamPermissionsRequest TestIamPermissions(TestPermissionsRequest body, string project, string zone, string resource)
Parameters
Type Name Description
TestPermissionsRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string resource

Name or id of the resource for this request.

Returns
Type Description
DisksResource.TestIamPermissionsRequest

Update(Disk, string, string, string)

Updates the specified disk with the data included in the request. The update is performed only on selected fields included as part of update-mask. Only the following fields can be modified: user_license.

Declaration
public virtual DisksResource.UpdateRequest Update(Disk body, string project, string zone, string disk)
Parameters
Type Name Description
Disk body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

The disk name for this request.

Returns
Type Description
DisksResource.UpdateRequest

WaitForReplicationCatchUp(WaitForReplicationCatchUpRequest, string, string, string)

Wait for replication to catch up on the secondary disk.

Declaration
public virtual DisksResource.WaitForReplicationCatchUpRequest WaitForReplicationCatchUp(WaitForReplicationCatchUpRequest body, string project, string zone, string disk)
Parameters
Type Name Description
WaitForReplicationCatchUpRequest body

The body of the request.

string project

Project ID for this request.

string zone

The name of the zone for this request.

string disk

The name of the persistent disk. Name should conform to RFC1035 or be an unsigned long integer.

Returns
Type Description
DisksResource.WaitForReplicationCatchUpRequest
In this article
Back to top Generated by DocFX