com.pulumi.aws.apigatewayv2.kotlin.VpcLink.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.apigatewayv2.kotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [VpcLink].
*/
@PulumiTagMarker
public class VpcLinkResourceBuilder internal constructor() {
public var name: String? = null
public var args: VpcLinkArgs = VpcLinkArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend VpcLinkArgsBuilder.() -> Unit) {
val builder = VpcLinkArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): VpcLink {
val builtJavaResource = com.pulumi.aws.apigatewayv2.VpcLink(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return VpcLink(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class VpcLink internal constructor(
override val javaResource: com.pulumi.aws.apigatewayv2.VpcLink,
) : KotlinCustomResource(javaResource, VpcLinkMapper) {
/**
* VPC Link ARN.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Name of the VPC Link. Must be between 1 and 128 characters in length.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Security group IDs for the VPC Link.
*/
public val securityGroupIds: Output>
get() = javaResource.securityGroupIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* Subnet IDs for the VPC Link.
*/
public val subnetIds: Output>
get() = javaResource.subnetIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* 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 val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy