Package com.pulumi.cloudamqp
Class Vpc
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.cloudamqp.Vpc
-
public class Vpc extends com.pulumi.resources.CustomResourceThis resource allows you to manage standalone VPC. New Cloudamqp instances can be added to the managed VPC. Set the instance *vpc_id* attribute to the managed vpc identifier , see example below, when creating the instance. Only available for dedicated subscription plans. Pricing is available at [cloudamqp.com](https://www.cloudamqp.com/plans.html). ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.cloudamqp.Vpc; import com.pulumi.cloudamqp.VpcArgs; import com.pulumi.cloudamqp.Instance; import com.pulumi.cloudamqp.InstanceArgs; import com.pulumi.cloudamqp.CloudamqpFunctions; import com.pulumi.cloudamqp.inputs.GetVpcInfoArgs; 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) { var vpc = new Vpc("vpc", VpcArgs.builder() .region("amazon-web-services::us-east-1") .subnet("10.56.72.0/24") .tags() .build()); var instance = new Instance("instance", InstanceArgs.builder() .plan("bunny-1") .region("amazon-web-services::us-east-1") .nodes(1) .tags() .rmqVersion("3.9.13") .vpcId(cloudamq_vpc.vpc().id()) .keepAssociatedVpc(true) .build()); final var vpcInfo = CloudamqpFunctions.getVpcInfo(GetVpcInfoArgs.builder() .vpcId(vpc.id()) .build()); } } ``` ## Import `cloudamqp_vpc` can be imported using the CloudAMQP VPC identifier. ```sh $ pulumi import cloudamqp:index/vpc:Vpc <resource_name> <vpc_id>` ``` To retrieve the identifier for a VPC, either use [CloudAMQP customer API](https://docs.cloudamqp.com/#list-vpcs). Or use the data source `cloudamqp_account_vpcs` to list all available standalone VPCs for an account.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Vpcget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, VpcState 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>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.lang.String>subnet()com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>tags()com.pulumi.core.Output<java.lang.String>vpcName()
-
-
-
Constructor Detail
-
Vpc
public Vpc(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
Vpc
public Vpc(java.lang.String name, VpcArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
Vpc
public Vpc(java.lang.String name, VpcArgs 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
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the VPC.
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The hosted region for the managed standalone VPC
-
subnet
public com.pulumi.core.Output<java.lang.String> subnet()
- Returns:
- The VPC subnet
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> tags()
- Returns:
- Tag the VPC with optional tags
-
vpcName
public com.pulumi.core.Output<java.lang.String> vpcName()
- Returns:
- VPC name given when hosted at the cloud provider
-
get
public static Vpc get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable VpcState 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.
-
-