pub struct Images { /* private fields */ }images only.Expand description
Implements a client for the Google Compute Engine API.
§Example
let client = Images::builder().build().await?;
// use `client` to make requests to the Google Compute Engine API.§Service Description
Service for the images resource.
§Configuration
To configure Images use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://compute.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
Images holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap Images in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl Images
impl Images
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for Images.
let client = Images::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: Images + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: Images + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn deprecate(&self) -> Deprecate
pub fn deprecate(&self) -> Deprecate
Sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.
Sourcepub fn get_from_family(&self) -> GetFromFamily
pub fn get_from_family(&self) -> GetFromFamily
Returns the latest image that is part of an image family and is not deprecated. For more information on image families, see Public image families documentation.
Sourcepub fn get_iam_policy(&self) -> GetIamPolicy
pub fn get_iam_policy(&self) -> GetIamPolicy
Gets the access control policy for a resource. May be empty if no such policy or resource exists.
Sourcepub fn insert(&self) -> Insert
pub fn insert(&self) -> Insert
Creates an image in the specified project using the data included in the request.
Sourcepub fn list(&self) -> List
pub fn list(&self) -> List
Retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.
Sourcepub fn patch(&self) -> Patch
pub fn patch(&self) -> Patch
Patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.
Sourcepub fn set_iam_policy(&self) -> SetIamPolicy
pub fn set_iam_policy(&self) -> SetIamPolicy
Sets the access control policy on the specified resource. Replaces any existing policy.
Sourcepub fn set_labels(&self) -> SetLabels
pub fn set_labels(&self) -> SetLabels
Sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.
Sourcepub fn test_iam_permissions(&self) -> TestIamPermissions
pub fn test_iam_permissions(&self) -> TestIamPermissions
Returns permissions that a caller has on the specified resource.