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.beta
Assembly: Google.Apis.Compute.beta.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.

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

Project ID for this request.

Returns
Type Description
DisksResource.AggregatedListRequest

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

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

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
In This Article
Back to top Generated by DocFX