Package com.pulumi.openstack.compute
Class AggregateV2
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.openstack.compute.AggregateV2
-
public class AggregateV2 extends com.pulumi.resources.CustomResourceManages a Host Aggregate within Openstack Nova. ## Example Usage ### Full example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.compute.AggregateV2; import com.pulumi.openstack.compute.AggregateV2Args; 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 dellServers = new AggregateV2("dellServers", AggregateV2Args.builder() .hosts( "myhost01.example.com", "myhost02.example.com") .metadata(Map.of("cpus", "56")) .region("RegionOne") .zone("nova") .build()); } } ``` ### Minimum required example ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.compute.AggregateV2; 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 test = new AggregateV2("test"); } } ``` ## Import You can import an existing Host Aggregate by their ID. ```sh $ pulumi import openstack:compute/aggregateV2:AggregateV2 myaggregate 24 ``` The ID can be obtained with an openstack command$ openstack aggregate list +----+------+-------------------+ | ID | Name | Availability Zone | +----+------+-------------------+ | 59 | test | None | +----+------+-------------------+
-
-
Constructor Summary
Constructors Constructor Description AggregateV2(java.lang.String name)AggregateV2(java.lang.String name, AggregateV2Args args)AggregateV2(java.lang.String name, AggregateV2Args args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AggregateV2get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, AggregateV2State 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.util.Optional<java.util.List<java.lang.String>>>hosts()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>metadata()com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.lang.String>region()com.pulumi.core.Output<java.util.Optional<java.lang.String>>zone()
-
-
-
Constructor Detail
-
AggregateV2
public AggregateV2(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
AggregateV2
public AggregateV2(java.lang.String name, @Nullable AggregateV2Args args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
AggregateV2
public AggregateV2(java.lang.String name, @Nullable AggregateV2Args 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
-
hosts
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> hosts()
- Returns:
- The list of hosts contained in the Host Aggregate. The hosts must be added to Openstack and visible in the web interface, or the provider will fail to add them to the host aggregate.
-
metadata
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> metadata()
- Returns:
- The metadata of the Host Aggregate. Can be useful to indicate scheduler hints.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- The name of the Host Aggregate
-
region
public com.pulumi.core.Output<java.lang.String> region()
- Returns:
- The region in which to create the Host Aggregate. If omitted, the `region` argument of the provider is used. Changing this creates a new Host Aggregate.
-
zone
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> zone()
- Returns:
- The name of the Availability Zone to use. If ommited, it will take the default availability zone.
-
get
public static AggregateV2 get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable AggregateV2State 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.
-
-