@yandex-cloud/nodejs-sdk
Version:
Yandex.Cloud NodeJS SDK
171 lines (170 loc) • 7.77 kB
TypeScript
import _m0 from "protobufjs/minimal";
export declare const protobufPackage = "yandex.cloud.compute.v1";
/** A Disk resource. For more information, see [Disks](/docs/compute/concepts/disk). */
export interface Disk {
$type: "yandex.cloud.compute.v1.Disk";
/** ID of the disk. */
id: string;
/** ID of the folder that the disk belongs to. */
folderId: string;
createdAt?: Date;
/** Name of the disk. 1-63 characters long. */
name: string;
/** Description of the disk. 0-256 characters long. */
description: string;
/** Resource labels as `key:value` pairs. Maximum of 64 per resource. */
labels: {
[key: string]: string;
};
/** ID of the disk type. */
typeId: string;
/** ID of the availability zone where the disk resides. */
zoneId: string;
/** Size of the disk, specified in bytes. */
size: number;
/** Block size of the disk, specified in bytes. */
blockSize: number;
/**
* License IDs that indicate which licenses are attached to this resource.
* License IDs are used to calculate additional charges for the use of the virtual machine.
*
* The correct license ID is generated by the platform. IDs are inherited by new resources created from this resource.
*
* If you know the license IDs, specify them when you create the image.
* For example, if you create a disk image using a third-party utility and load it into Object Storage, the license IDs will be lost.
* You can specify them in the [yandex.cloud.compute.v1.ImageService.Create] request.
*/
productIds: string[];
/** Current status of the disk. */
status: Disk_Status;
/** ID of the image that was used for disk creation. */
sourceImageId: string | undefined;
/** ID of the snapshot that was used for disk creation. */
sourceSnapshotId: string | undefined;
/** Array of instances to which the disk is attached. */
instanceIds: string[];
/** Placement policy configuration. */
diskPlacementPolicy?: DiskPlacementPolicy;
}
export declare enum Disk_Status {
STATUS_UNSPECIFIED = 0,
/** CREATING - Disk is being created. */
CREATING = 1,
/** READY - Disk is ready to use. */
READY = 2,
/** ERROR - Disk encountered a problem and cannot operate. */
ERROR = 3,
/** DELETING - Disk is being deleted. */
DELETING = 4,
UNRECOGNIZED = -1
}
export declare function disk_StatusFromJSON(object: any): Disk_Status;
export declare function disk_StatusToJSON(object: Disk_Status): string;
export interface Disk_LabelsEntry {
$type: "yandex.cloud.compute.v1.Disk.LabelsEntry";
key: string;
value: string;
}
export interface DiskPlacementPolicy {
$type: "yandex.cloud.compute.v1.DiskPlacementPolicy";
/** Placement group ID. */
placementGroupId: string;
placementGroupPartition: number;
}
export declare const Disk: {
$type: "yandex.cloud.compute.v1.Disk";
encode(message: Disk, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Disk;
fromJSON(object: any): Disk;
toJSON(message: Disk): unknown;
fromPartial<I extends {
description?: string | undefined;
id?: string | undefined;
name?: string | undefined;
createdAt?: Date | undefined;
status?: Disk_Status | undefined;
folderId?: string | undefined;
labels?: {
[x: string]: string | undefined;
[x: number]: string | undefined;
} | undefined;
zoneId?: string | undefined;
size?: number | undefined;
typeId?: string | undefined;
blockSize?: number | undefined;
productIds?: string[] | undefined;
instanceIds?: string[] | undefined;
sourceImageId?: string | undefined;
sourceSnapshotId?: string | undefined;
diskPlacementPolicy?: {
placementGroupId?: string | undefined;
placementGroupPartition?: number | undefined;
} | undefined;
} & {
description?: string | undefined;
id?: string | undefined;
name?: string | undefined;
createdAt?: Date | undefined;
status?: Disk_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["labels"], string | number>, never>) | undefined;
zoneId?: string | undefined;
size?: number | undefined;
typeId?: string | undefined;
blockSize?: number | undefined;
productIds?: (string[] & string[] & Record<Exclude<keyof I["productIds"], "$type" | keyof string[]>, never>) | undefined;
instanceIds?: (string[] & string[] & Record<Exclude<keyof I["instanceIds"], "$type" | keyof string[]>, never>) | undefined;
sourceImageId?: string | undefined;
sourceSnapshotId?: string | undefined;
diskPlacementPolicy?: ({
placementGroupId?: string | undefined;
placementGroupPartition?: number | undefined;
} & {
placementGroupId?: string | undefined;
placementGroupPartition?: number | undefined;
} & Record<Exclude<keyof I["diskPlacementPolicy"], "$type" | "placementGroupId" | "placementGroupPartition">, never>) | undefined;
} & Record<Exclude<keyof I, "$type" | "description" | "id" | "name" | "createdAt" | "status" | "folderId" | "labels" | "zoneId" | "size" | "typeId" | "blockSize" | "productIds" | "instanceIds" | "sourceImageId" | "sourceSnapshotId" | "diskPlacementPolicy">, never>>(object: I): Disk;
};
export declare const Disk_LabelsEntry: {
$type: "yandex.cloud.compute.v1.Disk.LabelsEntry";
encode(message: Disk_LabelsEntry, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): Disk_LabelsEntry;
fromJSON(object: any): Disk_LabelsEntry;
toJSON(message: Disk_LabelsEntry): unknown;
fromPartial<I extends {
value?: string | undefined;
key?: string | undefined;
} & {
value?: string | undefined;
key?: string | undefined;
} & Record<Exclude<keyof I, "$type" | "value" | "key">, never>>(object: I): Disk_LabelsEntry;
};
export declare const DiskPlacementPolicy: {
$type: "yandex.cloud.compute.v1.DiskPlacementPolicy";
encode(message: DiskPlacementPolicy, writer?: _m0.Writer): _m0.Writer;
decode(input: _m0.Reader | Uint8Array, length?: number | undefined): DiskPlacementPolicy;
fromJSON(object: any): DiskPlacementPolicy;
toJSON(message: DiskPlacementPolicy): unknown;
fromPartial<I extends {
placementGroupId?: string | undefined;
placementGroupPartition?: number | undefined;
} & {
placementGroupId?: string | undefined;
placementGroupPartition?: number | undefined;
} & Record<Exclude<keyof I, "$type" | "placementGroupId" | "placementGroupPartition">, never>>(object: I): DiskPlacementPolicy;
};
declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export declare type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
[K in Exclude<keyof T, "$type">]?: DeepPartial<T[K]>;
} : Partial<T>;
declare type KeysOfUnion<T> = T extends T ? keyof T : never;
export declare type Exact<P, I extends P> = P extends Builtin ? P : P & {
[K in keyof P]: Exact<P[K], I[K]>;
} & Record<Exclude<keyof I, KeysOfUnion<P> | "$type">, never>;
export {};