Class VpcEndpointConnectionNotification


  • public class VpcEndpointConnectionNotification
    extends com.pulumi.resources.CustomResource
    Provides a VPC Endpoint connection notification resource. Connection notifications notify subscribers of VPC Endpoint events. ## Example Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.iam.IamFunctions;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentArgs;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementArgs;
     import com.pulumi.aws.iam.inputs.GetPolicyDocumentStatementPrincipalArgs;
     import com.pulumi.aws.sns.Topic;
     import com.pulumi.aws.sns.TopicArgs;
     import com.pulumi.aws.ec2.VpcEndpointService;
     import com.pulumi.aws.ec2.VpcEndpointServiceArgs;
     import com.pulumi.aws.ec2.VpcEndpointConnectionNotification;
     import com.pulumi.aws.ec2.VpcEndpointConnectionNotificationArgs;
     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) {
             final var topic = IamFunctions.getPolicyDocument(GetPolicyDocumentArgs.builder()
                 .statements(GetPolicyDocumentStatementArgs.builder()
                     .principals(GetPolicyDocumentStatementPrincipalArgs.builder()
                         .type("Service")
                         .identifiers("vpce.amazonaws.com")
                         .build())
                     .effect("Allow")
                     .actions("SNS:Publish")
                     .resources("arn:aws:sns:*:*:vpce-notification-topic")
                     .build())
                 .build());
     
             var topicTopic = new Topic("topicTopic", TopicArgs.builder()
                 .name("vpce-notification-topic")
                 .policy(topic.json())
                 .build());
     
             var foo = new VpcEndpointService("foo", VpcEndpointServiceArgs.builder()
                 .acceptanceRequired(false)
                 .networkLoadBalancerArns(test.arn())
                 .build());
     
             var fooVpcEndpointConnectionNotification = new VpcEndpointConnectionNotification("fooVpcEndpointConnectionNotification", VpcEndpointConnectionNotificationArgs.builder()
                 .vpcEndpointServiceId(foo.id())
                 .connectionNotificationArn(topicTopic.arn())
                 .connectionEvents(            
                     "Accept",
                     "Reject")
                 .build());
     
         }
     }
     
     
    ## Import Using `pulumi import`, import VPC Endpoint connection notifications using the VPC endpoint connection notification `id`. For example: ```sh $ pulumi import aws:ec2/vpcEndpointConnectionNotification:VpcEndpointConnectionNotification foo vpce-nfn-09e6ed3b4efba2263 ```
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.pulumi.resources.CustomResource

        com.pulumi.resources.CustomResource.CustomResourceInternal
      • Nested classes/interfaces inherited from class com.pulumi.resources.Resource

        com.pulumi.resources.Resource.LazyField<T extends java.lang.Object>, com.pulumi.resources.Resource.LazyFields, com.pulumi.resources.Resource.ResourceInternal
    • Field Summary

      • Fields inherited from class com.pulumi.resources.Resource

        childResources, remote
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.pulumi.core.Output<java.util.List<java.lang.String>> connectionEvents()  
      com.pulumi.core.Output<java.lang.String> connectionNotificationArn()  
      static VpcEndpointConnectionNotification get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VpcEndpointConnectionNotificationState 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> notificationType()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.String> state()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpcEndpointId()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpcEndpointServiceId()  
      • Methods inherited from class com.pulumi.resources.CustomResource

        getId, id, idFuture
      • Methods inherited from class com.pulumi.resources.Resource

        getChildResources, getResourceName, getResourceType, getUrn, pulumiChildResources, pulumiResourceName, pulumiResourceType, urn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • VpcEndpointConnectionNotification

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

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

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

      • connectionEvents

        public com.pulumi.core.Output<java.util.List<java.lang.String>> connectionEvents()
        Returns:
        One or more endpoint [events](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateVpcEndpointConnectionNotification.html#API_CreateVpcEndpointConnectionNotification_RequestParameters) for which to receive notifications.
      • connectionNotificationArn

        public com.pulumi.core.Output<java.lang.String> connectionNotificationArn()
        Returns:
        ARN of the SNS topic for the notifications.
      • notificationType

        public com.pulumi.core.Output<java.lang.String> notificationType()
        Returns:
        Type of notification.
      • 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.
      • state

        public com.pulumi.core.Output<java.lang.String> state()
        Returns:
        State of the notification.
      • vpcEndpointId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpcEndpointId()
        Returns:
        ID of the VPC Endpoint to receive notifications for.
      • vpcEndpointServiceId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpcEndpointServiceId()
        Returns:
        ID of the VPC Endpoint Service to receive notifications for. > **NOTE:** One of `vpcEndpointServiceId` or `vpcEndpointId` must be specified.
      • get

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