Package com.pulumi.aws.pinpoint
Class Smsvoicev2Keyword
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.pinpoint.Smsvoicev2Keyword
-
public class Smsvoicev2Keyword extends com.pulumi.resources.CustomResourceManages an AWS End User Messaging SMS Keyword. > **Note:** The mandatory keywords `HELP` and `STOP` exist on every origination identity and cannot be created or deleted independently of it. For these mandatory keywords only, this resource adopts and manages the `keywordMessage` in place, while `keywordAction` is managed by AWS and cannot be set. Destroying a resource that manages a mandatory keyword does not delete or reset it in AWS; the keyword remains on the origination identity with its last-applied message. Non-mandatory keywords are created and deleted normally. ## Example Usage ### Phone Number
### Poolpackage 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.Smsvoicev2Keyword; import com.pulumi.aws.pinpoint.Smsvoicev2KeywordArgs; 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 exampleSmsvoicev2Keyword = new Smsvoicev2Keyword("exampleSmsvoicev2Keyword", Smsvoicev2KeywordArgs.builder() .originationIdentityArn(example.arn()) .keyword("EXAMPLE") .keywordMessage("Thanks for messaging our example number.") .build()); } }
### Mandatory Keyword The mandatory `HELP` and `STOP` keywords are adopted rather than created. Omit `keywordAction`; AWS manages it.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 com.pulumi.aws.pinpoint.Smsvoicev2Keyword; import com.pulumi.aws.pinpoint.Smsvoicev2KeywordArgs; 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()) .build()); var exampleSmsvoicev2Keyword = new Smsvoicev2Keyword("exampleSmsvoicev2Keyword", Smsvoicev2KeywordArgs.builder() .originationIdentityArn(exampleSmsvoicev2Pool.arn()) .keyword("OPTOUT") .keywordMessage("You have been unsubscribed.") .keywordAction("OPT_OUT") .build()); } }
## Import ### Identity Schema #### Required * `originationIdentityArn` (String) ARN of the origination identity the keyword is attached to. * `keyword` (String) Keyword text. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import a keyword using the `originationIdentityArn` and `keyword`, separated by a comma. For example: ```sh $ pulumi import aws:pinpoint/smsvoicev2Keyword:Smsvoicev2Keyword example "arn:aws:sms-voice:us-east-1:123456789012:phone-number/phone-abcdef0123456789abcdef0123456789,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.Smsvoicev2Keyword; import com.pulumi.aws.pinpoint.Smsvoicev2KeywordArgs; 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 help = new Smsvoicev2Keyword("help", Smsvoicev2KeywordArgs.builder() .originationIdentityArn(example.arn()) .keyword("HELP") .keywordMessage("Reply STOP to unsubscribe. Message and data rates may apply.") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description Smsvoicev2Keyword(java.lang.String name)Smsvoicev2Keyword(java.lang.String name, Smsvoicev2KeywordArgs args)Smsvoicev2Keyword(java.lang.String name, Smsvoicev2KeywordArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Smsvoicev2Keywordget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, Smsvoicev2KeywordState 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.lang.String>keyword()com.pulumi.core.Output<java.lang.String>keywordAction()com.pulumi.core.Output<java.lang.String>keywordMessage()com.pulumi.core.Output<java.lang.String>originationIdentityArn()com.pulumi.core.Output<java.lang.String>region()
-
-
-
Constructor Detail
-
Smsvoicev2Keyword
public Smsvoicev2Keyword(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Smsvoicev2Keyword
public Smsvoicev2Keyword(java.lang.String name, Smsvoicev2KeywordArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Smsvoicev2Keyword
public Smsvoicev2Keyword(java.lang.String name, Smsvoicev2KeywordArgs 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
-
keyword
public com.pulumi.core.Output<java.lang.String> keyword()
- Returns:
- Keyword to configure. Must be upper-case; AWS stores keywords in upper-case. 1-30 characters and cannot start or end with a space. Changing this forces a new resource.
-
keywordAction
public com.pulumi.core.Output<java.lang.String> keywordAction()
- Returns:
- Action to perform when the keyword is received. Valid values: `AUTOMATIC_RESPONSE`, `OPT_OUT`, `OPT_IN`. Defaults to `AUTOMATIC_RESPONSE`. Must not be set for mandatory keywords, whose action is managed by AWS.
-
keywordMessage
public com.pulumi.core.Output<java.lang.String> keywordMessage()
- Returns:
- Message to send when the keyword is received.
-
originationIdentityArn
public com.pulumi.core.Output<java.lang.String> originationIdentityArn()
- Returns:
- ARN of the origination identity (phone number or pool) to attach the keyword to. Changing this forces a new resource. 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/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration.
-
get
public static Smsvoicev2Keyword get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable Smsvoicev2KeywordState 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.
-
-