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

com.pulumi.aws.apigatewayv2.kotlin.VpcLinkArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.apigatewayv2.kotlin

import com.pulumi.aws.apigatewayv2.VpcLinkArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an Amazon API Gateway Version 2 VPC Link.
 * > **Note:** Amazon API Gateway Version 2 VPC Links enable private integrations that connect HTTP APIs to private resources in a VPC.
 * To enable private integration for REST APIs, use the Amazon API Gateway Version 1 VPC Link resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.apigatewayv2.VpcLink("example", {
 *     name: "example",
 *     securityGroupIds: [exampleAwsSecurityGroup.id],
 *     subnetIds: exampleAwsSubnets.ids,
 *     tags: {
 *         Usage: "example",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.apigatewayv2.VpcLink("example",
 *     name="example",
 *     security_group_ids=[example_aws_security_group["id"]],
 *     subnet_ids=example_aws_subnets["ids"],
 *     tags={
 *         "Usage": "example",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.ApiGatewayV2.VpcLink("example", new()
 *     {
 *         Name = "example",
 *         SecurityGroupIds = new[]
 *         {
 *             exampleAwsSecurityGroup.Id,
 *         },
 *         SubnetIds = exampleAwsSubnets.Ids,
 *         Tags =
 *         {
 *             { "Usage", "example" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigatewayv2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := apigatewayv2.NewVpcLink(ctx, "example", &apigatewayv2.VpcLinkArgs{
 * 			Name: pulumi.String("example"),
 * 			SecurityGroupIds: pulumi.StringArray{
 * 				exampleAwsSecurityGroup.Id,
 * 			},
 * 			SubnetIds: pulumi.Any(exampleAwsSubnets.Ids),
 * 			Tags: pulumi.StringMap{
 * 				"Usage": pulumi.String("example"),
 * 			},
 * 		})
 * 		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.apigatewayv2.VpcLink;
 * import com.pulumi.aws.apigatewayv2.VpcLinkArgs;
 * 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 VpcLink("example", VpcLinkArgs.builder()
 *             .name("example")
 *             .securityGroupIds(exampleAwsSecurityGroup.id())
 *             .subnetIds(exampleAwsSubnets.ids())
 *             .tags(Map.of("Usage", "example"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:apigatewayv2:VpcLink
 *     properties:
 *       name: example
 *       securityGroupIds:
 *         - ${exampleAwsSecurityGroup.id}
 *       subnetIds: ${exampleAwsSubnets.ids}
 *       tags:
 *         Usage: example
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import `aws_apigatewayv2_vpc_link` using the VPC Link identifier. For example:
 * ```sh
 * $ pulumi import aws:apigatewayv2/vpcLink:VpcLink example aabbccddee
 * ```
 * @property name Name of the VPC Link. Must be between 1 and 128 characters in length.
 * @property securityGroupIds Security group IDs for the VPC Link.
 * @property subnetIds Subnet IDs for the VPC Link.
 * @property tags Map of tags to assign to the VPC Link. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class VpcLinkArgs(
    public val name: Output? = null,
    public val securityGroupIds: Output>? = null,
    public val subnetIds: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.apigatewayv2.VpcLinkArgs =
        com.pulumi.aws.apigatewayv2.VpcLinkArgs.builder()
            .name(name?.applyValue({ args0 -> args0 }))
            .securityGroupIds(securityGroupIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .subnetIds(subnetIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [VpcLinkArgs].
 */
@PulumiTagMarker
public class VpcLinkArgsBuilder internal constructor() {
    private var name: Output? = null

    private var securityGroupIds: Output>? = null

    private var subnetIds: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value Name of the VPC Link. Must be between 1 and 128 characters in length.
     */
    @JvmName("unjbhfopfflkmlkw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Security group IDs for the VPC Link.
     */
    @JvmName("fisijxwmgvllskki")
    public suspend fun securityGroupIds(`value`: Output>) {
        this.securityGroupIds = value
    }

    @JvmName("dfywdssrakagoogw")
    public suspend fun securityGroupIds(vararg values: Output) {
        this.securityGroupIds = Output.all(values.asList())
    }

    /**
     * @param values Security group IDs for the VPC Link.
     */
    @JvmName("cqjnxnunhrsipnfk")
    public suspend fun securityGroupIds(values: List>) {
        this.securityGroupIds = Output.all(values)
    }

    /**
     * @param value Subnet IDs for the VPC Link.
     */
    @JvmName("xrvlusqbfleqtnrw")
    public suspend fun subnetIds(`value`: Output>) {
        this.subnetIds = value
    }

    @JvmName("ciwgtcwakohukijv")
    public suspend fun subnetIds(vararg values: Output) {
        this.subnetIds = Output.all(values.asList())
    }

    /**
     * @param values Subnet IDs for the VPC Link.
     */
    @JvmName("gtctaajpmdfbgqpg")
    public suspend fun subnetIds(values: List>) {
        this.subnetIds = Output.all(values)
    }

    /**
     * @param value Map of tags to assign to the VPC Link. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("rtvexjnjbaopdcxs")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Name of the VPC Link. Must be between 1 and 128 characters in length.
     */
    @JvmName("owocsnsouwoaeshu")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Security group IDs for the VPC Link.
     */
    @JvmName("kgdylcuipbjxsica")
    public suspend fun securityGroupIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param values Security group IDs for the VPC Link.
     */
    @JvmName("bydvtjwpkuuewbam")
    public suspend fun securityGroupIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param value Subnet IDs for the VPC Link.
     */
    @JvmName("vfsclywfwccpkynn")
    public suspend fun subnetIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param values Subnet IDs for the VPC Link.
     */
    @JvmName("pdykuckorvywrxmj")
    public suspend fun subnetIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param value Map of tags to assign to the VPC Link. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("egwtygmwlkpnocgk")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Map of tags to assign to the VPC Link. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("hyhdvjkscehlogpb")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): VpcLinkArgs = VpcLinkArgs(
        name = name,
        securityGroupIds = securityGroupIds,
        subnetIds = subnetIds,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy