Class SnapshotsResource
The "snapshots" collection of methods.
Inherited Members
Namespace: Google.Apis.Compute.beta
Assembly: Google.Apis.Compute.beta.dll
Syntax
public class SnapshotsResource
Constructors
SnapshotsResource(IClientService)
Constructs a new resource.
Declaration
public SnapshotsResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
AggregatedList(string)
Retrieves an aggregated list of all of the snapshots in your project across all regions and global scope. To
prevent failure, Google recommends that you set the returnPartialSuccess parameter to true.
Declaration
public virtual SnapshotsResource.AggregatedListRequest AggregatedList(string project)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.AggregatedListRequest |
Delete(string, string)
Deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots.
Declaration
public virtual SnapshotsResource.DeleteRequest Delete(string project, string snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | snapshot | Name of the Snapshot resource to delete. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.DeleteRequest |
Get(string, string)
Returns the specified Snapshot resource.
Declaration
public virtual SnapshotsResource.GetRequest Get(string project, string snapshot)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | snapshot | Name of the Snapshot resource to return. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.GetRequest |
GetIamPolicy(string, string)
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Declaration
public virtual SnapshotsResource.GetIamPolicyRequest GetIamPolicy(string project, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | resource | Name or id of the resource for this request. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.GetIamPolicyRequest |
Insert(Snapshot, string)
Creates a snapshot in the specified project using the data included in the request. For regular snapshot creation, consider using this method instead of disks.createSnapshot, as this method supports more features, such as creating snapshots in a project different from the source disk project.
Declaration
public virtual SnapshotsResource.InsertRequest Insert(Snapshot body, string project)
Parameters
| Type | Name | Description |
|---|---|---|
| Snapshot | body | The body of the request. |
| string | project | Project ID for this request. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.InsertRequest |
List(string)
Retrieves the list of Snapshot resources contained within the specified project.
Declaration
public virtual SnapshotsResource.ListRequest List(string project)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.ListRequest |
SetIamPolicy(GlobalSetPolicyRequest, string, string)
Sets the access control policy on the specified resource. Replaces any existing policy.
Declaration
public virtual SnapshotsResource.SetIamPolicyRequest SetIamPolicy(GlobalSetPolicyRequest body, string project, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| GlobalSetPolicyRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | resource | Name or id of the resource for this request. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.SetIamPolicyRequest |
SetLabels(GlobalSetLabelsRequest, string, string)
Sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.
Declaration
public virtual SnapshotsResource.SetLabelsRequest SetLabels(GlobalSetLabelsRequest body, string project, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| GlobalSetLabelsRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | resource | Name or id of the resource for this request. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.SetLabelsRequest |
TestIamPermissions(TestPermissionsRequest, string, string)
Returns permissions that a caller has on the specified resource.
Declaration
public virtual SnapshotsResource.TestIamPermissionsRequest TestIamPermissions(TestPermissionsRequest body, string project, string resource)
Parameters
| Type | Name | Description |
|---|---|---|
| TestPermissionsRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | resource | Name or id of the resource for this request. |
Returns
| Type | Description |
|---|---|
| SnapshotsResource.TestIamPermissionsRequest |