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

com.pulumi.azure.voice.kotlin.ServicesCommunicationsGatewayTestLine.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.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.voice.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map

/**
 * Builder for [ServicesCommunicationsGatewayTestLine].
 */
@PulumiTagMarker
public class ServicesCommunicationsGatewayTestLineResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ServicesCommunicationsGatewayTestLineArgs =
        ServicesCommunicationsGatewayTestLineArgs()

    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 ServicesCommunicationsGatewayTestLineArgsBuilder.() -> Unit) {
        val builder = ServicesCommunicationsGatewayTestLineArgsBuilder()
        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(): ServicesCommunicationsGatewayTestLine {
        val builtJavaResource =
            com.pulumi.azure.voice.ServicesCommunicationsGatewayTestLine(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return ServicesCommunicationsGatewayTestLine(builtJavaResource)
    }
}

/**
 * Manages a Voice Services Communications Gateway Test Line.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Central US",
 * });
 * const exampleServicesCommunicationsGateway = new azure.voice.ServicesCommunicationsGateway("example", {
 *     name: "example-vcg",
 *     resourceGroupName: example.name,
 * });
 * const exampleServicesCommunicationsGatewayTestLine = new azure.voice.ServicesCommunicationsGatewayTestLine("example", {
 *     name: "example-vtl",
 *     location: "West Central US",
 *     voiceServicesCommunicationsGatewayId: exampleServicesCommunicationsGateway.id,
 *     phoneNumber: "123456789",
 *     purpose: "Automated",
 *     tags: {
 *         key: "value",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Central US")
 * example_services_communications_gateway = azure.voice.ServicesCommunicationsGateway("example",
 *     name="example-vcg",
 *     resource_group_name=example.name)
 * example_services_communications_gateway_test_line = azure.voice.ServicesCommunicationsGatewayTestLine("example",
 *     name="example-vtl",
 *     location="West Central US",
 *     voice_services_communications_gateway_id=example_services_communications_gateway.id,
 *     phone_number="123456789",
 *     purpose="Automated",
 *     tags={
 *         "key": "value",
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Central US",
 *     });
 *     var exampleServicesCommunicationsGateway = new Azure.Voice.ServicesCommunicationsGateway("example", new()
 *     {
 *         Name = "example-vcg",
 *         ResourceGroupName = example.Name,
 *     });
 *     var exampleServicesCommunicationsGatewayTestLine = new Azure.Voice.ServicesCommunicationsGatewayTestLine("example", new()
 *     {
 *         Name = "example-vtl",
 *         Location = "West Central US",
 *         VoiceServicesCommunicationsGatewayId = exampleServicesCommunicationsGateway.Id,
 *         PhoneNumber = "123456789",
 *         Purpose = "Automated",
 *         Tags =
 *         {
 *             { "key", "value" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/voice"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Central US"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleServicesCommunicationsGateway, err := voice.NewServicesCommunicationsGateway(ctx, "example", &voice.ServicesCommunicationsGatewayArgs{
 * 			Name:              pulumi.String("example-vcg"),
 * 			ResourceGroupName: example.Name,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = voice.NewServicesCommunicationsGatewayTestLine(ctx, "example", &voice.ServicesCommunicationsGatewayTestLineArgs{
 * 			Name:                                 pulumi.String("example-vtl"),
 * 			Location:                             pulumi.String("West Central US"),
 * 			VoiceServicesCommunicationsGatewayId: exampleServicesCommunicationsGateway.ID(),
 * 			PhoneNumber:                          pulumi.String("123456789"),
 * 			Purpose:                              pulumi.String("Automated"),
 * 			Tags: pulumi.StringMap{
 * 				"key": pulumi.String("value"),
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.voice.ServicesCommunicationsGateway;
 * import com.pulumi.azure.voice.ServicesCommunicationsGatewayArgs;
 * import com.pulumi.azure.voice.ServicesCommunicationsGatewayTestLine;
 * import com.pulumi.azure.voice.ServicesCommunicationsGatewayTestLineArgs;
 * 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 ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Central US")
 *             .build());
 *         var exampleServicesCommunicationsGateway = new ServicesCommunicationsGateway("exampleServicesCommunicationsGateway", ServicesCommunicationsGatewayArgs.builder()
 *             .name("example-vcg")
 *             .resourceGroupName(example.name())
 *             .build());
 *         var exampleServicesCommunicationsGatewayTestLine = new ServicesCommunicationsGatewayTestLine("exampleServicesCommunicationsGatewayTestLine", ServicesCommunicationsGatewayTestLineArgs.builder()
 *             .name("example-vtl")
 *             .location("West Central US")
 *             .voiceServicesCommunicationsGatewayId(exampleServicesCommunicationsGateway.id())
 *             .phoneNumber("123456789")
 *             .purpose("Automated")
 *             .tags(Map.of("key", "value"))
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Central US
 *   exampleServicesCommunicationsGateway:
 *     type: azure:voice:ServicesCommunicationsGateway
 *     name: example
 *     properties:
 *       name: example-vcg
 *       resourceGroupName: ${example.name}
 *   exampleServicesCommunicationsGatewayTestLine:
 *     type: azure:voice:ServicesCommunicationsGatewayTestLine
 *     name: example
 *     properties:
 *       name: example-vtl
 *       location: West Central US
 *       voiceServicesCommunicationsGatewayId: ${exampleServicesCommunicationsGateway.id}
 *       phoneNumber: '123456789'
 *       purpose: Automated
 *       tags:
 *         key: value
 * ```
 * 
 * ## Import
 * Voice Services Communications Gateway Test Line can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:voice/servicesCommunicationsGatewayTestLine:ServicesCommunicationsGatewayTestLine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.VoiceServices/communicationsGateways/communicationsGateway1/testLines/testLine1
 * ```
 */
public class ServicesCommunicationsGatewayTestLine internal constructor(
    override val javaResource: com.pulumi.azure.voice.ServicesCommunicationsGatewayTestLine,
) : KotlinCustomResource(javaResource, ServicesCommunicationsGatewayTestLineMapper) {
    /**
     * Specifies the Azure Region where the Voice Services Communications Gateway Test Line should exist. Changing this forces a new resource to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * Specifies the name which should be used for this Voice Services Communications Gateway Test Line. Changing this forces a new resource to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Specifies the phone number.
     */
    public val phoneNumber: Output
        get() = javaResource.phoneNumber().applyValue({ args0 -> args0 })

    /**
     * The purpose of the Voice Services Communications Gateway Test Line. Possible values are `Automated` or `Manual`.
     */
    public val purpose: Output
        get() = javaResource.purpose().applyValue({ args0 -> args0 })

    /**
     * A mapping of tags which should be assigned to the Voice Services Communications Gateway Test Line.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * Specifies the ID of the Voice Services Communications Gateway. Changing this forces a new resource to be created.
     */
    public val voiceServicesCommunicationsGatewayId: Output
        get() = javaResource.voiceServicesCommunicationsGatewayId().applyValue({ args0 -> args0 })
}

public object ServicesCommunicationsGatewayTestLineMapper :
    ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.voice.ServicesCommunicationsGatewayTestLine::class == javaResource::class

    override fun map(javaResource: Resource): ServicesCommunicationsGatewayTestLine =
        ServicesCommunicationsGatewayTestLine(
            javaResource as
                com.pulumi.azure.voice.ServicesCommunicationsGatewayTestLine,
        )
}

/**
 * @see [ServicesCommunicationsGatewayTestLine].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [ServicesCommunicationsGatewayTestLine].
 */
public suspend fun servicesCommunicationsGatewayTestLine(
    name: String,
    block: suspend ServicesCommunicationsGatewayTestLineResourceBuilder.() -> Unit,
): ServicesCommunicationsGatewayTestLine {
    val builder = ServicesCommunicationsGatewayTestLineResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [ServicesCommunicationsGatewayTestLine].
 * @param name The _unique_ name of the resulting resource.
 */
public fun servicesCommunicationsGatewayTestLine(name: String): ServicesCommunicationsGatewayTestLine {
    val builder = ServicesCommunicationsGatewayTestLineResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy