// *** 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 ServerIp extends pulumi.CustomResource { /** * Get an existing ServerIp 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?: ServerIpState, opts?: pulumi.CustomResourceOptions): ServerIp { return new ServerIp(name, state, { ...opts, id: id }); } /** @internal */ public static readonly __pulumiType = 'timeweb-cloud:index/serverIp:ServerIp'; /** * Returns true if the given object is an instance of ServerIp. 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 ServerIp { if (obj === undefined || obj === null) { return false; } return obj['__pulumiType'] === ServerIp.__pulumiType; } /** * Address of created IP */ declare public /*out*/ readonly ip: pulumi.Output; /** * Flag that shows IP is main or not (always `false` for now) */ declare public /*out*/ readonly isMain: pulumi.Output; /** * PTR for created IP. Must be valid domain name without trailing dot */ declare public readonly ptr: pulumi.Output; declare public readonly serverIpId: pulumi.Output; /** * Server ID for which IP should be created */ declare public readonly sourceServerId: pulumi.Output; /** * Type for created IP (`ipv4`, `ipv6`) */ declare public readonly type: pulumi.Output; /** * Create a ServerIp 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: ServerIpArgs, opts?: pulumi.CustomResourceOptions) constructor(name: string, argsOrState?: ServerIpArgs | ServerIpState, opts?: pulumi.CustomResourceOptions) { let resourceInputs: pulumi.Inputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState as ServerIpState | undefined; resourceInputs["ip"] = state?.ip; resourceInputs["isMain"] = state?.isMain; resourceInputs["ptr"] = state?.ptr; resourceInputs["serverIpId"] = state?.serverIpId; resourceInputs["sourceServerId"] = state?.sourceServerId; resourceInputs["type"] = state?.type; } else { const args = argsOrState as ServerIpArgs | undefined; if (args?.sourceServerId === undefined && !opts.urn) { throw new Error("Missing required property 'sourceServerId'"); } if (args?.type === undefined && !opts.urn) { throw new Error("Missing required property 'type'"); } resourceInputs["ptr"] = args?.ptr; resourceInputs["serverIpId"] = args?.serverIpId; resourceInputs["sourceServerId"] = args?.sourceServerId; resourceInputs["type"] = args?.type; resourceInputs["ip"] = undefined /*out*/; resourceInputs["isMain"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(ServerIp.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage()); } } /** * Input properties used for looking up and filtering ServerIp resources. */ export interface ServerIpState { /** * Address of created IP */ ip?: pulumi.Input; /** * Flag that shows IP is main or not (always `false` for now) */ isMain?: pulumi.Input; /** * PTR for created IP. Must be valid domain name without trailing dot */ ptr?: pulumi.Input; serverIpId?: pulumi.Input; /** * Server ID for which IP should be created */ sourceServerId?: pulumi.Input; /** * Type for created IP (`ipv4`, `ipv6`) */ type?: pulumi.Input; } /** * The set of arguments for constructing a ServerIp resource. */ export interface ServerIpArgs { /** * PTR for created IP. Must be valid domain name without trailing dot */ ptr?: pulumi.Input; serverIpId?: pulumi.Input; /** * Server ID for which IP should be created */ sourceServerId: pulumi.Input; /** * Type for created IP (`ipv4`, `ipv6`) */ type: pulumi.Input; }