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

com.pulumi.awsnative.ec2.kotlin.VpcEndpointArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.awsnative.ec2.VpcEndpointArgs.builder
import com.pulumi.awsnative.ec2.kotlin.enums.VpcEndpointType
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Specifies a VPC endpoint. A VPC endpoint provides a private connection between your VPC and an endpoint service. You can use an endpoint service provided by AWS , an AWS Marketplace Partner, or another AWS accounts in your organization. For more information, see the [AWS PrivateLink User Guide](https://docs.aws.amazon.com/vpc/latest/privatelink/) .
 * An endpoint of type `Interface` establishes connections between the subnets in your VPC and an AWS service , your own service, or a service hosted by another AWS account . With an interface VPC endpoint, you specify the subnets in which to create the endpoint and the security groups to associate with the endpoint network interfaces.
 * An endpoint of type `gateway` serves as a target for a route in your route table for traffic destined for Amazon S3 or DynamoDB . You can specify an endpoint policy for the endpoint, which controls access to the service from your VPC. You can also specify the VPC route tables that use the endpoint. For more information about connectivity to Amazon S3 , see [Why can't I connect to an S3 bucket using a gateway VPC endpoint?](https://docs.aws.amazon.com/premiumsupport/knowledge-center/connect-s3-vpc-endpoint)
 * An endpoint of type `GatewayLoadBalancer` provides private connectivity between your VPC and virtual appliances from a service provider.
 * @property policyDocument An endpoint policy, which controls access to the service from the VPC. The default endpoint policy allows full access to the service. Endpoint policies are supported only for gateway and interface endpoints.
 *  For CloudFormation templates in YAML, you can provide the policy in JSON or YAML format. CFNlong converts YAML policies to JSON format before calling the API to create or modify the VPC endpoint.
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::EC2::VPCEndpoint` for more information about the expected schema for this property.
 * @property privateDnsEnabled Indicate whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, ``kinesis.us-east-1.amazonaws.com``), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.
 *  To use a private hosted zone, you must set the following VPC attributes to ``true``: ``enableDnsHostnames`` and ``enableDnsSupport``.
 *  This property is supported only for interface endpoints.
 *  Default: ``false``
 * @property routeTableIds The IDs of the route tables. Routing is supported only for gateway endpoints.
 * @property securityGroupIds The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC. Security groups are supported only for interface endpoints.
 * @property serviceName The name of the endpoint service.
 * @property subnetIds The IDs of the subnets in which to create endpoint network interfaces. You must specify this property for an interface endpoint or a Gateway Load Balancer endpoint. You can't specify this property for a gateway endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
 * @property vpcEndpointType The type of endpoint.
 *  Default: Gateway
 * @property vpcId The ID of the VPC.
 */
public data class VpcEndpointArgs(
    public val policyDocument: Output? = null,
    public val privateDnsEnabled: Output? = null,
    public val routeTableIds: Output>? = null,
    public val securityGroupIds: Output>? = null,
    public val serviceName: Output? = null,
    public val subnetIds: Output>? = null,
    public val vpcEndpointType: Output? = null,
    public val vpcId: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.VpcEndpointArgs =
        com.pulumi.awsnative.ec2.VpcEndpointArgs.builder()
            .policyDocument(policyDocument?.applyValue({ args0 -> args0 }))
            .privateDnsEnabled(privateDnsEnabled?.applyValue({ args0 -> args0 }))
            .routeTableIds(routeTableIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .securityGroupIds(securityGroupIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .serviceName(serviceName?.applyValue({ args0 -> args0 }))
            .subnetIds(subnetIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .vpcEndpointType(vpcEndpointType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .vpcId(vpcId?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VpcEndpointArgs].
 */
@PulumiTagMarker
public class VpcEndpointArgsBuilder internal constructor() {
    private var policyDocument: Output? = null

    private var privateDnsEnabled: Output? = null

    private var routeTableIds: Output>? = null

    private var securityGroupIds: Output>? = null

    private var serviceName: Output? = null

    private var subnetIds: Output>? = null

    private var vpcEndpointType: Output? = null

    private var vpcId: Output? = null

    /**
     * @param value An endpoint policy, which controls access to the service from the VPC. The default endpoint policy allows full access to the service. Endpoint policies are supported only for gateway and interface endpoints.
     *  For CloudFormation templates in YAML, you can provide the policy in JSON or YAML format. CFNlong converts YAML policies to JSON format before calling the API to create or modify the VPC endpoint.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::EC2::VPCEndpoint` for more information about the expected schema for this property.
     */
    @JvmName("mglwyaiiwcieavjq")
    public suspend fun policyDocument(`value`: Output) {
        this.policyDocument = value
    }

    /**
     * @param value Indicate whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, ``kinesis.us-east-1.amazonaws.com``), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.
     *  To use a private hosted zone, you must set the following VPC attributes to ``true``: ``enableDnsHostnames`` and ``enableDnsSupport``.
     *  This property is supported only for interface endpoints.
     *  Default: ``false``
     */
    @JvmName("ajuxmaevvelueglt")
    public suspend fun privateDnsEnabled(`value`: Output) {
        this.privateDnsEnabled = value
    }

    /**
     * @param value The IDs of the route tables. Routing is supported only for gateway endpoints.
     */
    @JvmName("wsnshuwwadrblmxx")
    public suspend fun routeTableIds(`value`: Output>) {
        this.routeTableIds = value
    }

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

    /**
     * @param values The IDs of the route tables. Routing is supported only for gateway endpoints.
     */
    @JvmName("nudnsqnmfbfwvfwg")
    public suspend fun routeTableIds(values: List>) {
        this.routeTableIds = Output.all(values)
    }

    /**
     * @param value The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC. Security groups are supported only for interface endpoints.
     */
    @JvmName("nlnwbavxhgfnhbkh")
    public suspend fun securityGroupIds(`value`: Output>) {
        this.securityGroupIds = value
    }

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

    /**
     * @param values The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC. Security groups are supported only for interface endpoints.
     */
    @JvmName("jqmkcdvwruuabkkd")
    public suspend fun securityGroupIds(values: List>) {
        this.securityGroupIds = Output.all(values)
    }

    /**
     * @param value The name of the endpoint service.
     */
    @JvmName("xmmttxtegnumtdnn")
    public suspend fun serviceName(`value`: Output) {
        this.serviceName = value
    }

    /**
     * @param value The IDs of the subnets in which to create endpoint network interfaces. You must specify this property for an interface endpoint or a Gateway Load Balancer endpoint. You can't specify this property for a gateway endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
     */
    @JvmName("bwxuibgoasoctokx")
    public suspend fun subnetIds(`value`: Output>) {
        this.subnetIds = value
    }

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

    /**
     * @param values The IDs of the subnets in which to create endpoint network interfaces. You must specify this property for an interface endpoint or a Gateway Load Balancer endpoint. You can't specify this property for a gateway endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
     */
    @JvmName("auhsrwaaidtdxtxy")
    public suspend fun subnetIds(values: List>) {
        this.subnetIds = Output.all(values)
    }

    /**
     * @param value The type of endpoint.
     *  Default: Gateway
     */
    @JvmName("jstotwedraojljhc")
    public suspend fun vpcEndpointType(`value`: Output) {
        this.vpcEndpointType = value
    }

    /**
     * @param value The ID of the VPC.
     */
    @JvmName("etfnwancdjdkwcqa")
    public suspend fun vpcId(`value`: Output) {
        this.vpcId = value
    }

    /**
     * @param value An endpoint policy, which controls access to the service from the VPC. The default endpoint policy allows full access to the service. Endpoint policies are supported only for gateway and interface endpoints.
     *  For CloudFormation templates in YAML, you can provide the policy in JSON or YAML format. CFNlong converts YAML policies to JSON format before calling the API to create or modify the VPC endpoint.
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::EC2::VPCEndpoint` for more information about the expected schema for this property.
     */
    @JvmName("eaaujjfkgnvjojua")
    public suspend fun policyDocument(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyDocument = mapped
    }

    /**
     * @param value Indicate whether to associate a private hosted zone with the specified VPC. The private hosted zone contains a record set for the default public DNS name for the service for the Region (for example, ``kinesis.us-east-1.amazonaws.com``), which resolves to the private IP addresses of the endpoint network interfaces in the VPC. This enables you to make requests to the default public DNS name for the service instead of the public DNS names that are automatically generated by the VPC endpoint service.
     *  To use a private hosted zone, you must set the following VPC attributes to ``true``: ``enableDnsHostnames`` and ``enableDnsSupport``.
     *  This property is supported only for interface endpoints.
     *  Default: ``false``
     */
    @JvmName("ytsiorybxmewmtuj")
    public suspend fun privateDnsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.privateDnsEnabled = mapped
    }

    /**
     * @param value The IDs of the route tables. Routing is supported only for gateway endpoints.
     */
    @JvmName("klvhrcvnbvojrami")
    public suspend fun routeTableIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routeTableIds = mapped
    }

    /**
     * @param values The IDs of the route tables. Routing is supported only for gateway endpoints.
     */
    @JvmName("cwqaiwdgtsoyyrwb")
    public suspend fun routeTableIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routeTableIds = mapped
    }

    /**
     * @param value The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC. Security groups are supported only for interface endpoints.
     */
    @JvmName("ptxxgiwpqrujjoon")
    public suspend fun securityGroupIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param values The IDs of the security groups to associate with the endpoint network interfaces. If this parameter is not specified, we use the default security group for the VPC. Security groups are supported only for interface endpoints.
     */
    @JvmName("cyykaehngyljxadh")
    public suspend fun securityGroupIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroupIds = mapped
    }

    /**
     * @param value The name of the endpoint service.
     */
    @JvmName("kcphrjhhaifugxxg")
    public suspend fun serviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceName = mapped
    }

    /**
     * @param value The IDs of the subnets in which to create endpoint network interfaces. You must specify this property for an interface endpoint or a Gateway Load Balancer endpoint. You can't specify this property for a gateway endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
     */
    @JvmName("thjpuagrrfcvqbjb")
    public suspend fun subnetIds(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param values The IDs of the subnets in which to create endpoint network interfaces. You must specify this property for an interface endpoint or a Gateway Load Balancer endpoint. You can't specify this property for a gateway endpoint. For a Gateway Load Balancer endpoint, you can specify only one subnet.
     */
    @JvmName("eiccmkstsepdkjib")
    public suspend fun subnetIds(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.subnetIds = mapped
    }

    /**
     * @param value The type of endpoint.
     *  Default: Gateway
     */
    @JvmName("klheijmoyefbbtgd")
    public suspend fun vpcEndpointType(`value`: VpcEndpointType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcEndpointType = mapped
    }

    /**
     * @param value The ID of the VPC.
     */
    @JvmName("ugmudockbjtuerxp")
    public suspend fun vpcId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcId = mapped
    }

    internal fun build(): VpcEndpointArgs = VpcEndpointArgs(
        policyDocument = policyDocument,
        privateDnsEnabled = privateDnsEnabled,
        routeTableIds = routeTableIds,
        securityGroupIds = securityGroupIds,
        serviceName = serviceName,
        subnetIds = subnetIds,
        vpcEndpointType = vpcEndpointType,
        vpcId = vpcId,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy