Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.ec2.kotlin.VpcEndpointServiceArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.ec2.kotlin
import com.pulumi.aws.ec2.VpcEndpointServiceArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* Provides a VPC Endpoint Service resource.
* Service consumers can create an _Interface_ VPC Endpoint to connect to the service.
* > **NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals:** This provider provides
* both a standalone VPC Endpoint Service Allowed Principal resource
* and a VPC Endpoint Service resource with an `allowed_principals` attribute. Do not use the same principal ARN in both
* a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict
* and will overwrite the association.
* ## Example Usage
* ### Network Load Balancers
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2.VpcEndpointService("example", {
* acceptanceRequired: false,
* networkLoadBalancerArns: [exampleAwsLb.arn],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2.VpcEndpointService("example",
* acceptance_required=False,
* network_load_balancer_arns=[example_aws_lb["arn"]])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2.VpcEndpointService("example", new()
* {
* AcceptanceRequired = false,
* NetworkLoadBalancerArns = new[]
* {
* exampleAwsLb.Arn,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
* AcceptanceRequired: pulumi.Bool(false),
* NetworkLoadBalancerArns: pulumi.StringArray{
* exampleAwsLb.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.ec2.VpcEndpointService;
* import com.pulumi.aws.ec2.VpcEndpointServiceArgs;
* 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 VpcEndpointService("example", VpcEndpointServiceArgs.builder()
* .acceptanceRequired(false)
* .networkLoadBalancerArns(exampleAwsLb.arn())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2:VpcEndpointService
* properties:
* acceptanceRequired: false
* networkLoadBalancerArns:
* - ${exampleAwsLb.arn}
* ```
*
* ### Gateway Load Balancers
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const example = new aws.ec2.VpcEndpointService("example", {
* acceptanceRequired: false,
* gatewayLoadBalancerArns: [exampleAwsLb.arn],
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* example = aws.ec2.VpcEndpointService("example",
* acceptance_required=False,
* gateway_load_balancer_arns=[example_aws_lb["arn"]])
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var example = new Aws.Ec2.VpcEndpointService("example", new()
* {
* AcceptanceRequired = false,
* GatewayLoadBalancerArns = new[]
* {
* exampleAwsLb.Arn,
* },
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := ec2.NewVpcEndpointService(ctx, "example", &ec2.VpcEndpointServiceArgs{
* AcceptanceRequired: pulumi.Bool(false),
* GatewayLoadBalancerArns: pulumi.StringArray{
* exampleAwsLb.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.ec2.VpcEndpointService;
* import com.pulumi.aws.ec2.VpcEndpointServiceArgs;
* 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 VpcEndpointService("example", VpcEndpointServiceArgs.builder()
* .acceptanceRequired(false)
* .gatewayLoadBalancerArns(exampleAwsLb.arn())
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: aws:ec2:VpcEndpointService
* properties:
* acceptanceRequired: false
* gatewayLoadBalancerArns:
* - ${exampleAwsLb.arn}
* ```
*
* ## Import
* Using `pulumi import`, import VPC Endpoint Services using the VPC endpoint service `id`. For example:
* ```sh
* $ pulumi import aws:ec2/vpcEndpointService:VpcEndpointService foo vpce-svc-0f97a19d3fa8220bc
* ```
* @property acceptanceRequired Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - `true` or `false`.
* @property allowedPrincipals The ARNs of one or more principals allowed to discover the endpoint service.
* @property gatewayLoadBalancerArns Amazon Resource Names (ARNs) of one or more Gateway Load Balancers for the endpoint service.
* @property networkLoadBalancerArns Amazon Resource Names (ARNs) of one or more Network Load Balancers for the endpoint service.
* @property privateDnsName The private DNS name for the service.
* @property supportedIpAddressTypes The supported IP address types. The possible values are `ipv4` and `ipv6`.
* @property supportedRegions The set of regions from which service consumers can access the service.
* @property tags A map of tags to assign to the resource. .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 VpcEndpointServiceArgs(
public val acceptanceRequired: Output? = null,
public val allowedPrincipals: Output>? = null,
public val gatewayLoadBalancerArns: Output>? = null,
public val networkLoadBalancerArns: Output>? = null,
public val privateDnsName: Output? = null,
public val supportedIpAddressTypes: Output>? = null,
public val supportedRegions: Output>? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.aws.ec2.VpcEndpointServiceArgs =
com.pulumi.aws.ec2.VpcEndpointServiceArgs.builder()
.acceptanceRequired(acceptanceRequired?.applyValue({ args0 -> args0 }))
.allowedPrincipals(allowedPrincipals?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.gatewayLoadBalancerArns(
gatewayLoadBalancerArns?.applyValue({ args0 ->
args0.map({ args0 ->
args0
})
}),
)
.networkLoadBalancerArns(
networkLoadBalancerArns?.applyValue({ args0 ->
args0.map({ args0 ->
args0
})
}),
)
.privateDnsName(privateDnsName?.applyValue({ args0 -> args0 }))
.supportedIpAddressTypes(
supportedIpAddressTypes?.applyValue({ args0 ->
args0.map({ args0 ->
args0
})
}),
)
.supportedRegions(supportedRegions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
).build()
}
/**
* Builder for [VpcEndpointServiceArgs].
*/
@PulumiTagMarker
public class VpcEndpointServiceArgsBuilder internal constructor() {
private var acceptanceRequired: Output? = null
private var allowedPrincipals: Output>? = null
private var gatewayLoadBalancerArns: Output>? = null
private var networkLoadBalancerArns: Output>? = null
private var privateDnsName: Output? = null
private var supportedIpAddressTypes: Output>? = null
private var supportedRegions: Output>? = null
private var tags: Output>? = null
/**
* @param value Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - `true` or `false`.
*/
@JvmName("grplyjphhgwcrttq")
public suspend fun acceptanceRequired(`value`: Output) {
this.acceptanceRequired = value
}
/**
* @param value The ARNs of one or more principals allowed to discover the endpoint service.
*/
@JvmName("cfwjilltucspuvxt")
public suspend fun allowedPrincipals(`value`: Output>) {
this.allowedPrincipals = value
}
@JvmName("ukadaakgfncntrnm")
public suspend fun allowedPrincipals(vararg values: Output) {
this.allowedPrincipals = Output.all(values.asList())
}
/**
* @param values The ARNs of one or more principals allowed to discover the endpoint service.
*/
@JvmName("wyisrjehrmimwdoo")
public suspend fun allowedPrincipals(values: List>) {
this.allowedPrincipals = Output.all(values)
}
/**
* @param value Amazon Resource Names (ARNs) of one or more Gateway Load Balancers for the endpoint service.
*/
@JvmName("ugqssgiddoqtxdqo")
public suspend fun gatewayLoadBalancerArns(`value`: Output>) {
this.gatewayLoadBalancerArns = value
}
@JvmName("nysbgesiigxxyebm")
public suspend fun gatewayLoadBalancerArns(vararg values: Output) {
this.gatewayLoadBalancerArns = Output.all(values.asList())
}
/**
* @param values Amazon Resource Names (ARNs) of one or more Gateway Load Balancers for the endpoint service.
*/
@JvmName("vyofpxplgtuhwhgl")
public suspend fun gatewayLoadBalancerArns(values: List>) {
this.gatewayLoadBalancerArns = Output.all(values)
}
/**
* @param value Amazon Resource Names (ARNs) of one or more Network Load Balancers for the endpoint service.
*/
@JvmName("vyrwlaaxlqivvqms")
public suspend fun networkLoadBalancerArns(`value`: Output>) {
this.networkLoadBalancerArns = value
}
@JvmName("xjqualogqdwsihaj")
public suspend fun networkLoadBalancerArns(vararg values: Output) {
this.networkLoadBalancerArns = Output.all(values.asList())
}
/**
* @param values Amazon Resource Names (ARNs) of one or more Network Load Balancers for the endpoint service.
*/
@JvmName("jibyfuwnoosmffqi")
public suspend fun networkLoadBalancerArns(values: List>) {
this.networkLoadBalancerArns = Output.all(values)
}
/**
* @param value The private DNS name for the service.
*/
@JvmName("mdgfhcqpsdhsdufi")
public suspend fun privateDnsName(`value`: Output) {
this.privateDnsName = value
}
/**
* @param value The supported IP address types. The possible values are `ipv4` and `ipv6`.
*/
@JvmName("qocnkhrrsokuqnyy")
public suspend fun supportedIpAddressTypes(`value`: Output>) {
this.supportedIpAddressTypes = value
}
@JvmName("glwnfahxyqbplqxm")
public suspend fun supportedIpAddressTypes(vararg values: Output) {
this.supportedIpAddressTypes = Output.all(values.asList())
}
/**
* @param values The supported IP address types. The possible values are `ipv4` and `ipv6`.
*/
@JvmName("ivrwejamakkxektv")
public suspend fun supportedIpAddressTypes(values: List>) {
this.supportedIpAddressTypes = Output.all(values)
}
/**
* @param value The set of regions from which service consumers can access the service.
*/
@JvmName("mgxdbxkrvphcnflh")
public suspend fun supportedRegions(`value`: Output>) {
this.supportedRegions = value
}
@JvmName("gyjmbildwcqlgghh")
public suspend fun supportedRegions(vararg values: Output) {
this.supportedRegions = Output.all(values.asList())
}
/**
* @param values The set of regions from which service consumers can access the service.
*/
@JvmName("xlqgifwcguypoend")
public suspend fun supportedRegions(values: List>) {
this.supportedRegions = Output.all(values)
}
/**
* @param value A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("qfjjgmfjewekenjg")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Whether or not VPC endpoint connection requests to the service must be accepted by the service owner - `true` or `false`.
*/
@JvmName("ojxkdraqseyhelkj")
public suspend fun acceptanceRequired(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.acceptanceRequired = mapped
}
/**
* @param value The ARNs of one or more principals allowed to discover the endpoint service.
*/
@JvmName("jeuaxqgrilnkimdg")
public suspend fun allowedPrincipals(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.allowedPrincipals = mapped
}
/**
* @param values The ARNs of one or more principals allowed to discover the endpoint service.
*/
@JvmName("gagpcsoudeptqflh")
public suspend fun allowedPrincipals(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.allowedPrincipals = mapped
}
/**
* @param value Amazon Resource Names (ARNs) of one or more Gateway Load Balancers for the endpoint service.
*/
@JvmName("cvsgfuntnsjxxuhg")
public suspend fun gatewayLoadBalancerArns(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.gatewayLoadBalancerArns = mapped
}
/**
* @param values Amazon Resource Names (ARNs) of one or more Gateway Load Balancers for the endpoint service.
*/
@JvmName("wgcylssqbaxvajhy")
public suspend fun gatewayLoadBalancerArns(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.gatewayLoadBalancerArns = mapped
}
/**
* @param value Amazon Resource Names (ARNs) of one or more Network Load Balancers for the endpoint service.
*/
@JvmName("msbavklwphcptckb")
public suspend fun networkLoadBalancerArns(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.networkLoadBalancerArns = mapped
}
/**
* @param values Amazon Resource Names (ARNs) of one or more Network Load Balancers for the endpoint service.
*/
@JvmName("seefmgcqewfojurt")
public suspend fun networkLoadBalancerArns(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.networkLoadBalancerArns = mapped
}
/**
* @param value The private DNS name for the service.
*/
@JvmName("mjbanultwrlpqivv")
public suspend fun privateDnsName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.privateDnsName = mapped
}
/**
* @param value The supported IP address types. The possible values are `ipv4` and `ipv6`.
*/
@JvmName("gjrfdgwbwrhfcdct")
public suspend fun supportedIpAddressTypes(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.supportedIpAddressTypes = mapped
}
/**
* @param values The supported IP address types. The possible values are `ipv4` and `ipv6`.
*/
@JvmName("qfpbjiblvaussebq")
public suspend fun supportedIpAddressTypes(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.supportedIpAddressTypes = mapped
}
/**
* @param value The set of regions from which service consumers can access the service.
*/
@JvmName("beinikspjokpbirn")
public suspend fun supportedRegions(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.supportedRegions = mapped
}
/**
* @param values The set of regions from which service consumers can access the service.
*/
@JvmName("cfxqibubepxkgahr")
public suspend fun supportedRegions(vararg values: String) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.supportedRegions = mapped
}
/**
* @param value A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("fdevagiaenwetann")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values A map of tags to assign to the resource. .If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
*/
@JvmName("nvqifpgbdsfqvaha")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
internal fun build(): VpcEndpointServiceArgs = VpcEndpointServiceArgs(
acceptanceRequired = acceptanceRequired,
allowedPrincipals = allowedPrincipals,
gatewayLoadBalancerArns = gatewayLoadBalancerArns,
networkLoadBalancerArns = networkLoadBalancerArns,
privateDnsName = privateDnsName,
supportedIpAddressTypes = supportedIpAddressTypes,
supportedRegions = supportedRegions,
tags = tags,
)
}