Class Instance


  • public class Instance
    extends com.pulumi.resources.CustomResource
    Manages a V1 DB instance resource within OpenStack. > **Note:** All arguments including the instance user password will be stored in the raw state as plain-text. Read more about sensitive data in state. ## Example Usage ### Instance ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.openstack.database.Instance; import com.pulumi.openstack.database.InstanceArgs; import com.pulumi.openstack.database.inputs.InstanceDatastoreArgs; import com.pulumi.openstack.database.inputs.InstanceNetworkArgs; 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 Instance("test", InstanceArgs.builder() .datastore(InstanceDatastoreArgs.builder() .type("mysql") .version("mysql-5.7") .build()) .flavorId("31792d21-c355-4587-9290-56c1ed0ca376") .networks(InstanceNetworkArgs.builder() .uuid("c0612505-caf2-4fb0-b7cb-56a0240a2b12") .build()) .region("region-test") .size(8) .build()); } } ```
    • 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
      Instance​(java.lang.String name)  
      Instance​(java.lang.String name, InstanceArgs args)  
      Instance​(java.lang.String name, InstanceArgs 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.List<java.lang.String>> addresses()  
      com.pulumi.core.Output<java.util.Optional<java.lang.String>> configurationId()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceDatabase>>> databases()  
      com.pulumi.core.Output<InstanceDatastore> datastore()  
      com.pulumi.core.Output<java.lang.String> flavorId()  
      static Instance get​(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, InstanceState 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.util.Optional<java.util.List<InstanceNetwork>>> networks()  
      com.pulumi.core.Output<java.lang.String> region()  
      com.pulumi.core.Output<java.lang.Integer> size()  
      com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceUser>>> users()  
      • 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

      • Instance

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

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

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

      • addresses

        public com.pulumi.core.Output<java.util.List<java.lang.String>> addresses()
        Returns:
        A list of IP addresses assigned to the instance.
      • configurationId

        public com.pulumi.core.Output<java.util.Optional<java.lang.String>> configurationId()
        Returns:
        Configuration ID to be attached to the instance. Database instance will be rebooted when configuration is detached.
      • databases

        public com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceDatabase>>> databases()
        Returns:
        An array of database name, charset and collate. The database object structure is documented below.
      • datastore

        public com.pulumi.core.Output<InstanceDatastore> datastore()
        Returns:
        An array of database engine type and version. The datastore object structure is documented below. Changing this creates a new instance.
      • flavorId

        public com.pulumi.core.Output<java.lang.String> flavorId()
        Returns:
        The flavor ID of the desired flavor for the instance. Changing this creates new instance.
      • name

        public com.pulumi.core.Output<java.lang.String> name()
        Returns:
        A unique name for the resource.
      • networks

        public com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceNetwork>>> networks()
        Returns:
        An array of one or more networks to attach to the instance. The network object structure is documented below. Changing this creates a new instance.
      • region

        public com.pulumi.core.Output<java.lang.String> region()
        Returns:
        The region in which to create the db instance. Changing this creates a new instance.
      • size

        public com.pulumi.core.Output<java.lang.Integer> size()
        Returns:
        Specifies the volume size in GB. Changing this creates new instance.
      • users

        public com.pulumi.core.Output<java.util.Optional<java.util.List<InstanceUser>>> users()
        Returns:
        An array of username, password, host and databases. The user object structure is documented below.
      • get

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