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

com.pulumi.aws.networkmanager.kotlin.TransitGatewayPeeringArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.networkmanager.kotlin

import com.pulumi.aws.networkmanager.TransitGatewayPeeringArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a peering connection between an AWS Cloud WAN core network and an AWS Transit Gateway.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.networkmanager.TransitGatewayPeering("example", {
 *     coreNetworkId: exampleAwsccNetworkmanagerCoreNetwork.id,
 *     transitGatewayArn: exampleAwsEc2TransitGateway.arn,
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.networkmanager.TransitGatewayPeering("example",
 *     core_network_id=example_awscc_networkmanager_core_network["id"],
 *     transit_gateway_arn=example_aws_ec2_transit_gateway["arn"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.NetworkManager.TransitGatewayPeering("example", new()
 *     {
 *         CoreNetworkId = exampleAwsccNetworkmanagerCoreNetwork.Id,
 *         TransitGatewayArn = exampleAwsEc2TransitGateway.Arn,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/networkmanager"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := networkmanager.NewTransitGatewayPeering(ctx, "example", &networkmanager.TransitGatewayPeeringArgs{
 * 			CoreNetworkId:     pulumi.Any(exampleAwsccNetworkmanagerCoreNetwork.Id),
 * 			TransitGatewayArn: pulumi.Any(exampleAwsEc2TransitGateway.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.networkmanager.TransitGatewayPeering;
 * import com.pulumi.aws.networkmanager.TransitGatewayPeeringArgs;
 * 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 TransitGatewayPeering("example", TransitGatewayPeeringArgs.builder()
 *             .coreNetworkId(exampleAwsccNetworkmanagerCoreNetwork.id())
 *             .transitGatewayArn(exampleAwsEc2TransitGateway.arn())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:networkmanager:TransitGatewayPeering
 *     properties:
 *       coreNetworkId: ${exampleAwsccNetworkmanagerCoreNetwork.id}
 *       transitGatewayArn: ${exampleAwsEc2TransitGateway.arn}
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import `aws_networkmanager_transit_gateway_peering` using the peering ID. For example:
 * ```sh
 * $ pulumi import aws:networkmanager/transitGatewayPeering:TransitGatewayPeering example peering-444555aaabbb11223
 * ```
 * @property coreNetworkId The ID of a core network.
 * @property tags Key-value tags for the peering. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 * @property transitGatewayArn The ARN of the transit gateway for the peering request.
 */
public data class TransitGatewayPeeringArgs(
    public val coreNetworkId: Output? = null,
    public val tags: Output>? = null,
    public val transitGatewayArn: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.networkmanager.TransitGatewayPeeringArgs =
        com.pulumi.aws.networkmanager.TransitGatewayPeeringArgs.builder()
            .coreNetworkId(coreNetworkId?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .transitGatewayArn(transitGatewayArn?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TransitGatewayPeeringArgs].
 */
@PulumiTagMarker
public class TransitGatewayPeeringArgsBuilder internal constructor() {
    private var coreNetworkId: Output? = null

    private var tags: Output>? = null

    private var transitGatewayArn: Output? = null

    /**
     * @param value The ID of a core network.
     */
    @JvmName("gmedsfvfxbgwwylw")
    public suspend fun coreNetworkId(`value`: Output) {
        this.coreNetworkId = value
    }

    /**
     * @param value Key-value tags for the peering. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("umelndfulgndxmfe")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ARN of the transit gateway for the peering request.
     */
    @JvmName("jghittruhdduburt")
    public suspend fun transitGatewayArn(`value`: Output) {
        this.transitGatewayArn = value
    }

    /**
     * @param value The ID of a core network.
     */
    @JvmName("ithgiuobqidtwbuw")
    public suspend fun coreNetworkId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.coreNetworkId = mapped
    }

    /**
     * @param value Key-value tags for the peering. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("coecyvskyrijxayy")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Key-value tags for the peering. If configured with a provider `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
     */
    @JvmName("fhbtpueynakprakv")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The ARN of the transit gateway for the peering request.
     */
    @JvmName("tqrdnwujeubkgrrj")
    public suspend fun transitGatewayArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transitGatewayArn = mapped
    }

    internal fun build(): TransitGatewayPeeringArgs = TransitGatewayPeeringArgs(
        coreNetworkId = coreNetworkId,
        tags = tags,
        transitGatewayArn = transitGatewayArn,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy