com.pulumi.aws.pinpoint.kotlin.Smsvoicev2PhoneNumber.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.pinpoint.kotlin
import com.pulumi.aws.pinpoint.kotlin.outputs.Smsvoicev2PhoneNumberTimeouts
import com.pulumi.aws.pinpoint.kotlin.outputs.Smsvoicev2PhoneNumberTimeouts.Companion.toKotlin
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.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
/**
* Builder for [Smsvoicev2PhoneNumber].
*/
@PulumiTagMarker
public class Smsvoicev2PhoneNumberResourceBuilder internal constructor() {
public var name: String? = null
public var args: Smsvoicev2PhoneNumberArgs = Smsvoicev2PhoneNumberArgs()
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 Smsvoicev2PhoneNumberArgsBuilder.() -> Unit) {
val builder = Smsvoicev2PhoneNumberArgsBuilder()
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(): Smsvoicev2PhoneNumber {
val builtJavaResource = com.pulumi.aws.pinpoint.Smsvoicev2PhoneNumber(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Smsvoicev2PhoneNumber(builtJavaResource)
}
}
/**
* 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
* ```
*/
public class Smsvoicev2PhoneNumber internal constructor(
override val javaResource: com.pulumi.aws.pinpoint.Smsvoicev2PhoneNumber,
) : KotlinCustomResource(javaResource, Smsvoicev2PhoneNumberMapper) {
/**
* ARN of the phone number.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* By default this is set to `false`. When set to true the phone number can’t be deleted.
*/
public val deletionProtectionEnabled: Output
get() = javaResource.deletionProtectionEnabled().applyValue({ args0 -> args0 })
/**
* The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
*/
public val isoCountryCode: Output
get() = javaResource.isoCountryCode().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val messageType: Output
get() = javaResource.messageType().applyValue({ args0 -> args0 })
/**
* The monthly price, in US dollars, to lease the phone number.
*/
public val monthlyLeasingPrice: Output
get() = javaResource.monthlyLeasingPrice().applyValue({ args0 -> args0 })
/**
* Describes if the origination identity can be used for text messages, voice calls or both. valid values are `SMS` and `VOICE`.
*/
public val numberCapabilities: Output>
get() = javaResource.numberCapabilities().applyValue({ args0 -> args0.map({ args0 -> args0 }) })
/**
* The type of phone number to request. Possible values are `LONG_CODE`, `TOLL_FREE`, `TEN_DLC`, or `SIMULATOR`.
*/
public val numberType: Output
get() = javaResource.numberType().applyValue({ args0 -> args0 })
/**
* The name of the opt-out list to associate with the phone number.
*/
public val optOutListName: Output
get() = javaResource.optOutListName().applyValue({ args0 -> args0 })
/**
* The new phone number that was requested.
*/
public val phoneNumber: Output
get() = javaResource.phoneNumber().applyValue({ args0 -> args0 })
/**
* Use this field to attach your phone number for an external registration process.
*/
public val registrationId: Output?
get() = javaResource.registrationId().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* 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.
*/
public val selfManagedOptOutsEnabled: Output
get() = javaResource.selfManagedOptOutsEnabled().applyValue({ args0 -> args0 })
public val tags: Output
© 2015 - 2024 Weber Informatics LLC | Privacy Policy