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

com.pulumi.aws.pinpoint.kotlin.Smsvoicev2PhoneNumberArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.pinpoint.kotlin

import com.pulumi.aws.pinpoint.Smsvoicev2PhoneNumberArgs.builder
import com.pulumi.aws.pinpoint.kotlin.inputs.Smsvoicev2PhoneNumberTimeoutsArgs
import com.pulumi.aws.pinpoint.kotlin.inputs.Smsvoicev2PhoneNumberTimeoutsArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages an AWS End User Messaging SMS phone number.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as aws from "@pulumi/aws";
 * const example = new aws.pinpoint.Smsvoicev2PhoneNumber("example", {
 *     isoCountryCode: "US",
 *     messageType: "TRANSACTIONAL",
 *     numberType: "TOLL_FREE",
 *     numberCapabilities: ["SMS"],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_aws as aws
 * example = aws.pinpoint.Smsvoicev2PhoneNumber("example",
 *     iso_country_code="US",
 *     message_type="TRANSACTIONAL",
 *     number_type="TOLL_FREE",
 *     number_capabilities=["SMS"])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Aws = Pulumi.Aws;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Aws.Pinpoint.Smsvoicev2PhoneNumber("example", new()
 *     {
 *         IsoCountryCode = "US",
 *         MessageType = "TRANSACTIONAL",
 *         NumberType = "TOLL_FREE",
 *         NumberCapabilities = new[]
 *         {
 *             "SMS",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/pinpoint"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := pinpoint.NewSmsvoicev2PhoneNumber(ctx, "example", &pinpoint.Smsvoicev2PhoneNumberArgs{
 * 			IsoCountryCode: pulumi.String("US"),
 * 			MessageType:    pulumi.String("TRANSACTIONAL"),
 * 			NumberType:     pulumi.String("TOLL_FREE"),
 * 			NumberCapabilities: pulumi.StringArray{
 * 				pulumi.String("SMS"),
 * 			},
 * 		})
 * 		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.pinpoint.Smsvoicev2PhoneNumber;
 * import com.pulumi.aws.pinpoint.Smsvoicev2PhoneNumberArgs;
 * 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 Smsvoicev2PhoneNumber("example", Smsvoicev2PhoneNumberArgs.builder()
 *             .isoCountryCode("US")
 *             .messageType("TRANSACTIONAL")
 *             .numberType("TOLL_FREE")
 *             .numberCapabilities("SMS")
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: aws:pinpoint:Smsvoicev2PhoneNumber
 *     properties:
 *       isoCountryCode: US
 *       messageType: TRANSACTIONAL
 *       numberType: TOLL_FREE
 *       numberCapabilities:
 *         - SMS
 * ```
 * 
 * ## Import
 * Using `pulumi import`, import phone numbers using the `id`. For example:
 * ```sh
 * $ pulumi import aws:pinpoint/smsvoicev2PhoneNumber:Smsvoicev2PhoneNumber example phone-abcdef0123456789abcdef0123456789
 * ```
 * @property deletionProtectionEnabled By default this is set to `false`. When set to true the phone number can’t be deleted.
 * @property isoCountryCode The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
 * @property messageType The type of message. Valid values are `TRANSACTIONAL` for messages that are critical or time-sensitive and `PROMOTIONAL` for messages that aren’t critical or time-sensitive.
 * @property numberCapabilities Describes if the origination identity can be used for text messages, voice calls or both. valid values are `SMS` and `VOICE`.
 * @property numberType The type of phone number to request. Possible values are `LONG_CODE`, `TOLL_FREE`, `TEN_DLC`, or `SIMULATOR`.
 * @property optOutListName The name of the opt-out list to associate with the phone number.
 * @property registrationId Use this field to attach your phone number for an external registration process.
 * @property selfManagedOptOutsEnabled When set to `false` an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the opt-out list. When set to true you’re responsible for responding to HELP and STOP requests. You’re also responsible for tracking and honoring opt-out request.
 * @property tags
 * @property timeouts
 * @property twoWayChannelArn The Amazon Resource Name (ARN) of the two way channel.
 * @property twoWayChannelEnabled By default this is set to `false`. When set to `true` you can receive incoming text messages from your end recipients.
 */
public data class Smsvoicev2PhoneNumberArgs(
    public val deletionProtectionEnabled: Output? = null,
    public val isoCountryCode: Output? = null,
    public val messageType: Output? = null,
    public val numberCapabilities: Output>? = null,
    public val numberType: Output? = null,
    public val optOutListName: Output? = null,
    public val registrationId: Output? = null,
    public val selfManagedOptOutsEnabled: Output? = null,
    public val tags: Output>? = null,
    public val timeouts: Output? = null,
    public val twoWayChannelArn: Output? = null,
    public val twoWayChannelEnabled: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.pinpoint.Smsvoicev2PhoneNumberArgs =
        com.pulumi.aws.pinpoint.Smsvoicev2PhoneNumberArgs.builder()
            .deletionProtectionEnabled(deletionProtectionEnabled?.applyValue({ args0 -> args0 }))
            .isoCountryCode(isoCountryCode?.applyValue({ args0 -> args0 }))
            .messageType(messageType?.applyValue({ args0 -> args0 }))
            .numberCapabilities(numberCapabilities?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .numberType(numberType?.applyValue({ args0 -> args0 }))
            .optOutListName(optOutListName?.applyValue({ args0 -> args0 }))
            .registrationId(registrationId?.applyValue({ args0 -> args0 }))
            .selfManagedOptOutsEnabled(selfManagedOptOutsEnabled?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .timeouts(timeouts?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .twoWayChannelArn(twoWayChannelArn?.applyValue({ args0 -> args0 }))
            .twoWayChannelEnabled(twoWayChannelEnabled?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [Smsvoicev2PhoneNumberArgs].
 */
@PulumiTagMarker
public class Smsvoicev2PhoneNumberArgsBuilder internal constructor() {
    private var deletionProtectionEnabled: Output? = null

    private var isoCountryCode: Output? = null

    private var messageType: Output? = null

    private var numberCapabilities: Output>? = null

    private var numberType: Output? = null

    private var optOutListName: Output? = null

    private var registrationId: Output? = null

    private var selfManagedOptOutsEnabled: Output? = null

    private var tags: Output>? = null

    private var timeouts: Output? = null

    private var twoWayChannelArn: Output? = null

    private var twoWayChannelEnabled: Output? = null

    /**
     * @param value By default this is set to `false`. When set to true the phone number can’t be deleted.
     */
    @JvmName("cijtnyljoeywofuk")
    public suspend fun deletionProtectionEnabled(`value`: Output) {
        this.deletionProtectionEnabled = value
    }

    /**
     * @param value The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
     */
    @JvmName("toupgabxmqlducjn")
    public suspend fun isoCountryCode(`value`: Output) {
        this.isoCountryCode = value
    }

    /**
     * @param value The type of message. Valid values are `TRANSACTIONAL` for messages that are critical or time-sensitive and `PROMOTIONAL` for messages that aren’t critical or time-sensitive.
     */
    @JvmName("tptxjmkssespchdp")
    public suspend fun messageType(`value`: Output) {
        this.messageType = value
    }

    /**
     * @param value Describes if the origination identity can be used for text messages, voice calls or both. valid values are `SMS` and `VOICE`.
     */
    @JvmName("ssvyhettjyqfevwi")
    public suspend fun numberCapabilities(`value`: Output>) {
        this.numberCapabilities = value
    }

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

    /**
     * @param values Describes if the origination identity can be used for text messages, voice calls or both. valid values are `SMS` and `VOICE`.
     */
    @JvmName("hnrdwekywbyalerw")
    public suspend fun numberCapabilities(values: List>) {
        this.numberCapabilities = Output.all(values)
    }

    /**
     * @param value The type of phone number to request. Possible values are `LONG_CODE`, `TOLL_FREE`, `TEN_DLC`, or `SIMULATOR`.
     */
    @JvmName("rqwhpddajvbitgka")
    public suspend fun numberType(`value`: Output) {
        this.numberType = value
    }

    /**
     * @param value The name of the opt-out list to associate with the phone number.
     */
    @JvmName("phabidltvuldvedm")
    public suspend fun optOutListName(`value`: Output) {
        this.optOutListName = value
    }

    /**
     * @param value Use this field to attach your phone number for an external registration process.
     */
    @JvmName("qckplirrclcdoioa")
    public suspend fun registrationId(`value`: Output) {
        this.registrationId = value
    }

    /**
     * @param value When set to `false` an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the opt-out list. When set to true you’re responsible for responding to HELP and STOP requests. You’re also responsible for tracking and honoring opt-out request.
     */
    @JvmName("qrikoldtwawpvyds")
    public suspend fun selfManagedOptOutsEnabled(`value`: Output) {
        this.selfManagedOptOutsEnabled = value
    }

    /**
     * @param value
     */
    @JvmName("rgcbxhjcafysjqha")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value
     */
    @JvmName("ttdvfcsaraqsoofq")
    public suspend fun timeouts(`value`: Output) {
        this.timeouts = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the two way channel.
     */
    @JvmName("pwyhllwqutklvkej")
    public suspend fun twoWayChannelArn(`value`: Output) {
        this.twoWayChannelArn = value
    }

    /**
     * @param value By default this is set to `false`. When set to `true` you can receive incoming text messages from your end recipients.
     */
    @JvmName("unvrlqnuuregdgol")
    public suspend fun twoWayChannelEnabled(`value`: Output) {
        this.twoWayChannelEnabled = value
    }

    /**
     * @param value By default this is set to `false`. When set to true the phone number can’t be deleted.
     */
    @JvmName("whwpbesmeukjqchv")
    public suspend fun deletionProtectionEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deletionProtectionEnabled = mapped
    }

    /**
     * @param value The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
     */
    @JvmName("oxknmvmrvvgttgeq")
    public suspend fun isoCountryCode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isoCountryCode = mapped
    }

    /**
     * @param value The type of message. Valid values are `TRANSACTIONAL` for messages that are critical or time-sensitive and `PROMOTIONAL` for messages that aren’t critical or time-sensitive.
     */
    @JvmName("gltarurnwrvdcaql")
    public suspend fun messageType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.messageType = mapped
    }

    /**
     * @param value Describes if the origination identity can be used for text messages, voice calls or both. valid values are `SMS` and `VOICE`.
     */
    @JvmName("fmuyuuxjyaanwrlr")
    public suspend fun numberCapabilities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numberCapabilities = mapped
    }

    /**
     * @param values Describes if the origination identity can be used for text messages, voice calls or both. valid values are `SMS` and `VOICE`.
     */
    @JvmName("wmqxgmflgitqptic")
    public suspend fun numberCapabilities(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.numberCapabilities = mapped
    }

    /**
     * @param value The type of phone number to request. Possible values are `LONG_CODE`, `TOLL_FREE`, `TEN_DLC`, or `SIMULATOR`.
     */
    @JvmName("oqrorwhpsoyupbmx")
    public suspend fun numberType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numberType = mapped
    }

    /**
     * @param value The name of the opt-out list to associate with the phone number.
     */
    @JvmName("xxrdypcauirdhnlf")
    public suspend fun optOutListName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.optOutListName = mapped
    }

    /**
     * @param value Use this field to attach your phone number for an external registration process.
     */
    @JvmName("racpftlmhmkugjub")
    public suspend fun registrationId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registrationId = mapped
    }

    /**
     * @param value When set to `false` an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the opt-out list. When set to true you’re responsible for responding to HELP and STOP requests. You’re also responsible for tracking and honoring opt-out request.
     */
    @JvmName("ogcamnawwtnxfhaa")
    public suspend fun selfManagedOptOutsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.selfManagedOptOutsEnabled = mapped
    }

    /**
     * @param value
     */
    @JvmName("qbllmaimkobimwqp")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values
     */
    @JvmName("yxnifrwiccnruhdl")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value
     */
    @JvmName("wygqtiocnlqwlohf")
    public suspend fun timeouts(`value`: Smsvoicev2PhoneNumberTimeoutsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeouts = mapped
    }

    /**
     * @param argument
     */
    @JvmName("tmpcepcgfdlmtprj")
    public suspend fun timeouts(argument: suspend Smsvoicev2PhoneNumberTimeoutsArgsBuilder.() -> Unit) {
        val toBeMapped = Smsvoicev2PhoneNumberTimeoutsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.timeouts = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the two way channel.
     */
    @JvmName("lyxgxvxqqcggqplg")
    public suspend fun twoWayChannelArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.twoWayChannelArn = mapped
    }

    /**
     * @param value By default this is set to `false`. When set to `true` you can receive incoming text messages from your end recipients.
     */
    @JvmName("kocegjnscbkpdsfk")
    public suspend fun twoWayChannelEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.twoWayChannelEnabled = mapped
    }

    internal fun build(): Smsvoicev2PhoneNumberArgs = Smsvoicev2PhoneNumberArgs(
        deletionProtectionEnabled = deletionProtectionEnabled,
        isoCountryCode = isoCountryCode,
        messageType = messageType,
        numberCapabilities = numberCapabilities,
        numberType = numberType,
        optOutListName = optOutListName,
        registrationId = registrationId,
        selfManagedOptOutsEnabled = selfManagedOptOutsEnabled,
        tags = tags,
        timeouts = timeouts,
        twoWayChannelArn = twoWayChannelArn,
        twoWayChannelEnabled = twoWayChannelEnabled,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy