[−][src]Struct google_compute1::InstanceMethods
A builder providing access to all methods supported on instance 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::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use compute1::Compute; let secret: ApplicationSecret = Default::default(); let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), <MemoryStorage as Default>::default(), None); let mut hub = Compute::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth); // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* // like `add_access_config(...)`, `aggregated_list(...)`, `attach_disk(...)`, `delete(...)`, `delete_access_config(...)`, `detach_disk(...)`, `get(...)`, `get_guest_attributes(...)`, `get_iam_policy(...)`, `get_serial_port_output(...)`, `get_shielded_instance_identity(...)`, `insert(...)`, `list(...)`, `list_referrers(...)`, `reset(...)`, `set_deletion_protection(...)`, `set_disk_auto_delete(...)`, `set_iam_policy(...)`, `set_labels(...)`, `set_machine_resources(...)`, `set_machine_type(...)`, `set_metadata(...)`, `set_min_cpu_platform(...)`, `set_scheduling(...)`, `set_service_account(...)`, `set_shielded_instance_integrity_policy(...)`, `set_tags(...)`, `simulate_maintenance_event(...)`, `start(...)`, `start_with_encryption_key(...)`, `stop(...)`, `test_iam_permissions(...)`, `update_access_config(...)`, `update_network_interface(...)` and `update_shielded_instance_config(...)` // to build up your call. let rb = hub.instances();
Methods
impl<'a, C, A> InstanceMethods<'a, C, A>[src]
pub fn set_service_account(
&self,
request: InstancesSetServiceAccountRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetServiceAccountCall<'a, C, A>[src]
&self,
request: InstancesSetServiceAccountRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetServiceAccountCall<'a, C, A>
Create a builder to help you perform the following task:
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance resource to start.
pub fn set_scheduling(
&self,
request: Scheduling,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetSchedulingCall<'a, C, A>[src]
&self,
request: Scheduling,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetSchedulingCall<'a, C, A>
Create a builder to help you perform the following task:
Sets an instance's scheduling options.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Instance name for this request.
pub fn delete(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceDeleteCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceDeleteCall<'a, C, A>
Create a builder to help you perform the following task:
Deletes the specified Instance resource. For more information, see Stopping or Deleting an Instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance resource to delete.
pub fn update_network_interface(
&self,
request: NetworkInterface,
project: &str,
zone: &str,
instance: &str,
network_interface: &str
) -> InstanceUpdateNetworkInterfaceCall<'a, C, A>[src]
&self,
request: NetworkInterface,
project: &str,
zone: &str,
instance: &str,
network_interface: &str
) -> InstanceUpdateNetworkInterfaceCall<'a, C, A>
Create a builder to help you perform the following task:
Updates an instance's network interface. This method follows PATCH semantics.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- The instance name for this request.networkInterface- The name of the network interface to update.
pub fn get_guest_attributes(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceGetGuestAttributeCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceGetGuestAttributeCall<'a, C, A>
Create a builder to help you perform the following task:
Returns the specified guest attributes entry.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn start(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceStartCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceStartCall<'a, C, A>
Create a builder to help you perform the following task:
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance resource to start.
pub fn reset(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceResetCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceResetCall<'a, C, A>
Create a builder to help you perform the following task:
Performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn simulate_maintenance_event(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceSimulateMaintenanceEventCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceSimulateMaintenanceEventCall<'a, C, A>
Create a builder to help you perform the following task:
Simulates a maintenance event on the instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn update_access_config(
&self,
request: AccessConfig,
project: &str,
zone: &str,
instance: &str,
network_interface: &str
) -> InstanceUpdateAccessConfigCall<'a, C, A>[src]
&self,
request: AccessConfig,
project: &str,
zone: &str,
instance: &str,
network_interface: &str
) -> InstanceUpdateAccessConfigCall<'a, C, A>
Create a builder to help you perform the following task:
Updates the specified access config from an instance's network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- The instance name for this request.networkInterface- The name of the network interface where the access config is attached.
pub fn set_tags(
&self,
request: Tags,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetTagCall<'a, C, A>[src]
&self,
request: Tags,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetTagCall<'a, C, A>
Create a builder to help you perform the following task:
Sets network tags for the specified instance to the data included in the request.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn set_metadata(
&self,
request: Metadata,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetMetadataCall<'a, C, A>[src]
&self,
request: Metadata,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetMetadataCall<'a, C, A>
Create a builder to help you perform the following task:
Sets metadata for the specified instance to the data included in the request.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn detach_disk(
&self,
project: &str,
zone: &str,
instance: &str,
device_name: &str
) -> InstanceDetachDiskCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str,
device_name: &str
) -> InstanceDetachDiskCall<'a, C, A>
Create a builder to help you perform the following task:
Detaches a disk from an instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Instance name for this request.deviceName- The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names.
pub fn get_iam_policy(
&self,
project: &str,
zone: &str,
resource: &str
) -> InstanceGetIamPolicyCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
resource: &str
) -> InstanceGetIamPolicyCall<'a, C, A>
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.zone- The name of the zone for this request.resource- Name or id of the resource for this request.
pub fn attach_disk(
&self,
request: AttachedDisk,
project: &str,
zone: &str,
instance: &str
) -> InstanceAttachDiskCall<'a, C, A>[src]
&self,
request: AttachedDisk,
project: &str,
zone: &str,
instance: &str
) -> InstanceAttachDiskCall<'a, C, A>
Create a builder to help you perform the following task:
Attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- The instance name for this request.
pub fn list_referrers(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceListReferrerCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceListReferrerCall<'a, C, A>
Create a builder to help you perform the following task:
Retrieves the list of referrers to instances contained within the specified zone. For more information, read Viewing Referrers to VM Instances.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the target instance scoping this request, or '-' if the request should span over all instances in the container.
pub fn set_labels(
&self,
request: InstancesSetLabelsRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetLabelCall<'a, C, A>[src]
&self,
request: InstancesSetLabelsRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetLabelCall<'a, C, A>
Create a builder to help you perform the following task:
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn start_with_encryption_key(
&self,
request: InstancesStartWithEncryptionKeyRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceStartWithEncryptionKeyCall<'a, C, A>[src]
&self,
request: InstancesStartWithEncryptionKeyRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceStartWithEncryptionKeyCall<'a, C, A>
Create a builder to help you perform the following task:
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance resource to start.
pub fn aggregated_list(
&self,
project: &str
) -> InstanceAggregatedListCall<'a, C, A>[src]
&self,
project: &str
) -> InstanceAggregatedListCall<'a, C, A>
Create a builder to help you perform the following task:
Retrieves aggregated list of all of the instances in your project across all regions and zones.
Arguments
project- Project ID for this request.
pub fn set_machine_type(
&self,
request: InstancesSetMachineTypeRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetMachineTypeCall<'a, C, A>[src]
&self,
request: InstancesSetMachineTypeRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetMachineTypeCall<'a, C, A>
Create a builder to help you perform the following task:
Changes the machine type for a stopped instance to the machine type specified in the request.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn get(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceGetCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceGetCall<'a, C, A>
Create a builder to help you perform the following task:
Returns the specified Instance resource. Gets a list of available instances by making a list() request.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance resource to return.
pub fn delete_access_config(
&self,
project: &str,
zone: &str,
instance: &str,
access_config: &str,
network_interface: &str
) -> InstanceDeleteAccessConfigCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str,
access_config: &str,
network_interface: &str
) -> InstanceDeleteAccessConfigCall<'a, C, A>
Create a builder to help you perform the following task:
Deletes an access config from an instance's network interface.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- The instance name for this request.accessConfig- The name of the access config to delete.networkInterface- The name of the network interface.
pub fn set_shielded_instance_integrity_policy(
&self,
request: ShieldedInstanceIntegrityPolicy,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetShieldedInstanceIntegrityPolicyCall<'a, C, A>[src]
&self,
request: ShieldedInstanceIntegrityPolicy,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetShieldedInstanceIntegrityPolicyCall<'a, C, A>
Create a builder to help you perform the following task:
Sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name or id of the instance scoping this request.
pub fn set_min_cpu_platform(
&self,
request: InstancesSetMinCpuPlatformRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetMinCpuPlatformCall<'a, C, A>[src]
&self,
request: InstancesSetMinCpuPlatformRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetMinCpuPlatformCall<'a, C, A>
Create a builder to help you perform the following task:
Changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn update_shielded_instance_config(
&self,
request: ShieldedInstanceConfig,
project: &str,
zone: &str,
instance: &str
) -> InstanceUpdateShieldedInstanceConfigCall<'a, C, A>[src]
&self,
request: ShieldedInstanceConfig,
project: &str,
zone: &str,
instance: &str
) -> InstanceUpdateShieldedInstanceConfigCall<'a, C, A>
Create a builder to help you perform the following task:
Updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name or id of the instance scoping this request.
pub fn test_iam_permissions(
&self,
request: TestPermissionsRequest,
project: &str,
zone: &str,
resource: &str
) -> InstanceTestIamPermissionCall<'a, C, A>[src]
&self,
request: TestPermissionsRequest,
project: &str,
zone: &str,
resource: &str
) -> InstanceTestIamPermissionCall<'a, C, A>
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.zone- The name of the zone for this request.resource- Name or id of the resource for this request.
pub fn insert(
&self,
request: Instance,
project: &str,
zone: &str
) -> InstanceInsertCall<'a, C, A>[src]
&self,
request: Instance,
project: &str,
zone: &str
) -> InstanceInsertCall<'a, C, A>
Create a builder to help you perform the following task:
Creates an instance resource in the specified project using the data included in the request.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.
pub fn get_serial_port_output(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceGetSerialPortOutputCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceGetSerialPortOutputCall<'a, C, A>
Create a builder to help you perform the following task:
Returns the last 1 MB of serial port output from the specified instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn set_disk_auto_delete(
&self,
project: &str,
zone: &str,
instance: &str,
auto_delete: bool,
device_name: &str
) -> InstanceSetDiskAutoDeleteCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str,
auto_delete: bool,
device_name: &str
) -> InstanceSetDiskAutoDeleteCall<'a, C, A>
Create a builder to help you perform the following task:
Sets the auto-delete flag for a disk attached to an instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- The instance name for this request.autoDelete- Whether to auto-delete the disk when the instance is deleted.deviceName- The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names.
pub fn add_access_config(
&self,
request: AccessConfig,
project: &str,
zone: &str,
instance: &str,
network_interface: &str
) -> InstanceAddAccessConfigCall<'a, C, A>[src]
&self,
request: AccessConfig,
project: &str,
zone: &str,
instance: &str,
network_interface: &str
) -> InstanceAddAccessConfigCall<'a, C, A>
Create a builder to help you perform the following task:
Adds an access config to an instance's network interface.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- The instance name for this request.networkInterface- The name of the network interface to add to this instance.
pub fn stop(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceStopCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceStopCall<'a, C, A>
Create a builder to help you perform the following task:
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM is using, such as persistent disks and static IP addresses, will continue to be charged until they are deleted. For more information, see Stopping an instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance resource to stop.
pub fn set_iam_policy(
&self,
request: ZoneSetPolicyRequest,
project: &str,
zone: &str,
resource: &str
) -> InstanceSetIamPolicyCall<'a, C, A>[src]
&self,
request: ZoneSetPolicyRequest,
project: &str,
zone: &str,
resource: &str
) -> InstanceSetIamPolicyCall<'a, C, A>
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.zone- The name of the zone for this request.resource- Name or id of the resource for this request.
pub fn get_shielded_instance_identity(
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceGetShieldedInstanceIdentityCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
instance: &str
) -> InstanceGetShieldedInstanceIdentityCall<'a, C, A>
Create a builder to help you perform the following task:
Returns the Shielded Instance Identity of an instance
Arguments
project- Project ID for this request.zone- The name of the zone for this request.instance- Name or id of the instance scoping this request.
pub fn set_deletion_protection(
&self,
project: &str,
zone: &str,
resource: &str
) -> InstanceSetDeletionProtectionCall<'a, C, A>[src]
&self,
project: &str,
zone: &str,
resource: &str
) -> InstanceSetDeletionProtectionCall<'a, C, A>
Create a builder to help you perform the following task:
Sets deletion protection on the instance.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.resource- Name or id of the resource for this request.
pub fn set_machine_resources(
&self,
request: InstancesSetMachineResourcesRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetMachineResourceCall<'a, C, A>[src]
&self,
request: InstancesSetMachineResourcesRequest,
project: &str,
zone: &str,
instance: &str
) -> InstanceSetMachineResourceCall<'a, C, A>
Create a builder to help you perform the following task:
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Arguments
request- No description provided.project- Project ID for this request.zone- The name of the zone for this request.instance- Name of the instance scoping this request.
pub fn list(&self, project: &str, zone: &str) -> InstanceListCall<'a, C, A>[src]
Create a builder to help you perform the following task:
Retrieves the list of instances contained within the specified zone.
Arguments
project- Project ID for this request.zone- The name of the zone for this request.
Trait Implementations
impl<'a, C, A> MethodsBuilder for InstanceMethods<'a, C, A>[src]
Auto Trait Implementations
impl<'a, C, A> !Send for InstanceMethods<'a, C, A>
impl<'a, C, A> !Sync for InstanceMethods<'a, C, A>
impl<'a, C, A> Unpin for InstanceMethods<'a, C, A>
impl<'a, C, A> !UnwindSafe for InstanceMethods<'a, C, A>
impl<'a, C, A> !RefUnwindSafe for InstanceMethods<'a, C, A>
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,