Package com.pulumi.random
Class RandomUuid
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.random.RandomUuid
-
public class RandomUuid extends com.pulumi.resources.CustomResourceThe resource `random.RandomUuid` generates a random uuid string that is intended to be used as a unique identifier for other resources. This resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needing a unique string identifier. ## Example Usage ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.random.RandomUuid; import com.pulumi.azure.core.ResourceGroup; import com.pulumi.azure.core.ResourceGroupArgs; 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 testRandomUuid = new RandomUuid("testRandomUuid"); var testResourceGroup = new ResourceGroup("testResourceGroup", ResourceGroupArgs.builder() .location("Central US") .build()); } } ``` ## Import Random UUID's can be imported. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. ```sh $ pulumi import random:index/randomUuid:RandomUuid main aabbccdd-eeff-0011-2233-445566778899 ```
-
-
Constructor Summary
Constructors Constructor Description RandomUuid(java.lang.String name)RandomUuid(java.lang.String name, RandomUuidArgs args)RandomUuid(java.lang.String name, RandomUuidArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RandomUuidget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, RandomUuidState 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.Map<java.lang.String,java.lang.String>>>keepers()com.pulumi.core.Output<java.lang.String>result()
-
-
-
Constructor Detail
-
RandomUuid
public RandomUuid(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
RandomUuid
public RandomUuid(java.lang.String name, @Nullable RandomUuidArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
RandomUuid
public RandomUuid(java.lang.String name, @Nullable RandomUuidArgs 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
-
keepers
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> keepers()
- Returns:
- Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.
-
result
public com.pulumi.core.Output<java.lang.String> result()
- Returns:
- The generated uuid presented in string format.
-
get
public static RandomUuid get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable RandomUuidState 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.
-
-