// *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; export class ServerDisk extends pulumi.CustomResource { /** * Get an existing ServerDisk resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ public static get(name: string, id: pulumi.Input, state?: ServerDiskState, opts?: pulumi.CustomResourceOptions): ServerDisk { return new ServerDisk(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/serverDisk:ServerDisk'; /** * Returns true if the given object is an instance of ServerDisk. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is ServerDisk { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ServerDisk.__pulumiType; } /** * Flag that shows current mount status of disk */ declare public /*out*/ readonly isMounted: pulumi.Output; /** * Flag that shows disk is system or not (always `false` for now) */ declare public /*out*/ readonly isSystem: pulumi.Output; declare public readonly serverDiskId: pulumi.Output; /** * Disk size for created disk in MB, minimal size is `5120`, step is `5120` */ declare public readonly size: pulumi.Output; /** * Server ID for which disk should be created */ declare public readonly sourceServerId: pulumi.Output; /** * Current status of disk */ declare public /*out*/ readonly status: pulumi.Output; /** * The name of the disk it was mounted on */ declare public /*out*/ readonly systemName: pulumi.Output; /** * Disk type (`ssd`, `nvme`, `hdd`) */ declare public /*out*/ readonly type: pulumi.Output; /** * Used disk space in MB */ declare public /*out*/ readonly used: pulumi.Output; /** * Create a ServerDisk resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ServerDiskArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ServerDiskArgs | ServerDiskState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ServerDiskState | undefined; resourceInputs["isMounted"] = state?.isMounted; resourceInputs["isSystem"] = state?.isSystem; resourceInputs["serverDiskId"] = state?.serverDiskId; resourceInputs["size"] = state?.size; resourceInputs["sourceServerId"] = state?.sourceServerId; resourceInputs["status"] = state?.status; resourceInputs["systemName"] = state?.systemName; resourceInputs["type"] = state?.type; resourceInputs["used"] = state?.used; } else { const args = argsOrState as ServerDiskArgs | undefined; if (args?.size === undefined && !opts.urn) { throw new Error("Missing required property 'size'"); } if (args?.sourceServerId === undefined && !opts.urn) { throw new Error("Missing required property 'sourceServerId'"); } resourceInputs["serverDiskId"] = args?.serverDiskId; resourceInputs["size"] = args?.size; resourceInputs["sourceServerId"] = args?.sourceServerId; resourceInputs["isMounted"] = undefined /*out*/; resourceInputs["isSystem"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["systemName"] = undefined /*out*/; resourceInputs["type"] = undefined /*out*/; resourceInputs["used"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServerDisk.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering ServerDisk resources. */ export interface ServerDiskState { /** * Flag that shows current mount status of disk */ isMounted?: pulumi.Input; /** * Flag that shows disk is system or not (always `false` for now) */ isSystem?: pulumi.Input; serverDiskId?: pulumi.Input; /** * Disk size for created disk in MB, minimal size is `5120`, step is `5120` */ size?: pulumi.Input; /** * Server ID for which disk should be created */ sourceServerId?: pulumi.Input; /** * Current status of disk */ status?: pulumi.Input; /** * The name of the disk it was mounted on */ systemName?: pulumi.Input; /** * Disk type (`ssd`, `nvme`, `hdd`) */ type?: pulumi.Input; /** * Used disk space in MB */ used?: pulumi.Input; } /** * The set of arguments for constructing a ServerDisk resource. */ export interface ServerDiskArgs { serverDiskId?: pulumi.Input; /** * Disk size for created disk in MB, minimal size is `5120`, step is `5120` */ size: pulumi.Input; /** * Server ID for which disk should be created */ sourceServerId: pulumi.Input; }