Pulumi Random

class pulumi_random.Provider(resource_name, opts=None, __name__=None, __opts__=None)

The provider type for the random package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_random.RandomId(resource_name, opts=None, byte_length=None, keepers=None, prefix=None, __name__=None, __opts__=None)

The resource random_id generates random numbers that are intended to be used as unique identifiers for other resources.

This resource does use a cryptographic random number generator in order to minimize the chance of collisions, making the results of this resource when a 16-byte identifier is requested of equivalent uniqueness to a type-4 UUID.

This resource can be used in conjunction with resources that have the create_before_destroy lifecycle flag set to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • byte_length (pulumi.Input[int]) – The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.
  • keepers (pulumi.Input[dict]) – Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.
  • prefix (pulumi.Input[str]) – Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.
b64_std = None

The generated id presented in base64 without additional transformations.

b64_url = None

The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters _ and -.

byte_length = None

The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.

dec = None

The generated id presented in non-padded decimal digits.

hex = None

The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length.

keepers = None

Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.

prefix = None

Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_random.RandomInteger(resource_name, opts=None, keepers=None, max=None, min=None, seed=None, __name__=None, __opts__=None)

The resource random_integer generates random values from a given range, described by the min and max attributes of a given resource.

This resource can be used in conjunction with resources that have the create_before_destroy lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • keepers (pulumi.Input[dict]) – Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.
  • max (pulumi.Input[int]) – The maximum inclusive value of the range.
  • min (pulumi.Input[int]) – The minimum inclusive value of the range.
  • seed (pulumi.Input[str]) – A custom seed to always produce the same value.
keepers = None

Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.

max = None

The maximum inclusive value of the range.

min = None

The minimum inclusive value of the range.

result = None

(int) The random Integer result.

seed = None

A custom seed to always produce the same value.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_random.RandomPet(resource_name, opts=None, keepers=None, length=None, prefix=None, separator=None, __name__=None, __opts__=None)

The resource random_pet generates random pet names that are intended to be used as unique identifiers for other resources.

This resource can be used in conjunction with resources that have the create_before_destroy lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • keepers (pulumi.Input[dict]) – Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.
  • length (pulumi.Input[int]) – The length (in words) of the pet name.
  • prefix (pulumi.Input[str]) – A string to prefix the name with.
  • separator (pulumi.Input[str]) – The character to separate words in the pet name.
keepers = None

Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.

length = None

The length (in words) of the pet name.

prefix = None

A string to prefix the name with.

separator = None

The character to separate words in the pet name.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_random.RandomShuffle(resource_name, opts=None, inputs=None, keepers=None, result_count=None, seed=None, __name__=None, __opts__=None)

The resource random_shuffle generates a random permutation of a list of strings given as an argument.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • inputs (pulumi.Input[list]) – The list of strings to shuffle.
  • keepers (pulumi.Input[dict]) – Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.
  • result_count (pulumi.Input[int]) – The number of results to return. Defaults to the number of items in the input list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list.
  • seed (pulumi.Input[str]) – Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Important: Even with an identical seed, it is not guaranteed that the same permutation will be produced across different versions of Terraform. This argument causes the result to be less volatile, but not fixed for all time.
inputs = None

The list of strings to shuffle.

keepers = None

Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.

results = None

Random permutation of the list of strings given in input.

result_count = None

The number of results to return. Defaults to the number of items in the input list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list.

seed = None

Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Important: Even with an identical seed, it is not guaranteed that the same permutation will be produced across different versions of Terraform. This argument causes the result to be less volatile, but not fixed for all time.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_random.RandomString(resource_name, opts=None, keepers=None, length=None, lower=None, min_lower=None, min_numeric=None, min_special=None, min_upper=None, number=None, override_special=None, special=None, upper=None, __name__=None, __opts__=None)

The resource random_string generates a random permutation of alphanumeric characters and optionally special characters.

This resource does use a cryptographic random number generator.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • keepers (pulumi.Input[dict]) – Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.
  • length (pulumi.Input[int]) – The length of the string desired
  • lower (pulumi.Input[bool]) – (default true) Include lowercase alphabet characters in random string.
  • min_lower (pulumi.Input[int]) – (default 0) Minimum number of lowercase alphabet characters in random string.
  • min_numeric (pulumi.Input[int]) – (default 0) Minimum number of numeric characters in random string.
  • min_special (pulumi.Input[int]) – (default 0) Minimum number of special characters in random string.
  • min_upper (pulumi.Input[int]) – (default 0) Minimum number of uppercase alphabet characters in random string.
  • number (pulumi.Input[bool]) – (default true) Include numeric characters in random string.
  • override*special (pulumi.Input[str]) –

    Supply your own list of special characters to use for string generation. This overrides characters list in the special argument. The special argument must still be set to true for any overwritten characters to be used in generation.

  • special (pulumi.Input[bool]) – (default true) Include special characters in random string. These are ‘!@#$%&*()-*=+[]{}<>:?’
  • upper (pulumi.Input[bool]) – (default true) Include uppercase alphabet characters in random string.
keepers = None

Arbitrary map of values that, when changed, will trigger a new id to be generated. See the main provider documentation for more information.

length = None

The length of the string desired

lower = None

(default true) Include lowercase alphabet characters in random string.

min_lower = None

(default 0) Minimum number of lowercase alphabet characters in random string.

min_numeric = None

(default 0) Minimum number of numeric characters in random string.

min_special = None

(default 0) Minimum number of special characters in random string.

min_upper = None

(default 0) Minimum number of uppercase alphabet characters in random string.

number = None

(default true) Include numeric characters in random string.

override_special = None

Supply your own list of special characters to use for string generation. This overrides characters list in the special argument. The special argument must still be set to true for any overwritten characters to be used in generation.

result = None

Random string generated.

special = None

(default true) Include special characters in random string. These are ‘!@#$%&*()-_=+[]{}<>:?’

upper = None

(default true) Include uppercase alphabet characters in random string.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
class pulumi_random.RandomUuid(resource_name, opts=None, keepers=None, __name__=None, __opts__=None)

The resource random_uuid generates random uuid string that is intended to be used as unique identifiers for other resources.

This resource uses the hashicorp/go-uuid to generate a UUID-formatted string for use with services needed a unique string identifier.

Parameters:
  • resource_name (str) – The name of the resource.
  • opts (pulumi.ResourceOptions) – Options for the resource.
  • keepers (pulumi.Input[dict]) – Arbitrary map of values that, when changed, will trigger a new uuid to be generated. See the main provider documentation for more information.
keepers = None

Arbitrary map of values that, when changed, will trigger a new uuid to be generated. See the main provider documentation for more information.

result = None

The generated uuid presented in string format.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str
translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters:prop (str) – A property name.
Returns:A potentially transformed property name.
Return type:str