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

com.pulumi.aws.apigateway.kotlin.VpcLinkArgs.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.apigateway.kotlin

import com.pulumi.aws.apigateway.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.Map
import kotlin.jvm.JvmName

/**
 * Provides an API Gateway VPC Link.
 * > **Note:** Amazon API Gateway Version 1 VPC Links enable private integrations that connect REST APIs to private resources in a VPC.
 * To enable private integration for HTTP APIs, use the Amazon API Gateway Version 2 VPC Link resource.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.lb.LoadBalancer("example", {
 *     name: "example",
 *     internal: true,
 *     loadBalancerType: "network",
 *     subnetMappings: [{
 *         subnetId: "12345",
 *     }],
 * });
 * const exampleVpcLink = new aws.apigateway.VpcLink("example", {
 *     name: "example",
 *     description: "example description",
 *     targetArn: example.arn,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.lb.LoadBalancer("example",
 *     name="example",
 *     internal=True,
 *     load_balancer_type="network",
 *     subnet_mappings=[{
 *         "subnet_id": "12345",
 *     }])
 * example_vpc_link = aws.apigateway.VpcLink("example",
 *     name="example",
 *     description="example description",
 *     target_arn=example.arn)
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.LB.LoadBalancer("example", new()
 *     {
 *         Name = "example",
 *         Internal = true,
 *         LoadBalancerType = "network",
 *         SubnetMappings = new[]
 *         {
 *             new Aws.LB.Inputs.LoadBalancerSubnetMappingArgs
 *             {
 *                 SubnetId = "12345",
 *             },
 *         },
 *     });
 *     var exampleVpcLink = new Aws.ApiGateway.VpcLink("example", new()
 *     {
 *         Name = "example",
 *         Description = "example description",
 *         TargetArn = example.Arn,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apigateway"
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/lb"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := lb.NewLoadBalancer(ctx, "example", &lb.LoadBalancerArgs{
 * 			Name:             pulumi.String("example"),
 * 			Internal:         pulumi.Bool(true),
 * 			LoadBalancerType: pulumi.String("network"),
 * 			SubnetMappings: lb.LoadBalancerSubnetMappingArray{
 * 				&lb.LoadBalancerSubnetMappingArgs{
 * 					SubnetId: pulumi.String("12345"),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = apigateway.NewVpcLink(ctx, "example", &apigateway.VpcLinkArgs{
 * 			Name:        pulumi.String("example"),
 * 			Description: pulumi.String("example description"),
 * 			TargetArn:   example.Arn,
 * 		})
 * 		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.lb.LoadBalancer;
 * import com.pulumi.aws.lb.LoadBalancerArgs;
 * import com.pulumi.aws.lb.inputs.LoadBalancerSubnetMappingArgs;
 * import com.pulumi.aws.apigateway.VpcLink;
 * import com.pulumi.aws.apigateway.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 LoadBalancer("example", LoadBalancerArgs.builder()
 *             .name("example")
 *             .internal(true)
 *             .loadBalancerType("network")
 *             .subnetMappings(LoadBalancerSubnetMappingArgs.builder()
 *                 .subnetId("12345")
 *                 .build())
 *             .build());
 *         var exampleVpcLink = new VpcLink("exampleVpcLink", VpcLinkArgs.builder()
 *             .name("example")
 *             .description("example description")
 *             .targetArn(example.arn())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:lb:LoadBalancer
 *     properties:
 *       name: example
 *       internal: true
 *       loadBalancerType: network
 *       subnetMappings:
 *         - subnetId: '12345'
 *   exampleVpcLink:
 *     type: aws:apigateway:VpcLink
 *     name: example
 *     properties:
 *       name: example
 *       description: example description
 *       targetArn: ${example.arn}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import API Gateway VPC Link using the `id`. For example:
 * ```sh
 * $ pulumi import aws:apigateway/vpcLink:VpcLink example 12345abcde
 * ```
 * @property description Description of the VPC link.
 * @property name Name used to label and identify the VPC link.
 * @property tags Key-value map of resource tags. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property targetArn List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
 */
public data class VpcLinkArgs(
    public val description: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
    public val targetArn: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.apigateway.VpcLinkArgs =
        com.pulumi.aws.apigateway.VpcLinkArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .targetArn(targetArn?.applyValue({ args0 -> args0 })).build()
}

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

    private var name: Output? = null

    private var tags: Output>? = null

    private var targetArn: Output? = null

    /**
     * @param value Description of the VPC link.
     */
    @JvmName("rjdymfomqimhecjf")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Name used to label and identify the VPC link.
     */
    @JvmName("fnhlgflxgnfqxudd")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

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

    /**
     * @param value List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
     */
    @JvmName("hrxkhvqvaxuckoll")
    public suspend fun targetArn(`value`: Output) {
        this.targetArn = value
    }

    /**
     * @param value Description of the VPC link.
     */
    @JvmName("cupaweikurinyoxd")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Name used to label and identify the VPC link.
     */
    @JvmName("vloffriiogjufpqx")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

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

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

    /**
     * @param value List of network load balancer arns in the VPC targeted by the VPC link. Currently AWS only supports 1 target.
     */
    @JvmName("qwicltvgdrcnnlwp")
    public suspend fun targetArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetArn = mapped
    }

    internal fun build(): VpcLinkArgs = VpcLinkArgs(
        description = description,
        name = name,
        tags = tags,
        targetArn = targetArn,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy