Class PrivateGraphEndpoint


  • public class PrivateGraphEndpoint
    extends com.pulumi.resources.CustomResource
    Manages an Amazon Neptune Analytics Private Graph Endpoint. ## Example Usage Creates a private graph endpoint for Neptune Graph with VPC configuration, connecting through specified subnets and secured by a custom security group that allows inbound traffic on port 8182. ### Basic Usage
     
     package generated_program;
     
     import com.pulumi.Context;
     import com.pulumi.Pulumi;
     import com.pulumi.core.Output;
     import com.pulumi.aws.AwsFunctions;
     import com.pulumi.aws.inputs.GetRegionArgs;
     import com.pulumi.aws.ec2.Vpc;
     import com.pulumi.aws.ec2.VpcArgs;
     import com.pulumi.aws.ec2.Subnet;
     import com.pulumi.aws.ec2.SubnetArgs;
     import com.pulumi.aws.ec2.SecurityGroup;
     import com.pulumi.aws.ec2.SecurityGroupArgs;
     import com.pulumi.aws.ec2.inputs.SecurityGroupIngressArgs;
     import com.pulumi.aws.neptunegraph.Graph;
     import com.pulumi.aws.neptunegraph.GraphArgs;
     import com.pulumi.aws.neptunegraph.PrivateGraphEndpoint;
     import com.pulumi.aws.neptunegraph.PrivateGraphEndpointArgs;
     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 current = AwsFunctions.getRegion(GetRegionArgs.builder()
                 .build());
     
             // Example VPC for Neptune Graph
             var example = new Vpc("example", VpcArgs.builder()
                 .cidrBlock("10.0.0.0/16")
                 .tags(Map.of("Name", "neptune-graph-vpc"))
                 .build());
     
             // Example Subnet 1
             var example1 = new Subnet("example1", SubnetArgs.builder()
                 .vpcId(example.id())
                 .cidrBlock("10.0.1.0/24")
                 .availabilityZone(String.format("%sa", current.region()))
                 .tags(Map.of("Name", "neptune-graph-subnet-1"))
                 .build());
     
             // Example Subnet 2
             var example2 = new Subnet("example2", SubnetArgs.builder()
                 .vpcId(example.id())
                 .cidrBlock("10.0.2.0/24")
                 .availabilityZone(String.format("%sb", current.region()))
                 .tags(Map.of("Name", "neptune-graph-subnet-2"))
                 .build());
     
             // Security Group for Neptune Graph
             var exampleSecurityGroup = new SecurityGroup("exampleSecurityGroup", SecurityGroupArgs.builder()
                 .ingress(SecurityGroupIngressArgs.builder()
                     .fromPort(8182)
                     .toPort(8182)
                     .protocol("tcp")
                     .cidrBlocks("10.0.0.0/16")
                     .build())
                 .namePrefix("neptune-graph-sg")
                 .description("Security group for Neptune Graph")
                 .vpcId(example.id())
                 .tags(Map.of("Name", "neptune-graph-sg"))
                 .build());
     
             // Example Graph resource
             var exampleGraph = new Graph("exampleGraph", GraphArgs.builder()
                 .graphName("example-graph-test-20260112")
                 .provisionedMemory(16)
                 .build());
     
             // Private Graph Endpoint
             var examplePrivateGraphEndpoint = new PrivateGraphEndpoint("examplePrivateGraphEndpoint", PrivateGraphEndpointArgs.builder()
                 .graphIdentifier(exampleGraph.id())
                 .vpcId(example.id())
                 .subnetIds(            
                     example1.id(),
                     example2.id())
                 .vpcSecurityGroupIds(exampleSecurityGroup.id())
                 .build());
     
         }
     }
     
     
    ## Import ### Identity Schema #### Required * `graphIdentifier` (String) Unique identifier of the Neptune Analytics graph. * `vpcId` (String) VPC in which the private graph endpoint is created. #### Optional * `accountId` (String) AWS Account where this resource is managed. * `region` (String) Region where this resource is managed. Using `pulumi import`, import Neptune Analytics Private Graph Endpoint using the `privateGraphEndpointIdentifier`. For example: ```sh $ pulumi import aws:neptunegraph/privateGraphEndpoint:PrivateGraphEndpoint example g-12a3bcdef4_vpc-111122223333aabbc ```
    • 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
      static PrivateGraphEndpoint get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, PrivateGraphEndpointState 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> graphIdentifier()  
      com.pulumi.core.Output<java.lang.String> privateGraphEndpointIdentifier()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> subnetIds()  
      com.pulumi.core.Output<java.util.Optional<PrivateGraphEndpointTimeouts>> timeouts()  
      com.pulumi.core.Output<java.lang.String> vpcEndpointId()  
      com.pulumi.core.Output<java.lang.String> vpcId()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> vpcSecurityGroupIds()  
      • 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

      • PrivateGraphEndpoint

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

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

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

      • graphIdentifier

        public com.pulumi.core.Output<java.lang.String> graphIdentifier()
        Returns:
        Unique identifier of the Neptune Analytics graph.
      • privateGraphEndpointIdentifier

        public com.pulumi.core.Output<java.lang.String> privateGraphEndpointIdentifier()
        Returns:
        PrivateGraphEndpoint resource identifier generated by concatenating the associated `graphIdentifier` and `vpcId` with an underscore separator. For example, if `graphIdentifier` is `g-12a3bcdef4` and `vpcId` is `vpc-111122223333aabbc`, the generated identifier is `g-12a3bcdef4_vpc-111122223333aabbc`.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        Region where this resource will be managed. Defaults to the Region set in the provider configuration.
      • subnetIds

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> subnetIds()
        Returns:
        Subnets in which private graph endpoint ENIs are created.
      • vpcEndpointId

        public com.pulumi.core.Output<java.lang.String> vpcEndpointId()
        Returns:
        VPC endpoint that provides a private connection between the Graph and specified VPC.
      • vpcId

        public com.pulumi.core.Output<java.lang.String> vpcId()
        Returns:
        VPC in which the private graph endpoint needs to be created. The following arguments are optional:
      • vpcSecurityGroupIds

        public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> vpcSecurityGroupIds()
        Returns:
        Security groups to be attached to the private graph endpoint. The Neptune Analytics API does not return this value, so Terraform cannot detect drift or repopulate it on import; the value present at creation persists in state until changed in configuration.
      • get

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