Smsvoicev2Pool class
Manages an AWS End User Messaging SMS Pool.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.pinpoint.Smsvoicev2PhoneNumber("example", {
isoCountryCode: "US",
messageType: "TRANSACTIONAL",
numberType: "SIMULATOR",
numberCapabilities: ["SMS"],
});
const exampleSmsvoicev2Pool = new aws.pinpoint.Smsvoicev2Pool("example", {
isoCountryCode: "US",
messageType: "TRANSACTIONAL",
originationIdentities: [example.arn],
tags: {
Name: "example",
},
});
import pulumi
import pulumi_aws as aws
example = aws.pinpoint.Smsvoicev2PhoneNumber("example",
iso_country_code="US",
message_type="TRANSACTIONAL",
number_type="SIMULATOR",
number_capabilities=["SMS"])
example_smsvoicev2_pool = aws.pinpoint.Smsvoicev2Pool("example",
iso_country_code="US",
message_type="TRANSACTIONAL",
origination_identities=[example.arn],
tags={
"Name": "example",
})
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 = "SIMULATOR",
NumberCapabilities = new[]
{
"SMS",
},
});
var exampleSmsvoicev2Pool = new Aws.Pinpoint.Smsvoicev2Pool("example", new()
{
IsoCountryCode = "US",
MessageType = "TRANSACTIONAL",
OriginationIdentities = new[]
{
example.Arn,
},
Tags =
{
{ "Name", "example" },
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/pinpoint"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := pinpoint.NewSmsvoicev2PhoneNumber(ctx, "example", &pinpoint.Smsvoicev2PhoneNumberArgs{
IsoCountryCode: pulumi.String("US"),
MessageType: pulumi.String("TRANSACTIONAL"),
NumberType: pulumi.String("SIMULATOR"),
NumberCapabilities: pulumi.StringArray{
pulumi.String("SMS"),
},
})
if err != nil {
return err
}
_, err = pinpoint.NewSmsvoicev2Pool(ctx, "example", &pinpoint.Smsvoicev2PoolArgs{
IsoCountryCode: pulumi.String("US"),
MessageType: pulumi.String("TRANSACTIONAL"),
OriginationIdentities: pulumi.StringArray{
example.Arn,
},
Tags: pulumi.StringMap{
"Name": pulumi.String("example"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_pinpoint_smsvoicev2phonenumber" "example" {
iso_country_code = "US"
message_type = "TRANSACTIONAL"
number_type = "SIMULATOR"
number_capabilities = ["SMS"]
}
resource "aws_pinpoint_smsvoicev2pool" "example" {
iso_country_code = "US"
message_type = "TRANSACTIONAL"
origination_identities = [aws_pinpoint_smsvoicev2phonenumber.example.arn]
tags = {
"Name" = "example"
}
}
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 com.pulumi.aws.pinpoint.Smsvoicev2Pool;
import com.pulumi.aws.pinpoint.Smsvoicev2PoolArgs;
import java.util.ArrayList;
import java.util.Arrays;
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("SIMULATOR")
.numberCapabilities("SMS")
.build());
var exampleSmsvoicev2Pool = new Smsvoicev2Pool("exampleSmsvoicev2Pool", Smsvoicev2PoolArgs.builder()
.isoCountryCode("US")
.messageType("TRANSACTIONAL")
.originationIdentities(example.arn())
.tags(Map.of("Name", "example"))
.build());
}
}
resources:
example:
type: aws:pinpoint:Smsvoicev2PhoneNumber
properties:
isoCountryCode: US
messageType: TRANSACTIONAL
numberType: SIMULATOR
numberCapabilities:
- SMS
exampleSmsvoicev2Pool:
type: aws:pinpoint:Smsvoicev2Pool
name: example
properties:
isoCountryCode: US
messageType: TRANSACTIONAL
originationIdentities:
- ${example.arn}
tags:
Name: example
Two-Way Channel
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.sns.Topic("example", {name: "example-two-way-channel"});
const exampleRole = new aws.iam.Role("example", {
name: "example-pool-two-way",
assumeRolePolicy: JSON.stringify({
Version: "2012-10-17",
Statement: [{
Effect: "Allow",
Principal: {
Service: "sms-voice.amazonaws.com",
},
Action: "sts:AssumeRole",
}],
}),
});
const exampleSmsvoicev2PhoneNumber = new aws.pinpoint.Smsvoicev2PhoneNumber("example", {
isoCountryCode: "US",
messageType: "TRANSACTIONAL",
numberType: "SIMULATOR",
numberCapabilities: ["SMS"],
});
const exampleSmsvoicev2Pool = new aws.pinpoint.Smsvoicev2Pool("example", {
isoCountryCode: "US",
messageType: "TRANSACTIONAL",
originationIdentities: [exampleSmsvoicev2PhoneNumber.arn],
twoWayEnabled: true,
twoWayChannelArn: example.arn,
twoWayChannelRole: exampleRole.arn,
tags: {
Name: "example",
},
});
import pulumi
import json
import pulumi_aws as aws
example = aws.sns.Topic("example", name="example-two-way-channel")
example_role = aws.iam.Role("example",
name="example-pool-two-way",
assume_role_policy=json.dumps({
"Version": "2012-10-17",
"Statement": [{
"Effect": "Allow",
"Principal": {
"Service": "sms-voice.amazonaws.com",
},
"Action": "sts:AssumeRole",
}],
}))
example_smsvoicev2_phone_number = aws.pinpoint.Smsvoicev2PhoneNumber("example",
iso_country_code="US",
message_type="TRANSACTIONAL",
number_type="SIMULATOR",
number_capabilities=["SMS"])
example_smsvoicev2_pool = aws.pinpoint.Smsvoicev2Pool("example",
iso_country_code="US",
message_type="TRANSACTIONAL",
origination_identities=[example_smsvoicev2_phone_number.arn],
two_way_enabled=True,
two_way_channel_arn=example.arn,
two_way_channel_role=example_role.arn,
tags={
"Name": "example",
})
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Sns.Topic("example", new()
{
Name = "example-two-way-channel",
});
var exampleRole = new Aws.Iam.Role("example", new()
{
Name = "example-pool-two-way",
AssumeRolePolicy = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["Version"] = "2012-10-17",
["Statement"] = new[]
{
new Dictionary<string, object?>
{
["Effect"] = "Allow",
["Principal"] = new Dictionary<string, object?>
{
["Service"] = "sms-voice.amazonaws.com",
},
["Action"] = "sts:AssumeRole",
},
},
}),
});
var exampleSmsvoicev2PhoneNumber = new Aws.Pinpoint.Smsvoicev2PhoneNumber("example", new()
{
IsoCountryCode = "US",
MessageType = "TRANSACTIONAL",
NumberType = "SIMULATOR",
NumberCapabilities = new[]
{
"SMS",
},
});
var exampleSmsvoicev2Pool = new Aws.Pinpoint.Smsvoicev2Pool("example", new()
{
IsoCountryCode = "US",
MessageType = "TRANSACTIONAL",
OriginationIdentities = new[]
{
exampleSmsvoicev2PhoneNumber.Arn,
},
TwoWayEnabled = true,
TwoWayChannelArn = example.Arn,
TwoWayChannelRole = exampleRole.Arn,
Tags =
{
{ "Name", "example" },
},
});
});
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/iam"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/pinpoint"
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/sns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := sns.NewTopic(ctx, "example", &sns.TopicArgs{
Name: pulumi.String("example-two-way-channel"),
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"Version": "2012-10-17",
"Statement": []map[string]interface{}{
map[string]interface{}{
"Effect": "Allow",
"Principal": map[string]string{
"Service": "sms-voice.amazonaws.com",
},
"Action": "sts:AssumeRole",
},
},
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
exampleRole, err := iam.NewRole(ctx, "example", &iam.RoleArgs{
Name: pulumi.String("example-pool-two-way"),
AssumeRolePolicy: pulumi.String(json0),
})
if err != nil {
return err
}
exampleSmsvoicev2PhoneNumber, err := pinpoint.NewSmsvoicev2PhoneNumber(ctx, "example", &pinpoint.Smsvoicev2PhoneNumberArgs{
IsoCountryCode: pulumi.String("US"),
MessageType: pulumi.String("TRANSACTIONAL"),
NumberType: pulumi.String("SIMULATOR"),
NumberCapabilities: pulumi.StringArray{
pulumi.String("SMS"),
},
})
if err != nil {
return err
}
_, err = pinpoint.NewSmsvoicev2Pool(ctx, "example", &pinpoint.Smsvoicev2PoolArgs{
IsoCountryCode: pulumi.String("US"),
MessageType: pulumi.String("TRANSACTIONAL"),
OriginationIdentities: pulumi.StringArray{
exampleSmsvoicev2PhoneNumber.Arn,
},
TwoWayEnabled: pulumi.Bool(true),
TwoWayChannelArn: example.Arn,
TwoWayChannelRole: exampleRole.Arn,
Tags: pulumi.StringMap{
"Name": pulumi.String("example"),
},
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_sns_topic" "example" {
name = "example-two-way-channel"
}
resource "aws_iam_role" "example" {
name = "example-pool-two-way"
assume_role_policy = jsonencode({
"Version" = "2012-10-17"
"Statement" = [{
"Effect" = "Allow"
"Principal" = {
"Service" = "sms-voice.amazonaws.com"
}
"Action" = "sts:AssumeRole"
}]
})
}
resource "aws_pinpoint_smsvoicev2phonenumber" "example" {
iso_country_code = "US"
message_type = "TRANSACTIONAL"
number_type = "SIMULATOR"
number_capabilities = ["SMS"]
}
resource "aws_pinpoint_smsvoicev2pool" "example" {
iso_country_code = "US"
message_type = "TRANSACTIONAL"
origination_identities = [aws_pinpoint_smsvoicev2phonenumber.example.arn]
two_way_enabled = true
two_way_channel_arn = aws_sns_topic.example.arn
two_way_channel_role = aws_iam_role.example.arn
tags = {
"Name" = "example"
}
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.sns.TopicArgs;
import com.pulumi.aws.iam.Role;
import com.pulumi.aws.iam.RoleArgs;
import com.pulumi.aws.pinpoint.Smsvoicev2PhoneNumber;
import com.pulumi.aws.pinpoint.Smsvoicev2PhoneNumberArgs;
import com.pulumi.aws.pinpoint.Smsvoicev2Pool;
import com.pulumi.aws.pinpoint.Smsvoicev2PoolArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.ArrayList;
import java.util.Arrays;
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 Topic("example", TopicArgs.builder()
.name("example-two-way-channel")
.build());
var exampleRole = new Role("exampleRole", RoleArgs.builder()
.name("example-pool-two-way")
.assumeRolePolicy(serializeJson(
jsonObject(
jsonProperty("Version", "2012-10-17"),
jsonProperty("Statement", jsonArray(jsonObject(
jsonProperty("Effect", "Allow"),
jsonProperty("Principal", jsonObject(
jsonProperty("Service", "sms-voice.amazonaws.com")
)),
jsonProperty("Action", "sts:AssumeRole")
)))
)))
.build());
var exampleSmsvoicev2PhoneNumber = new Smsvoicev2PhoneNumber("exampleSmsvoicev2PhoneNumber", Smsvoicev2PhoneNumberArgs.builder()
.isoCountryCode("US")
.messageType("TRANSACTIONAL")
.numberType("SIMULATOR")
.numberCapabilities("SMS")
.build());
var exampleSmsvoicev2Pool = new Smsvoicev2Pool("exampleSmsvoicev2Pool", Smsvoicev2PoolArgs.builder()
.isoCountryCode("US")
.messageType("TRANSACTIONAL")
.originationIdentities(exampleSmsvoicev2PhoneNumber.arn())
.twoWayEnabled(true)
.twoWayChannelArn(example.arn())
.twoWayChannelRole(exampleRole.arn())
.tags(Map.of("Name", "example"))
.build());
}
}
resources:
example:
type: aws:sns:Topic
properties:
name: example-two-way-channel
exampleRole:
type: aws:iam:Role
name: example
properties:
name: example-pool-two-way
assumeRolePolicy:
fn::toJSON:
Version: 2012-10-17
Statement:
- Effect: Allow
Principal:
Service: sms-voice.amazonaws.com
Action: sts:AssumeRole
exampleSmsvoicev2PhoneNumber:
type: aws:pinpoint:Smsvoicev2PhoneNumber
name: example
properties:
isoCountryCode: US
messageType: TRANSACTIONAL
numberType: SIMULATOR
numberCapabilities:
- SMS
exampleSmsvoicev2Pool:
type: aws:pinpoint:Smsvoicev2Pool
name: example
properties:
isoCountryCode: US
messageType: TRANSACTIONAL
originationIdentities:
- ${exampleSmsvoicev2PhoneNumber.arn}
twoWayEnabled: true
twoWayChannelArn: ${example.arn}
twoWayChannelRole: ${exampleRole.arn}
tags:
Name: example
Import
> Note: isoCountryCode is never returned by AWS, so importing a pool with isoCountryCode set plans a replacement until removed from config.
Identity Schema
Required
id- (String) ID of the Pool.
Optional
accountId(String) AWS Account where this resource is managed.region(String) Region where this resource is managed.
Using pulumi import, import an AWS End User Messaging SMS Pool using the id. For example:
$ pulumi import aws:pinpoint/smsvoicev2Pool:Smsvoicev2Pool example pool-abcdef0123456789abcdef0123456789
Constructors
- Smsvoicev2Pool(String name, {Smsvoicev2PoolArgs? args, CustomResourceOptions? options})
-
Creates a new Smsvoicev2Pool.
nameThe Pulumi resource name.argsArguments used to configure this Smsvoicev2Pool. The set of arguments for Smsvoicev2Pool.optionsResource options controlling this resource's behavior. - Smsvoicev2Pool.reference(String urn)
- Creates a typed reference to an existing Smsvoicev2Pool resource.
Properties
-
arn
↔ Output<
String> -
ARN of the pool.
latefinal
-
childResources
→ Set<
Resource> -
finalinherited
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
deletionProtectionEnabled
↔ Output<
bool> -
Whether deletion protection is enabled. When
true, the pool cannot be deleted.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
-
isoCountryCode
↔ Output<
String?> -
Two-character code, in ISO 3166-1 alpha-2 format, for the country or region of the pool. Cannot be changed after creation.
latefinal
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
messageType
↔ Output<
String> -
Type of message. Valid values are
TRANSACTIONALandPROMOTIONAL. Cannot be changed after creation.latefinal -
optOutListName
↔ Output<
String> -
Name of the opt-out list associated with the pool.
latefinal
-
originationIdentities
↔ Output<
List< String> > -
Set of origination identity ARNs (phone number ARNs or sender ID ARNs) associated with the pool. At least one identity is required at creation.
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selfManagedOptOutsEnabled
↔ Output<
bool> -
Whether the pool relies on self-managed opt-out handling. When
false, AWS auto-replies to HELP/STOP requests and manages the opt-out list.latefinal -
Whether shared routes are enabled for the pool. When
true, messages may use shared phone numbers or sender IDs in countries that allow it.latefinal -
Map of tags to assign to the resource. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
Map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
timeouts
↔ Output<
Smsvoicev2PoolTimeouts?> -
latefinal
-
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
twoWayChannelArn
↔ Output<
String?> -
Destination for incoming messages. Specify an ARN to receive incoming messages, or
connect.[region].amazonaws.com(with[region]replaced by the AWS Region of the Amazon Connect instance) to set Amazon Connect as the inbound destination.latefinal -
twoWayChannelRole
↔ Output<
String?> -
ARN of the IAM role that End User Messaging SMS assumes to publish inbound messages to the two-way channel.
latefinal
-
twoWayEnabled
↔ Output<
bool> -
Whether inbound message reception is enabled for the pool. When
true,twoWayChannelArnmust be set.latefinal -
urn
↔ Output<
String> -
latefinalinherited
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
get(
String name, Input< String> id, {Smsvoicev2PoolState? state, CustomResourceOptions? options}) → Smsvoicev2Pool -
Gets an existing Smsvoicev2Pool resource's state with the given
nameandid.