Class InstancesResource
The "instances" collection of methods.
Inherited Members
Namespace: Google.Apis.Compute.beta
Assembly: Google.Apis.Compute.beta.dll
Syntax
public class InstancesResource
Constructors
InstancesResource(IClientService)
Constructs a new resource.
Declaration
public InstancesResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
AddAccessConfig(AccessConfig, string, string, string, string)
Adds an access config to an instance's network interface.
Declaration
public virtual InstancesResource.AddAccessConfigRequest AddAccessConfig(AccessConfig body, string project, string zone, string instance, string networkInterface)
Parameters
| Type | Name | Description |
|---|---|---|
| AccessConfig | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
| string | networkInterface | The name of the network interface to add to this instance. |
Returns
| Type | Description |
|---|---|
| InstancesResource.AddAccessConfigRequest |
AddNetworkInterface(NetworkInterface, string, string, string)
Adds one dynamic network interface to an active instance.
Declaration
public virtual InstancesResource.AddNetworkInterfaceRequest AddNetworkInterface(NetworkInterface body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkInterface | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request stored as resource_id. Name should conform to RFC1035 or be an unsigned long integer. |
Returns
| Type | Description |
|---|---|
| InstancesResource.AddNetworkInterfaceRequest |
AddResourcePolicies(InstancesAddResourcePoliciesRequest, string, string, string)
Adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.
Declaration
public virtual InstancesResource.AddResourcePoliciesRequest AddResourcePolicies(InstancesAddResourcePoliciesRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesAddResourcePoliciesRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.AddResourcePoliciesRequest |
AggregatedList(string)
Retrieves an aggregated list of all of the instances in your project across all regions and zones. The
performance of this method degrades when a filter is specified on a project that has a very large number of
instances. To prevent failure, Google recommends that you set the returnPartialSuccess parameter to
true.
Declaration
public virtual InstancesResource.AggregatedListRequest AggregatedList(string project)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.AggregatedListRequest |
AttachDisk(AttachedDisk, string, string, string)
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.
Declaration
public virtual InstancesResource.AttachDiskRequest AttachDisk(AttachedDisk body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| AttachedDisk | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.AttachDiskRequest |
BulkInsert(BulkInsertInstanceResource, string, string)
Creates multiple instances. Count specifies the number of instances to create. For more information, see About bulk creation of VMs.
Declaration
public virtual InstancesResource.BulkInsertRequest BulkInsert(BulkInsertInstanceResource body, string project, string zone)
Parameters
| Type | Name | Description |
|---|---|---|
| BulkInsertInstanceResource | 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 |
|---|---|
| InstancesResource.BulkInsertRequest |
Delete(string, string, string)
Deletes the specified Instance resource. For more information, see Deleting an instance.
Declaration
public virtual InstancesResource.DeleteRequest Delete(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to delete. |
Returns
| Type | Description |
|---|---|
| InstancesResource.DeleteRequest |
DeleteAccessConfig(string, string, string, string, string)
Deletes an access config from an instance's network interface.
Declaration
public virtual InstancesResource.DeleteAccessConfigRequest DeleteAccessConfig(string project, string zone, string instance, string accessConfig, string networkInterface)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
| string | accessConfig | The name of the access config to delete. |
| string | networkInterface | The name of the network interface. |
Returns
| Type | Description |
|---|---|
| InstancesResource.DeleteAccessConfigRequest |
DeleteNetworkInterface(string, string, string, string)
Deletes one dynamic network interface from an active instance. InstancesDeleteNetworkInterfaceRequest indicates: - instance from which to delete, using project+zone+resource_id fields; - dynamic network interface to be deleted, using network_interface_name field;
Declaration
public virtual InstancesResource.DeleteNetworkInterfaceRequest DeleteNetworkInterface(string project, string zone, string instance, string networkInterfaceName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request stored as resource_id. Name should conform to RFC1035 or be an unsigned long integer. |
| string | networkInterfaceName | The name of the dynamic network interface to be deleted from the instance. |
Returns
| Type | Description |
|---|---|
| InstancesResource.DeleteNetworkInterfaceRequest |
DetachDisk(string, string, string, string)
Detaches a disk from an instance.
Declaration
public virtual InstancesResource.DetachDiskRequest DetachDisk(string project, string zone, string instance, string deviceName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Instance name for this request. |
| string | deviceName | The device name of the disk to detach. Make a get() request on the instance to view currently attached disks and device names. |
Returns
| Type | Description |
|---|---|
| InstancesResource.DetachDiskRequest |
Get(string, string, string)
Returns the specified Instance resource.
Declaration
public virtual InstancesResource.GetRequest Get(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to return. |
Returns
| Type | Description |
|---|---|
| InstancesResource.GetRequest |
GetEffectiveFirewalls(string, string, string, string)
Returns effective firewalls applied to an interface of the instance.
Declaration
public virtual InstancesResource.GetEffectiveFirewallsRequest GetEffectiveFirewalls(string project, string zone, string instance, string networkInterface)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
| string | networkInterface | The name of the network interface to get the effective firewalls. |
Returns
| Type | Description |
|---|---|
| InstancesResource.GetEffectiveFirewallsRequest |
GetGuestAttributes(string, string, string)
Returns the specified guest attributes entry.
Declaration
public virtual InstancesResource.GetGuestAttributesRequest GetGuestAttributes(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.GetGuestAttributesRequest |
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 InstancesResource.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 |
|---|---|
| InstancesResource.GetIamPolicyRequest |
GetPartnerMetadata(string, string, string)
Gets partner metadata of the specified instance and namespaces.
Declaration
public virtual InstancesResource.GetPartnerMetadataRequest GetPartnerMetadata(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.GetPartnerMetadataRequest |
GetScreenshot(string, string, string)
Returns the screenshot from the specified instance.
Declaration
public virtual InstancesResource.GetScreenshotRequest GetScreenshot(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.GetScreenshotRequest |
GetSerialPortOutput(string, string, string)
Returns the last 1 MB of serial port output from the specified instance.
Declaration
public virtual InstancesResource.GetSerialPortOutputRequest GetSerialPortOutput(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance for this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.GetSerialPortOutputRequest |
GetShieldedInstanceIdentity(string, string, string)
Returns the Shielded Instance Identity of an instance
Declaration
public virtual InstancesResource.GetShieldedInstanceIdentityRequest GetShieldedInstanceIdentity(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name or id of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.GetShieldedInstanceIdentityRequest |
GetShieldedVmIdentity(string, string, string)
Returns the Shielded VM Identity of an instance
Declaration
public virtual InstancesResource.GetShieldedVmIdentityRequest GetShieldedVmIdentity(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.GetShieldedVmIdentityRequest |
Insert(Instance, string, string)
Creates an instance resource in the specified project using the data included in the request.
Declaration
public virtual InstancesResource.InsertRequest Insert(Instance body, string project, string zone)
Parameters
| Type | Name | Description |
|---|---|---|
| Instance | 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 |
|---|---|
| InstancesResource.InsertRequest |
List(string, string)
Retrieves the list of instances contained within the specified zone.
Declaration
public virtual InstancesResource.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 |
|---|---|
| InstancesResource.ListRequest |
ListReferrers(string, string, string)
Retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.
Declaration
public virtual InstancesResource.ListReferrersRequest ListReferrers(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the target instance scoping this request, or '-' if the request should span over all instances in the container. |
Returns
| Type | Description |
|---|---|
| InstancesResource.ListReferrersRequest |
PatchPartnerMetadata(PartnerMetadata, string, string, string)
Patches partner metadata of the specified instance.
Declaration
public virtual InstancesResource.PatchPartnerMetadataRequest PatchPartnerMetadata(PartnerMetadata body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| PartnerMetadata | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.PatchPartnerMetadataRequest |
PerformMaintenance(string, string, string)
Perform a manual maintenance on the instance.
Declaration
public virtual InstancesResource.PerformMaintenanceRequest PerformMaintenance(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.PerformMaintenanceRequest |
RemoveResourcePolicies(InstancesRemoveResourcePoliciesRequest, string, string, string)
Removes resource policies from an instance.
Declaration
public virtual InstancesResource.RemoveResourcePoliciesRequest RemoveResourcePolicies(InstancesRemoveResourcePoliciesRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesRemoveResourcePoliciesRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.RemoveResourcePoliciesRequest |
ReportHostAsFaulty(InstancesReportHostAsFaultyRequest, string, string, string)
Mark the host as faulty and try to restart the instance on a new host.
Declaration
public virtual InstancesResource.ReportHostAsFaultyRequest ReportHostAsFaulty(InstancesReportHostAsFaultyRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesReportHostAsFaultyRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.ReportHostAsFaultyRequest |
Reset(string, string, string)
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.
Declaration
public virtual InstancesResource.ResetRequest Reset(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.ResetRequest |
Resume(InstancesResumeRequest, string, string, string)
Resumes an instance that was suspended using the instances().suspend method.
Declaration
public virtual InstancesResource.ResumeRequest Resume(InstancesResumeRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesResumeRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to resume. |
Returns
| Type | Description |
|---|---|
| InstancesResource.ResumeRequest |
SendDiagnosticInterrupt(string, string, string)
Sends diagnostic interrupt to the instance.
Declaration
public virtual InstancesResource.SendDiagnosticInterruptRequest SendDiagnosticInterrupt(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SendDiagnosticInterruptRequest |
SetDeletionProtection(string, string, string)
Sets deletion protection on the instance.
Declaration
public virtual InstancesResource.SetDeletionProtectionRequest SetDeletionProtection(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 |
|---|---|
| InstancesResource.SetDeletionProtectionRequest |
SetDiskAutoDelete(string, string, string, bool, string)
Sets the auto-delete flag for a disk attached to an instance.
Declaration
public virtual InstancesResource.SetDiskAutoDeleteRequest SetDiskAutoDelete(string project, string zone, string instance, bool autoDelete, string deviceName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
| bool | autoDelete | Whether to auto-delete the disk when the instance is deleted. |
| string | deviceName | The device name of the disk to modify. Make a get() request on the instance to view currently attached disks and device names. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetDiskAutoDeleteRequest |
SetIamPolicy(ZoneSetPolicyRequest, string, string, string)
Sets the access control policy on the specified resource. Replaces any existing policy.
Declaration
public virtual InstancesResource.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 |
|---|---|
| InstancesResource.SetIamPolicyRequest |
SetLabels(InstancesSetLabelsRequest, string, string, string)
Sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.
Declaration
public virtual InstancesResource.SetLabelsRequest SetLabels(InstancesSetLabelsRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesSetLabelsRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetLabelsRequest |
SetMachineResources(InstancesSetMachineResourcesRequest, string, string, string)
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request.
Declaration
public virtual InstancesResource.SetMachineResourcesRequest SetMachineResources(InstancesSetMachineResourcesRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesSetMachineResourcesRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetMachineResourcesRequest |
SetMachineType(InstancesSetMachineTypeRequest, string, string, string)
Changes the machine type for a stopped instance to the machine type specified in the request.
Declaration
public virtual InstancesResource.SetMachineTypeRequest SetMachineType(InstancesSetMachineTypeRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesSetMachineTypeRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetMachineTypeRequest |
SetMetadata(Metadata, string, string, string)
Sets metadata for the specified instance to the data included in the request.
Declaration
public virtual InstancesResource.SetMetadataRequest SetMetadata(Metadata body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| Metadata | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetMetadataRequest |
SetMinCpuPlatform(InstancesSetMinCpuPlatformRequest, string, string, string)
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.
Declaration
public virtual InstancesResource.SetMinCpuPlatformRequest SetMinCpuPlatform(InstancesSetMinCpuPlatformRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesSetMinCpuPlatformRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetMinCpuPlatformRequest |
SetName(InstancesSetNameRequest, string, string, string)
Sets name of an instance.
Declaration
public virtual InstancesResource.SetNameRequest SetName(InstancesSetNameRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesSetNameRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetNameRequest |
SetScheduling(Scheduling, string, string, string)
Sets an instance's scheduling options. You can only call this method on a stopped instance, that is, a VM
instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible
instance states. For more information about setting scheduling options for a VM, see Set VM host maintenance
policy.
Declaration
public virtual InstancesResource.SetSchedulingRequest SetScheduling(Scheduling body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| Scheduling | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Instance name for this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetSchedulingRequest |
SetSecurityPolicy(InstancesSetSecurityPolicyRequest, string, string, string)
Sets the Google Cloud Armor security policy for the specified instance. For more information, see Google Cloud Armor Overview
Declaration
public virtual InstancesResource.SetSecurityPolicyRequest SetSecurityPolicy(InstancesSetSecurityPolicyRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesSetSecurityPolicyRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | Name of the zone scoping this request. |
| string | instance | Name of the Instance resource to which the security policy should be set. The name should conform to RFC1035. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetSecurityPolicyRequest |
SetServiceAccount(InstancesSetServiceAccountRequest, string, string, string)
Sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.
Declaration
public virtual InstancesResource.SetServiceAccountRequest SetServiceAccount(InstancesSetServiceAccountRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesSetServiceAccountRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to start. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetServiceAccountRequest |
SetShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy, string, string, string)
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.
Declaration
public virtual InstancesResource.SetShieldedInstanceIntegrityPolicyRequest SetShieldedInstanceIntegrityPolicy(ShieldedInstanceIntegrityPolicy body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| ShieldedInstanceIntegrityPolicy | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name or id of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetShieldedInstanceIntegrityPolicyRequest |
SetShieldedVmIntegrityPolicy(ShieldedVmIntegrityPolicy, string, string, string)
Sets the Shielded VM integrity policy for a VM instance. You can only use this method on a running VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Declaration
public virtual InstancesResource.SetShieldedVmIntegrityPolicyRequest SetShieldedVmIntegrityPolicy(ShieldedVmIntegrityPolicy body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| ShieldedVmIntegrityPolicy | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetShieldedVmIntegrityPolicyRequest |
SetTags(Tags, string, string, string)
Sets network tags for the specified instance to the data included in the request.
Declaration
public virtual InstancesResource.SetTagsRequest SetTags(Tags body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| Tags | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SetTagsRequest |
SimulateMaintenanceEvent(string, string, string)
Simulates a host maintenance event on a VM. For more information, see Simulate a host maintenance event.
Declaration
public virtual InstancesResource.SimulateMaintenanceEventRequest SimulateMaintenanceEvent(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SimulateMaintenanceEventRequest |
Start(string, string, string)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Declaration
public virtual InstancesResource.StartRequest Start(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to start. |
Returns
| Type | Description |
|---|---|
| InstancesResource.StartRequest |
StartWithEncryptionKey(InstancesStartWithEncryptionKeyRequest, string, string, string)
Starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.
Declaration
public virtual InstancesResource.StartWithEncryptionKeyRequest StartWithEncryptionKey(InstancesStartWithEncryptionKeyRequest body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| InstancesStartWithEncryptionKeyRequest | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to start. |
Returns
| Type | Description |
|---|---|
| InstancesResource.StartWithEncryptionKeyRequest |
Stop(string, string, string)
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.
Declaration
public virtual InstancesResource.StopRequest Stop(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to stop. |
Returns
| Type | Description |
|---|---|
| InstancesResource.StopRequest |
Suspend(string, string, string)
This method suspends a running instance, saving its state to persistent storage, and allows you to resume the instance at a later time. Suspended instances have no compute costs (cores or RAM), and incur only storage charges for the saved VM memory and localSSD data. Any charged resources the virtual machine was using, such as persistent disks and static IP addresses, will continue to be charged while the instance is suspended. For more information, see Suspending and resuming an instance.
Declaration
public virtual InstancesResource.SuspendRequest Suspend(string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to suspend. |
Returns
| Type | Description |
|---|---|
| InstancesResource.SuspendRequest |
TestIamPermissions(TestPermissionsRequest, string, string, string)
Returns permissions that a caller has on the specified resource.
Declaration
public virtual InstancesResource.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 |
|---|---|
| InstancesResource.TestIamPermissionsRequest |
Update(Instance, string, string, string)
Updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.
Declaration
public virtual InstancesResource.UpdateRequest Update(Instance body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| Instance | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance resource to update. |
Returns
| Type | Description |
|---|---|
| InstancesResource.UpdateRequest |
UpdateAccessConfig(AccessConfig, string, string, string, string)
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.
Declaration
public virtual InstancesResource.UpdateAccessConfigRequest UpdateAccessConfig(AccessConfig body, string project, string zone, string instance, string networkInterface)
Parameters
| Type | Name | Description |
|---|---|---|
| AccessConfig | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
| string | networkInterface | The name of the network interface where the access config is attached. |
Returns
| Type | Description |
|---|---|
| InstancesResource.UpdateAccessConfigRequest |
UpdateDisplayDevice(DisplayDevice, string, string, string)
Updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Declaration
public virtual InstancesResource.UpdateDisplayDeviceRequest UpdateDisplayDevice(DisplayDevice body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| DisplayDevice | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.UpdateDisplayDeviceRequest |
UpdateNetworkInterface(NetworkInterface, string, string, string, string)
Updates an instance's network interface. This method can only update an interface's alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.
Declaration
public virtual InstancesResource.UpdateNetworkInterfaceRequest UpdateNetworkInterface(NetworkInterface body, string project, string zone, string instance, string networkInterface)
Parameters
| Type | Name | Description |
|---|---|---|
| NetworkInterface | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | The instance name for this request. |
| string | networkInterface | The name of the network interface to update. |
Returns
| Type | Description |
|---|---|
| InstancesResource.UpdateNetworkInterfaceRequest |
UpdateShieldedInstanceConfig(ShieldedInstanceConfig, string, string, string)
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.
Declaration
public virtual InstancesResource.UpdateShieldedInstanceConfigRequest UpdateShieldedInstanceConfig(ShieldedInstanceConfig body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| ShieldedInstanceConfig | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name or id of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.UpdateShieldedInstanceConfigRequest |
UpdateShieldedVmConfig(ShieldedVmConfig, string, string, string)
Updates the Shielded VM config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.
Declaration
public virtual InstancesResource.UpdateShieldedVmConfigRequest UpdateShieldedVmConfig(ShieldedVmConfig body, string project, string zone, string instance)
Parameters
| Type | Name | Description |
|---|---|---|
| ShieldedVmConfig | body | The body of the request. |
| string | project | Project ID for this request. |
| string | zone | The name of the zone for this request. |
| string | instance | Name of the instance scoping this request. |
Returns
| Type | Description |
|---|---|
| InstancesResource.UpdateShieldedVmConfigRequest |