Permalink
Fetching contributors…
Cannot retrieve contributors at this time
147 lines (140 sloc) 7.3 KB
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** 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 Instance extends pulumi.CustomResource {
/**
* Get an existing Instance 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.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, state?: InstanceState): Instance {
return new Instance(name, <any>state, { id });
}
public readonly alternativeLocationId: pulumi.Output<string>;
public readonly authorizedNetwork: pulumi.Output<string>;
public /*out*/ readonly createTime: pulumi.Output<string>;
public /*out*/ readonly currentLocationId: pulumi.Output<string>;
public readonly displayName: pulumi.Output<string | undefined>;
public /*out*/ readonly host: pulumi.Output<string>;
public readonly labels: pulumi.Output<{[key: string]: string} | undefined>;
public readonly locationId: pulumi.Output<string>;
public readonly memorySizeGb: pulumi.Output<number>;
public readonly name: pulumi.Output<string>;
public /*out*/ readonly port: pulumi.Output<number>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
public readonly project: pulumi.Output<string>;
public readonly redisConfigs: pulumi.Output<{[key: string]: string} | undefined>;
public readonly redisVersion: pulumi.Output<string>;
public readonly region: pulumi.Output<string>;
public readonly reservedIpRange: pulumi.Output<string>;
public readonly tier: pulumi.Output<string | undefined>;
/**
* Create a Instance 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: InstanceArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: InstanceArgs | InstanceState, opts?: pulumi.CustomResourceOptions) {
let inputs: pulumi.Inputs = {};
if (opts && opts.id) {
const state: InstanceState = argsOrState as InstanceState | undefined;
inputs["alternativeLocationId"] = state ? state.alternativeLocationId : undefined;
inputs["authorizedNetwork"] = state ? state.authorizedNetwork : undefined;
inputs["createTime"] = state ? state.createTime : undefined;
inputs["currentLocationId"] = state ? state.currentLocationId : undefined;
inputs["displayName"] = state ? state.displayName : undefined;
inputs["host"] = state ? state.host : undefined;
inputs["labels"] = state ? state.labels : undefined;
inputs["locationId"] = state ? state.locationId : undefined;
inputs["memorySizeGb"] = state ? state.memorySizeGb : undefined;
inputs["name"] = state ? state.name : undefined;
inputs["port"] = state ? state.port : undefined;
inputs["project"] = state ? state.project : undefined;
inputs["redisConfigs"] = state ? state.redisConfigs : undefined;
inputs["redisVersion"] = state ? state.redisVersion : undefined;
inputs["region"] = state ? state.region : undefined;
inputs["reservedIpRange"] = state ? state.reservedIpRange : undefined;
inputs["tier"] = state ? state.tier : undefined;
} else {
const args = argsOrState as InstanceArgs | undefined;
if (!args || args.memorySizeGb === undefined) {
throw new Error("Missing required property 'memorySizeGb'");
}
inputs["alternativeLocationId"] = args ? args.alternativeLocationId : undefined;
inputs["authorizedNetwork"] = args ? args.authorizedNetwork : undefined;
inputs["displayName"] = args ? args.displayName : undefined;
inputs["labels"] = args ? args.labels : undefined;
inputs["locationId"] = args ? args.locationId : undefined;
inputs["memorySizeGb"] = args ? args.memorySizeGb : undefined;
inputs["name"] = args ? args.name : undefined;
inputs["project"] = args ? args.project : undefined;
inputs["redisConfigs"] = args ? args.redisConfigs : undefined;
inputs["redisVersion"] = args ? args.redisVersion : undefined;
inputs["region"] = args ? args.region : undefined;
inputs["reservedIpRange"] = args ? args.reservedIpRange : undefined;
inputs["tier"] = args ? args.tier : undefined;
inputs["createTime"] = undefined /*out*/;
inputs["currentLocationId"] = undefined /*out*/;
inputs["host"] = undefined /*out*/;
inputs["port"] = undefined /*out*/;
}
super("gcp:redis/instance:Instance", name, inputs, opts);
}
}
/**
* Input properties used for looking up and filtering Instance resources.
*/
export interface InstanceState {
readonly alternativeLocationId?: pulumi.Input<string>;
readonly authorizedNetwork?: pulumi.Input<string>;
readonly createTime?: pulumi.Input<string>;
readonly currentLocationId?: pulumi.Input<string>;
readonly displayName?: pulumi.Input<string>;
readonly host?: pulumi.Input<string>;
readonly labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
readonly locationId?: pulumi.Input<string>;
readonly memorySizeGb?: pulumi.Input<number>;
readonly name?: pulumi.Input<string>;
readonly port?: pulumi.Input<number>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project?: pulumi.Input<string>;
readonly redisConfigs?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
readonly redisVersion?: pulumi.Input<string>;
readonly region?: pulumi.Input<string>;
readonly reservedIpRange?: pulumi.Input<string>;
readonly tier?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a Instance resource.
*/
export interface InstanceArgs {
readonly alternativeLocationId?: pulumi.Input<string>;
readonly authorizedNetwork?: pulumi.Input<string>;
readonly displayName?: pulumi.Input<string>;
readonly labels?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
readonly locationId?: pulumi.Input<string>;
readonly memorySizeGb: pulumi.Input<number>;
readonly name?: pulumi.Input<string>;
/**
* The ID of the project in which the resource belongs.
* If it is not provided, the provider project is used.
*/
readonly project?: pulumi.Input<string>;
readonly redisConfigs?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;
readonly redisVersion?: pulumi.Input<string>;
readonly region?: pulumi.Input<string>;
readonly reservedIpRange?: pulumi.Input<string>;
readonly tier?: pulumi.Input<string>;
}