Package com.pulumi.aws.ec2
Class VpcEndpointConnectionNotification
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ec2.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 <!--Start PulumiCodeChooser --> ```java 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.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.List; import java.util.ArrayList; 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() .effect("Allow") .principals(GetPolicyDocumentStatementPrincipalArgs.builder() .type("Service") .identifiers("vpce.amazonaws.com") .build()) .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.applyValue(getPolicyDocumentResult -> getPolicyDocumentResult.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()); } } ``` <!--End PulumiCodeChooser --> ## 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 ```
-
-
Constructor Summary
Constructors Constructor Description VpcEndpointConnectionNotification(java.lang.String name)
VpcEndpointConnectionNotification(java.lang.String name, VpcEndpointConnectionNotificationArgs args)
VpcEndpointConnectionNotification(java.lang.String name, VpcEndpointConnectionNotificationArgs 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.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>
state()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
vpcEndpointId()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
vpcEndpointServiceId()
-
-
-
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. > **NOTE:** One of `vpc_endpoint_service_id` or `vpc_endpoint_id` must be specified.
-
connectionNotificationArn
public com.pulumi.core.Output<java.lang.String> connectionNotificationArn()
- Returns:
- The ARN of the SNS topic for the notifications.
-
notificationType
public com.pulumi.core.Output<java.lang.String> notificationType()
- Returns:
- The type of notification.
-
state
public com.pulumi.core.Output<java.lang.String> state()
- Returns:
- The state of the notification.
-
vpcEndpointId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpcEndpointId()
- Returns:
- The ID of the VPC Endpoint to receive notifications for.
-
vpcEndpointServiceId
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> vpcEndpointServiceId()
- Returns:
- The ID of the VPC Endpoint Service to receive notifications for.
-
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.
-
-