pulumi/tests/testdata/codegen/kubernetes20/nodejs/helm/v3/release.ts

94 lines
3.6 KiB
TypeScript

// *** WARNING: this file was generated by test. ***
// *** 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 non-overlay, non-component, non-Kubernetes resource.
*/
export class Release extends pulumi.CustomResource {
/**
* Get an existing Release 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): Release {
return new Release(name, undefined as any, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'kubernetes:helm.sh/v3:Release';
/**
* Returns true if the given object is an instance of Release. 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 Release {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === Release.__pulumiType;
}
/**
* Chart name to be installed. A path may be used.
*/
public readonly chart!: pulumi.Output<string>;
/**
* List of assets (raw yaml files). Content is read and merged with values (with values taking precedence).
*/
public readonly valueYamlFiles!: pulumi.Output<(pulumi.asset.Asset | pulumi.asset.Archive)[]>;
/**
* Custom values set for the release.
*/
public readonly values!: pulumi.Output<{[key: string]: any}>;
/**
* Create a Release 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?: ReleaseArgs, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (!opts.id) {
if ((!args || args.chart === undefined) && !opts.urn) {
throw new Error("Missing required property 'chart'");
}
resourceInputs["chart"] = args ? args.chart : undefined;
resourceInputs["valueYamlFiles"] = args ? args.valueYamlFiles : undefined;
resourceInputs["values"] = args ? args.values : undefined;
} else {
resourceInputs["chart"] = undefined /*out*/;
resourceInputs["valueYamlFiles"] = undefined /*out*/;
resourceInputs["values"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Release.__pulumiType, name, resourceInputs, opts);
}
}
/**
* The set of arguments for constructing a Release resource.
*/
export interface ReleaseArgs {
/**
* Chart name to be installed. A path may be used.
*/
chart: pulumi.Input<string>;
/**
* List of assets (raw yaml files). Content is read and merged with values.
*/
valueYamlFiles?: pulumi.Input<pulumi.Input<pulumi.asset.Asset | pulumi.asset.Archive>[]>;
/**
* Custom values set for the release.
*/
values?: pulumi.Input<{[key: string]: any}>;
}