Package com.pulumi.aws.pinpoint
Class Smsvoicev2Pool
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.pinpoint.Smsvoicev2Pool
-
public class Smsvoicev2Pool extends com.pulumi.resources.CustomResourceManages an AWS End User Messaging SMS Pool. ## Example Usage ### Basic Usage
### Two-Way Channelpackage 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()); } }
## 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: ```sh $ pulumi import aws:pinpoint/smsvoicev2Pool:Smsvoicev2Pool example pool-abcdef0123456789abcdef0123456789 ```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()); } }
-
-
Constructor Summary
Constructors Constructor Description Smsvoicev2Pool(java.lang.String name)Smsvoicev2Pool(java.lang.String name, Smsvoicev2PoolArgs args)Smsvoicev2Pool(java.lang.String name, Smsvoicev2PoolArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.lang.Boolean>deletionProtectionEnabled()static Smsvoicev2Poolget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, Smsvoicev2PoolState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.String>>isoCountryCode()com.pulumi.core.Output<java.lang.String>messageType()com.pulumi.core.Output<java.lang.String>optOutListName()com.pulumi.core.Output<java.util.List<java.lang.String>>originationIdentities()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.Boolean>selfManagedOptOutsEnabled()com.pulumi.core.Output<java.lang.Boolean>sharedRoutesEnabled()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()com.pulumi.core.Output<java.util.Optional<Smsvoicev2PoolTimeouts>>timeouts()com.pulumi.core.Output<java.util.Optional<java.lang.String>>twoWayChannelArn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>twoWayChannelRole()com.pulumi.core.Output<java.lang.Boolean>twoWayEnabled()
-
-
-
Constructor Detail
-
Smsvoicev2Pool
public Smsvoicev2Pool(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Smsvoicev2Pool
public Smsvoicev2Pool(java.lang.String name, Smsvoicev2PoolArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Smsvoicev2Pool
public Smsvoicev2Pool(java.lang.String name, Smsvoicev2PoolArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the pool.
-
deletionProtectionEnabled
public com.pulumi.core.Output<java.lang.Boolean> deletionProtectionEnabled()
- Returns:
- Whether deletion protection is enabled. When `true`, the pool cannot be deleted.
-
isoCountryCode
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> isoCountryCode()
- Returns:
- Two-character code, in ISO 3166-1 alpha-2 format, for the country or region of the pool. Cannot be changed after creation.
-
messageType
public com.pulumi.core.Output<java.lang.String> messageType()
- Returns:
- Type of message. Valid values are `TRANSACTIONAL` and `PROMOTIONAL`. Cannot be changed after creation.
-
optOutListName
public com.pulumi.core.Output<java.lang.String> optOutListName()
- Returns:
- Name of the opt-out list associated with the pool.
-
originationIdentities
public com.pulumi.core.Output<java.util.List<java.lang.String>> originationIdentities()
- Returns:
- Set of origination identity ARNs (phone number ARNs or sender ID ARNs) associated with the pool. At least one identity is required at creation. The following arguments are optional:
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- Region where this resource will be [managed](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-options.html#cli-configure-options-region). Defaults to the region set in the provider configuration.
-
selfManagedOptOutsEnabled
public com.pulumi.core.Output<java.lang.Boolean> selfManagedOptOutsEnabled()
- Returns:
- 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.
-
sharedRoutesEnabled
public com.pulumi.core.Output<java.lang.Boolean> sharedRoutesEnabled()
- Returns:
- Whether shared routes are enabled for the pool. When `true`, messages may use shared phone numbers or sender IDs in countries that allow it.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
timeouts
public com.pulumi.core.Output<java.util.Optional<Smsvoicev2PoolTimeouts>> timeouts()
-
twoWayChannelArn
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> twoWayChannelArn()
- Returns:
- 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.
-
twoWayChannelRole
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> twoWayChannelRole()
- Returns:
- ARN of the IAM role that End User Messaging SMS assumes to publish inbound messages to the two-way channel.
-
twoWayEnabled
public com.pulumi.core.Output<java.lang.Boolean> twoWayEnabled()
- Returns:
- Whether inbound message reception is enabled for the pool. When `true`, `twoWayChannelArn` must be set.
-
get
public static Smsvoicev2Pool get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable Smsvoicev2PoolState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-