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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin
import com.pulumi.awsnative.ec2.kotlin.enums.VpcEndpointType
import com.pulumi.awsnative.ec2.kotlin.enums.VpcEndpointType.Companion.toKotlin
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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [VpcEndpoint].
*/
@PulumiTagMarker
public class VpcEndpointResourceBuilder internal constructor() {
public var name: String? = null
public var args: VpcEndpointArgs = VpcEndpointArgs()
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 VpcEndpointArgsBuilder.() -> Unit) {
val builder = VpcEndpointArgsBuilder()
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(): VpcEndpoint {
val builtJavaResource = com.pulumi.awsnative.ec2.VpcEndpoint(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return VpcEndpoint(builtJavaResource)
}
}
/**
* 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 , 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.
*/
public class VpcEndpoint internal constructor(
override val javaResource: com.pulumi.awsnative.ec2.VpcEndpoint,
) : KotlinCustomResource(javaResource, VpcEndpointMapper) {
/**
* The ID of the VPC endpoint.
*/
public val awsId: Output
get() = javaResource.awsId().applyValue({ args0 -> args0 })
/**
* The date and time the VPC endpoint was created. For example: `Fri Sep 28 23:34:36 UTC 2018.`
*/
public val creationTimestamp: Output
get() = javaResource.creationTimestamp().applyValue({ args0 -> args0 })
/**
* (Interface endpoints) The DNS entries for the endpoint. Each entry is a combination of the hosted zone ID and the DNS name. The entries are ordered as follows: regional public DNS, zonal public DNS, private DNS, and wildcard DNS. This order is not enforced for AWS Marketplace services.
* The following is an example. In the first entry, the hosted zone ID is Z1HUB23UULQXV and the DNS name is vpce-01abc23456de78f9g-12abccd3.ec2.us-east-1.vpce.amazonaws.com.
* ["Z1HUB23UULQXV:vpce-01abc23456de78f9g-12abccd3.ec2.us-east-1.vpce.amazonaws.com", "Z1HUB23UULQXV:vpce-01abc23456de78f9g-12abccd3-us-east-1a.ec2.us-east-1.vpce.amazonaws.com", "Z1C12344VYDITB0:ec2.us-east-1.amazonaws.com"]
* If you update the `PrivateDnsEnabled` or `SubnetIds` properties, the DNS entries in the list will change.
*/
public val dnsEntries: Output>
get() = javaResource.dnsEntries().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* (Interface endpoints) The network interface IDs. If you update the `PrivateDnsEnabled` or `SubnetIds` properties, the items in this list might change.
*/
public val networkInterfaceIds: Output>
get() = javaResource.networkInterfaceIds().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* 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.
*/
public val policyDocument: Output?
get() = javaResource.policyDocument().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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``
*/
public val privateDnsEnabled: Output?
get() = javaResource.privateDnsEnabled().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The IDs of the route tables. Routing is supported only for gateway endpoints.
*/
public val routeTableIds: Output>?
get() = javaResource.routeTableIds().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* 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.
*/
public val securityGroupIds: Output>?
get() = javaResource.securityGroupIds().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* The name of the endpoint service.
*/
public val serviceName: Output
get() = javaResource.serviceName().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val subnetIds: Output>?
get() = javaResource.subnetIds().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* The type of endpoint.
* Default: Gateway
*/
public val vpcEndpointType: Output?
get() = javaResource.vpcEndpointType().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
}).orElse(null)
})
/**
* The ID of the VPC.
*/
public val vpcId: Output
get() = javaResource.vpcId().applyValue({ args0 -> args0 })
}
public object VpcEndpointMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.ec2.VpcEndpoint::class == javaResource::class
override fun map(javaResource: Resource): VpcEndpoint = VpcEndpoint(
javaResource as
com.pulumi.awsnative.ec2.VpcEndpoint,
)
}
/**
* @see [VpcEndpoint].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [VpcEndpoint].
*/
public suspend fun vpcEndpoint(name: String, block: suspend VpcEndpointResourceBuilder.() -> Unit): VpcEndpoint {
val builder = VpcEndpointResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [VpcEndpoint].
* @param name The _unique_ name of the resulting resource.
*/
public fun vpcEndpoint(name: String): VpcEndpoint {
val builder = VpcEndpointResourceBuilder()
builder.name(name)
return builder.build()
}