@yandex-cloud/nodejs-sdk
Version:
Yandex.Cloud NodeJS SDK
1,139 lines • 234 kB
TypeScript
/// <reference types="node" />
import { ChannelCredentials, ChannelOptions, UntypedServiceImplementation, handleUnaryCall, Client, ClientUnaryCall, Metadata, CallOptions, ServiceError } from "@grpc/grpc-js";
import _m0 from "protobufjs/minimal";
import { MetadataOptions, SchedulingPolicy, NetworkSettings, GpuSettings, PlacementPolicy, IpVersion, Instance } from "../../../../yandex/cloud/compute/v1/instance";
import { FieldMask } from "../../../../google/protobuf/field_mask";
import { DiskPlacementPolicy } from "../../../../yandex/cloud/compute/v1/disk";
import { Operation } from "../../../../yandex/cloud/operation/operation";
import { ListAccessBindingsRequest, ListAccessBindingsResponse, SetAccessBindingsRequest, UpdateAccessBindingsRequest } from "../../../../yandex/cloud/access/access";
export declare const protobufPackage = "yandex.cloud.compute.v1";
export declare enum InstanceView {
/** BASIC - Doesn't include the metadata of the instance in the server response. */
BASIC = 0,
/** FULL - Returns the metadata of the instance in the server response. */
FULL = 1,
UNRECOGNIZED = -1
}
export declare function instanceViewFromJSON(object: any): InstanceView;
export declare function instanceViewToJSON(object: InstanceView): string;
export interface GetInstanceRequest {
$type: "yandex.cloud.compute.v1.GetInstanceRequest";
/**
* ID of the Instance resource to return.
* To get the instance ID, use a [InstanceService.List] request.
*/
instanceId: string;
/** Defines which information about the Instance resource should be returned in the server response. */
view: InstanceView;
}
export interface ListInstancesRequest {
$type: "yandex.cloud.compute.v1.ListInstancesRequest";
/**
* ID of the Folder to list instances in.
* To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
*/
folderId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size],
* the service returns a [ListInstancesResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*/
pageSize: number;
/**
* Page token. To get the next page of results,
* set [page_token] to the [ListInstancesResponse.next_page_token]
* returned by a previous list request.
*/
pageToken: string;
/**
* A filter expression that filters resources listed in the response.
* The expression consists of one or more conditions united by `AND` operator: `<condition1> [AND <condition2> [<...> AND <conditionN>]]`.
*
* Each condition has the form `<field> <operator> <value>`, where:
* 1. `<field>` is the field name. Currently you can use filtering only on the limited number of fields.
* 2. `<operator>` is a logical operator, one of `=`, `!=`, `IN`, `NOT IN`.
* 3. `<value>` represents a value.
* String values should be written in double (`"`) or single (`'`) quotes. C-style escape sequences are supported (`\"` turns to `"`, `\'` to `'`, `\\` to backslash).
*/
filter: string;
/**
* By which column the listing should be ordered and in which direction,
* format is "createdAt desc". "id asc" if omitted.
* The default sorting order is ascending
*/
orderBy: string;
}
export interface ListInstancesResponse {
$type: "yandex.cloud.compute.v1.ListInstancesResponse";
/** List of Instance resources. */
instances: Instance[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListInstancesRequest.page_size], use
* the [next_page_token] as the value
* for the [ListInstancesRequest.page_token] query parameter
* in the next list request. Each subsequent list request will have its own
* [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export interface CreateInstanceRequest {
$type: "yandex.cloud.compute.v1.CreateInstanceRequest";
/**
* ID of the folder to create an instance in.
* To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
*/
folderId: string;
/** Name of the instance. */
name: string;
/** Description of the instance. */
description: string;
/** Resource labels as `key:value` pairs. */
labels: {
[key: string]: string;
};
/**
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*/
zoneId: string;
/**
* ID of the hardware platform configuration for the instance.
* This field affects the available values in [resources_spec] field.
*
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*/
platformId: string;
/**
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*/
resourcesSpec?: ResourcesSpec;
/**
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
*
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
*
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*/
metadata: {
[key: string]: string;
};
/** Options allow user to configure access to instance's metadata */
metadataOptions?: MetadataOptions;
/** Boot disk to attach to the instance. */
bootDiskSpec?: AttachedDiskSpec;
/** Array of secondary disks to attach to the instance. */
secondaryDiskSpecs: AttachedDiskSpec[];
/** Array of local disks to attach to the instance. */
localDiskSpecs: AttachedLocalDiskSpec[];
/**
* Array of filesystems to attach to the instance.
*
* The filesystems must reside in the same availability zone as the instance.
*
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*/
filesystemSpecs: AttachedFilesystemSpec[];
/**
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*/
networkInterfaceSpecs: NetworkInterfaceSpec[];
/**
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
*/
hostname: string;
/** Scheduling policy configuration. */
schedulingPolicy?: SchedulingPolicy;
/**
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*/
serviceAccountId: string;
/** Network settings. */
networkSettings?: NetworkSettings;
/** GPU settings. */
gpuSettings?: GpuSettings;
/** Placement policy configuration. */
placementPolicy?: PlacementPolicy;
}
export interface CreateInstanceRequest_LabelsEntry {
$type: "yandex.cloud.compute.v1.CreateInstanceRequest.LabelsEntry";
key: string;
value: string;
}
export interface CreateInstanceRequest_MetadataEntry {
$type: "yandex.cloud.compute.v1.CreateInstanceRequest.MetadataEntry";
key: string;
value: string;
}
export interface CreateInstanceMetadata {
$type: "yandex.cloud.compute.v1.CreateInstanceMetadata";
/** ID of the instance that is being created. */
instanceId: string;
}
export interface UpdateInstanceRequest {
$type: "yandex.cloud.compute.v1.UpdateInstanceRequest";
/**
* ID of the Instance resource to update.
* To get the instance ID, use a [InstanceService.List] request.
*/
instanceId: string;
/** Field mask that specifies which fields of the Instance resource are going to be updated. */
updateMask?: FieldMask;
/** Name of the instance. */
name: string;
/** Description of the instance. */
description: string;
/**
* Resource labels as `key:value` pairs.
*
* Existing set of `labels` is completely replaced by the provided set.
*/
labels: {
[key: string]: string;
};
/**
* ID of the hardware platform configuration for the instance.
* This field affects the available values in [resources_spec] field.
*
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*/
platformId: string;
/**
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*/
resourcesSpec?: ResourcesSpec;
/**
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
*
* Existing set of `metadata` is completely replaced by the provided set.
*
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
*
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*/
metadata: {
[key: string]: string;
};
/** Options allow user to configure access to instance's metadata */
metadataOptions?: MetadataOptions;
/**
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*/
serviceAccountId: string;
/** Network settings. */
networkSettings?: NetworkSettings;
/** Placement policy configuration. */
placementPolicy?: PlacementPolicy;
/** Scheduling policy configuration. */
schedulingPolicy?: SchedulingPolicy;
}
export interface UpdateInstanceRequest_LabelsEntry {
$type: "yandex.cloud.compute.v1.UpdateInstanceRequest.LabelsEntry";
key: string;
value: string;
}
export interface UpdateInstanceRequest_MetadataEntry {
$type: "yandex.cloud.compute.v1.UpdateInstanceRequest.MetadataEntry";
key: string;
value: string;
}
export interface UpdateInstanceMetadata {
$type: "yandex.cloud.compute.v1.UpdateInstanceMetadata";
/** ID of the Instance resource that is being updated. */
instanceId: string;
}
export interface DeleteInstanceRequest {
$type: "yandex.cloud.compute.v1.DeleteInstanceRequest";
/**
* ID of the instance to delete.
* To get the instance ID, use a [InstanceService.List] request.
*/
instanceId: string;
}
export interface DeleteInstanceMetadata {
$type: "yandex.cloud.compute.v1.DeleteInstanceMetadata";
/** ID of the instance that is being deleted. */
instanceId: string;
}
export interface UpdateInstanceMetadataRequest {
$type: "yandex.cloud.compute.v1.UpdateInstanceMetadataRequest";
/** ID of the instance that is being updated. */
instanceId: string;
/** List of keys to be deleted. */
delete: string[];
/** The metadata `key:value` pairs that will be added or updated to this instance. */
upsert: {
[key: string]: string;
};
}
export interface UpdateInstanceMetadataRequest_UpsertEntry {
$type: "yandex.cloud.compute.v1.UpdateInstanceMetadataRequest.UpsertEntry";
key: string;
value: string;
}
export interface UpdateInstanceMetadataMetadata {
$type: "yandex.cloud.compute.v1.UpdateInstanceMetadataMetadata";
/** ID of the instance that is being updated. */
instanceId: string;
}
export interface GetInstanceSerialPortOutputRequest {
$type: "yandex.cloud.compute.v1.GetInstanceSerialPortOutputRequest";
/** ID of the instance to return the serial port output for. */
instanceId: string;
/** Serial port to retrieve data from. The default is 1. */
port: number;
}
export interface GetInstanceSerialPortOutputResponse {
$type: "yandex.cloud.compute.v1.GetInstanceSerialPortOutputResponse";
/**
* The contents of the serial port output, starting from the time when the instance
* started to boot.
*/
contents: string;
}
export interface StopInstanceRequest {
$type: "yandex.cloud.compute.v1.StopInstanceRequest";
/**
* ID of the instance to stop.
* To get the instance ID, use a [InstanceService.List] request.
*/
instanceId: string;
}
export interface StopInstanceMetadata {
$type: "yandex.cloud.compute.v1.StopInstanceMetadata";
/** ID of the instance that is being deleted. */
instanceId: string;
}
export interface StartInstanceRequest {
$type: "yandex.cloud.compute.v1.StartInstanceRequest";
/**
* ID of the instance to start.
* To get the instance ID, use a [InstanceService.List] request.
*/
instanceId: string;
}
export interface StartInstanceMetadata {
$type: "yandex.cloud.compute.v1.StartInstanceMetadata";
/** ID of the instance. */
instanceId: string;
}
export interface RestartInstanceRequest {
$type: "yandex.cloud.compute.v1.RestartInstanceRequest";
/**
* ID of the instance to restart.
* To get the instance ID, use a [InstanceService.List] request.
*/
instanceId: string;
}
export interface RestartInstanceMetadata {
$type: "yandex.cloud.compute.v1.RestartInstanceMetadata";
/** ID of the instance. */
instanceId: string;
}
export interface AttachInstanceDiskRequest {
$type: "yandex.cloud.compute.v1.AttachInstanceDiskRequest";
/**
* ID of the instance to attach the disk to.
* To get the instance ID, use a [InstanceService.List] request.
*/
instanceId: string;
/** Disk that should be attached. */
attachedDiskSpec?: AttachedDiskSpec;
}
export interface AttachInstanceDiskMetadata {
$type: "yandex.cloud.compute.v1.AttachInstanceDiskMetadata";
/** ID of the instance. */
instanceId: string;
/** ID of the disk. */
diskId: string;
}
export interface DetachInstanceDiskRequest {
$type: "yandex.cloud.compute.v1.DetachInstanceDiskRequest";
/**
* ID of the instance to detach the disk from.
* To get the instance ID, use a [InstanceService.List] request.
*/
instanceId: string;
/** ID of the disk that should be detached. */
diskId: string | undefined;
/**
* Serial number of the disk that should be detached. This value is reflected into the /dev/disk/by-id/ tree
* of a Linux operating system running within the instance.
*/
deviceName: string | undefined;
}
export interface DetachInstanceDiskMetadata {
$type: "yandex.cloud.compute.v1.DetachInstanceDiskMetadata";
/** ID of the instance. */
instanceId: string;
/** ID of the disk. */
diskId: string;
}
export interface AttachInstanceFilesystemRequest {
$type: "yandex.cloud.compute.v1.AttachInstanceFilesystemRequest";
/**
* ID of the instance to attach the filesystem to.
*
* To get the instance ID, make a [InstanceService.List] request.
*/
instanceId: string;
/** Filesystem to attach to the instance. */
attachedFilesystemSpec?: AttachedFilesystemSpec;
}
export interface AttachInstanceFilesystemMetadata {
$type: "yandex.cloud.compute.v1.AttachInstanceFilesystemMetadata";
/** ID of the instance that the filesystem is being attached to. */
instanceId: string;
/** ID of the filesystem that is being attached to the instance. */
filesystemId: string;
}
export interface DetachInstanceFilesystemRequest {
$type: "yandex.cloud.compute.v1.DetachInstanceFilesystemRequest";
/**
* ID of the instance to detach the filesystem from.
*
* To get the instance ID, make a [InstanceService.List] request.
*/
instanceId: string;
/** ID of the filesystem that should be detached. */
filesystemId: string | undefined;
/** Name of the device used for mounting the filesystem that should be detached. */
deviceName: string | undefined;
}
export interface DetachInstanceFilesystemMetadata {
$type: "yandex.cloud.compute.v1.DetachInstanceFilesystemMetadata";
/** ID of the instance that the filesystem is being detached from. */
instanceId: string;
/** ID of the filesystem that is being detached from the instance. */
filesystemId: string;
}
/** Enables One-to-one NAT on the network interface. */
export interface AddInstanceOneToOneNatRequest {
$type: "yandex.cloud.compute.v1.AddInstanceOneToOneNatRequest";
/** ID of the instance to enable One-to-One NAT on. */
instanceId: string;
/** The index of the network interface to enable One-to-One NAT on. */
networkInterfaceIndex: string;
/** The network address that is assigned to the instance for this network interface. */
internalAddress: string;
/**
* An external IP address configuration.
* If not specified, then this instance will have no external internet access.
*/
oneToOneNatSpec?: OneToOneNatSpec;
}
export interface AddInstanceOneToOneNatMetadata {
$type: "yandex.cloud.compute.v1.AddInstanceOneToOneNatMetadata";
/** ID of the instance. */
instanceId: string;
}
export interface RemoveInstanceOneToOneNatRequest {
$type: "yandex.cloud.compute.v1.RemoveInstanceOneToOneNatRequest";
/** ID of the instance to remove One-to-one NAT. */
instanceId: string;
/** The index of the network interface to remove One-to-One NAT from. */
networkInterfaceIndex: string;
/** The network address that is assigned to the instance for this network interface. */
internalAddress: string;
}
export interface RemoveInstanceOneToOneNatMetadata {
$type: "yandex.cloud.compute.v1.RemoveInstanceOneToOneNatMetadata";
/** ID of the instance. */
instanceId: string;
}
export interface UpdateInstanceNetworkInterfaceRequest {
$type: "yandex.cloud.compute.v1.UpdateInstanceNetworkInterfaceRequest";
/** ID of the network interface that is being updated. */
instanceId: string;
/** The index of the network interface to be updated. */
networkInterfaceIndex: string;
/** Field mask that specifies which attributes of the instance should be updated. */
updateMask?: FieldMask;
/** ID of the subnet. */
subnetId: string;
/** Primary IPv4 address that will be assigned to the instance for this network interface. */
primaryV4AddressSpec?: PrimaryAddressSpec;
/** Primary IPv6 address that will be assigned to the instance for this network interface. IPv6 not available yet. */
primaryV6AddressSpec?: PrimaryAddressSpec;
/** ID's of security groups attached to the interface. */
securityGroupIds: string[];
}
export interface UpdateInstanceNetworkInterfaceMetadata {
$type: "yandex.cloud.compute.v1.UpdateInstanceNetworkInterfaceMetadata";
/** ID of the instant network interface that is being updated. */
instanceId: string;
/** The index of the network interface. */
networkInterfaceIndex: string;
}
export interface ListInstanceOperationsRequest {
$type: "yandex.cloud.compute.v1.ListInstanceOperationsRequest";
/** ID of the Instance resource to list operations for. */
instanceId: string;
/**
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListInstanceOperationsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*/
pageSize: number;
/**
* Page token. To get the next page of results, set [page_token] to the
* [ListInstanceOperationsResponse.next_page_token] returned by a previous list request.
*/
pageToken: string;
}
export interface ListInstanceOperationsResponse {
$type: "yandex.cloud.compute.v1.ListInstanceOperationsResponse";
/** List of operations for the specified instance. */
operations: Operation[];
/**
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListInstanceOperationsRequest.page_size], use the [next_page_token] as the value
* for the [ListInstanceOperationsRequest.page_token] query parameter in the next list request.
* Each subsequent list request will have its own [next_page_token] to continue paging through the results.
*/
nextPageToken: string;
}
export interface ResourcesSpec {
$type: "yandex.cloud.compute.v1.ResourcesSpec";
/** The amount of memory available to the instance, specified in bytes. */
memory: number;
/** The number of cores available to the instance. */
cores: number;
/**
* Baseline level of CPU performance with the ability to burst performance above that baseline level.
* This field sets baseline performance for each core.
*
* For example, if you need only 5% of the CPU performance, you can set core_fraction=5.
* For more information, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*/
coreFraction: number;
/** The number of GPUs available to the instance. */
gpus: number;
}
export interface AttachedDiskSpec {
$type: "yandex.cloud.compute.v1.AttachedDiskSpec";
/** The mode in which to attach this disk. */
mode: AttachedDiskSpec_Mode;
/**
* Specifies a unique serial number of your choice 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.
* If not specified, a random value will be generated.
*/
deviceName: string;
/** Specifies whether the disk will be auto-deleted when the instance is deleted. */
autoDelete: boolean;
/** Disk specification. */
diskSpec?: AttachedDiskSpec_DiskSpec | undefined;
/** ID of the disk that should be attached. */
diskId: string | undefined;
}
export declare enum AttachedDiskSpec_Mode {
MODE_UNSPECIFIED = 0,
/** READ_ONLY - Read-only access. */
READ_ONLY = 1,
/** READ_WRITE - Read/Write access. Default value. */
READ_WRITE = 2,
UNRECOGNIZED = -1
}
export declare function attachedDiskSpec_ModeFromJSON(object: any): AttachedDiskSpec_Mode;
export declare function attachedDiskSpec_ModeToJSON(object: AttachedDiskSpec_Mode): string;
export interface AttachedDiskSpec_DiskSpec {
$type: "yandex.cloud.compute.v1.AttachedDiskSpec.DiskSpec";
/** Name of the disk. */
name: string;
/** Description of the disk. */
description: string;
/**
* ID of the disk type.
* To get a list of available disk types, use the [yandex.cloud.compute.v1.DiskTypeService.List] request.
*/
typeId: string;
/** Size of the disk, specified in bytes. */
size: number;
/** Block size of the disk, specified in bytes. The default is 4096. */
blockSize: number;
/** Placement policy configuration. */
diskPlacementPolicy?: DiskPlacementPolicy;
/** ID of the image to create the disk from. */
imageId: string | undefined;
/** ID of the snapshot to restore the disk from. */
snapshotId: string | undefined;
}
export interface AttachedLocalDiskSpec {
$type: "yandex.cloud.compute.v1.AttachedLocalDiskSpec";
/** Size of the disk, specified in bytes. */
size: number;
}
export interface AttachedFilesystemSpec {
$type: "yandex.cloud.compute.v1.AttachedFilesystemSpec";
/** Mode of access to the filesystem that should be attached. */
mode: AttachedFilesystemSpec_Mode;
/**
* 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.
*
* If not specified, a random value will be generated.
*/
deviceName: string;
/** ID of the filesystem that should be attached. */
filesystemId: string;
}
export declare enum AttachedFilesystemSpec_Mode {
MODE_UNSPECIFIED = 0,
/** READ_ONLY - Read-only access. */
READ_ONLY = 1,
/** READ_WRITE - Read/Write access. Default value. */
READ_WRITE = 2,
UNRECOGNIZED = -1
}
export declare function attachedFilesystemSpec_ModeFromJSON(object: any): AttachedFilesystemSpec_Mode;
export declare function attachedFilesystemSpec_ModeToJSON(object: AttachedFilesystemSpec_Mode): string;
export interface NetworkInterfaceSpec {
$type: "yandex.cloud.compute.v1.NetworkInterfaceSpec";
/** ID of the subnet. */
subnetId: string;
/** Primary IPv4 address that will be assigned to the instance for this network interface. */
primaryV4AddressSpec?: PrimaryAddressSpec;
/** Primary IPv6 address that will be assigned to the instance for this network interface. IPv6 not available yet. */
primaryV6AddressSpec?: PrimaryAddressSpec;
/** ID's of security groups attached to the interface */
securityGroupIds: string[];
}
export interface PrimaryAddressSpec {
$type: "yandex.cloud.compute.v1.PrimaryAddressSpec";
/**
* An IPv4 internal network address that is assigned to the instance for this network interface.
* If not specified by the user, an unused internal IP is assigned by the system.
*/
address: string;
/**
* An external IP address configuration.
* If not specified, then this instance will have no external internet access.
*/
oneToOneNatSpec?: OneToOneNatSpec;
/** Internal DNS configuration */
dnsRecordSpecs: DnsRecordSpec[];
}
export interface OneToOneNatSpec {
$type: "yandex.cloud.compute.v1.OneToOneNatSpec";
/** External IP address version. */
ipVersion: IpVersion;
/** set static IP by value */
address: string;
/** External DNS configuration */
dnsRecordSpecs: DnsRecordSpec[];
}
export interface DnsRecordSpec {
$type: "yandex.cloud.compute.v1.DnsRecordSpec";
/** FQDN (required) */
fqdn: string;
/** DNS zone id (optional, if not set, private zone used) */
dnsZoneId: string;
/** DNS record ttl, values in 0-86400 (optional) */
ttl: number;
/** When set to true, also create PTR DNS record (optional) */
ptr: boolean;
}
export interface MoveInstanceRequest {
$type: "yandex.cloud.compute.v1.MoveInstanceRequest";
/**
* ID of the instance to move.
*
* To get the instance ID, make a [InstanceService.List] request.
*/
instanceId: string;
/**
* ID of the folder to move the instance to.
*
* To get the folder ID, make a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
*/
destinationFolderId: string;
}
export interface MoveInstanceMetadata {
$type: "yandex.cloud.compute.v1.MoveInstanceMetadata";
/** ID of the instance that is being moved. */
instanceId: string;
/** ID of the folder that the instance is being moved from. */
sourceFolderId: string;
/** ID of the folder that the instance is being moved to. */
destinationFolderId: string;
}
export interface RelocateInstanceRequest {
$type: "yandex.cloud.compute.v1.RelocateInstanceRequest";
/**
* ID of the instance to move.
*
* To get the instance ID, make a [InstanceService.List] request.
*/
instanceId: string;
/**
* ID of the availability zone to move the instance to.
*
* To get the zone ID, make a [ZoneService.List] request.
*/
destinationZoneId: string;
}
export interface RelocateInstanceMetadata {
$type: "yandex.cloud.compute.v1.RelocateInstanceMetadata";
/** ID of the instance that is being moved. */
instanceId: string;
/** ID of the availability zone that the instance is being moved from. */
sourceZoneId: string;
/** ID of the availability zone that the instance is being moved to. */
destinationZoneId: string;
}
export interface GuestStopInstanceMetadata {
$type: "yandex.cloud.compute.v1.GuestStopInstanceMetadata";
/** ID of the instance that was stopped from guest OS. */
instanceId: string;
}
export interface PreemptInstanceMetadata {
$type: "yandex.cloud.compute.v1.PreemptInstanceMetadata";
/** ID of the instance that is being preempted. */
instanceId: string;
}
export interface CrashInstanceMetadata {
$type: "yandex.cloud.compute.v1.CrashInstanceMetadata";
/** ID of the instance that was crashed. */
instanceId: string;
}
export declare const GetInstanceRequest: {
$type: "yandex.cloud.compute.v1.GetInstanceRequest";
encode(message: GetInstanceRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): GetInstanceRequest;
fromJSON(object: any): GetInstanceRequest;
toJSON(message: GetInstanceRequest): unknown;
fromPartial<I extends {
view?: InstanceView | undefined;
instanceId?: string | undefined;
} & {
view?: InstanceView | undefined;
instanceId?: string | undefined;
} & Record<Exclude<keyof I, "$type" | "view" | "instanceId">, never>>(object: I): GetInstanceRequest;
};
export declare const ListInstancesRequest: {
$type: "yandex.cloud.compute.v1.ListInstancesRequest";
encode(message: ListInstancesRequest, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ListInstancesRequest;
fromJSON(object: any): ListInstancesRequest;
toJSON(message: ListInstancesRequest): unknown;
fromPartial<I extends {
pageSize?: number | undefined;
pageToken?: string | undefined;
filter?: string | undefined;
folderId?: string | undefined;
orderBy?: string | undefined;
} & {
pageSize?: number | undefined;
pageToken?: string | undefined;
filter?: string | undefined;
folderId?: string | undefined;
orderBy?: string | undefined;
} & Record<Exclude<keyof I, "$type" | "pageSize" | "pageToken" | "filter" | "folderId" | "orderBy">, never>>(object: I): ListInstancesRequest;
};
export declare const ListInstancesResponse: {
$type: "yandex.cloud.compute.v1.ListInstancesResponse";
encode(message: ListInstancesResponse, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ListInstancesResponse;
fromJSON(object: any): ListInstancesResponse;
toJSON(message: ListInstancesResponse): unknown;
fromPartial<I extends {
nextPageToken?: string | undefined;
instances?: {
description?: string | undefined;
id?: string | undefined;
name?: string | undefined;
createdAt?: Date | undefined;
metadata?: {
[x: string]: string | undefined;
[x: number]: string | undefined;
} | undefined;
status?: import("../../../../yandex/cloud/compute/v1/instance").Instance_Status | undefined;
folderId?: string | undefined;
labels?: {
[x: string]: string | undefined;
[x: number]: string | undefined;
} | undefined;
zoneId?: string | undefined;
resources?: {
memory?: number | undefined;
cores?: number | undefined;
coreFraction?: number | undefined;
gpus?: number | undefined;
} | undefined;
filesystems?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedFilesystem_Mode | undefined;
filesystemId?: string | undefined;
deviceName?: string | undefined;
}[] | undefined;
platformId?: string | undefined;
fqdn?: string | undefined;
serviceAccountId?: string | undefined;
hostGroupId?: string | undefined;
hostId?: string | undefined;
metadataOptions?: {
gceHttpEndpoint?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
awsV1HttpEndpoint?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
gceHttpToken?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
awsV1HttpToken?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
} | undefined;
bootDisk?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedDisk_Mode | undefined;
diskId?: string | undefined;
deviceName?: string | undefined;
autoDelete?: boolean | undefined;
} | undefined;
secondaryDisks?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedDisk_Mode | undefined;
diskId?: string | undefined;
deviceName?: string | undefined;
autoDelete?: boolean | undefined;
}[] | undefined;
localDisks?: {
size?: number | undefined;
deviceName?: string | undefined;
}[] | undefined;
networkInterfaces?: {
subnetId?: string | undefined;
securityGroupIds?: string[] | undefined;
index?: string | undefined;
macAddress?: string | undefined;
primaryV4Address?: {
address?: string | undefined;
oneToOneNat?: {
address?: string | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
ipVersion?: IpVersion | undefined;
} | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
} | undefined;
primaryV6Address?: {
address?: string | undefined;
oneToOneNat?: {
address?: string | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
ipVersion?: IpVersion | undefined;
} | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
} | undefined;
}[] | undefined;
gpuSettings?: {
gpuClusterId?: string | undefined;
} | undefined;
schedulingPolicy?: {
preemptible?: boolean | undefined;
} | undefined;
networkSettings?: {
type?: import("../../../../yandex/cloud/compute/v1/instance").NetworkSettings_Type | undefined;
} | undefined;
placementPolicy?: {
placementGroupId?: string | undefined;
placementGroupPartition?: number | undefined;
hostAffinityRules?: {
values?: string[] | undefined;
key?: string | undefined;
op?: import("../../../../yandex/cloud/compute/v1/instance").PlacementPolicy_HostAffinityRule_Operator | undefined;
}[] | undefined;
} | undefined;
}[] | undefined;
} & {
nextPageToken?: string | undefined;
instances?: ({
description?: string | undefined;
id?: string | undefined;
name?: string | undefined;
createdAt?: Date | undefined;
metadata?: {
[x: string]: string | undefined;
[x: number]: string | undefined;
} | undefined;
status?: import("../../../../yandex/cloud/compute/v1/instance").Instance_Status | undefined;
folderId?: string | undefined;
labels?: {
[x: string]: string | undefined;
[x: number]: string | undefined;
} | undefined;
zoneId?: string | undefined;
resources?: {
memory?: number | undefined;
cores?: number | undefined;
coreFraction?: number | undefined;
gpus?: number | undefined;
} | undefined;
filesystems?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedFilesystem_Mode | undefined;
filesystemId?: string | undefined;
deviceName?: string | undefined;
}[] | undefined;
platformId?: string | undefined;
fqdn?: string | undefined;
serviceAccountId?: string | undefined;
hostGroupId?: string | undefined;
hostId?: string | undefined;
metadataOptions?: {
gceHttpEndpoint?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
awsV1HttpEndpoint?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
gceHttpToken?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
awsV1HttpToken?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
} | undefined;
bootDisk?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedDisk_Mode | undefined;
diskId?: string | undefined;
deviceName?: string | undefined;
autoDelete?: boolean | undefined;
} | undefined;
secondaryDisks?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedDisk_Mode | undefined;
diskId?: string | undefined;
deviceName?: string | undefined;
autoDelete?: boolean | undefined;
}[] | undefined;
localDisks?: {
size?: number | undefined;
deviceName?: string | undefined;
}[] | undefined;
networkInterfaces?: {
subnetId?: string | undefined;
securityGroupIds?: string[] | undefined;
index?: string | undefined;
macAddress?: string | undefined;
primaryV4Address?: {
address?: string | undefined;
oneToOneNat?: {
address?: string | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
ipVersion?: IpVersion | undefined;
} | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
} | undefined;
primaryV6Address?: {
address?: string | undefined;
oneToOneNat?: {
address?: string | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
ipVersion?: IpVersion | undefined;
} | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
} | undefined;
}[] | undefined;
gpuSettings?: {
gpuClusterId?: string | undefined;
} | undefined;
schedulingPolicy?: {
preemptible?: boolean | undefined;
} | undefined;
networkSettings?: {
type?: import("../../../../yandex/cloud/compute/v1/instance").NetworkSettings_Type | undefined;
} | undefined;
placementPolicy?: {
placementGroupId?: string | undefined;
placementGroupPartition?: number | undefined;
hostAffinityRules?: {
values?: string[] | undefined;
key?: string | undefined;
op?: import("../../../../yandex/cloud/compute/v1/instance").PlacementPolicy_HostAffinityRule_Operator | undefined;
}[] | undefined;
} | undefined;
}[] & ({
description?: string | undefined;
id?: string | undefined;
name?: string | undefined;
createdAt?: Date | undefined;
metadata?: {
[x: string]: string | undefined;
[x: number]: string | undefined;
} | undefined;
status?: import("../../../../yandex/cloud/compute/v1/instance").Instance_Status | undefined;
folderId?: string | undefined;
labels?: {
[x: string]: string | undefined;
[x: number]: string | undefined;
} | undefined;
zoneId?: string | undefined;
resources?: {
memory?: number | undefined;
cores?: number | undefined;
coreFraction?: number | undefined;
gpus?: number | undefined;
} | undefined;
filesystems?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedFilesystem_Mode | undefined;
filesystemId?: string | undefined;
deviceName?: string | undefined;
}[] | undefined;
platformId?: string | undefined;
fqdn?: string | undefined;
serviceAccountId?: string | undefined;
hostGroupId?: string | undefined;
hostId?: string | undefined;
metadataOptions?: {
gceHttpEndpoint?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
awsV1HttpEndpoint?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
gceHttpToken?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
awsV1HttpToken?: import("../../../../yandex/cloud/compute/v1/instance").MetadataOption | undefined;
} | undefined;
bootDisk?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedDisk_Mode | undefined;
diskId?: string | undefined;
deviceName?: string | undefined;
autoDelete?: boolean | undefined;
} | undefined;
secondaryDisks?: {
mode?: import("../../../../yandex/cloud/compute/v1/instance").AttachedDisk_Mode | undefined;
diskId?: string | undefined;
deviceName?: string | undefined;
autoDelete?: boolean | undefined;
}[] | undefined;
localDisks?: {
size?: number | undefined;
deviceName?: string | undefined;
}[] | undefined;
networkInterfaces?: {
subnetId?: string | undefined;
securityGroupIds?: string[] | undefined;
index?: string | undefined;
macAddress?: string | undefined;
primaryV4Address?: {
address?: string | undefined;
oneToOneNat?: {
address?: string | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
ipVersion?: IpVersion | undefined;
} | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
} | undefined;
primaryV6Address?: {
address?: string | undefined;
oneToOneNat?: {
address?: string | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
ipVersion?: IpVersion | undefined;
} | undefined;
dnsRecords?: {
ttl?: number | undefined;
fqdn?: string | undefined;
dnsZoneId?: string | undefined;
ptr?: boolean | undefined;
}[] | undefined;
} | undefined;
}[] | undefined;
gpuSettings?: {
gpuClusterId?: string | undefined;
} | undefined;
schedulingPolicy?: {
preemptible?: boolean | undefined;
} | undefined;
networkSettings?: {
type?: import("../../../../yandex/cloud/compute/v1/instance").NetworkSettings_Type | undefined;
} | undefined;
placementPolicy?: {
placementGroupId?: string | undefined;
placementGroupPartition?: number | undefined;
hostAffinityRules?: {
values?: string[] | undefined;
key?: string | undefined;
op?: import("../../../../yandex/cloud/compute/v1/instance").PlacementPolicy_HostAffinityRule_Operator | undefined;
}[] | undefined;
} | undefined;
} & {
description?: string | undefined;
id?: string | undefined;
name?: string | undefined;
createdAt?: Date | undefined;
metadata?: ({
[x: string]: string | undefined;
[x: number]: string | undefined;
} & {
[x: string]: string | undefined;
[x: number]: string | undefined;
} & Record<Exclude<keyof I["instances"][number]["metadata"], string | number>, never>) | undefined;
status?: import("../../../../yandex/cloud/compute/v1/instance").Instance_Status | undefined;
folderId?: string | undefined;
labels?: ({
[x: string]: string | undefined;
[x: number]: string | undefined;
} & {
[x: string]: string | undefined;
[x: number]: string | undefined;
} & Record<Exclude<keyof I["instances"][number]["labels