// *** 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 inputs from "./types/input"; import * as outputs from "./types/output"; import * as utilities from "./utilities"; export class Server extends pulumi.CustomResource { /** * Get an existing Server 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?: ServerState, opts?: pulumi.CustomResourceOptions): Server { return new Server(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/server:Server'; /** * Returns true if the given object is an instance of Server. 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 Server { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === Server.__pulumiType; } /** * Availability zone for server */ declare public readonly availabilityZone: pulumi.Output; /** * Identifier of avatar */ declare public /*out*/ readonly avatarId: pulumi.Output; /** * Bandwidth for server */ declare public readonly bandwidth: pulumi.Output; /** * Boot mode of server (`std`, `single`, `cd`) */ declare public /*out*/ readonly bootMode: pulumi.Output; /** * Cloud-init script. If script requires external network you should use floating_ip_id field instead of * twc_floating_ip.resource */ declare public readonly cloudInit: pulumi.Output; /** * Comment for server */ declare public readonly comment: pulumi.Output; /** * Configuration for server */ declare public readonly configuration: pulumi.Output; /** * Configurator identifier */ declare public /*out*/ readonly configuratorId: pulumi.Output; /** * Current CPUs count of server */ declare public /*out*/ readonly cpu: pulumi.Output; /** * Current CPU frequency of server */ declare public /*out*/ readonly cpuFrequency: pulumi.Output; /** * Current server disks representation */ declare public /*out*/ readonly disks: pulumi.Output; /** * Floating IP ID for server */ declare public readonly floatingIpId: pulumi.Output; /** * Image ID for servers (not supported for cloned servers) */ declare public readonly imageId: pulumi.Output; /** * Flag that shows status of DDoS guard service */ declare public /*out*/ readonly isDdosGuard: pulumi.Output; /** * Is root password required for server */ declare public readonly isRootPasswordRequired: pulumi.Output; /** * Flag that enables local network for created server (not supported for cloned servers) */ declare public readonly localNetwork: pulumi.Output; /** * Location for the server (`ru-1`, `ru-2`, `pl-1`, `kz-1`) */ declare public /*out*/ readonly location: pulumi.Output; /** * Main IPv4 address from public interface */ declare public /*out*/ readonly mainIpv4: pulumi.Output; /** * Name for server */ declare public readonly name: pulumi.Output; declare public /*out*/ readonly networks: pulumi.Output; /** * Information about specified OS */ declare public /*out*/ readonly os: pulumi.Output; /** * OS ID for server (not supported for cloned servers) */ declare public readonly osId: pulumi.Output; /** * Preset ID for server (conflicts with configuration) */ declare public readonly presetId: pulumi.Output; /** * Project ID for created server */ declare public readonly projectId: pulumi.Output; /** * Current RAM size of server */ declare public /*out*/ readonly ram: pulumi.Output; /** * Root password for server */ declare public /*out*/ readonly rootPass: pulumi.Output; declare public readonly serverId: pulumi.Output; /** * Software ID for server (not supported for cloned servers) */ declare public readonly softwareId: pulumi.Output; /** * Information about specified software (if software_id was set) */ declare public /*out*/ readonly softwares: pulumi.Output; /** * Server ID for which clone should be created */ declare public readonly sourceServerId: pulumi.Output; /** * List of SSH keys IDs for server */ declare public readonly sshKeysIds: pulumi.Output; /** * Last boot time (in ISO8601 format) */ declare public /*out*/ readonly startAt: pulumi.Output; /** * Current status of server (`installing`, `software_install`, `reinstalling`, `on`, `off`, `turning_on`, `turning_off`, * `hard_turning_off`, `rebooting`, `hard_rebooting`, `removing`, `removed`, `cloning`, `transfer`, `blocked`, * `configuring`, `no_paid`, `permanent_blocked`) */ declare public /*out*/ readonly status: pulumi.Output; /** * VNC password for server */ declare public /*out*/ readonly vncPass: pulumi.Output; /** * Create a Server 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?: ServerArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ServerArgs | ServerState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ServerState | undefined; resourceInputs["availabilityZone"] = state?.availabilityZone; resourceInputs["avatarId"] = state?.avatarId; resourceInputs["bandwidth"] = state?.bandwidth; resourceInputs["bootMode"] = state?.bootMode; resourceInputs["cloudInit"] = state?.cloudInit; resourceInputs["comment"] = state?.comment; resourceInputs["configuration"] = state?.configuration; resourceInputs["configuratorId"] = state?.configuratorId; resourceInputs["cpu"] = state?.cpu; resourceInputs["cpuFrequency"] = state?.cpuFrequency; resourceInputs["disks"] = state?.disks; resourceInputs["floatingIpId"] = state?.floatingIpId; resourceInputs["imageId"] = state?.imageId; resourceInputs["isDdosGuard"] = state?.isDdosGuard; resourceInputs["isRootPasswordRequired"] = state?.isRootPasswordRequired; resourceInputs["localNetwork"] = state?.localNetwork; resourceInputs["location"] = state?.location; resourceInputs["mainIpv4"] = state?.mainIpv4; resourceInputs["name"] = state?.name; resourceInputs["networks"] = state?.networks; resourceInputs["os"] = state?.os; resourceInputs["osId"] = state?.osId; resourceInputs["presetId"] = state?.presetId; resourceInputs["projectId"] = state?.projectId; resourceInputs["ram"] = state?.ram; resourceInputs["rootPass"] = state?.rootPass; resourceInputs["serverId"] = state?.serverId; resourceInputs["softwareId"] = state?.softwareId; resourceInputs["softwares"] = state?.softwares; resourceInputs["sourceServerId"] = state?.sourceServerId; resourceInputs["sshKeysIds"] = state?.sshKeysIds; resourceInputs["startAt"] = state?.startAt; resourceInputs["status"] = state?.status; resourceInputs["vncPass"] = state?.vncPass; } else { const args = argsOrState as ServerArgs | undefined; resourceInputs["availabilityZone"] = args?.availabilityZone; resourceInputs["bandwidth"] = args?.bandwidth; resourceInputs["cloudInit"] = args?.cloudInit; resourceInputs["comment"] = args?.comment; resourceInputs["configuration"] = args?.configuration; resourceInputs["floatingIpId"] = args?.floatingIpId; resourceInputs["imageId"] = args?.imageId; resourceInputs["isRootPasswordRequired"] = args?.isRootPasswordRequired; resourceInputs["localNetwork"] = args?.localNetwork; resourceInputs["name"] = args?.name; resourceInputs["osId"] = args?.osId; resourceInputs["presetId"] = args?.presetId; resourceInputs["projectId"] = args?.projectId; resourceInputs["serverId"] = args?.serverId; resourceInputs["softwareId"] = args?.softwareId; resourceInputs["sourceServerId"] = args?.sourceServerId; resourceInputs["sshKeysIds"] = args?.sshKeysIds; resourceInputs["avatarId"] = undefined /*out*/; resourceInputs["bootMode"] = undefined /*out*/; resourceInputs["configuratorId"] = undefined /*out*/; resourceInputs["cpu"] = undefined /*out*/; resourceInputs["cpuFrequency"] = undefined /*out*/; resourceInputs["disks"] = undefined /*out*/; resourceInputs["isDdosGuard"] = undefined /*out*/; resourceInputs["location"] = undefined /*out*/; resourceInputs["mainIpv4"] = undefined /*out*/; resourceInputs["networks"] = undefined /*out*/; resourceInputs["os"] = undefined /*out*/; resourceInputs["ram"] = undefined /*out*/; resourceInputs["rootPass"] = undefined /*out*/; resourceInputs["softwares"] = undefined /*out*/; resourceInputs["startAt"] = undefined /*out*/; resourceInputs["status"] = undefined /*out*/; resourceInputs["vncPass"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); const secretOpts = { additionalSecretOutputs: ["rootPass", "vncPass"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(Server.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering Server resources. */ export interface ServerState { /** * Availability zone for server */ availabilityZone?: pulumi.Input; /** * Identifier of avatar */ avatarId?: pulumi.Input; /** * Bandwidth for server */ bandwidth?: pulumi.Input; /** * Boot mode of server (`std`, `single`, `cd`) */ bootMode?: pulumi.Input; /** * Cloud-init script. If script requires external network you should use floating_ip_id field instead of * twc_floating_ip.resource */ cloudInit?: pulumi.Input; /** * Comment for server */ comment?: pulumi.Input; /** * Configuration for server */ configuration?: pulumi.Input; /** * Configurator identifier */ configuratorId?: pulumi.Input; /** * Current CPUs count of server */ cpu?: pulumi.Input; /** * Current CPU frequency of server */ cpuFrequency?: pulumi.Input; /** * Current server disks representation */ disks?: pulumi.Input[]>; /** * Floating IP ID for server */ floatingIpId?: pulumi.Input; /** * Image ID for servers (not supported for cloned servers) */ imageId?: pulumi.Input; /** * Flag that shows status of DDoS guard service */ isDdosGuard?: pulumi.Input; /** * Is root password required for server */ isRootPasswordRequired?: pulumi.Input; /** * Flag that enables local network for created server (not supported for cloned servers) */ localNetwork?: pulumi.Input; /** * Location for the server (`ru-1`, `ru-2`, `pl-1`, `kz-1`) */ location?: pulumi.Input; /** * Main IPv4 address from public interface */ mainIpv4?: pulumi.Input; /** * Name for server */ name?: pulumi.Input; networks?: pulumi.Input[]>; /** * Information about specified OS */ os?: pulumi.Input[]>; /** * OS ID for server (not supported for cloned servers) */ osId?: pulumi.Input; /** * Preset ID for server (conflicts with configuration) */ presetId?: pulumi.Input; /** * Project ID for created server */ projectId?: pulumi.Input; /** * Current RAM size of server */ ram?: pulumi.Input; /** * Root password for server */ rootPass?: pulumi.Input; serverId?: pulumi.Input; /** * Software ID for server (not supported for cloned servers) */ softwareId?: pulumi.Input; /** * Information about specified software (if software_id was set) */ softwares?: pulumi.Input[]>; /** * Server ID for which clone should be created */ sourceServerId?: pulumi.Input; /** * List of SSH keys IDs for server */ sshKeysIds?: pulumi.Input[]>; /** * Last boot time (in ISO8601 format) */ startAt?: pulumi.Input; /** * Current status of server (`installing`, `software_install`, `reinstalling`, `on`, `off`, `turning_on`, `turning_off`, * `hard_turning_off`, `rebooting`, `hard_rebooting`, `removing`, `removed`, `cloning`, `transfer`, `blocked`, * `configuring`, `no_paid`, `permanent_blocked`) */ status?: pulumi.Input; /** * VNC password for server */ vncPass?: pulumi.Input; } /** * The set of arguments for constructing a Server resource. */ export interface ServerArgs { /** * Availability zone for server */ availabilityZone?: pulumi.Input; /** * Bandwidth for server */ bandwidth?: pulumi.Input; /** * Cloud-init script. If script requires external network you should use floating_ip_id field instead of * twc_floating_ip.resource */ cloudInit?: pulumi.Input; /** * Comment for server */ comment?: pulumi.Input; /** * Configuration for server */ configuration?: pulumi.Input; /** * Floating IP ID for server */ floatingIpId?: pulumi.Input; /** * Image ID for servers (not supported for cloned servers) */ imageId?: pulumi.Input; /** * Is root password required for server */ isRootPasswordRequired?: pulumi.Input; /** * Flag that enables local network for created server (not supported for cloned servers) */ localNetwork?: pulumi.Input; /** * Name for server */ name?: pulumi.Input; /** * OS ID for server (not supported for cloned servers) */ osId?: pulumi.Input; /** * Preset ID for server (conflicts with configuration) */ presetId?: pulumi.Input; /** * Project ID for created server */ projectId?: pulumi.Input; serverId?: pulumi.Input; /** * Software ID for server (not supported for cloned servers) */ softwareId?: pulumi.Input; /** * Server ID for which clone should be created */ sourceServerId?: pulumi.Input; /** * List of SSH keys IDs for server */ sshKeysIds?: pulumi.Input[]>; }