pulumi/tests/integration/nodejs/parameterized/sdk/nodejs/echo.ts

99 lines
3.1 KiB
TypeScript

// *** 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";
/**
* A test resource that echoes its input.
*/
export class Echo extends pulumi.CustomResource {
/**
* Get an existing Echo 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 opts Optional settings to control the behavior of the CustomResource.
*/
public static get(name: string, id: pulumi.Input<pulumi.ID>, opts?: pulumi.CustomResourceOptions): Echo {
return new Echo(name, undefined as any, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'pkg:index:Echo';
/**
* Returns true if the given object is an instance of Echo. 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 Echo {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Echo.__pulumiType;
}
/**
* Input to echo.
*/
public readonly echo!: pulumi.Output<any | undefined>;
/**
* Create a Echo 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?: EchoArgs, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (!opts.id) {
resourceInputs["echo"] = args ? args.echo : undefined;
} else {
resourceInputs["echo"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Echo.__pulumiType, name, resourceInputs, opts, false /*dependency*/, utilities.getPackage());
}
/**
* A test call that echoes its input.
*/
doEchoMethod(args?: Echo.DoEchoMethodArgs): pulumi.Output<Echo.DoEchoMethodResult> {
args = args || {};
return pulumi.runtime.call("pkg:index:Echo/doEchoMethod", {
"__self__": this,
"echo": args.echo,
}, this, utilities.getPackage());
}
}
/**
* The set of arguments for constructing a Echo resource.
*/
export interface EchoArgs {
/**
* An echoed input.
*/
echo?: any;
}
export namespace Echo {
/**
* The set of arguments for the Echo.doEchoMethod method.
*/
export interface DoEchoMethodArgs {
echo?: pulumi.Input<string>;
}
/**
* The results of the Echo.doEchoMethod method.
*/
export interface DoEchoMethodResult {
readonly echo?: string;
}
}