Class Flavor


  • public class Flavor
    extends com.pulumi.resources.CustomResource
    Manages a V2 flavor resource within OpenStack. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.compute.Flavor; import com.pulumi.openstack.compute.FlavorArgs; 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_flavor = new Flavor("test-flavor", FlavorArgs.builder() .disk("20") .extraSpecs(Map.ofEntries( Map.entry("hw:cpu_policy", "CPU-POLICY"), Map.entry("hw:cpu_thread_policy", "CPU-THREAD-POLICY") )) .ram("8096") .vcpus("2") .build()); } } ``` ## Import Flavors can be imported using the `ID`, e.g. ```sh $ pulumi import openstack:compute/flavor:Flavor my-flavor 4142e64b-1b35-44a0-9b1e-5affc7af1106 ```
    • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      Flavor​(java.lang.String name)  
      Flavor​(java.lang.String name, FlavorArgs args)  
      Flavor​(java.lang.String name, FlavorArgs 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.Optional<java.lang.String>> description()  
      com.pulumi.core.Output<java.lang.Integer> disk()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> ephemeral()  
      com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.Object>> extraSpecs()  
      com.pulumi.core.Output<java.lang.String> flavorId()  
      static Flavor get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, FlavorState 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.lang.Boolean>> isPublic()  
      com.pulumi.core.Output<java.lang.String> name()  
      com.pulumi.core.Output<java.lang.Integer> ram()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Double>> rxTxFactor()  
      com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> swap()  
      com.pulumi.core.Output<java.lang.Integer> vcpus()  
      • 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

      • Flavor

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

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

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

      • description

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> description()
        Returns:
        The description of the flavor. Changing this updates the description of the flavor. Requires microversion >= 2.55.
      • disk

        public com.pulumi.core.Output<java.lang.Integer> disk()
        Returns:
        The amount of disk space in GiB to use for the root (/) partition. Changing this creates a new flavor.
      • ephemeral

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> ephemeral()
        Returns:
        The amount of ephemeral in GiB. If unspecified, the default is 0. Changing this creates a new flavor.
      • extraSpecs

        public com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.Object>> extraSpecs()
        Returns:
        Key/Value pairs of metadata for the flavor.
      • flavorId

        public com.pulumi.core.Output<java.lang.String> flavorId()
        Returns:
        Unique ID (integer or UUID) of flavor to create. Changing this creates a new flavor.
      • isPublic

        public com.pulumi.core.Output<java.util.Optional<java.lang.Boolean>> isPublic()
        Returns:
        Whether the flavor is public. Changing this creates a new flavor.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        A unique name for the flavor. Changing this creates a new flavor.
      • ram

        public com.pulumi.core.Output<java.lang.Integer> ram()
        Returns:
        The amount of RAM to use, in megabytes. Changing this creates a new flavor.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        The region in which to obtain the V2 Compute client. Flavors are associated with accounts, but a Compute client is needed to create one. If omitted, the `region` argument of the provider is used. Changing this creates a new flavor.
      • rxTxFactor

        public com.pulumi.core.Output<java.util.Optional<java.lang.Double>> rxTxFactor()
        Returns:
        RX/TX bandwith factor. The default is 1. Changing this creates a new flavor.
      • swap

        public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> swap()
        Returns:
        The amount of disk space in megabytes to use. If unspecified, the default is 0. Changing this creates a new flavor.
      • vcpus

        public com.pulumi.core.Output<java.lang.Integer> vcpus()
        Returns:
        The number of virtual CPUs to use. Changing this creates a new flavor.
      • get

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