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

com.pulumi.aws.connect.kotlin.RoutingProfileArgs.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.connect.kotlin

import com.pulumi.aws.connect.RoutingProfileArgs.builder
import com.pulumi.aws.connect.kotlin.inputs.RoutingProfileMediaConcurrencyArgs
import com.pulumi.aws.connect.kotlin.inputs.RoutingProfileMediaConcurrencyArgsBuilder
import com.pulumi.aws.connect.kotlin.inputs.RoutingProfileQueueConfigArgs
import com.pulumi.aws.connect.kotlin.inputs.RoutingProfileQueueConfigArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an Amazon Connect Routing Profile resource. For more information see
 * [Amazon Connect: Getting Started](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-get-started.html)
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.connect.RoutingProfile("example", {
 *     instanceId: "aaaaaaaa-bbbb-cccc-dddd-111111111111",
 *     name: "example",
 *     defaultOutboundQueueId: "12345678-1234-1234-1234-123456789012",
 *     description: "example description",
 *     mediaConcurrencies: [{
 *         channel: "VOICE",
 *         concurrency: 1,
 *     }],
 *     queueConfigs: [{
 *         channel: "VOICE",
 *         delay: 2,
 *         priority: 1,
 *         queueId: "12345678-1234-1234-1234-123456789012",
 *     }],
 *     tags: {
 *         Name: "Example Routing Profile",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.connect.RoutingProfile("example",
 *     instance_id="aaaaaaaa-bbbb-cccc-dddd-111111111111",
 *     name="example",
 *     default_outbound_queue_id="12345678-1234-1234-1234-123456789012",
 *     description="example description",
 *     media_concurrencies=[{
 *         "channel": "VOICE",
 *         "concurrency": 1,
 *     }],
 *     queue_configs=[{
 *         "channel": "VOICE",
 *         "delay": 2,
 *         "priority": 1,
 *         "queue_id": "12345678-1234-1234-1234-123456789012",
 *     }],
 *     tags={
 *         "Name": "Example Routing Profile",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Connect.RoutingProfile("example", new()
 *     {
 *         InstanceId = "aaaaaaaa-bbbb-cccc-dddd-111111111111",
 *         Name = "example",
 *         DefaultOutboundQueueId = "12345678-1234-1234-1234-123456789012",
 *         Description = "example description",
 *         MediaConcurrencies = new[]
 *         {
 *             new Aws.Connect.Inputs.RoutingProfileMediaConcurrencyArgs
 *             {
 *                 Channel = "VOICE",
 *                 Concurrency = 1,
 *             },
 *         },
 *         QueueConfigs = new[]
 *         {
 *             new Aws.Connect.Inputs.RoutingProfileQueueConfigArgs
 *             {
 *                 Channel = "VOICE",
 *                 Delay = 2,
 *                 Priority = 1,
 *                 QueueId = "12345678-1234-1234-1234-123456789012",
 *             },
 *         },
 *         Tags =
 *         {
 *             { "Name", "Example Routing Profile" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/connect"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := connect.NewRoutingProfile(ctx, "example", &connect.RoutingProfileArgs{
 * 			InstanceId:             pulumi.String("aaaaaaaa-bbbb-cccc-dddd-111111111111"),
 * 			Name:                   pulumi.String("example"),
 * 			DefaultOutboundQueueId: pulumi.String("12345678-1234-1234-1234-123456789012"),
 * 			Description:            pulumi.String("example description"),
 * 			MediaConcurrencies: connect.RoutingProfileMediaConcurrencyArray{
 * 				&connect.RoutingProfileMediaConcurrencyArgs{
 * 					Channel:     pulumi.String("VOICE"),
 * 					Concurrency: pulumi.Int(1),
 * 				},
 * 			},
 * 			QueueConfigs: connect.RoutingProfileQueueConfigArray{
 * 				&connect.RoutingProfileQueueConfigArgs{
 * 					Channel:  pulumi.String("VOICE"),
 * 					Delay:    pulumi.Int(2),
 * 					Priority: pulumi.Int(1),
 * 					QueueId:  pulumi.String("12345678-1234-1234-1234-123456789012"),
 * 				},
 * 			},
 * 			Tags: pulumi.StringMap{
 * 				"Name": pulumi.String("Example Routing Profile"),
 * 			},
 * 		})
 * 		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.connect.RoutingProfile;
 * import com.pulumi.aws.connect.RoutingProfileArgs;
 * import com.pulumi.aws.connect.inputs.RoutingProfileMediaConcurrencyArgs;
 * import com.pulumi.aws.connect.inputs.RoutingProfileQueueConfigArgs;
 * 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 RoutingProfile("example", RoutingProfileArgs.builder()
 *             .instanceId("aaaaaaaa-bbbb-cccc-dddd-111111111111")
 *             .name("example")
 *             .defaultOutboundQueueId("12345678-1234-1234-1234-123456789012")
 *             .description("example description")
 *             .mediaConcurrencies(RoutingProfileMediaConcurrencyArgs.builder()
 *                 .channel("VOICE")
 *                 .concurrency(1)
 *                 .build())
 *             .queueConfigs(RoutingProfileQueueConfigArgs.builder()
 *                 .channel("VOICE")
 *                 .delay(2)
 *                 .priority(1)
 *                 .queueId("12345678-1234-1234-1234-123456789012")
 *                 .build())
 *             .tags(Map.of("Name", "Example Routing Profile"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:connect:RoutingProfile
 *     properties:
 *       instanceId: aaaaaaaa-bbbb-cccc-dddd-111111111111
 *       name: example
 *       defaultOutboundQueueId: 12345678-1234-1234-1234-123456789012
 *       description: example description
 *       mediaConcurrencies:
 *         - channel: VOICE
 *           concurrency: 1
 *       queueConfigs:
 *         - channel: VOICE
 *           delay: 2
 *           priority: 1
 *           queueId: 12345678-1234-1234-1234-123456789012
 *       tags:
 *         Name: Example Routing Profile
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import Amazon Connect Routing Profiles using the `instance_id` and `routing_profile_id` separated by a colon (`:`). For example:
 * ```sh
 * $ pulumi import aws:connect/routingProfile:RoutingProfile example f1288a1f-6193-445a-b47e-af739b2:c1d4e5f6-1b3c-1b3c-1b3c-c1d4e5f6c1d4e5
 * ```
 * @property defaultOutboundQueueId Specifies the default outbound queue for the Routing Profile.
 * @property description Specifies the description of the Routing Profile.
 * @property instanceId Specifies the identifier of the hosting Amazon Connect Instance.
 * @property mediaConcurrencies One or more `media_concurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `media_concurrencies` block is documented below.
 * @property name Specifies the name of the Routing Profile.
 * @property queueConfigs One or more `queue_configs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queue_configs` block is documented below.
 * @property tags Tags to apply to the Routing Profile. If configured with a provider
 * `default_tags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
 */
public data class RoutingProfileArgs(
    public val defaultOutboundQueueId: Output? = null,
    public val description: Output? = null,
    public val instanceId: Output? = null,
    public val mediaConcurrencies: Output>? = null,
    public val name: Output? = null,
    public val queueConfigs: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.connect.RoutingProfileArgs =
        com.pulumi.aws.connect.RoutingProfileArgs.builder()
            .defaultOutboundQueueId(defaultOutboundQueueId?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .mediaConcurrencies(
                mediaConcurrencies?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .name(name?.applyValue({ args0 -> args0 }))
            .queueConfigs(
                queueConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [RoutingProfileArgs].
 */
@PulumiTagMarker
public class RoutingProfileArgsBuilder internal constructor() {
    private var defaultOutboundQueueId: Output? = null

    private var description: Output? = null

    private var instanceId: Output? = null

    private var mediaConcurrencies: Output>? = null

    private var name: Output? = null

    private var queueConfigs: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value Specifies the default outbound queue for the Routing Profile.
     */
    @JvmName("nkindivsqykginvn")
    public suspend fun defaultOutboundQueueId(`value`: Output) {
        this.defaultOutboundQueueId = value
    }

    /**
     * @param value Specifies the description of the Routing Profile.
     */
    @JvmName("vyycdjquvotfmceb")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Specifies the identifier of the hosting Amazon Connect Instance.
     */
    @JvmName("nhygbdgteoqyaxcq")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

    /**
     * @param value One or more `media_concurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `media_concurrencies` block is documented below.
     */
    @JvmName("busppdvpfitihjic")
    public suspend fun mediaConcurrencies(`value`: Output>) {
        this.mediaConcurrencies = value
    }

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

    /**
     * @param values One or more `media_concurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `media_concurrencies` block is documented below.
     */
    @JvmName("tdeuexebnyirvhkl")
    public suspend fun mediaConcurrencies(values: List>) {
        this.mediaConcurrencies = Output.all(values)
    }

    /**
     * @param value Specifies the name of the Routing Profile.
     */
    @JvmName("ftieusmqssdvlhmv")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value One or more `queue_configs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queue_configs` block is documented below.
     */
    @JvmName("aommyykrxstxxkfa")
    public suspend fun queueConfigs(`value`: Output>) {
        this.queueConfigs = value
    }

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

    /**
     * @param values One or more `queue_configs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queue_configs` block is documented below.
     */
    @JvmName("hfsmimntjehrvqnk")
    public suspend fun queueConfigs(values: List>) {
        this.queueConfigs = Output.all(values)
    }

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

    /**
     * @param value Specifies the default outbound queue for the Routing Profile.
     */
    @JvmName("deedqjosjrpycxcc")
    public suspend fun defaultOutboundQueueId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultOutboundQueueId = mapped
    }

    /**
     * @param value Specifies the description of the Routing Profile.
     */
    @JvmName("belqvlieslbqliac")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Specifies the identifier of the hosting Amazon Connect Instance.
     */
    @JvmName("ypvxlhasgkuubbhp")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

    /**
     * @param value One or more `media_concurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `media_concurrencies` block is documented below.
     */
    @JvmName("bkghcmiwjurlntra")
    public suspend fun mediaConcurrencies(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mediaConcurrencies = mapped
    }

    /**
     * @param argument One or more `media_concurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `media_concurrencies` block is documented below.
     */
    @JvmName("xblkesfuaqavuweq")
    public suspend fun mediaConcurrencies(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RoutingProfileMediaConcurrencyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.mediaConcurrencies = mapped
    }

    /**
     * @param argument One or more `media_concurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `media_concurrencies` block is documented below.
     */
    @JvmName("hgfxwfkqxvajhfev")
    public suspend fun mediaConcurrencies(vararg argument: suspend RoutingProfileMediaConcurrencyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RoutingProfileMediaConcurrencyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.mediaConcurrencies = mapped
    }

    /**
     * @param argument One or more `media_concurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `media_concurrencies` block is documented below.
     */
    @JvmName("ctrwkdxnpkclxtdm")
    public suspend fun mediaConcurrencies(argument: suspend RoutingProfileMediaConcurrencyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RoutingProfileMediaConcurrencyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.mediaConcurrencies = mapped
    }

    /**
     * @param values One or more `media_concurrencies` blocks that specify the channels that agents can handle in the Contact Control Panel (CCP) for this Routing Profile. The `media_concurrencies` block is documented below.
     */
    @JvmName("gdnfhlndnidgqyuh")
    public suspend fun mediaConcurrencies(vararg values: RoutingProfileMediaConcurrencyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mediaConcurrencies = mapped
    }

    /**
     * @param value Specifies the name of the Routing Profile.
     */
    @JvmName("hmqmedtgathwkotg")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value One or more `queue_configs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queue_configs` block is documented below.
     */
    @JvmName("hgdxklonjrvyemaq")
    public suspend fun queueConfigs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.queueConfigs = mapped
    }

    /**
     * @param argument One or more `queue_configs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queue_configs` block is documented below.
     */
    @JvmName("ihcplntvnnfjbgrp")
    public suspend fun queueConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RoutingProfileQueueConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.queueConfigs = mapped
    }

    /**
     * @param argument One or more `queue_configs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queue_configs` block is documented below.
     */
    @JvmName("rmadoohstaiwkxov")
    public suspend fun queueConfigs(vararg argument: suspend RoutingProfileQueueConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RoutingProfileQueueConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.queueConfigs = mapped
    }

    /**
     * @param argument One or more `queue_configs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queue_configs` block is documented below.
     */
    @JvmName("xfnaflogvjukvcss")
    public suspend fun queueConfigs(argument: suspend RoutingProfileQueueConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            RoutingProfileQueueConfigArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.queueConfigs = mapped
    }

    /**
     * @param values One or more `queue_configs` blocks that specify the inbound queues associated with the routing profile. If no queue is added, the agent only can make outbound calls. The `queue_configs` block is documented below.
     */
    @JvmName("eblndochobkyppvr")
    public suspend fun queueConfigs(vararg values: RoutingProfileQueueConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.queueConfigs = mapped
    }

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

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

    internal fun build(): RoutingProfileArgs = RoutingProfileArgs(
        defaultOutboundQueueId = defaultOutboundQueueId,
        description = description,
        instanceId = instanceId,
        mediaConcurrencies = mediaConcurrencies,
        name = name,
        queueConfigs = queueConfigs,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy