Class Smsvoicev2EventDestination


  • public class Smsvoicev2EventDestination
    extends com.pulumi.resources.CustomResource
    Manages an AWS End User Messaging SMS Event Destination. An event destination is a location where messaging events are published. Exactly one of `cloudwatchLogsDestination`, `kinesisFirehoseDestination`, or `snsDestination` must be configured per event destination. Changing the sink type (e.g., from `snsDestination` to `cloudwatchLogsDestination`) forces resource replacement — AWS's `UpdateEventDestination` rejects sink-type changes with `ConflictException`. ## Example Usage ### CloudWatch Logs Destination
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.pinpoint.Smsvoicev2ConfigurationSet;
     import com.pulumi.aws.pinpoint.Smsvoicev2ConfigurationSetArgs;
     import com.pulumi.aws.pinpoint.Smsvoicev2EventDestination;
     import com.pulumi.aws.pinpoint.Smsvoicev2EventDestinationArgs;
     import com.pulumi.aws.pinpoint.inputs.Smsvoicev2EventDestinationCloudwatchLogsDestinationArgs;
     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 Smsvoicev2ConfigurationSet("example", Smsvoicev2ConfigurationSetArgs.builder()
                 .name("example-configuration-set")
                 .build());
     
             var exampleSmsvoicev2EventDestination = new Smsvoicev2EventDestination("exampleSmsvoicev2EventDestination", Smsvoicev2EventDestinationArgs.builder()
                 .cloudwatchLogsDestination(Smsvoicev2EventDestinationCloudwatchLogsDestinationArgs.builder()
                     .iamRoleArn(exampleAwsIamRole.arn())
                     .logGroupArn(exampleAwsCloudwatchLogGroup.arn())
                     .build())
                 .configurationSetName(example.name())
                 .eventDestinationName("example")
                 .matchingEventTypes("ALL")
                 .build());
     
         }
     }
     
     
    ### Kinesis Firehose Destination
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.pinpoint.Smsvoicev2ConfigurationSet;
     import com.pulumi.aws.pinpoint.Smsvoicev2ConfigurationSetArgs;
     import com.pulumi.aws.pinpoint.Smsvoicev2EventDestination;
     import com.pulumi.aws.pinpoint.Smsvoicev2EventDestinationArgs;
     import com.pulumi.aws.pinpoint.inputs.Smsvoicev2EventDestinationKinesisFirehoseDestinationArgs;
     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 Smsvoicev2ConfigurationSet("example", Smsvoicev2ConfigurationSetArgs.builder()
                 .name("example-configuration-set")
                 .build());
     
             var exampleSmsvoicev2EventDestination = new Smsvoicev2EventDestination("exampleSmsvoicev2EventDestination", Smsvoicev2EventDestinationArgs.builder()
                 .kinesisFirehoseDestination(Smsvoicev2EventDestinationKinesisFirehoseDestinationArgs.builder()
                     .deliveryStreamArn(exampleAwsKinesisFirehoseDeliveryStream.arn())
                     .iamRoleArn(exampleAwsIamRole.arn())
                     .build())
                 .configurationSetName(example.name())
                 .eventDestinationName("example")
                 .matchingEventTypes("ALL")
                 .build());
     
         }
     }
     
     
    ### SNS Destination
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.pinpoint.Smsvoicev2ConfigurationSet;
     import com.pulumi.aws.pinpoint.Smsvoicev2ConfigurationSetArgs;
     import com.pulumi.aws.pinpoint.Smsvoicev2EventDestination;
     import com.pulumi.aws.pinpoint.Smsvoicev2EventDestinationArgs;
     import com.pulumi.aws.pinpoint.inputs.Smsvoicev2EventDestinationSnsDestinationArgs;
     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 Smsvoicev2ConfigurationSet("example", Smsvoicev2ConfigurationSetArgs.builder()
                 .name("example-configuration-set")
                 .build());
     
             var exampleSmsvoicev2EventDestination = new Smsvoicev2EventDestination("exampleSmsvoicev2EventDestination", Smsvoicev2EventDestinationArgs.builder()
                 .snsDestination(Smsvoicev2EventDestinationSnsDestinationArgs.builder()
                     .topicArn(exampleAwsSnsTopic.arn())
                     .build())
                 .configurationSetName(example.name())
                 .eventDestinationName("example")
                 .matchingEventTypes("ALL")
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `configurationSetName` (String) Name of the configuration set this event destination belongs to. * `eventDestinationName` (String) Name of the event destination. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import an event destination using the `configurationSetName` and `eventDestinationName`, separated by a comma. For example: ```sh $ pulumi import aws:pinpoint/smsvoicev2EventDestination:Smsvoicev2EventDestination example "example-configuration-set,example-event-destination" ```
    • Constructor Detail

      • Smsvoicev2EventDestination

        public Smsvoicev2EventDestination​(java.lang.String name)
        Parameters:
        name - The _unique_ name of the resulting resource.
      • Smsvoicev2EventDestination

        public Smsvoicev2EventDestination​(java.lang.String name,
                                          Smsvoicev2EventDestinationArgs args)
        Parameters:
        name - The _unique_ name of the resulting resource.
        args - The arguments to use to populate this resource's properties.
      • Smsvoicev2EventDestination

        public Smsvoicev2EventDestination​(java.lang.String name,
                                          Smsvoicev2EventDestinationArgs 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

      • cloudwatchLogsDestination

        public com.pulumi.core.Output<java.util.Optional<Smsvoicev2EventDestinationCloudwatchLogsDestination>> cloudwatchLogsDestination()
        Returns:
        Send events to Amazon CloudWatch Logs. Exactly one of `cloudwatchLogsDestination`, `kinesisFirehoseDestination`, or `snsDestination` must be configured. See `cloudwatchLogsDestination` Block for details.
      • configurationSetArn

        public com.pulumi.core.Output<java.lang.String> configurationSetArn()
        Returns:
        ARN of the parent configuration set.
      • configurationSetName

        public com.pulumi.core.Output<java.lang.String> configurationSetName()
        Returns:
        Name of the configuration set this event destination belongs to. Changing this forces a new resource.
      • enabled

        public com.pulumi.core.Output<java.lang.Boolean> enabled()
        Returns:
        Whether the event destination is enabled. Defaults to `true`.
      • eventDestinationName

        public com.pulumi.core.Output<java.lang.String> eventDestinationName()
        Returns:
        Name of the event destination. Changing this forces a new resource.
      • kinesisFirehoseDestination

        public com.pulumi.core.Output<java.util.Optional<Smsvoicev2EventDestinationKinesisFirehoseDestination>> kinesisFirehoseDestination()
        Returns:
        Send events to Amazon Data Firehose. Exactly one of `cloudwatchLogsDestination`, `kinesisFirehoseDestination`, or `snsDestination` must be configured. See `kinesisFirehoseDestination` Block for details.
      • matchingEventTypes

        public com.pulumi.core.Output<java.util.List<java.lang.String>> matchingEventTypes()
        Returns:
        Event types for which the destination receives records. See the [AWS API reference](https://docs.aws.amazon.com/pinpoint/latest/apireference_smsvoicev2/API_CreateEventDestination.html#pinpoint-CreateEventDestination-request-MatchingEventTypes) for valid values. 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.
      • snsDestination

        public com.pulumi.core.Output<java.util.Optional<Smsvoicev2EventDestinationSnsDestination>> snsDestination()
        Returns:
        Send events to Amazon SNS. Exactly one of `cloudwatchLogsDestination`, `kinesisFirehoseDestination`, or `snsDestination` must be configured. See `snsDestination` Block for details.
      • get

        public static Smsvoicev2EventDestination get​(java.lang.String name,
                                                     com.pulumi.core.Output<java.lang.String> id,
                                                     @Nullable
                                                     Smsvoicev2EventDestinationState 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.