com.pulumi.aws.directconnect.kotlin.HostedPrivateVirtualInterface.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.directconnect.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [HostedPrivateVirtualInterface].
*/
@PulumiTagMarker
public class HostedPrivateVirtualInterfaceResourceBuilder internal constructor() {
public var name: String? = null
public var args: HostedPrivateVirtualInterfaceArgs = HostedPrivateVirtualInterfaceArgs()
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 HostedPrivateVirtualInterfaceArgsBuilder.() -> Unit) {
val builder = HostedPrivateVirtualInterfaceArgsBuilder()
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(): HostedPrivateVirtualInterface {
val builtJavaResource =
com.pulumi.aws.directconnect.HostedPrivateVirtualInterface(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return HostedPrivateVirtualInterface(builtJavaResource)
}
}
/**
* Provides a Direct Connect hosted private virtual interface resource. This resource represents the allocator's side of the hosted virtual interface.
* A hosted virtual interface is a virtual interface that is owned by another AWS account.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as aws from "@pulumi/aws";
* const foo = new aws.directconnect.HostedPrivateVirtualInterface("foo", {
* connectionId: "dxcon-zzzzzzzz",
* name: "vif-foo",
* vlan: 4094,
* addressFamily: "ipv4",
* bgpAsn: 65352,
* });
* ```
* ```python
* import pulumi
* import pulumi_aws as aws
* foo = aws.directconnect.HostedPrivateVirtualInterface("foo",
* connection_id="dxcon-zzzzzzzz",
* name="vif-foo",
* vlan=4094,
* address_family="ipv4",
* bgp_asn=65352)
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Aws = Pulumi.Aws;
* return await Deployment.RunAsync(() =>
* {
* var foo = new Aws.DirectConnect.HostedPrivateVirtualInterface("foo", new()
* {
* ConnectionId = "dxcon-zzzzzzzz",
* Name = "vif-foo",
* Vlan = 4094,
* AddressFamily = "ipv4",
* BgpAsn = 65352,
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directconnect"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := directconnect.NewHostedPrivateVirtualInterface(ctx, "foo", &directconnect.HostedPrivateVirtualInterfaceArgs{
* ConnectionId: pulumi.String("dxcon-zzzzzzzz"),
* Name: pulumi.String("vif-foo"),
* Vlan: pulumi.Int(4094),
* AddressFamily: pulumi.String("ipv4"),
* BgpAsn: pulumi.Int(65352),
* })
* 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.directconnect.HostedPrivateVirtualInterface;
* import com.pulumi.aws.directconnect.HostedPrivateVirtualInterfaceArgs;
* 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 foo = new HostedPrivateVirtualInterface("foo", HostedPrivateVirtualInterfaceArgs.builder()
* .connectionId("dxcon-zzzzzzzz")
* .name("vif-foo")
* .vlan(4094)
* .addressFamily("ipv4")
* .bgpAsn(65352)
* .build());
* }
* }
* ```
* ```yaml
* resources:
* foo:
* type: aws:directconnect:HostedPrivateVirtualInterface
* properties:
* connectionId: dxcon-zzzzzzzz
* name: vif-foo
* vlan: 4094
* addressFamily: ipv4
* bgpAsn: 65352
* ```
*
* ## Import
* Using `pulumi import`, import Direct Connect hosted private virtual interfaces using the VIF `id`. For example:
* ```sh
* $ pulumi import aws:directconnect/hostedPrivateVirtualInterface:HostedPrivateVirtualInterface test dxvif-33cc44dd
* ```
*/
public class HostedPrivateVirtualInterface internal constructor(
override val javaResource: com.pulumi.aws.directconnect.HostedPrivateVirtualInterface,
) : KotlinCustomResource(javaResource, HostedPrivateVirtualInterfaceMapper) {
/**
* The address family for the BGP peer. `ipv4 ` or `ipv6`.
*/
public val addressFamily: Output
get() = javaResource.addressFamily().applyValue({ args0 -> args0 })
/**
* The IPv4 CIDR address to use to send traffic to Amazon. Required for IPv4 BGP peers.
*/
public val amazonAddress: Output
get() = javaResource.amazonAddress().applyValue({ args0 -> args0 })
public val amazonSideAsn: Output
get() = javaResource.amazonSideAsn().applyValue({ args0 -> args0 })
/**
* The ARN of the virtual interface.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The Direct Connect endpoint on which the virtual interface terminates.
*/
public val awsDevice: Output
get() = javaResource.awsDevice().applyValue({ args0 -> args0 })
/**
* The autonomous system (AS) number for Border Gateway Protocol (BGP) configuration.
*/
public val bgpAsn: Output
get() = javaResource.bgpAsn().applyValue({ args0 -> args0 })
/**
* The authentication key for BGP configuration.
*/
public val bgpAuthKey: Output
get() = javaResource.bgpAuthKey().applyValue({ args0 -> args0 })
/**
* The ID of the Direct Connect connection (or LAG) on which to create the virtual interface.
*/
public val connectionId: Output
get() = javaResource.connectionId().applyValue({ args0 -> args0 })
/**
* The IPv4 CIDR destination address to which Amazon should send traffic. Required for IPv4 BGP peers.
*/
public val customerAddress: Output
get() = javaResource.customerAddress().applyValue({ args0 -> args0 })
/**
* Indicates whether jumbo frames (9001 MTU) are supported.
*/
public val jumboFrameCapable: Output
get() = javaResource.jumboFrameCapable().applyValue({ args0 -> args0 })
/**
* The maximum transmission unit (MTU) is the size, in bytes, of the largest permissible packet that can be passed over the connection. The MTU of a virtual private interface can be either `1500` or `9001` (jumbo frames). Default is `1500`.
*/
public val mtu: Output?
get() = javaResource.mtu().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* The name for the virtual interface.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* The AWS account that will own the new virtual interface.
*/
public val ownerAccountId: Output
get() = javaResource.ownerAccountId().applyValue({ args0 -> args0 })
/**
* The VLAN ID.
*/
public val vlan: Output
get() = javaResource.vlan().applyValue({ args0 -> args0 })
}
public object HostedPrivateVirtualInterfaceMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.aws.directconnect.HostedPrivateVirtualInterface::class == javaResource::class
override fun map(javaResource: Resource): HostedPrivateVirtualInterface =
HostedPrivateVirtualInterface(
javaResource as
com.pulumi.aws.directconnect.HostedPrivateVirtualInterface,
)
}
/**
* @see [HostedPrivateVirtualInterface].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [HostedPrivateVirtualInterface].
*/
public suspend fun hostedPrivateVirtualInterface(
name: String,
block: suspend HostedPrivateVirtualInterfaceResourceBuilder.() -> Unit,
): HostedPrivateVirtualInterface {
val builder = HostedPrivateVirtualInterfaceResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [HostedPrivateVirtualInterface].
* @param name The _unique_ name of the resulting resource.
*/
public fun hostedPrivateVirtualInterface(name: String): HostedPrivateVirtualInterface {
val builder = HostedPrivateVirtualInterfaceResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy