- Resource: Instance
- Status
- InstanceParams
- DisplayDevice
- ShieldedInstanceIntegrityPolicy
- ResourceStatus
- EffectiveInstanceMetadata
- Scheduling
- PhysicalHostTopology
- Methods
Resource: Instance
Represents an Instance resource.
An instance is a virtual machine that is hosted on Trusted Cloud Platform. For more information, read Virtual Machine Instances.
JSON representation |
---|
{ "kind": string, "id": string, "creationTimestamp": string, "name": string, "description": string, "tags": { object ( |
Fields | |
---|---|
kind |
[Output Only] Type of the resource. Always
for instances. |
id |
[Output Only] The unique identifier for the resource. This identifier is defined by the server. |
creationTimestamp |
[Output Only] Creation timestamp in RFC3339 text format. |
name |
The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression |
description |
An optional description of this resource. Provide this property when you create the resource. |
tags |
Tags to apply to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035. Multiple tags can be specified via the 'tags.items' field. |
machineType |
Full or partial URL of the machine type resource to use for this instance, in the format:
. This is provided by the client when the instance is created. For example, the following is a valid partial url to a predefined machine type:
To create a custom machine type, provide a URL to a machine type in the following format, where CPUS is 1 or an even number up to 32 (2, 4, 6, ... 24, etc), and MEMORY is the total memory for this instance. Memory must be a multiple of 256 MB and must be supplied in MB (e.g. 5 GB of memory is 5120 MB):
For example:
For a full list of restrictions, read the Specifications for custom machine types. |
status |
[Output Only] The status of the instance. One of the following values:
,
,
,
,
,
,
, and
. For more information about the status of the instance, see Instance life cycle. |
statusMessage |
[Output Only] An optional, human-readable explanation of the status. |
zone |
[Output Only] URL of the zone where the instance resides. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body. |
canIpForward |
Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding. |
networkInterfaces[] |
An array of network configurations for this instance. These specify how interfaces are configured to interact with other network services, such as connecting to the internet. Multiple interfaces are supported per instance. |
disks[] |
Array of disks associated with this instance. Persistent disks must be created before you can assign them. |
metadata |
The metadata key/value pairs assigned to this instance. This includes metadata keys that were explicitly defined for the instance. |
serviceAccounts[] |
A list of service accounts, with their specified scopes, authorized for this instance. Only one service account per VM instance is supported. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Service Accounts for more information. |
selfLink |
[Output Only] Server-defined URL for this resource. |
scheduling |
Sets the scheduling options for this instance. |
cpuPlatform |
[Output Only] The CPU platform used by this instance. |
labels |
Labels to apply to this instance. These can be later modified by the
method. |
params |
Input only. [Input Only] Additional params passed with the request, but not persisted as part of resource payload. |
labelFingerprint |
A fingerprint for this request, which is essentially a hash of the label's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels. To see the latest fingerprint, make
request to the instance. A base64-encoded string. |
instanceEncryptionKey |
Encrypts suspended data for an instance with a customer-managed encryption key. If you are creating a new instance, this field will encrypt the local SSD and in-memory contents of the instance during the suspend operation. If you do not provide an encryption key when creating the instance, then the local SSD and in-memory contents will be encrypted using an automatically generated key during the suspend operation. |
minCpuPlatform |
Specifies a minimum CPU platform for the VM instance. Applicable values are the friendly names of CPU platforms, such as
or
. |
guestAccelerators[] |
A list of the type and count of accelerator cards attached to the instance. |
startRestricted |
[Output Only] Whether a VM has been restricted for start because Compute Engine has detected suspicious activity. |
deletionProtection |
Whether the resource should be protected against deletion. |
resourcePolicies[] |
Resource policies applied to this instance. |
sourceMachineImage |
Source machine image |
reservationAffinity |
Specifies the reservations that this instance can consume from. |
hostname |
Specifies the hostname of the instance. The specified hostname must be RFC1035 compliant. If hostname is not specified, the default hostname is [INSTANCE_NAME].c.[PROJECT_ID].internal when using the global DNS, and [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal when using zonal DNS. |
displayDevice |
Enables display device for the instance. |
shieldedInstanceConfig |
|
shieldedInstanceIntegrityPolicy |
|
sourceMachineImageEncryptionKey |
Source machine image encryption key when creating an instance from a machine image. |
confidentialInstanceConfig |
|
fingerprint |
Specifies a fingerprint for this resource, which is essentially a hash of the instance's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update the instance. You must always provide an up-to-date fingerprint hash in order to update the instance. To see the latest fingerprint, make
request to the instance. A base64-encoded string. |
privateIpv6GoogleAccess |
The private IPv6 Google access type for the VM. If not specified, use
as default. |
advancedMachineFeatures |
Controls for advanced machine-related behavior features. |
lastStartTimestamp |
[Output Only] Last start timestamp in RFC3339 text format. |
lastStopTimestamp |
[Output Only] Last stop timestamp in RFC3339 text format. |
lastSuspendedTimestamp |
[Output Only] Last suspended timestamp in RFC3339 text format. |
satisfiesPzs |
[Output Only] Reserved for future use. |
satisfiesPzi |
[Output Only] Reserved for future use. |
resourceStatus |
[Output Only] Specifies values set for instance attributes as compared to the values requested by user in the corresponding input only field. |
networkPerformanceConfig |
|
keyRevocationActionType |
KeyRevocationActionType of the instance. Supported options are "STOP" and "NONE". The default value is "NONE" if it is not specified. |
Status
Enums | |
---|---|
PROVISIONING |
Resources are being allocated for the instance. |
STAGING |
All required resources have been allocated and the instance is being started. |
RUNNING |
The instance is running. |
STOPPING |
The instance is currently stopping (either being deleted or killed). |
STOPPED |
The instance has stopped successfully. |
TERMINATED |
The instance has stopped (either by explicit action or underlying failure). |
SUSPENDING |
The instance is suspending. |
SUSPENDED |
The instance has suspended. |
REPAIRING |
The instance is in repair. |
DEPROVISIONING |
The instance is halted and we are performing tear down tasks like network deprogramming, releasing quota, IP, tearing down disks etc. |
PENDING |
For Flex instances.start provisioning instance is waiting for available capacity from Dynamic Workload Scheduler (DWS). |
InstanceParams
Additional instance params.
JSON representation |
---|
{
"resourceManagerTags": {
string: string,
...
},
"requestValidForDuration": {
object ( |
Fields | |
---|---|
resourceManagerTags |
Resource manager tags to be bound to the instance. Tag keys and values have the same definition as resource manager tags. Keys must be in the format |
requestValidForDuration |
Relative deadline for waiting for capacity. Relevant only for Instances.Insert API. |
DisplayDevice
A set of Display Device options
JSON representation |
---|
{ "enableDisplay": boolean } |
Fields | |
---|---|
enableDisplay |
Defines whether the instance has Display enabled. |
ShieldedInstanceIntegrityPolicy
The policy describes the baseline against which Instance boot integrity is measured.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
updateAutoLearnPolicy |
Updates the integrity policy baseline using the measurements from the VM instance's most recent boot. |
ResourceStatus
Contains output only fields. Use this sub-message for actual values set on Instance attributes as compared to the value requested by the user (intent) in their instance CRUD calls.
JSON representation |
---|
{ "effectiveInstanceMetadata": { object ( |
Fields | |
---|---|
effectiveInstanceMetadata |
[Output Only] Effective metadata is a field that consolidates project, zonal instance settings, and instance-level predefined metadata keys to provide the overridden value for those metadata keys at the instance level. |
scheduling |
|
upcomingMaintenance |
|
physicalHost |
[Output Only] The precise location of your instance within the zone's data center, including the block, sub-block, and host. The field is formatted as follows: blockId/subBlockId/hostId. |
physicalHostTopology |
[Output Only] A series of fields containing the global name of the Compute Engine cluster, as well as the ID of the block, sub-block, and host on which the running instance is located. |
EffectiveInstanceMetadata
Effective values of predefined metadata keys for an instance.
JSON representation |
---|
{ "vmDnsSettingMetadataValue": string, "enableOsloginMetadataValue": boolean, "enableOsconfigMetadataValue": boolean, "enableOsInventoryMetadataValue": boolean, "enableGuestAttributesMetadataValue": boolean, "blockProjectSshKeysMetadataValue": boolean, "serialPortEnableMetadataValue": boolean, "serialPortLoggingEnableMetadataValue": boolean } |
Fields | |
---|---|
vmDnsSettingMetadataValue |
Effective VM DNS setting at Instance level. |
enableOsloginMetadataValue |
Effective enable-oslogin value at Instance level. |
enableOsconfigMetadataValue |
Effective enable-osconfig value at Instance level. |
enableOsInventoryMetadataValue |
Effective enable-os-inventory value at Instance level. |
enableGuestAttributesMetadataValue |
Effective enable-guest-attributes value at Instance level. |
blockProjectSshKeysMetadataValue |
Effective block-project-ssh-keys value at Instance level. |
serialPortEnableMetadataValue |
Effective serial-port-enable value at Instance level. |
serialPortLoggingEnableMetadataValue |
Effective serial-port-logging-enable value at Instance level. |
Scheduling
JSON representation |
---|
{ "availabilityDomain": integer } |
Fields | |
---|---|
availabilityDomain |
Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance. |
PhysicalHostTopology
Represents the physical host topology of the host on which the VM is running.
JSON representation |
---|
{ "cluster": string, "block": string, "subblock": string, "host": string } |
Fields | |
---|---|
cluster |
[Output Only] The global name of the Compute Engine cluster where the running instance is located. |
block |
[Output Only] The ID of the block in which the running instance is located. Instances within the same block experience low network latency. |
subblock |
[Output Only] The ID of the sub-block in which the running instance is located. Instances in the same sub-block experience lower network latency than instances in the same block. |
host |
[Output Only] The ID of the host on which the running instance is located. Instances on the same host experience the lowest possible network latency. |
Methods |
|
---|---|
|
Adds an access config to an instance's network interface. |
|
Adds existing resource policies to an instance. |
|
Retrieves an aggregated list of all of the instances in your project across all regions and zones. |
|
Attaches an existing Disk resource to an instance. |
|
Creates multiple instances. |
|
Deletes the specified Instance resource. |
|
Deletes an access config from an instance's network interface. |
|
Detaches a disk from an instance. |
|
Returns the specified Instance resource. |
|
Returns effective firewalls applied to an interface of the instance. |
|
Returns the specified guest attributes entry. |
|
Returns the screenshot from the specified instance. |
|
Returns the last 1 MB of serial port output from the specified instance. |
|
Returns the Shielded Instance Identity of an instance |
|
Creates an instance resource in the specified project using the data included in the request. |
|
Retrieves the list of instances contained within the specified zone. |
|
Retrieves a list of resources that refer to the VM instance specified in the request. |
|
Removes resource policies from an instance. |
|
Performs a reset on the instance. |
|
Sets deletion protection on the instance. |
|
Sets the auto-delete flag for a disk attached to an instance. |
|
Sets labels on an instance. |
|
Changes the number and/or type of accelerator for a stopped instance to the values specified in the request. |
|
Changes the machine type for a stopped instance to the machine type specified in the request. |
|
Sets metadata for the specified instance to the data included in the request. |
|
Changes the minimum CPU platform that this instance should use. |
|
Sets an instance's scheduling options. |
|
Sets the service account on the instance. |
|
Sets the Shielded Instance integrity policy for an instance. |
|
Sets network tags for the specified instance to the data included in the request. |
|
Simulates a host maintenance event on a VM. |
|
Starts an instance that was stopped using the |
|
Starts an instance that was stopped using the |
|
Stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. |
|
Updates an instance only if the necessary resources are available. |
|
Updates the specified access config from an instance's network interface with the data included in the request. |
|
Updates the Display config for a VM instance. |
|
Updates an instance's network interface. |
|
Updates the Shielded Instance config for an instance. |
|
The method compute.v1.InstancesService.AddNetworkInterface is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.DeleteNetworkInterface is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.GetPolicy is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.PerformMaintenance is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.ReportHostAsFaulty is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.Resume is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.SendDiagnosticInterrupt is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.SetPolicy is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.SetName is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.SetSecurityPolicy is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.Suspend is not available in Trusted Cloud by S3NS. |
|
The method compute.v1.InstancesService.TestPermissions is not available in Trusted Cloud by S3NS. |