All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.aws.vpclattice.kotlin.TargetGroupAttachmentArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.vpclattice.kotlin

import com.pulumi.aws.vpclattice.TargetGroupAttachmentArgs.builder
import com.pulumi.aws.vpclattice.kotlin.inputs.TargetGroupAttachmentTargetArgs
import com.pulumi.aws.vpclattice.kotlin.inputs.TargetGroupAttachmentTargetArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Provides the ability to register a target with an AWS VPC Lattice Target Group.
 * ## Example Usage
 * ### Basic Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.vpclattice.TargetGroupAttachment("example", {
 *     targetGroupIdentifier: exampleAwsVpclatticeTargetGroup.id,
 *     target: {
 *         id: exampleAwsLb.arn,
 *         port: 80,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.vpclattice.TargetGroupAttachment("example",
 *     target_group_identifier=example_aws_vpclattice_target_group["id"],
 *     target={
 *         "id": example_aws_lb["arn"],
 *         "port": 80,
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.VpcLattice.TargetGroupAttachment("example", new()
 *     {
 *         TargetGroupIdentifier = exampleAwsVpclatticeTargetGroup.Id,
 *         Target = new Aws.VpcLattice.Inputs.TargetGroupAttachmentTargetArgs
 *         {
 *             Id = exampleAwsLb.Arn,
 *             Port = 80,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/vpclattice"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := vpclattice.NewTargetGroupAttachment(ctx, "example", &vpclattice.TargetGroupAttachmentArgs{
 * 			TargetGroupIdentifier: pulumi.Any(exampleAwsVpclatticeTargetGroup.Id),
 * 			Target: &vpclattice.TargetGroupAttachmentTargetArgs{
 * 				Id:   pulumi.Any(exampleAwsLb.Arn),
 * 				Port: pulumi.Int(80),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.aws.vpclattice.TargetGroupAttachment;
 * import com.pulumi.aws.vpclattice.TargetGroupAttachmentArgs;
 * import com.pulumi.aws.vpclattice.inputs.TargetGroupAttachmentTargetArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 *     public static void stack(Context ctx) {
 *         var example = new TargetGroupAttachment("example", TargetGroupAttachmentArgs.builder()
 *             .targetGroupIdentifier(exampleAwsVpclatticeTargetGroup.id())
 *             .target(TargetGroupAttachmentTargetArgs.builder()
 *                 .id(exampleAwsLb.arn())
 *                 .port(80)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:vpclattice:TargetGroupAttachment
 *     properties:
 *       targetGroupIdentifier: ${exampleAwsVpclatticeTargetGroup.id}
 *       target:
 *         id: ${exampleAwsLb.arn}
 *         port: 80
 * ```
 * 
 * @property target The target.
 * @property targetGroupIdentifier The ID or Amazon Resource Name (ARN) of the target group.
 */
public data class TargetGroupAttachmentArgs(
    public val target: Output? = null,
    public val targetGroupIdentifier: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.vpclattice.TargetGroupAttachmentArgs =
        com.pulumi.aws.vpclattice.TargetGroupAttachmentArgs.builder()
            .target(target?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .targetGroupIdentifier(targetGroupIdentifier?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TargetGroupAttachmentArgs].
 */
@PulumiTagMarker
public class TargetGroupAttachmentArgsBuilder internal constructor() {
    private var target: Output? = null

    private var targetGroupIdentifier: Output? = null

    /**
     * @param value The target.
     */
    @JvmName("ympkqxpwxipeyhaa")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value The ID or Amazon Resource Name (ARN) of the target group.
     */
    @JvmName("tlmmjtcwglplrurl")
    public suspend fun targetGroupIdentifier(`value`: Output) {
        this.targetGroupIdentifier = value
    }

    /**
     * @param value The target.
     */
    @JvmName("nwyytisevgbvbxrd")
    public suspend fun target(`value`: TargetGroupAttachmentTargetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param argument The target.
     */
    @JvmName("uywmofqerewdpcvb")
    public suspend fun target(argument: suspend TargetGroupAttachmentTargetArgsBuilder.() -> Unit) {
        val toBeMapped = TargetGroupAttachmentTargetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.target = mapped
    }

    /**
     * @param value The ID or Amazon Resource Name (ARN) of the target group.
     */
    @JvmName("hvbwftfipxhkueva")
    public suspend fun targetGroupIdentifier(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetGroupIdentifier = mapped
    }

    internal fun build(): TargetGroupAttachmentArgs = TargetGroupAttachmentArgs(
        target = target,
        targetGroupIdentifier = targetGroupIdentifier,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy