Struct google_compute1::api::RegionDiskMethods[][src]

pub struct RegionDiskMethods<'a, C> where
    C: 'a, 
{ /* fields omitted */ }

A builder providing access to all methods supported on regionDisk resources. It is not used directly, but through the Compute hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate hyper_rustls;
extern crate yup_oauth2 as oauth2;
extern crate google_compute1 as compute1;
 
use std::default::Default;
use oauth2;
use compute1::Compute;
 
let secret: oauth2::ApplicationSecret = Default::default();
let auth = yup_oauth2::InstalledFlowAuthenticator::builder(
        secret,
        yup_oauth2::InstalledFlowReturnMethod::HTTPRedirect,
    ).build().await.unwrap();
let mut hub = Compute::new(hyper::Client::builder().build(hyper_rustls::HttpsConnector::with_native_roots()), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `add_resource_policies(...)`, `create_snapshot(...)`, `delete(...)`, `get(...)`, `get_iam_policy(...)`, `insert(...)`, `list(...)`, `remove_resource_policies(...)`, `resize(...)`, `set_iam_policy(...)`, `set_labels(...)` and `test_iam_permissions(...)`
// to build up your call.
let rb = hub.region_disks();

Implementations

impl<'a, C> RegionDiskMethods<'a, C>[src]

pub fn add_resource_policies(
    &self,
    request: RegionDisksAddResourcePoliciesRequest,
    project: &str,
    region: &str,
    disk: &str
) -> RegionDiskAddResourcePolicyCall<'a, C>
[src]

Create a builder to help you perform the following task:

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.

Arguments

  • request - No description provided.
  • project - Project ID for this request.
  • region - The name of the region for this request.
  • disk - The disk name for this request.

pub fn create_snapshot(
    &self,
    request: Snapshot,
    project: &str,
    region: &str,
    disk: &str
) -> RegionDiskCreateSnapshotCall<'a, C>
[src]

Create a builder to help you perform the following task:

Creates a snapshot of this regional disk.

Arguments

  • request - No description provided.
  • project - Project ID for this request.
  • region - Name of the region for this request.
  • disk - Name of the regional persistent disk to snapshot.

pub fn delete(
    &self,
    project: &str,
    region: &str,
    disk: &str
) -> RegionDiskDeleteCall<'a, C>
[src]

Create a builder to help you perform the following task:

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 any snapshots previously made from the disk. You must separately delete snapshots.

Arguments

  • project - Project ID for this request.
  • region - Name of the region for this request.
  • disk - Name of the regional persistent disk to delete.

pub fn get(
    &self,
    project: &str,
    region: &str,
    disk: &str
) -> RegionDiskGetCall<'a, C>
[src]

Create a builder to help you perform the following task:

Returns a specified regional persistent disk.

Arguments

  • project - Project ID for this request.
  • region - Name of the region for this request.
  • disk - Name of the regional persistent disk to return.

pub fn get_iam_policy(
    &self,
    project: &str,
    region: &str,
    resource: &str
) -> RegionDiskGetIamPolicyCall<'a, C>
[src]

Create a builder to help you perform the following task:

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

Arguments

  • project - Project ID for this request.
  • region - The name of the region for this request.
  • resource - Name or id of the resource for this request.

pub fn insert(
    &self,
    request: Disk,
    project: &str,
    region: &str
) -> RegionDiskInsertCall<'a, C>
[src]

Create a builder to help you perform the following task:

Creates a persistent regional disk in the specified project using the data included in the request.

Arguments

  • request - No description provided.
  • project - Project ID for this request.
  • region - Name of the region for this request.

pub fn list(&self, project: &str, region: &str) -> RegionDiskListCall<'a, C>[src]

Create a builder to help you perform the following task:

Retrieves the list of persistent disks contained within the specified region.

Arguments

  • project - Project ID for this request.
  • region - Name of the region for this request.

pub fn remove_resource_policies(
    &self,
    request: RegionDisksRemoveResourcePoliciesRequest,
    project: &str,
    region: &str,
    disk: &str
) -> RegionDiskRemoveResourcePolicyCall<'a, C>
[src]

Create a builder to help you perform the following task:

Removes resource policies from a regional disk.

Arguments

  • request - No description provided.
  • project - Project ID for this request.
  • region - The name of the region for this request.
  • disk - The disk name for this request.

pub fn resize(
    &self,
    request: RegionDisksResizeRequest,
    project: &str,
    region: &str,
    disk: &str
) -> RegionDiskResizeCall<'a, C>
[src]

Create a builder to help you perform the following task:

Resizes the specified regional persistent disk.

Arguments

  • request - No description provided.
  • project - The project ID for this request.
  • region - Name of the region for this request.
  • disk - Name of the regional persistent disk.

pub fn set_iam_policy(
    &self,
    request: RegionSetPolicyRequest,
    project: &str,
    region: &str,
    resource: &str
) -> RegionDiskSetIamPolicyCall<'a, C>
[src]

Create a builder to help you perform the following task:

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

Arguments

  • request - No description provided.
  • project - Project ID for this request.
  • region - The name of the region for this request.
  • resource - Name or id of the resource for this request.

pub fn set_labels(
    &self,
    request: RegionSetLabelsRequest,
    project: &str,
    region: &str,
    resource: &str
) -> RegionDiskSetLabelCall<'a, C>
[src]

Create a builder to help you perform the following task:

Sets the labels on the target regional disk.

Arguments

  • request - No description provided.
  • project - Project ID for this request.
  • region - The region for this request.
  • resource - Name or id of the resource for this request.

pub fn test_iam_permissions(
    &self,
    request: TestPermissionsRequest,
    project: &str,
    region: &str,
    resource: &str
) -> RegionDiskTestIamPermissionCall<'a, C>
[src]

Create a builder to help you perform the following task:

Returns permissions that a caller has on the specified resource.

Arguments

  • request - No description provided.
  • project - Project ID for this request.
  • region - The name of the region for this request.
  • resource - Name or id of the resource for this request.

Trait Implementations

impl<'a, C> MethodsBuilder for RegionDiskMethods<'a, C>[src]

Auto Trait Implementations

impl<'a, C> !RefUnwindSafe for RegionDiskMethods<'a, C>[src]

impl<'a, C> !Send for RegionDiskMethods<'a, C>[src]

impl<'a, C> !Sync for RegionDiskMethods<'a, C>[src]

impl<'a, C> Unpin for RegionDiskMethods<'a, C>[src]

impl<'a, C> !UnwindSafe for RegionDiskMethods<'a, C>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.