@pulumi/awsx
Version:
[](https://github.com/pulumi/pulumi-awsx/actions) [](https://slack.pulumi.com) [;
exports.TargetGroupAttachment = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* Attach an EC2 instance or Lambda to a Load Balancer. This will create required permissions if attaching to a Lambda Function.
*/
class TargetGroupAttachment extends pulumi.ComponentResource {
/**
* Returns true if the given object is an instance of TargetGroupAttachment. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === TargetGroupAttachment.__pulumiType;
}
/**
* Create a TargetGroupAttachment 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, args, opts) {
let resourceInputs = {};
opts = opts || {};
if (!opts.id) {
resourceInputs["instance"] = args ? args.instance : undefined;
resourceInputs["instanceId"] = args ? args.instanceId : undefined;
resourceInputs["lambda"] = args ? args.lambda : undefined;
resourceInputs["lambdaArn"] = args ? args.lambdaArn : undefined;
resourceInputs["targetGroup"] = args ? args.targetGroup : undefined;
resourceInputs["targetGroupArn"] = args ? args.targetGroupArn : undefined;
resourceInputs["lambdaPermission"] = undefined /*out*/;
resourceInputs["targetGroupAttachment"] = undefined /*out*/;
}
else {
resourceInputs["lambdaPermission"] = undefined /*out*/;
resourceInputs["targetGroupAttachment"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TargetGroupAttachment.__pulumiType, name, resourceInputs, opts, true /*remote*/);
}
}
exports.TargetGroupAttachment = TargetGroupAttachment;
/** @internal */
TargetGroupAttachment.__pulumiType = 'awsx:lb:TargetGroupAttachment';
//# sourceMappingURL=targetGroupAttachment.js.map