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

com.pulumi.aws.chime.kotlin.VoiceConnectorGroupArgs.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.chime.kotlin

import com.pulumi.aws.chime.VoiceConnectorGroupArgs.builder
import com.pulumi.aws.chime.kotlin.inputs.VoiceConnectorGroupConnectorArgs
import com.pulumi.aws.chime.kotlin.inputs.VoiceConnectorGroupConnectorArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Creates an Amazon Chime Voice Connector group under the administrator's AWS account. You can associate Amazon Chime Voice Connectors with the Amazon Chime Voice Connector group by including VoiceConnectorItems in the request.
 * You can include Amazon Chime Voice Connectors from different AWS Regions in your group. This creates a fault tolerant mechanism for fallback in case of availability events.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const vc1 = new aws.chime.VoiceConnector("vc1", {
 *     name: "connector-test-1",
 *     requireEncryption: true,
 *     awsRegion: "us-east-1",
 * });
 * const vc2 = new aws.chime.VoiceConnector("vc2", {
 *     name: "connector-test-2",
 *     requireEncryption: true,
 *     awsRegion: "us-west-2",
 * });
 * const group = new aws.chime.VoiceConnectorGroup("group", {
 *     name: "test-group",
 *     connectors: [
 *         {
 *             voiceConnectorId: vc1.id,
 *             priority: 1,
 *         },
 *         {
 *             voiceConnectorId: vc2.id,
 *             priority: 3,
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * vc1 = aws.chime.VoiceConnector("vc1",
 *     name="connector-test-1",
 *     require_encryption=True,
 *     aws_region="us-east-1")
 * vc2 = aws.chime.VoiceConnector("vc2",
 *     name="connector-test-2",
 *     require_encryption=True,
 *     aws_region="us-west-2")
 * group = aws.chime.VoiceConnectorGroup("group",
 *     name="test-group",
 *     connectors=[
 *         {
 *             "voice_connector_id": vc1.id,
 *             "priority": 1,
 *         },
 *         {
 *             "voice_connector_id": vc2.id,
 *             "priority": 3,
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var vc1 = new Aws.Chime.VoiceConnector("vc1", new()
 *     {
 *         Name = "connector-test-1",
 *         RequireEncryption = true,
 *         AwsRegion = "us-east-1",
 *     });
 *     var vc2 = new Aws.Chime.VoiceConnector("vc2", new()
 *     {
 *         Name = "connector-test-2",
 *         RequireEncryption = true,
 *         AwsRegion = "us-west-2",
 *     });
 *     var @group = new Aws.Chime.VoiceConnectorGroup("group", new()
 *     {
 *         Name = "test-group",
 *         Connectors = new[]
 *         {
 *             new Aws.Chime.Inputs.VoiceConnectorGroupConnectorArgs
 *             {
 *                 VoiceConnectorId = vc1.Id,
 *                 Priority = 1,
 *             },
 *             new Aws.Chime.Inputs.VoiceConnectorGroupConnectorArgs
 *             {
 *                 VoiceConnectorId = vc2.Id,
 *                 Priority = 3,
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/chime"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		vc1, err := chime.NewVoiceConnector(ctx, "vc1", &chime.VoiceConnectorArgs{
 * 			Name:              pulumi.String("connector-test-1"),
 * 			RequireEncryption: pulumi.Bool(true),
 * 			AwsRegion:         pulumi.String("us-east-1"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		vc2, err := chime.NewVoiceConnector(ctx, "vc2", &chime.VoiceConnectorArgs{
 * 			Name:              pulumi.String("connector-test-2"),
 * 			RequireEncryption: pulumi.Bool(true),
 * 			AwsRegion:         pulumi.String("us-west-2"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = chime.NewVoiceConnectorGroup(ctx, "group", &chime.VoiceConnectorGroupArgs{
 * 			Name: pulumi.String("test-group"),
 * 			Connectors: chime.VoiceConnectorGroupConnectorArray{
 * 				&chime.VoiceConnectorGroupConnectorArgs{
 * 					VoiceConnectorId: vc1.ID(),
 * 					Priority:         pulumi.Int(1),
 * 				},
 * 				&chime.VoiceConnectorGroupConnectorArgs{
 * 					VoiceConnectorId: vc2.ID(),
 * 					Priority:         pulumi.Int(3),
 * 				},
 * 			},
 * 		})
 * 		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.chime.VoiceConnector;
 * import com.pulumi.aws.chime.VoiceConnectorArgs;
 * import com.pulumi.aws.chime.VoiceConnectorGroup;
 * import com.pulumi.aws.chime.VoiceConnectorGroupArgs;
 * import com.pulumi.aws.chime.inputs.VoiceConnectorGroupConnectorArgs;
 * 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 vc1 = new VoiceConnector("vc1", VoiceConnectorArgs.builder()
 *             .name("connector-test-1")
 *             .requireEncryption(true)
 *             .awsRegion("us-east-1")
 *             .build());
 *         var vc2 = new VoiceConnector("vc2", VoiceConnectorArgs.builder()
 *             .name("connector-test-2")
 *             .requireEncryption(true)
 *             .awsRegion("us-west-2")
 *             .build());
 *         var group = new VoiceConnectorGroup("group", VoiceConnectorGroupArgs.builder()
 *             .name("test-group")
 *             .connectors(
 *                 VoiceConnectorGroupConnectorArgs.builder()
 *                     .voiceConnectorId(vc1.id())
 *                     .priority(1)
 *                     .build(),
 *                 VoiceConnectorGroupConnectorArgs.builder()
 *                     .voiceConnectorId(vc2.id())
 *                     .priority(3)
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   vc1:
 *     type: aws:chime:VoiceConnector
 *     properties:
 *       name: connector-test-1
 *       requireEncryption: true
 *       awsRegion: us-east-1
 *   vc2:
 *     type: aws:chime:VoiceConnector
 *     properties:
 *       name: connector-test-2
 *       requireEncryption: true
 *       awsRegion: us-west-2
 *   group:
 *     type: aws:chime:VoiceConnectorGroup
 *     properties:
 *       name: test-group
 *       connectors:
 *         - voiceConnectorId: ${vc1.id}
 *           priority: 1
 *         - voiceConnectorId: ${vc2.id}
 *           priority: 3
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Configuration Recorder using the name. For example:
 * ```sh
 * $ pulumi import aws:chime/voiceConnectorGroup:VoiceConnectorGroup default example
 * ```
 * @property connectors The Amazon Chime Voice Connectors to route inbound calls to.
 * @property name The name of the Amazon Chime Voice Connector group.
 */
public data class VoiceConnectorGroupArgs(
    public val connectors: Output>? = null,
    public val name: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.chime.VoiceConnectorGroupArgs =
        com.pulumi.aws.chime.VoiceConnectorGroupArgs.builder()
            .connectors(
                connectors?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VoiceConnectorGroupArgs].
 */
@PulumiTagMarker
public class VoiceConnectorGroupArgsBuilder internal constructor() {
    private var connectors: Output>? = null

    private var name: Output? = null

    /**
     * @param value The Amazon Chime Voice Connectors to route inbound calls to.
     */
    @JvmName("dgrodsyfxyvoolbb")
    public suspend fun connectors(`value`: Output>) {
        this.connectors = value
    }

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

    /**
     * @param values The Amazon Chime Voice Connectors to route inbound calls to.
     */
    @JvmName("qnhjnoggifcvfudq")
    public suspend fun connectors(values: List>) {
        this.connectors = Output.all(values)
    }

    /**
     * @param value The name of the Amazon Chime Voice Connector group.
     */
    @JvmName("rswohnuietsmceay")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The Amazon Chime Voice Connectors to route inbound calls to.
     */
    @JvmName("nubhcylhytdgunwk")
    public suspend fun connectors(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.connectors = mapped
    }

    /**
     * @param argument The Amazon Chime Voice Connectors to route inbound calls to.
     */
    @JvmName("ljrvnihficgoihyc")
    public suspend fun connectors(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VoiceConnectorGroupConnectorArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.connectors = mapped
    }

    /**
     * @param argument The Amazon Chime Voice Connectors to route inbound calls to.
     */
    @JvmName("ufxhvrngehlaoplm")
    public suspend fun connectors(vararg argument: suspend VoiceConnectorGroupConnectorArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VoiceConnectorGroupConnectorArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.connectors = mapped
    }

    /**
     * @param argument The Amazon Chime Voice Connectors to route inbound calls to.
     */
    @JvmName("bryojxtjteywycja")
    public suspend fun connectors(argument: suspend VoiceConnectorGroupConnectorArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            VoiceConnectorGroupConnectorArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.connectors = mapped
    }

    /**
     * @param values The Amazon Chime Voice Connectors to route inbound calls to.
     */
    @JvmName("lwojubunxaewiqye")
    public suspend fun connectors(vararg values: VoiceConnectorGroupConnectorArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.connectors = mapped
    }

    /**
     * @param value The name of the Amazon Chime Voice Connector group.
     */
    @JvmName("wbiytcoycgytlwdc")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    internal fun build(): VoiceConnectorGroupArgs = VoiceConnectorGroupArgs(
        connectors = connectors,
        name = name,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy