Files
pulumi-incus/sdk/nodejs/clusterGroupMember.ts
2025-12-08 10:47:09 -05:00

119 lines
4.6 KiB
TypeScript
Generated

// *** 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 ClusterGroupMember extends pulumi.CustomResource {
/**
* Get an existing ClusterGroupMember 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?: ClusterGroupMemberState, opts?: pulumi.CustomResourceOptions): ClusterGroupMember {
return new ClusterGroupMember(name, <any>state, { ...opts, id: id });
}
/** @internal */
public static readonly __pulumiType = 'incus:index/clusterGroupMember:ClusterGroupMember';
/**
* Returns true if the given object is an instance of ClusterGroupMember. 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 ClusterGroupMember {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === ClusterGroupMember.__pulumiType;
}
/**
* **Required** - Name of the cluster group.
*/
declare public readonly clusterGroup: pulumi.Output<string>;
/**
* **Required** - Name of the cluster group member.
*/
declare public readonly member: pulumi.Output<string>;
/**
* *Optional* - The remote in which the resource will be created. If
* not provided, the provider's default remote will be used.
*/
declare public readonly remote: pulumi.Output<string | undefined>;
/**
* Create a ClusterGroupMember 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: ClusterGroupMemberArgs, opts?: pulumi.CustomResourceOptions)
constructor(name: string, argsOrState?: ClusterGroupMemberArgs | ClusterGroupMemberState, opts?: pulumi.CustomResourceOptions) {
let resourceInputs: pulumi.Inputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState as ClusterGroupMemberState | undefined;
resourceInputs["clusterGroup"] = state?.clusterGroup;
resourceInputs["member"] = state?.member;
resourceInputs["remote"] = state?.remote;
} else {
const args = argsOrState as ClusterGroupMemberArgs | undefined;
if (args?.clusterGroup === undefined && !opts.urn) {
throw new Error("Missing required property 'clusterGroup'");
}
if (args?.member === undefined && !opts.urn) {
throw new Error("Missing required property 'member'");
}
resourceInputs["clusterGroup"] = args?.clusterGroup;
resourceInputs["member"] = args?.member;
resourceInputs["remote"] = args?.remote;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(ClusterGroupMember.__pulumiType, name, resourceInputs, opts);
}
}
/**
* Input properties used for looking up and filtering ClusterGroupMember resources.
*/
export interface ClusterGroupMemberState {
/**
* **Required** - Name of the cluster group.
*/
clusterGroup?: pulumi.Input<string>;
/**
* **Required** - Name of the cluster group member.
*/
member?: pulumi.Input<string>;
/**
* *Optional* - The remote in which the resource will be created. If
* not provided, the provider's default remote will be used.
*/
remote?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a ClusterGroupMember resource.
*/
export interface ClusterGroupMemberArgs {
/**
* **Required** - Name of the cluster group.
*/
clusterGroup: pulumi.Input<string>;
/**
* **Required** - Name of the cluster group member.
*/
member: pulumi.Input<string>;
/**
* *Optional* - The remote in which the resource will be created. If
* not provided, the provider's default remote will be used.
*/
remote?: pulumi.Input<string>;
}