Compute Cloud API, REST: Instance.get
Returns the specified Instance resource.
To get the list of available Instance resources, make a list request.
HTTP request
GET https://compute.api.cloud.yandex.net/compute/v1/instances/{instanceId}
Path parameters
Parameter | Description |
---|---|
instanceId | Required. ID of the Instance resource to return. To get the instance ID, use a list request. The maximum string length in characters is 50. |
Query parameters
Parameter | Description |
---|---|
view | Defines which information about the Instance resource should be returned in the server response.
|
Response
HTTP Code: 200 - OK
{
"id": "string",
"folderId": "string",
"createdAt": "string",
"name": "string",
"description": "string",
"labels": "object",
"zoneId": "string",
"platformId": "string",
"resources": {
"memory": "string",
"cores": "string",
"coreFraction": "string",
"gpus": "string"
},
"status": "string",
"metadata": "object",
"metadataOptions": {
"gceHttpEndpoint": "string",
"awsV1HttpEndpoint": "string",
"gceHttpToken": "string",
"awsV1HttpToken": "string"
},
"bootDisk": {
"mode": "string",
"deviceName": "string",
"autoDelete": true,
"diskId": "string"
},
"secondaryDisks": [
{
"mode": "string",
"deviceName": "string",
"autoDelete": true,
"diskId": "string"
}
],
"localDisks": [
{
"size": "string",
"deviceName": "string"
}
],
"filesystems": [
{
"mode": "string",
"deviceName": "string",
"filesystemId": "string"
}
],
"networkInterfaces": [
{
"index": "string",
"macAddress": "string",
"subnetId": "string",
"primaryV4Address": {
"address": "string",
"oneToOneNat": {
"address": "string",
"ipVersion": "string",
"dnsRecords": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": true
}
]
},
"dnsRecords": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": true
}
]
},
"primaryV6Address": {
"address": "string",
"oneToOneNat": {
"address": "string",
"ipVersion": "string",
"dnsRecords": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": true
}
]
},
"dnsRecords": [
{
"fqdn": "string",
"dnsZoneId": "string",
"ttl": "string",
"ptr": true
}
]
},
"securityGroupIds": [
"string"
]
}
],
"gpuSettings": {
"gpuClusterId": "string"
},
"fqdn": "string",
"schedulingPolicy": {
"preemptible": true
},
"serviceAccountId": "string",
"networkSettings": {
"type": "string"
},
"placementPolicy": {
"placementGroupId": "string",
"hostAffinityRules": [
{
"key": "string",
"op": "string",
"values": [
"string"
]
}
]
}
}
An Instance resource. For more information, see Instances.
Field | Description |
---|---|
id | string ID of the instance. |
folderId | string ID of the folder that the instance belongs to. |
createdAt | string (date-time) String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
name | string Name of the instance. 1-63 characters long. |
description | string Description of the instance. 0-256 characters long. |
labels | object Resource labels as |
zoneId | string ID of the availability zone where the instance resides. |
platformId | string ID of the hardware platform configuration for the instance. |
resources | object Computing resources of the instance such as the amount of memory and number of cores. |
resources. memory |
string (int64) The amount of memory available to the instance, specified in bytes. |
resources. cores |
string (int64) The number of cores available to the instance. |
resources. coreFraction |
string (int64) Baseline level of CPU performance with the ability to burst performance above that baseline level. This field sets baseline performance for each core. |
resources. gpus |
string (int64) The number of GPUs available to the instance. |
status | string Status of the instance.
|
metadata | object The metadata For example, you may use the metadata in order to provide your public SSH key to the instance. For more information, see Metadata. |
metadataOptions | object Options allow user to configure access to instance's metadata |
metadataOptions. gceHttpEndpoint |
string Enabled access to GCE flavored metadata
|
metadataOptions. awsV1HttpEndpoint |
string Enabled access to AWS flavored metadata (IMDSv1)
|
metadataOptions. gceHttpToken |
string Enabled access to IAM credentials with GCE flavored metadata
|
metadataOptions. awsV1HttpToken |
string Enabled access to IAM credentials with AWS flavored metadata (IMDSv1)
|
bootDisk | object Boot disk that is attached to the instance. |
bootDisk. mode |
string Access mode to the Disk resource.
|
bootDisk. deviceName |
string Serial number that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance. This value can be used to reference the device for mounting, resizing, and so on, from within the instance. |
bootDisk. autoDelete |
boolean (boolean) Specifies whether the disk will be auto-deleted when the instance is deleted. |
bootDisk. diskId |
string ID of the disk that is attached to the instance. |
secondaryDisks[] | object Array of secondary disks that are attached to the instance. |
secondaryDisks[]. mode |
string Access mode to the Disk resource.
|
secondaryDisks[]. deviceName |
string Serial number that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance. This value can be used to reference the device for mounting, resizing, and so on, from within the instance. |
secondaryDisks[]. autoDelete |
boolean (boolean) Specifies whether the disk will be auto-deleted when the instance is deleted. |
secondaryDisks[]. diskId |
string ID of the disk that is attached to the instance. |
localDisks[] | object Array of local disks that are attached to the instance. |
localDisks[]. size |
string (int64) Size of the disk, specified in bytes. |
localDisks[]. deviceName |
string Serial number that is reflected into the /dev/disk/by-id/ tree of a Linux operating system running within the instance. This value can be used to reference the device for mounting, resizing, and so on, from within the instance. |
filesystems[] | object Array of filesystems that are attached to the instance. |
filesystems[]. mode |
string Access mode to the filesystem.
|
filesystems[]. deviceName |
string Name of the device representing the filesystem on the instance. The name should be used for referencing the filesystem from within the instance when it's being mounted, resized etc. |
filesystems[]. filesystemId |
string ID of the filesystem that is attached to the instance. |
networkInterfaces[] | object Array of network interfaces that are attached to the instance. |
networkInterfaces[]. index |
string The index of the network interface, generated by the server, 0,1,2... etc. Currently only one network interface is supported per instance. |
networkInterfaces[]. macAddress |
string MAC address that is assigned to the network interface. |
networkInterfaces[]. subnetId |
string ID of the subnet. |
networkInterfaces[]. primaryV4Address |
object Primary IPv4 address that is assigned to the instance for this network interface. |
networkInterfaces[]. primaryV4Address. address |
string An IPv4 internal network address that is assigned to the instance for this network interface. |
networkInterfaces[]. primaryV4Address. oneToOneNat |
object One-to-one NAT configuration. If missing, NAT has not been set up. |
networkInterfaces[]. primaryV4Address. oneToOneNat. address |
string An external IP address associated with this instance. |
networkInterfaces[]. primaryV4Address. oneToOneNat. ipVersion |
string IP version for the external IP address.
|
networkInterfaces[]. primaryV4Address. oneToOneNat. dnsRecords[] |
object External DNS configuration |
networkInterfaces[]. primaryV4Address. oneToOneNat. dnsRecords[]. fqdn |
string Name of the A/AAAA record as specified when creating the instance. Note that if `fqdn' has no trailing '.', it is specified relative to the zone (@see dns_zone_id). |
networkInterfaces[]. primaryV4Address. oneToOneNat. dnsRecords[]. dnsZoneId |
string DNS zone id for the record (optional, if not set, some private zone is used). |
networkInterfaces[]. primaryV4Address. oneToOneNat. dnsRecords[]. ttl |
string (int64) DNS record ttl (optional, if not set, a reasonable default is used.) |
networkInterfaces[]. primaryV4Address. oneToOneNat. dnsRecords[]. ptr |
boolean (boolean) When true, indicates there is a corresponding auto-created PTR DNS record. |
networkInterfaces[]. primaryV4Address. dnsRecords[] |
object Internal DNS configuration |
networkInterfaces[]. primaryV4Address. dnsRecords[]. fqdn |
string Name of the A/AAAA record as specified when creating the instance. Note that if `fqdn' has no trailing '.', it is specified relative to the zone (@see dns_zone_id). |
networkInterfaces[]. primaryV4Address. dnsRecords[]. dnsZoneId |
string DNS zone id for the record (optional, if not set, some private zone is used). |
networkInterfaces[]. primaryV4Address. dnsRecords[]. ttl |
string (int64) DNS record ttl (optional, if not set, a reasonable default is used.) |
networkInterfaces[]. primaryV4Address. dnsRecords[]. ptr |
boolean (boolean) When true, indicates there is a corresponding auto-created PTR DNS record. |
networkInterfaces[]. primaryV6Address |
object Primary IPv6 address that is assigned to the instance for this network interface. IPv6 not available yet. |
networkInterfaces[]. primaryV6Address. address |
string An IPv4 internal network address that is assigned to the instance for this network interface. |
networkInterfaces[]. primaryV6Address. oneToOneNat |
object One-to-one NAT configuration. If missing, NAT has not been set up. |
networkInterfaces[]. primaryV6Address. oneToOneNat. address |
string An external IP address associated with this instance. |
networkInterfaces[]. primaryV6Address. oneToOneNat. ipVersion |
string IP version for the external IP address.
|
networkInterfaces[]. primaryV6Address. oneToOneNat. dnsRecords[] |
object External DNS configuration |
networkInterfaces[]. primaryV6Address. oneToOneNat. dnsRecords[]. fqdn |
string Name of the A/AAAA record as specified when creating the instance. Note that if `fqdn' has no trailing '.', it is specified relative to the zone (@see dns_zone_id). |
networkInterfaces[]. primaryV6Address. oneToOneNat. dnsRecords[]. dnsZoneId |
string DNS zone id for the record (optional, if not set, some private zone is used). |
networkInterfaces[]. primaryV6Address. oneToOneNat. dnsRecords[]. ttl |
string (int64) DNS record ttl (optional, if not set, a reasonable default is used.) |
networkInterfaces[]. primaryV6Address. oneToOneNat. dnsRecords[]. ptr |
boolean (boolean) When true, indicates there is a corresponding auto-created PTR DNS record. |
networkInterfaces[]. primaryV6Address. dnsRecords[] |
object Internal DNS configuration |
networkInterfaces[]. primaryV6Address. dnsRecords[]. fqdn |
string Name of the A/AAAA record as specified when creating the instance. Note that if `fqdn' has no trailing '.', it is specified relative to the zone (@see dns_zone_id). |
networkInterfaces[]. primaryV6Address. dnsRecords[]. dnsZoneId |
string DNS zone id for the record (optional, if not set, some private zone is used). |
networkInterfaces[]. primaryV6Address. dnsRecords[]. ttl |
string (int64) DNS record ttl (optional, if not set, a reasonable default is used.) |
networkInterfaces[]. primaryV6Address. dnsRecords[]. ptr |
boolean (boolean) When true, indicates there is a corresponding auto-created PTR DNS record. |
networkInterfaces[]. securityGroupIds[] |
string ID's of security groups attached to the interface |
gpuSettings | object GPU settings |
gpuSettings. gpuClusterId |
string Attach instance to specified GPU cluster. |
fqdn | string A domain name of the instance. FQDN is defined by the server in the format |
schedulingPolicy | object Scheduling policy configuration. |
schedulingPolicy. preemptible |
boolean (boolean) True for short-lived compute instances. For more information, see Preemptible VMs. |
serviceAccountId | string ID of the service account to use for authentication inside the instance. To get the service account ID, use a list request. |
networkSettings | object Network Settings |
networkSettings. type |
string Network Type
|
placementPolicy | object Placement policy configuration. |
placementPolicy. placementGroupId |
string Placement group ID. |
placementPolicy. hostAffinityRules[] |
object List of affinity rules. Scheduler will attempt to allocate instances according to order of rules. |
placementPolicy. hostAffinityRules[]. key |
string Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId' |
placementPolicy. hostAffinityRules[]. op |
string Include or exclude action |
placementPolicy. hostAffinityRules[]. values[] |
string Affinity value or host ID or host group ID |