Package com.pulumi.aws.ec2
Class VpcEndpointSubnetAssociation
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.ec2.VpcEndpointSubnetAssociation
-
public class VpcEndpointSubnetAssociation extends com.pulumi.resources.CustomResourceProvides a resource to create an association between a VPC endpoint and a subnet. > **NOTE on VPC Endpoints and VPC Endpoint Subnet Associations:** This provider provides both a standalone VPC Endpoint Subnet Association (an association between a VPC endpoint and a single `subnetId`) and a VPC Endpoint resource with a `subnetIds` attribute. Do not use the same subnet ID in both a VPC Endpoint resource and a VPC Endpoint Subnet Association resource. Doing so will cause a conflict of associations and will overwrite the association. ## Example Usage Basic usage:
## Import Using `pulumi import`, import VPC Endpoint Subnet Associations using `vpcEndpointId` together with `subnetId`. For example: ```sh $ pulumi import aws:ec2/vpcEndpointSubnetAssociation:VpcEndpointSubnetAssociation example vpce-aaaaaaaa/subnet-bbbbbbbbbbbbbbbbb ```package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.aws.ec2.VpcEndpointSubnetAssociation; import com.pulumi.aws.ec2.VpcEndpointSubnetAssociationArgs; 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 snEc2 = new VpcEndpointSubnetAssociation("snEc2", VpcEndpointSubnetAssociationArgs.builder() .vpcEndpointId(ec2.id()) .subnetId(sn.id()) .build()); } }
-
-
Constructor Summary
Constructors Constructor Description VpcEndpointSubnetAssociation(java.lang.String name)VpcEndpointSubnetAssociation(java.lang.String name, VpcEndpointSubnetAssociationArgs args)VpcEndpointSubnetAssociation(java.lang.String name, VpcEndpointSubnetAssociationArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VpcEndpointSubnetAssociationget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VpcEndpointSubnetAssociationState 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>region()com.pulumi.core.Output<java.lang.String>subnetId()com.pulumi.core.Output<java.lang.String>vpcEndpointId()
-
-
-
Constructor Detail
-
VpcEndpointSubnetAssociation
public VpcEndpointSubnetAssociation(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
VpcEndpointSubnetAssociation
public VpcEndpointSubnetAssociation(java.lang.String name, VpcEndpointSubnetAssociationArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
VpcEndpointSubnetAssociation
public VpcEndpointSubnetAssociation(java.lang.String name, VpcEndpointSubnetAssociationArgs 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
-
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.
-
subnetId
public com.pulumi.core.Output<java.lang.String> subnetId()
- Returns:
- ID of the subnet to be associated with the VPC endpoint.
-
vpcEndpointId
public com.pulumi.core.Output<java.lang.String> vpcEndpointId()
- Returns:
- ID of the VPC endpoint with which the subnet will be associated.
-
get
public static VpcEndpointSubnetAssociation get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable VpcEndpointSubnetAssociationState 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.
-
-