initial commit
This commit is contained in:
81
sdk/nodejs/resource.ts
generated
Normal file
81
sdk/nodejs/resource.ts
generated
Normal file
@@ -0,0 +1,81 @@
|
||||
// *** 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 Resource extends pulumi.CustomResource {
|
||||
/**
|
||||
* Get an existing Resource 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<pulumi.ID>, state?: ResourceState, opts?: pulumi.CustomResourceOptions): Resource {
|
||||
return new Resource(name, <any>state, { ...opts, id: id });
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
public static readonly __pulumiType = 'xyz:index/resource:Resource';
|
||||
|
||||
/**
|
||||
* Returns true if the given object is an instance of Resource. 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 Resource {
|
||||
if (obj === undefined || obj === null) {
|
||||
return false;
|
||||
}
|
||||
return obj['__pulumiType'] === Resource.__pulumiType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sample attribute.
|
||||
*/
|
||||
public readonly sampleAttribute!: pulumi.Output<string | undefined>;
|
||||
|
||||
/**
|
||||
* Create a Resource 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?: ResourceArgs, opts?: pulumi.CustomResourceOptions)
|
||||
constructor(name: string, argsOrState?: ResourceArgs | ResourceState, opts?: pulumi.CustomResourceOptions) {
|
||||
let resourceInputs: pulumi.Inputs = {};
|
||||
opts = opts || {};
|
||||
if (opts.id) {
|
||||
const state = argsOrState as ResourceState | undefined;
|
||||
resourceInputs["sampleAttribute"] = state ? state.sampleAttribute : undefined;
|
||||
} else {
|
||||
const args = argsOrState as ResourceArgs | undefined;
|
||||
resourceInputs["sampleAttribute"] = args ? args.sampleAttribute : undefined;
|
||||
}
|
||||
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
|
||||
super(Resource.__pulumiType, name, resourceInputs, opts);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Input properties used for looking up and filtering Resource resources.
|
||||
*/
|
||||
export interface ResourceState {
|
||||
/**
|
||||
* Sample attribute.
|
||||
*/
|
||||
sampleAttribute?: pulumi.Input<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* The set of arguments for constructing a Resource resource.
|
||||
*/
|
||||
export interface ResourceArgs {
|
||||
/**
|
||||
* Sample attribute.
|
||||
*/
|
||||
sampleAttribute?: pulumi.Input<string>;
|
||||
}
|
||||
Reference in New Issue
Block a user