Documentation ¶
Overview ¶
A Pulumi package to safely use randomness in Pulumi programs.
Index ¶
- func PkgVersion() (semver.Version, error)
- type Provider
- func (*Provider) ElementType() reflect.Type
- func (i *Provider) ToProviderOutput() ProviderOutput
- func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
- func (i *Provider) ToProviderPtrOutput() ProviderPtrOutput
- func (i *Provider) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
- type ProviderArgs
- type ProviderInput
- type ProviderOutput
- func (ProviderOutput) ElementType() reflect.Type
- func (o ProviderOutput) ToProviderOutput() ProviderOutput
- func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
- func (o ProviderOutput) ToProviderPtrOutput() ProviderPtrOutput
- func (o ProviderOutput) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
- type ProviderPtrInput
- type ProviderPtrOutput
- type RandomId
- func (*RandomId) ElementType() reflect.Type
- func (i *RandomId) ToRandomIdOutput() RandomIdOutput
- func (i *RandomId) ToRandomIdOutputWithContext(ctx context.Context) RandomIdOutput
- func (i *RandomId) ToRandomIdPtrOutput() RandomIdPtrOutput
- func (i *RandomId) ToRandomIdPtrOutputWithContext(ctx context.Context) RandomIdPtrOutput
- type RandomIdArgs
- type RandomIdArray
- type RandomIdArrayInput
- type RandomIdArrayOutput
- type RandomIdInput
- type RandomIdMap
- type RandomIdMapInput
- type RandomIdMapOutput
- type RandomIdOutput
- func (RandomIdOutput) ElementType() reflect.Type
- func (o RandomIdOutput) ToRandomIdOutput() RandomIdOutput
- func (o RandomIdOutput) ToRandomIdOutputWithContext(ctx context.Context) RandomIdOutput
- func (o RandomIdOutput) ToRandomIdPtrOutput() RandomIdPtrOutput
- func (o RandomIdOutput) ToRandomIdPtrOutputWithContext(ctx context.Context) RandomIdPtrOutput
- type RandomIdPtrInput
- type RandomIdPtrOutput
- type RandomIdState
- type RandomInteger
- func (*RandomInteger) ElementType() reflect.Type
- func (i *RandomInteger) ToRandomIntegerOutput() RandomIntegerOutput
- func (i *RandomInteger) ToRandomIntegerOutputWithContext(ctx context.Context) RandomIntegerOutput
- func (i *RandomInteger) ToRandomIntegerPtrOutput() RandomIntegerPtrOutput
- func (i *RandomInteger) ToRandomIntegerPtrOutputWithContext(ctx context.Context) RandomIntegerPtrOutput
- type RandomIntegerArgs
- type RandomIntegerArray
- type RandomIntegerArrayInput
- type RandomIntegerArrayOutput
- func (RandomIntegerArrayOutput) ElementType() reflect.Type
- func (o RandomIntegerArrayOutput) Index(i pulumi.IntInput) RandomIntegerOutput
- func (o RandomIntegerArrayOutput) ToRandomIntegerArrayOutput() RandomIntegerArrayOutput
- func (o RandomIntegerArrayOutput) ToRandomIntegerArrayOutputWithContext(ctx context.Context) RandomIntegerArrayOutput
- type RandomIntegerInput
- type RandomIntegerMap
- type RandomIntegerMapInput
- type RandomIntegerMapOutput
- func (RandomIntegerMapOutput) ElementType() reflect.Type
- func (o RandomIntegerMapOutput) MapIndex(k pulumi.StringInput) RandomIntegerOutput
- func (o RandomIntegerMapOutput) ToRandomIntegerMapOutput() RandomIntegerMapOutput
- func (o RandomIntegerMapOutput) ToRandomIntegerMapOutputWithContext(ctx context.Context) RandomIntegerMapOutput
- type RandomIntegerOutput
- func (RandomIntegerOutput) ElementType() reflect.Type
- func (o RandomIntegerOutput) ToRandomIntegerOutput() RandomIntegerOutput
- func (o RandomIntegerOutput) ToRandomIntegerOutputWithContext(ctx context.Context) RandomIntegerOutput
- func (o RandomIntegerOutput) ToRandomIntegerPtrOutput() RandomIntegerPtrOutput
- func (o RandomIntegerOutput) ToRandomIntegerPtrOutputWithContext(ctx context.Context) RandomIntegerPtrOutput
- type RandomIntegerPtrInput
- type RandomIntegerPtrOutput
- type RandomIntegerState
- type RandomPassword
- func (*RandomPassword) ElementType() reflect.Type
- func (i *RandomPassword) ToRandomPasswordOutput() RandomPasswordOutput
- func (i *RandomPassword) ToRandomPasswordOutputWithContext(ctx context.Context) RandomPasswordOutput
- func (i *RandomPassword) ToRandomPasswordPtrOutput() RandomPasswordPtrOutput
- func (i *RandomPassword) ToRandomPasswordPtrOutputWithContext(ctx context.Context) RandomPasswordPtrOutput
- type RandomPasswordArgs
- type RandomPasswordArray
- type RandomPasswordArrayInput
- type RandomPasswordArrayOutput
- func (RandomPasswordArrayOutput) ElementType() reflect.Type
- func (o RandomPasswordArrayOutput) Index(i pulumi.IntInput) RandomPasswordOutput
- func (o RandomPasswordArrayOutput) ToRandomPasswordArrayOutput() RandomPasswordArrayOutput
- func (o RandomPasswordArrayOutput) ToRandomPasswordArrayOutputWithContext(ctx context.Context) RandomPasswordArrayOutput
- type RandomPasswordInput
- type RandomPasswordMap
- type RandomPasswordMapInput
- type RandomPasswordMapOutput
- func (RandomPasswordMapOutput) ElementType() reflect.Type
- func (o RandomPasswordMapOutput) MapIndex(k pulumi.StringInput) RandomPasswordOutput
- func (o RandomPasswordMapOutput) ToRandomPasswordMapOutput() RandomPasswordMapOutput
- func (o RandomPasswordMapOutput) ToRandomPasswordMapOutputWithContext(ctx context.Context) RandomPasswordMapOutput
- type RandomPasswordOutput
- func (RandomPasswordOutput) ElementType() reflect.Type
- func (o RandomPasswordOutput) ToRandomPasswordOutput() RandomPasswordOutput
- func (o RandomPasswordOutput) ToRandomPasswordOutputWithContext(ctx context.Context) RandomPasswordOutput
- func (o RandomPasswordOutput) ToRandomPasswordPtrOutput() RandomPasswordPtrOutput
- func (o RandomPasswordOutput) ToRandomPasswordPtrOutputWithContext(ctx context.Context) RandomPasswordPtrOutput
- type RandomPasswordPtrInput
- type RandomPasswordPtrOutput
- type RandomPasswordState
- type RandomPet
- func (*RandomPet) ElementType() reflect.Type
- func (i *RandomPet) ToRandomPetOutput() RandomPetOutput
- func (i *RandomPet) ToRandomPetOutputWithContext(ctx context.Context) RandomPetOutput
- func (i *RandomPet) ToRandomPetPtrOutput() RandomPetPtrOutput
- func (i *RandomPet) ToRandomPetPtrOutputWithContext(ctx context.Context) RandomPetPtrOutput
- type RandomPetArgs
- type RandomPetArray
- type RandomPetArrayInput
- type RandomPetArrayOutput
- func (RandomPetArrayOutput) ElementType() reflect.Type
- func (o RandomPetArrayOutput) Index(i pulumi.IntInput) RandomPetOutput
- func (o RandomPetArrayOutput) ToRandomPetArrayOutput() RandomPetArrayOutput
- func (o RandomPetArrayOutput) ToRandomPetArrayOutputWithContext(ctx context.Context) RandomPetArrayOutput
- type RandomPetInput
- type RandomPetMap
- type RandomPetMapInput
- type RandomPetMapOutput
- type RandomPetOutput
- func (RandomPetOutput) ElementType() reflect.Type
- func (o RandomPetOutput) ToRandomPetOutput() RandomPetOutput
- func (o RandomPetOutput) ToRandomPetOutputWithContext(ctx context.Context) RandomPetOutput
- func (o RandomPetOutput) ToRandomPetPtrOutput() RandomPetPtrOutput
- func (o RandomPetOutput) ToRandomPetPtrOutputWithContext(ctx context.Context) RandomPetPtrOutput
- type RandomPetPtrInput
- type RandomPetPtrOutput
- type RandomPetState
- type RandomShuffle
- func (*RandomShuffle) ElementType() reflect.Type
- func (i *RandomShuffle) ToRandomShuffleOutput() RandomShuffleOutput
- func (i *RandomShuffle) ToRandomShuffleOutputWithContext(ctx context.Context) RandomShuffleOutput
- func (i *RandomShuffle) ToRandomShufflePtrOutput() RandomShufflePtrOutput
- func (i *RandomShuffle) ToRandomShufflePtrOutputWithContext(ctx context.Context) RandomShufflePtrOutput
- type RandomShuffleArgs
- type RandomShuffleArray
- type RandomShuffleArrayInput
- type RandomShuffleArrayOutput
- func (RandomShuffleArrayOutput) ElementType() reflect.Type
- func (o RandomShuffleArrayOutput) Index(i pulumi.IntInput) RandomShuffleOutput
- func (o RandomShuffleArrayOutput) ToRandomShuffleArrayOutput() RandomShuffleArrayOutput
- func (o RandomShuffleArrayOutput) ToRandomShuffleArrayOutputWithContext(ctx context.Context) RandomShuffleArrayOutput
- type RandomShuffleInput
- type RandomShuffleMap
- type RandomShuffleMapInput
- type RandomShuffleMapOutput
- func (RandomShuffleMapOutput) ElementType() reflect.Type
- func (o RandomShuffleMapOutput) MapIndex(k pulumi.StringInput) RandomShuffleOutput
- func (o RandomShuffleMapOutput) ToRandomShuffleMapOutput() RandomShuffleMapOutput
- func (o RandomShuffleMapOutput) ToRandomShuffleMapOutputWithContext(ctx context.Context) RandomShuffleMapOutput
- type RandomShuffleOutput
- func (RandomShuffleOutput) ElementType() reflect.Type
- func (o RandomShuffleOutput) ToRandomShuffleOutput() RandomShuffleOutput
- func (o RandomShuffleOutput) ToRandomShuffleOutputWithContext(ctx context.Context) RandomShuffleOutput
- func (o RandomShuffleOutput) ToRandomShufflePtrOutput() RandomShufflePtrOutput
- func (o RandomShuffleOutput) ToRandomShufflePtrOutputWithContext(ctx context.Context) RandomShufflePtrOutput
- type RandomShufflePtrInput
- type RandomShufflePtrOutput
- type RandomShuffleState
- type RandomString
- func (*RandomString) ElementType() reflect.Type
- func (i *RandomString) ToRandomStringOutput() RandomStringOutput
- func (i *RandomString) ToRandomStringOutputWithContext(ctx context.Context) RandomStringOutput
- func (i *RandomString) ToRandomStringPtrOutput() RandomStringPtrOutput
- func (i *RandomString) ToRandomStringPtrOutputWithContext(ctx context.Context) RandomStringPtrOutput
- type RandomStringArgs
- type RandomStringArray
- type RandomStringArrayInput
- type RandomStringArrayOutput
- func (RandomStringArrayOutput) ElementType() reflect.Type
- func (o RandomStringArrayOutput) Index(i pulumi.IntInput) RandomStringOutput
- func (o RandomStringArrayOutput) ToRandomStringArrayOutput() RandomStringArrayOutput
- func (o RandomStringArrayOutput) ToRandomStringArrayOutputWithContext(ctx context.Context) RandomStringArrayOutput
- type RandomStringInput
- type RandomStringMap
- type RandomStringMapInput
- type RandomStringMapOutput
- func (RandomStringMapOutput) ElementType() reflect.Type
- func (o RandomStringMapOutput) MapIndex(k pulumi.StringInput) RandomStringOutput
- func (o RandomStringMapOutput) ToRandomStringMapOutput() RandomStringMapOutput
- func (o RandomStringMapOutput) ToRandomStringMapOutputWithContext(ctx context.Context) RandomStringMapOutput
- type RandomStringOutput
- func (RandomStringOutput) ElementType() reflect.Type
- func (o RandomStringOutput) ToRandomStringOutput() RandomStringOutput
- func (o RandomStringOutput) ToRandomStringOutputWithContext(ctx context.Context) RandomStringOutput
- func (o RandomStringOutput) ToRandomStringPtrOutput() RandomStringPtrOutput
- func (o RandomStringOutput) ToRandomStringPtrOutputWithContext(ctx context.Context) RandomStringPtrOutput
- type RandomStringPtrInput
- type RandomStringPtrOutput
- type RandomStringState
- type RandomUuid
- func (*RandomUuid) ElementType() reflect.Type
- func (i *RandomUuid) ToRandomUuidOutput() RandomUuidOutput
- func (i *RandomUuid) ToRandomUuidOutputWithContext(ctx context.Context) RandomUuidOutput
- func (i *RandomUuid) ToRandomUuidPtrOutput() RandomUuidPtrOutput
- func (i *RandomUuid) ToRandomUuidPtrOutputWithContext(ctx context.Context) RandomUuidPtrOutput
- type RandomUuidArgs
- type RandomUuidArray
- type RandomUuidArrayInput
- type RandomUuidArrayOutput
- func (RandomUuidArrayOutput) ElementType() reflect.Type
- func (o RandomUuidArrayOutput) Index(i pulumi.IntInput) RandomUuidOutput
- func (o RandomUuidArrayOutput) ToRandomUuidArrayOutput() RandomUuidArrayOutput
- func (o RandomUuidArrayOutput) ToRandomUuidArrayOutputWithContext(ctx context.Context) RandomUuidArrayOutput
- type RandomUuidInput
- type RandomUuidMap
- type RandomUuidMapInput
- type RandomUuidMapOutput
- func (RandomUuidMapOutput) ElementType() reflect.Type
- func (o RandomUuidMapOutput) MapIndex(k pulumi.StringInput) RandomUuidOutput
- func (o RandomUuidMapOutput) ToRandomUuidMapOutput() RandomUuidMapOutput
- func (o RandomUuidMapOutput) ToRandomUuidMapOutputWithContext(ctx context.Context) RandomUuidMapOutput
- type RandomUuidOutput
- func (RandomUuidOutput) ElementType() reflect.Type
- func (o RandomUuidOutput) ToRandomUuidOutput() RandomUuidOutput
- func (o RandomUuidOutput) ToRandomUuidOutputWithContext(ctx context.Context) RandomUuidOutput
- func (o RandomUuidOutput) ToRandomUuidPtrOutput() RandomUuidPtrOutput
- func (o RandomUuidOutput) ToRandomUuidPtrOutputWithContext(ctx context.Context) RandomUuidPtrOutput
- type RandomUuidPtrInput
- type RandomUuidPtrOutput
- type RandomUuidState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PkgVersion ¶
PkgVersion uses reflection to determine the version of the current package.
Types ¶
type Provider ¶
type Provider struct {
pulumi.ProviderResourceState
}
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](https://www.pulumi.com/docs/reference/programming-model/#providers) for more information.
func NewProvider ¶
func NewProvider(ctx *pulumi.Context, name string, args *ProviderArgs, opts ...pulumi.ResourceOption) (*Provider, error)
NewProvider registers a new resource with the given unique name, arguments, and options.
func (*Provider) ElementType ¶
func (*Provider) ToProviderOutput ¶
func (i *Provider) ToProviderOutput() ProviderOutput
func (*Provider) ToProviderOutputWithContext ¶
func (i *Provider) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
func (*Provider) ToProviderPtrOutput ¶
func (i *Provider) ToProviderPtrOutput() ProviderPtrOutput
func (*Provider) ToProviderPtrOutputWithContext ¶
func (i *Provider) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
type ProviderArgs ¶
type ProviderArgs struct { }
The set of arguments for constructing a Provider resource.
func (ProviderArgs) ElementType ¶
func (ProviderArgs) ElementType() reflect.Type
type ProviderInput ¶
type ProviderInput interface { pulumi.Input ToProviderOutput() ProviderOutput ToProviderOutputWithContext(ctx context.Context) ProviderOutput }
type ProviderOutput ¶
type ProviderOutput struct {
*pulumi.OutputState
}
func (ProviderOutput) ElementType ¶
func (ProviderOutput) ElementType() reflect.Type
func (ProviderOutput) ToProviderOutput ¶
func (o ProviderOutput) ToProviderOutput() ProviderOutput
func (ProviderOutput) ToProviderOutputWithContext ¶
func (o ProviderOutput) ToProviderOutputWithContext(ctx context.Context) ProviderOutput
func (ProviderOutput) ToProviderPtrOutput ¶
func (o ProviderOutput) ToProviderPtrOutput() ProviderPtrOutput
func (ProviderOutput) ToProviderPtrOutputWithContext ¶
func (o ProviderOutput) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
type ProviderPtrInput ¶
type ProviderPtrInput interface { pulumi.Input ToProviderPtrOutput() ProviderPtrOutput ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput }
type ProviderPtrOutput ¶
type ProviderPtrOutput struct {
*pulumi.OutputState
}
func (ProviderPtrOutput) ElementType ¶
func (ProviderPtrOutput) ElementType() reflect.Type
func (ProviderPtrOutput) ToProviderPtrOutput ¶
func (o ProviderPtrOutput) ToProviderPtrOutput() ProviderPtrOutput
func (ProviderPtrOutput) ToProviderPtrOutputWithContext ¶
func (o ProviderPtrOutput) ToProviderPtrOutputWithContext(ctx context.Context) ProviderPtrOutput
type RandomId ¶
type RandomId struct { pulumi.CustomResourceState // The generated id presented in base64 without additional transformations. B64Std pulumi.StringOutput `pulumi:"b64Std"` // The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters `_` and `-`. B64Url pulumi.StringOutput `pulumi:"b64Url"` // The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. ByteLength pulumi.IntOutput `pulumi:"byteLength"` // The generated id presented in non-padded decimal digits. Dec pulumi.StringOutput `pulumi:"dec"` // The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length. Hex pulumi.StringOutput `pulumi:"hex"` // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapOutput `pulumi:"keepers"` // 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. Prefix pulumi.StringPtrOutput `pulumi:"prefix"` }
The resource `RandomId` 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 `createBeforeDestroy` lifecycle flag set to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.
## Import
Random IDs can be imported using the b64_url with an optional prefix. This # can be used to replace a config value with a value interpolated from the # random provider without experiencing diffs. # Example with no prefix ¶
```sh
$ pulumi import random:index/randomId:RandomId server p-9hUg
```
Example with prefix (prefix is separated by a ,) ¶
```sh
$ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg
```
func GetRandomId ¶
func GetRandomId(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RandomIdState, opts ...pulumi.ResourceOption) (*RandomId, error)
GetRandomId gets an existing RandomId resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRandomId ¶
func NewRandomId(ctx *pulumi.Context, name string, args *RandomIdArgs, opts ...pulumi.ResourceOption) (*RandomId, error)
NewRandomId registers a new resource with the given unique name, arguments, and options.
func (*RandomId) ElementType ¶
func (*RandomId) ToRandomIdOutput ¶
func (i *RandomId) ToRandomIdOutput() RandomIdOutput
func (*RandomId) ToRandomIdOutputWithContext ¶
func (i *RandomId) ToRandomIdOutputWithContext(ctx context.Context) RandomIdOutput
func (*RandomId) ToRandomIdPtrOutput ¶
func (i *RandomId) ToRandomIdPtrOutput() RandomIdPtrOutput
func (*RandomId) ToRandomIdPtrOutputWithContext ¶
func (i *RandomId) ToRandomIdPtrOutputWithContext(ctx context.Context) RandomIdPtrOutput
type RandomIdArgs ¶
type RandomIdArgs struct { // The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. ByteLength pulumi.IntInput // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // 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. Prefix pulumi.StringPtrInput }
The set of arguments for constructing a RandomId resource.
func (RandomIdArgs) ElementType ¶
func (RandomIdArgs) ElementType() reflect.Type
type RandomIdArray ¶
type RandomIdArray []RandomIdInput
func (RandomIdArray) ElementType ¶
func (RandomIdArray) ElementType() reflect.Type
func (RandomIdArray) ToRandomIdArrayOutput ¶
func (i RandomIdArray) ToRandomIdArrayOutput() RandomIdArrayOutput
func (RandomIdArray) ToRandomIdArrayOutputWithContext ¶
func (i RandomIdArray) ToRandomIdArrayOutputWithContext(ctx context.Context) RandomIdArrayOutput
type RandomIdArrayInput ¶
type RandomIdArrayInput interface { pulumi.Input ToRandomIdArrayOutput() RandomIdArrayOutput ToRandomIdArrayOutputWithContext(context.Context) RandomIdArrayOutput }
RandomIdArrayInput is an input type that accepts RandomIdArray and RandomIdArrayOutput values. You can construct a concrete instance of `RandomIdArrayInput` via:
RandomIdArray{ RandomIdArgs{...} }
type RandomIdArrayOutput ¶
type RandomIdArrayOutput struct{ *pulumi.OutputState }
func (RandomIdArrayOutput) ElementType ¶
func (RandomIdArrayOutput) ElementType() reflect.Type
func (RandomIdArrayOutput) Index ¶
func (o RandomIdArrayOutput) Index(i pulumi.IntInput) RandomIdOutput
func (RandomIdArrayOutput) ToRandomIdArrayOutput ¶
func (o RandomIdArrayOutput) ToRandomIdArrayOutput() RandomIdArrayOutput
func (RandomIdArrayOutput) ToRandomIdArrayOutputWithContext ¶
func (o RandomIdArrayOutput) ToRandomIdArrayOutputWithContext(ctx context.Context) RandomIdArrayOutput
type RandomIdInput ¶
type RandomIdInput interface { pulumi.Input ToRandomIdOutput() RandomIdOutput ToRandomIdOutputWithContext(ctx context.Context) RandomIdOutput }
type RandomIdMap ¶
type RandomIdMap map[string]RandomIdInput
func (RandomIdMap) ElementType ¶
func (RandomIdMap) ElementType() reflect.Type
func (RandomIdMap) ToRandomIdMapOutput ¶
func (i RandomIdMap) ToRandomIdMapOutput() RandomIdMapOutput
func (RandomIdMap) ToRandomIdMapOutputWithContext ¶
func (i RandomIdMap) ToRandomIdMapOutputWithContext(ctx context.Context) RandomIdMapOutput
type RandomIdMapInput ¶
type RandomIdMapInput interface { pulumi.Input ToRandomIdMapOutput() RandomIdMapOutput ToRandomIdMapOutputWithContext(context.Context) RandomIdMapOutput }
RandomIdMapInput is an input type that accepts RandomIdMap and RandomIdMapOutput values. You can construct a concrete instance of `RandomIdMapInput` via:
RandomIdMap{ "key": RandomIdArgs{...} }
type RandomIdMapOutput ¶
type RandomIdMapOutput struct{ *pulumi.OutputState }
func (RandomIdMapOutput) ElementType ¶
func (RandomIdMapOutput) ElementType() reflect.Type
func (RandomIdMapOutput) MapIndex ¶
func (o RandomIdMapOutput) MapIndex(k pulumi.StringInput) RandomIdOutput
func (RandomIdMapOutput) ToRandomIdMapOutput ¶
func (o RandomIdMapOutput) ToRandomIdMapOutput() RandomIdMapOutput
func (RandomIdMapOutput) ToRandomIdMapOutputWithContext ¶
func (o RandomIdMapOutput) ToRandomIdMapOutputWithContext(ctx context.Context) RandomIdMapOutput
type RandomIdOutput ¶
type RandomIdOutput struct {
*pulumi.OutputState
}
func (RandomIdOutput) ElementType ¶
func (RandomIdOutput) ElementType() reflect.Type
func (RandomIdOutput) ToRandomIdOutput ¶
func (o RandomIdOutput) ToRandomIdOutput() RandomIdOutput
func (RandomIdOutput) ToRandomIdOutputWithContext ¶
func (o RandomIdOutput) ToRandomIdOutputWithContext(ctx context.Context) RandomIdOutput
func (RandomIdOutput) ToRandomIdPtrOutput ¶
func (o RandomIdOutput) ToRandomIdPtrOutput() RandomIdPtrOutput
func (RandomIdOutput) ToRandomIdPtrOutputWithContext ¶
func (o RandomIdOutput) ToRandomIdPtrOutputWithContext(ctx context.Context) RandomIdPtrOutput
type RandomIdPtrInput ¶
type RandomIdPtrInput interface { pulumi.Input ToRandomIdPtrOutput() RandomIdPtrOutput ToRandomIdPtrOutputWithContext(ctx context.Context) RandomIdPtrOutput }
type RandomIdPtrOutput ¶
type RandomIdPtrOutput struct {
*pulumi.OutputState
}
func (RandomIdPtrOutput) ElementType ¶
func (RandomIdPtrOutput) ElementType() reflect.Type
func (RandomIdPtrOutput) ToRandomIdPtrOutput ¶
func (o RandomIdPtrOutput) ToRandomIdPtrOutput() RandomIdPtrOutput
func (RandomIdPtrOutput) ToRandomIdPtrOutputWithContext ¶
func (o RandomIdPtrOutput) ToRandomIdPtrOutputWithContext(ctx context.Context) RandomIdPtrOutput
type RandomIdState ¶
type RandomIdState struct { // The generated id presented in base64 without additional transformations. B64Std pulumi.StringPtrInput // The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters `_` and `-`. B64Url pulumi.StringPtrInput // The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. ByteLength pulumi.IntPtrInput // The generated id presented in non-padded decimal digits. Dec pulumi.StringPtrInput // The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length. Hex pulumi.StringPtrInput // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // 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. Prefix pulumi.StringPtrInput }
func (RandomIdState) ElementType ¶
func (RandomIdState) ElementType() reflect.Type
type RandomInteger ¶
type RandomInteger struct { pulumi.CustomResourceState // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapOutput `pulumi:"keepers"` // The maximum inclusive value of the range. Max pulumi.IntOutput `pulumi:"max"` // The minimum inclusive value of the range. Min pulumi.IntOutput `pulumi:"min"` // The random integer result. Result pulumi.IntOutput `pulumi:"result"` // A custom seed to always produce the same value. Seed pulumi.StringPtrOutput `pulumi:"seed"` }
The resource `RandomInteger` 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 `createBeforeDestroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/alb" "github.com/pulumi/pulumi-random/sdk/v4/go/random" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { priority, err := random.NewRandomInteger(ctx, "priority", &random.RandomIntegerArgs{ Min: pulumi.Int(1), Max: pulumi.Int(50000), Keepers: pulumi.AnyMap{ "listener_arn": pulumi.Any(_var.Listener_arn), }, }) if err != nil { return err } _, err = alb.NewListenerRule(ctx, "main", &alb.ListenerRuleArgs{ ListenerArn: pulumi.Any(_var.Listener_arn), Priority: priority.Result, Actions: alb.ListenerRuleActionArray{ &alb.ListenerRuleActionArgs{ Type: pulumi.String("forward"), TargetGroupArn: pulumi.Any(_var.Target_group_arn), }, }, }) if err != nil { return err } return nil }) }
```
## Import
Random integers can be imported using the result, min, and max, with an # optional seed. This can be used to replace a config value with a value # interpolated from the random provider without experiencing diffs. # Example (values are separated by a ,) ¶
```sh
$ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000
```
func GetRandomInteger ¶
func GetRandomInteger(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RandomIntegerState, opts ...pulumi.ResourceOption) (*RandomInteger, error)
GetRandomInteger gets an existing RandomInteger resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRandomInteger ¶
func NewRandomInteger(ctx *pulumi.Context, name string, args *RandomIntegerArgs, opts ...pulumi.ResourceOption) (*RandomInteger, error)
NewRandomInteger registers a new resource with the given unique name, arguments, and options.
func (*RandomInteger) ElementType ¶
func (*RandomInteger) ElementType() reflect.Type
func (*RandomInteger) ToRandomIntegerOutput ¶
func (i *RandomInteger) ToRandomIntegerOutput() RandomIntegerOutput
func (*RandomInteger) ToRandomIntegerOutputWithContext ¶
func (i *RandomInteger) ToRandomIntegerOutputWithContext(ctx context.Context) RandomIntegerOutput
func (*RandomInteger) ToRandomIntegerPtrOutput ¶
func (i *RandomInteger) ToRandomIntegerPtrOutput() RandomIntegerPtrOutput
func (*RandomInteger) ToRandomIntegerPtrOutputWithContext ¶
func (i *RandomInteger) ToRandomIntegerPtrOutputWithContext(ctx context.Context) RandomIntegerPtrOutput
type RandomIntegerArgs ¶
type RandomIntegerArgs struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The maximum inclusive value of the range. Max pulumi.IntInput // The minimum inclusive value of the range. Min pulumi.IntInput // A custom seed to always produce the same value. Seed pulumi.StringPtrInput }
The set of arguments for constructing a RandomInteger resource.
func (RandomIntegerArgs) ElementType ¶
func (RandomIntegerArgs) ElementType() reflect.Type
type RandomIntegerArray ¶
type RandomIntegerArray []RandomIntegerInput
func (RandomIntegerArray) ElementType ¶
func (RandomIntegerArray) ElementType() reflect.Type
func (RandomIntegerArray) ToRandomIntegerArrayOutput ¶
func (i RandomIntegerArray) ToRandomIntegerArrayOutput() RandomIntegerArrayOutput
func (RandomIntegerArray) ToRandomIntegerArrayOutputWithContext ¶
func (i RandomIntegerArray) ToRandomIntegerArrayOutputWithContext(ctx context.Context) RandomIntegerArrayOutput
type RandomIntegerArrayInput ¶
type RandomIntegerArrayInput interface { pulumi.Input ToRandomIntegerArrayOutput() RandomIntegerArrayOutput ToRandomIntegerArrayOutputWithContext(context.Context) RandomIntegerArrayOutput }
RandomIntegerArrayInput is an input type that accepts RandomIntegerArray and RandomIntegerArrayOutput values. You can construct a concrete instance of `RandomIntegerArrayInput` via:
RandomIntegerArray{ RandomIntegerArgs{...} }
type RandomIntegerArrayOutput ¶
type RandomIntegerArrayOutput struct{ *pulumi.OutputState }
func (RandomIntegerArrayOutput) ElementType ¶
func (RandomIntegerArrayOutput) ElementType() reflect.Type
func (RandomIntegerArrayOutput) Index ¶
func (o RandomIntegerArrayOutput) Index(i pulumi.IntInput) RandomIntegerOutput
func (RandomIntegerArrayOutput) ToRandomIntegerArrayOutput ¶
func (o RandomIntegerArrayOutput) ToRandomIntegerArrayOutput() RandomIntegerArrayOutput
func (RandomIntegerArrayOutput) ToRandomIntegerArrayOutputWithContext ¶
func (o RandomIntegerArrayOutput) ToRandomIntegerArrayOutputWithContext(ctx context.Context) RandomIntegerArrayOutput
type RandomIntegerInput ¶
type RandomIntegerInput interface { pulumi.Input ToRandomIntegerOutput() RandomIntegerOutput ToRandomIntegerOutputWithContext(ctx context.Context) RandomIntegerOutput }
type RandomIntegerMap ¶
type RandomIntegerMap map[string]RandomIntegerInput
func (RandomIntegerMap) ElementType ¶
func (RandomIntegerMap) ElementType() reflect.Type
func (RandomIntegerMap) ToRandomIntegerMapOutput ¶
func (i RandomIntegerMap) ToRandomIntegerMapOutput() RandomIntegerMapOutput
func (RandomIntegerMap) ToRandomIntegerMapOutputWithContext ¶
func (i RandomIntegerMap) ToRandomIntegerMapOutputWithContext(ctx context.Context) RandomIntegerMapOutput
type RandomIntegerMapInput ¶
type RandomIntegerMapInput interface { pulumi.Input ToRandomIntegerMapOutput() RandomIntegerMapOutput ToRandomIntegerMapOutputWithContext(context.Context) RandomIntegerMapOutput }
RandomIntegerMapInput is an input type that accepts RandomIntegerMap and RandomIntegerMapOutput values. You can construct a concrete instance of `RandomIntegerMapInput` via:
RandomIntegerMap{ "key": RandomIntegerArgs{...} }
type RandomIntegerMapOutput ¶
type RandomIntegerMapOutput struct{ *pulumi.OutputState }
func (RandomIntegerMapOutput) ElementType ¶
func (RandomIntegerMapOutput) ElementType() reflect.Type
func (RandomIntegerMapOutput) MapIndex ¶
func (o RandomIntegerMapOutput) MapIndex(k pulumi.StringInput) RandomIntegerOutput
func (RandomIntegerMapOutput) ToRandomIntegerMapOutput ¶
func (o RandomIntegerMapOutput) ToRandomIntegerMapOutput() RandomIntegerMapOutput
func (RandomIntegerMapOutput) ToRandomIntegerMapOutputWithContext ¶
func (o RandomIntegerMapOutput) ToRandomIntegerMapOutputWithContext(ctx context.Context) RandomIntegerMapOutput
type RandomIntegerOutput ¶
type RandomIntegerOutput struct {
*pulumi.OutputState
}
func (RandomIntegerOutput) ElementType ¶
func (RandomIntegerOutput) ElementType() reflect.Type
func (RandomIntegerOutput) ToRandomIntegerOutput ¶
func (o RandomIntegerOutput) ToRandomIntegerOutput() RandomIntegerOutput
func (RandomIntegerOutput) ToRandomIntegerOutputWithContext ¶
func (o RandomIntegerOutput) ToRandomIntegerOutputWithContext(ctx context.Context) RandomIntegerOutput
func (RandomIntegerOutput) ToRandomIntegerPtrOutput ¶
func (o RandomIntegerOutput) ToRandomIntegerPtrOutput() RandomIntegerPtrOutput
func (RandomIntegerOutput) ToRandomIntegerPtrOutputWithContext ¶
func (o RandomIntegerOutput) ToRandomIntegerPtrOutputWithContext(ctx context.Context) RandomIntegerPtrOutput
type RandomIntegerPtrInput ¶
type RandomIntegerPtrInput interface { pulumi.Input ToRandomIntegerPtrOutput() RandomIntegerPtrOutput ToRandomIntegerPtrOutputWithContext(ctx context.Context) RandomIntegerPtrOutput }
type RandomIntegerPtrOutput ¶
type RandomIntegerPtrOutput struct {
*pulumi.OutputState
}
func (RandomIntegerPtrOutput) ElementType ¶
func (RandomIntegerPtrOutput) ElementType() reflect.Type
func (RandomIntegerPtrOutput) ToRandomIntegerPtrOutput ¶
func (o RandomIntegerPtrOutput) ToRandomIntegerPtrOutput() RandomIntegerPtrOutput
func (RandomIntegerPtrOutput) ToRandomIntegerPtrOutputWithContext ¶
func (o RandomIntegerPtrOutput) ToRandomIntegerPtrOutputWithContext(ctx context.Context) RandomIntegerPtrOutput
type RandomIntegerState ¶
type RandomIntegerState struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The maximum inclusive value of the range. Max pulumi.IntPtrInput // The minimum inclusive value of the range. Min pulumi.IntPtrInput // The random integer result. Result pulumi.IntPtrInput // A custom seed to always produce the same value. Seed pulumi.StringPtrInput }
func (RandomIntegerState) ElementType ¶
func (RandomIntegerState) ElementType() reflect.Type
type RandomPassword ¶
type RandomPassword struct { pulumi.CustomResourceState // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapOutput `pulumi:"keepers"` // The length of the string desired. Length pulumi.IntOutput `pulumi:"length"` // Include lowercase alphabet characters in the result. Lower pulumi.BoolPtrOutput `pulumi:"lower"` // Minimum number of lowercase alphabet characters in the result. MinLower pulumi.IntPtrOutput `pulumi:"minLower"` // Minimum number of numeric characters in the result. MinNumeric pulumi.IntPtrOutput `pulumi:"minNumeric"` // Minimum number of special characters in the result. MinSpecial pulumi.IntPtrOutput `pulumi:"minSpecial"` // Minimum number of uppercase alphabet characters in the result. MinUpper pulumi.IntPtrOutput `pulumi:"minUpper"` // Include numeric characters in the result. Number pulumi.BoolPtrOutput `pulumi:"number"` // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrOutput `pulumi:"overrideSpecial"` // The generated random string. Result pulumi.StringOutput `pulumi:"result"` // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` Special pulumi.BoolPtrOutput `pulumi:"special"` // Include uppercase alphabet characters in the result. Upper pulumi.BoolPtrOutput `pulumi:"upper"` }
Identical to RandomString with the exception that the result is treated as sensitive and, thus, _not_ displayed in console output.
This resource *does* use a cryptographic random number generator.
## Example Usage
```go package main
import (
"fmt" "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/rds" "github.com/pulumi/pulumi-random/sdk/v4/go/random" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { password, err := random.NewRandomPassword(ctx, "password", &random.RandomPasswordArgs{ Length: pulumi.Int(16), Special: pulumi.Bool(true), OverrideSpecial: pulumi.String(fmt.Sprintf("%v%v%v", "_", "%", "@")), }) if err != nil { return err } _, err = rds.NewInstance(ctx, "example", &rds.InstanceArgs{ InstanceClass: pulumi.String("db.t3.micro"), AllocatedStorage: pulumi.Int(64), Engine: pulumi.String("mysql"), Username: pulumi.String("someone"), Password: password.Result, }) if err != nil { return err } return nil }) }
```
## Import
Random Password can be imported by specifying the value of the string ¶
```sh
$ pulumi import random:index/randomPassword:RandomPassword password securepassword
```
func GetRandomPassword ¶
func GetRandomPassword(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RandomPasswordState, opts ...pulumi.ResourceOption) (*RandomPassword, error)
GetRandomPassword gets an existing RandomPassword resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRandomPassword ¶
func NewRandomPassword(ctx *pulumi.Context, name string, args *RandomPasswordArgs, opts ...pulumi.ResourceOption) (*RandomPassword, error)
NewRandomPassword registers a new resource with the given unique name, arguments, and options.
func (*RandomPassword) ElementType ¶
func (*RandomPassword) ElementType() reflect.Type
func (*RandomPassword) ToRandomPasswordOutput ¶
func (i *RandomPassword) ToRandomPasswordOutput() RandomPasswordOutput
func (*RandomPassword) ToRandomPasswordOutputWithContext ¶
func (i *RandomPassword) ToRandomPasswordOutputWithContext(ctx context.Context) RandomPasswordOutput
func (*RandomPassword) ToRandomPasswordPtrOutput ¶
func (i *RandomPassword) ToRandomPasswordPtrOutput() RandomPasswordPtrOutput
func (*RandomPassword) ToRandomPasswordPtrOutputWithContext ¶
func (i *RandomPassword) ToRandomPasswordPtrOutputWithContext(ctx context.Context) RandomPasswordPtrOutput
type RandomPasswordArgs ¶
type RandomPasswordArgs struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The length of the string desired. Length pulumi.IntInput // Include lowercase alphabet characters in the result. Lower pulumi.BoolPtrInput // Minimum number of lowercase alphabet characters in the result. MinLower pulumi.IntPtrInput // Minimum number of numeric characters in the result. MinNumeric pulumi.IntPtrInput // Minimum number of special characters in the result. MinSpecial pulumi.IntPtrInput // Minimum number of uppercase alphabet characters in the result. MinUpper pulumi.IntPtrInput // Include numeric characters in the result. Number pulumi.BoolPtrInput // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrInput // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` Special pulumi.BoolPtrInput // Include uppercase alphabet characters in the result. Upper pulumi.BoolPtrInput }
The set of arguments for constructing a RandomPassword resource.
func (RandomPasswordArgs) ElementType ¶
func (RandomPasswordArgs) ElementType() reflect.Type
type RandomPasswordArray ¶
type RandomPasswordArray []RandomPasswordInput
func (RandomPasswordArray) ElementType ¶
func (RandomPasswordArray) ElementType() reflect.Type
func (RandomPasswordArray) ToRandomPasswordArrayOutput ¶
func (i RandomPasswordArray) ToRandomPasswordArrayOutput() RandomPasswordArrayOutput
func (RandomPasswordArray) ToRandomPasswordArrayOutputWithContext ¶
func (i RandomPasswordArray) ToRandomPasswordArrayOutputWithContext(ctx context.Context) RandomPasswordArrayOutput
type RandomPasswordArrayInput ¶
type RandomPasswordArrayInput interface { pulumi.Input ToRandomPasswordArrayOutput() RandomPasswordArrayOutput ToRandomPasswordArrayOutputWithContext(context.Context) RandomPasswordArrayOutput }
RandomPasswordArrayInput is an input type that accepts RandomPasswordArray and RandomPasswordArrayOutput values. You can construct a concrete instance of `RandomPasswordArrayInput` via:
RandomPasswordArray{ RandomPasswordArgs{...} }
type RandomPasswordArrayOutput ¶
type RandomPasswordArrayOutput struct{ *pulumi.OutputState }
func (RandomPasswordArrayOutput) ElementType ¶
func (RandomPasswordArrayOutput) ElementType() reflect.Type
func (RandomPasswordArrayOutput) Index ¶
func (o RandomPasswordArrayOutput) Index(i pulumi.IntInput) RandomPasswordOutput
func (RandomPasswordArrayOutput) ToRandomPasswordArrayOutput ¶
func (o RandomPasswordArrayOutput) ToRandomPasswordArrayOutput() RandomPasswordArrayOutput
func (RandomPasswordArrayOutput) ToRandomPasswordArrayOutputWithContext ¶
func (o RandomPasswordArrayOutput) ToRandomPasswordArrayOutputWithContext(ctx context.Context) RandomPasswordArrayOutput
type RandomPasswordInput ¶
type RandomPasswordInput interface { pulumi.Input ToRandomPasswordOutput() RandomPasswordOutput ToRandomPasswordOutputWithContext(ctx context.Context) RandomPasswordOutput }
type RandomPasswordMap ¶
type RandomPasswordMap map[string]RandomPasswordInput
func (RandomPasswordMap) ElementType ¶
func (RandomPasswordMap) ElementType() reflect.Type
func (RandomPasswordMap) ToRandomPasswordMapOutput ¶
func (i RandomPasswordMap) ToRandomPasswordMapOutput() RandomPasswordMapOutput
func (RandomPasswordMap) ToRandomPasswordMapOutputWithContext ¶
func (i RandomPasswordMap) ToRandomPasswordMapOutputWithContext(ctx context.Context) RandomPasswordMapOutput
type RandomPasswordMapInput ¶
type RandomPasswordMapInput interface { pulumi.Input ToRandomPasswordMapOutput() RandomPasswordMapOutput ToRandomPasswordMapOutputWithContext(context.Context) RandomPasswordMapOutput }
RandomPasswordMapInput is an input type that accepts RandomPasswordMap and RandomPasswordMapOutput values. You can construct a concrete instance of `RandomPasswordMapInput` via:
RandomPasswordMap{ "key": RandomPasswordArgs{...} }
type RandomPasswordMapOutput ¶
type RandomPasswordMapOutput struct{ *pulumi.OutputState }
func (RandomPasswordMapOutput) ElementType ¶
func (RandomPasswordMapOutput) ElementType() reflect.Type
func (RandomPasswordMapOutput) MapIndex ¶
func (o RandomPasswordMapOutput) MapIndex(k pulumi.StringInput) RandomPasswordOutput
func (RandomPasswordMapOutput) ToRandomPasswordMapOutput ¶
func (o RandomPasswordMapOutput) ToRandomPasswordMapOutput() RandomPasswordMapOutput
func (RandomPasswordMapOutput) ToRandomPasswordMapOutputWithContext ¶
func (o RandomPasswordMapOutput) ToRandomPasswordMapOutputWithContext(ctx context.Context) RandomPasswordMapOutput
type RandomPasswordOutput ¶
type RandomPasswordOutput struct {
*pulumi.OutputState
}
func (RandomPasswordOutput) ElementType ¶
func (RandomPasswordOutput) ElementType() reflect.Type
func (RandomPasswordOutput) ToRandomPasswordOutput ¶
func (o RandomPasswordOutput) ToRandomPasswordOutput() RandomPasswordOutput
func (RandomPasswordOutput) ToRandomPasswordOutputWithContext ¶
func (o RandomPasswordOutput) ToRandomPasswordOutputWithContext(ctx context.Context) RandomPasswordOutput
func (RandomPasswordOutput) ToRandomPasswordPtrOutput ¶
func (o RandomPasswordOutput) ToRandomPasswordPtrOutput() RandomPasswordPtrOutput
func (RandomPasswordOutput) ToRandomPasswordPtrOutputWithContext ¶
func (o RandomPasswordOutput) ToRandomPasswordPtrOutputWithContext(ctx context.Context) RandomPasswordPtrOutput
type RandomPasswordPtrInput ¶
type RandomPasswordPtrInput interface { pulumi.Input ToRandomPasswordPtrOutput() RandomPasswordPtrOutput ToRandomPasswordPtrOutputWithContext(ctx context.Context) RandomPasswordPtrOutput }
type RandomPasswordPtrOutput ¶
type RandomPasswordPtrOutput struct {
*pulumi.OutputState
}
func (RandomPasswordPtrOutput) ElementType ¶
func (RandomPasswordPtrOutput) ElementType() reflect.Type
func (RandomPasswordPtrOutput) ToRandomPasswordPtrOutput ¶
func (o RandomPasswordPtrOutput) ToRandomPasswordPtrOutput() RandomPasswordPtrOutput
func (RandomPasswordPtrOutput) ToRandomPasswordPtrOutputWithContext ¶
func (o RandomPasswordPtrOutput) ToRandomPasswordPtrOutputWithContext(ctx context.Context) RandomPasswordPtrOutput
type RandomPasswordState ¶
type RandomPasswordState struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The length of the string desired. Length pulumi.IntPtrInput // Include lowercase alphabet characters in the result. Lower pulumi.BoolPtrInput // Minimum number of lowercase alphabet characters in the result. MinLower pulumi.IntPtrInput // Minimum number of numeric characters in the result. MinNumeric pulumi.IntPtrInput // Minimum number of special characters in the result. MinSpecial pulumi.IntPtrInput // Minimum number of uppercase alphabet characters in the result. MinUpper pulumi.IntPtrInput // Include numeric characters in the result. Number pulumi.BoolPtrInput // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrInput // The generated random string. Result pulumi.StringPtrInput // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` Special pulumi.BoolPtrInput // Include uppercase alphabet characters in the result. Upper pulumi.BoolPtrInput }
func (RandomPasswordState) ElementType ¶
func (RandomPasswordState) ElementType() reflect.Type
type RandomPet ¶
type RandomPet struct { pulumi.CustomResourceState // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapOutput `pulumi:"keepers"` // The length (in words) of the pet name. Length pulumi.IntPtrOutput `pulumi:"length"` // A string to prefix the name with. Prefix pulumi.StringPtrOutput `pulumi:"prefix"` // The character to separate words in the pet name. Separator pulumi.StringPtrOutput `pulumi:"separator"` }
The resource `RandomPet` 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 `createBeforeDestroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.
func GetRandomPet ¶
func GetRandomPet(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RandomPetState, opts ...pulumi.ResourceOption) (*RandomPet, error)
GetRandomPet gets an existing RandomPet resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRandomPet ¶
func NewRandomPet(ctx *pulumi.Context, name string, args *RandomPetArgs, opts ...pulumi.ResourceOption) (*RandomPet, error)
NewRandomPet registers a new resource with the given unique name, arguments, and options.
func (*RandomPet) ElementType ¶
func (*RandomPet) ToRandomPetOutput ¶
func (i *RandomPet) ToRandomPetOutput() RandomPetOutput
func (*RandomPet) ToRandomPetOutputWithContext ¶
func (i *RandomPet) ToRandomPetOutputWithContext(ctx context.Context) RandomPetOutput
func (*RandomPet) ToRandomPetPtrOutput ¶
func (i *RandomPet) ToRandomPetPtrOutput() RandomPetPtrOutput
func (*RandomPet) ToRandomPetPtrOutputWithContext ¶
func (i *RandomPet) ToRandomPetPtrOutputWithContext(ctx context.Context) RandomPetPtrOutput
type RandomPetArgs ¶
type RandomPetArgs struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The length (in words) of the pet name. Length pulumi.IntPtrInput // A string to prefix the name with. Prefix pulumi.StringPtrInput // The character to separate words in the pet name. Separator pulumi.StringPtrInput }
The set of arguments for constructing a RandomPet resource.
func (RandomPetArgs) ElementType ¶
func (RandomPetArgs) ElementType() reflect.Type
type RandomPetArray ¶
type RandomPetArray []RandomPetInput
func (RandomPetArray) ElementType ¶
func (RandomPetArray) ElementType() reflect.Type
func (RandomPetArray) ToRandomPetArrayOutput ¶
func (i RandomPetArray) ToRandomPetArrayOutput() RandomPetArrayOutput
func (RandomPetArray) ToRandomPetArrayOutputWithContext ¶
func (i RandomPetArray) ToRandomPetArrayOutputWithContext(ctx context.Context) RandomPetArrayOutput
type RandomPetArrayInput ¶
type RandomPetArrayInput interface { pulumi.Input ToRandomPetArrayOutput() RandomPetArrayOutput ToRandomPetArrayOutputWithContext(context.Context) RandomPetArrayOutput }
RandomPetArrayInput is an input type that accepts RandomPetArray and RandomPetArrayOutput values. You can construct a concrete instance of `RandomPetArrayInput` via:
RandomPetArray{ RandomPetArgs{...} }
type RandomPetArrayOutput ¶
type RandomPetArrayOutput struct{ *pulumi.OutputState }
func (RandomPetArrayOutput) ElementType ¶
func (RandomPetArrayOutput) ElementType() reflect.Type
func (RandomPetArrayOutput) Index ¶
func (o RandomPetArrayOutput) Index(i pulumi.IntInput) RandomPetOutput
func (RandomPetArrayOutput) ToRandomPetArrayOutput ¶
func (o RandomPetArrayOutput) ToRandomPetArrayOutput() RandomPetArrayOutput
func (RandomPetArrayOutput) ToRandomPetArrayOutputWithContext ¶
func (o RandomPetArrayOutput) ToRandomPetArrayOutputWithContext(ctx context.Context) RandomPetArrayOutput
type RandomPetInput ¶
type RandomPetInput interface { pulumi.Input ToRandomPetOutput() RandomPetOutput ToRandomPetOutputWithContext(ctx context.Context) RandomPetOutput }
type RandomPetMap ¶
type RandomPetMap map[string]RandomPetInput
func (RandomPetMap) ElementType ¶
func (RandomPetMap) ElementType() reflect.Type
func (RandomPetMap) ToRandomPetMapOutput ¶
func (i RandomPetMap) ToRandomPetMapOutput() RandomPetMapOutput
func (RandomPetMap) ToRandomPetMapOutputWithContext ¶
func (i RandomPetMap) ToRandomPetMapOutputWithContext(ctx context.Context) RandomPetMapOutput
type RandomPetMapInput ¶
type RandomPetMapInput interface { pulumi.Input ToRandomPetMapOutput() RandomPetMapOutput ToRandomPetMapOutputWithContext(context.Context) RandomPetMapOutput }
RandomPetMapInput is an input type that accepts RandomPetMap and RandomPetMapOutput values. You can construct a concrete instance of `RandomPetMapInput` via:
RandomPetMap{ "key": RandomPetArgs{...} }
type RandomPetMapOutput ¶
type RandomPetMapOutput struct{ *pulumi.OutputState }
func (RandomPetMapOutput) ElementType ¶
func (RandomPetMapOutput) ElementType() reflect.Type
func (RandomPetMapOutput) MapIndex ¶
func (o RandomPetMapOutput) MapIndex(k pulumi.StringInput) RandomPetOutput
func (RandomPetMapOutput) ToRandomPetMapOutput ¶
func (o RandomPetMapOutput) ToRandomPetMapOutput() RandomPetMapOutput
func (RandomPetMapOutput) ToRandomPetMapOutputWithContext ¶
func (o RandomPetMapOutput) ToRandomPetMapOutputWithContext(ctx context.Context) RandomPetMapOutput
type RandomPetOutput ¶
type RandomPetOutput struct {
*pulumi.OutputState
}
func (RandomPetOutput) ElementType ¶
func (RandomPetOutput) ElementType() reflect.Type
func (RandomPetOutput) ToRandomPetOutput ¶
func (o RandomPetOutput) ToRandomPetOutput() RandomPetOutput
func (RandomPetOutput) ToRandomPetOutputWithContext ¶
func (o RandomPetOutput) ToRandomPetOutputWithContext(ctx context.Context) RandomPetOutput
func (RandomPetOutput) ToRandomPetPtrOutput ¶
func (o RandomPetOutput) ToRandomPetPtrOutput() RandomPetPtrOutput
func (RandomPetOutput) ToRandomPetPtrOutputWithContext ¶
func (o RandomPetOutput) ToRandomPetPtrOutputWithContext(ctx context.Context) RandomPetPtrOutput
type RandomPetPtrInput ¶
type RandomPetPtrInput interface { pulumi.Input ToRandomPetPtrOutput() RandomPetPtrOutput ToRandomPetPtrOutputWithContext(ctx context.Context) RandomPetPtrOutput }
type RandomPetPtrOutput ¶
type RandomPetPtrOutput struct {
*pulumi.OutputState
}
func (RandomPetPtrOutput) ElementType ¶
func (RandomPetPtrOutput) ElementType() reflect.Type
func (RandomPetPtrOutput) ToRandomPetPtrOutput ¶
func (o RandomPetPtrOutput) ToRandomPetPtrOutput() RandomPetPtrOutput
func (RandomPetPtrOutput) ToRandomPetPtrOutputWithContext ¶
func (o RandomPetPtrOutput) ToRandomPetPtrOutputWithContext(ctx context.Context) RandomPetPtrOutput
type RandomPetState ¶
type RandomPetState struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The length (in words) of the pet name. Length pulumi.IntPtrInput // A string to prefix the name with. Prefix pulumi.StringPtrInput // The character to separate words in the pet name. Separator pulumi.StringPtrInput }
func (RandomPetState) ElementType ¶
func (RandomPetState) ElementType() reflect.Type
type RandomShuffle ¶
type RandomShuffle struct { pulumi.CustomResourceState // The list of strings to shuffle. Inputs pulumi.StringArrayOutput `pulumi:"inputs"` // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapOutput `pulumi:"keepers"` // 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. ResultCount pulumi.IntPtrOutput `pulumi:"resultCount"` // Random permutation of the list of strings given in `input`. Results pulumi.StringArrayOutput `pulumi:"results"` // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Seed pulumi.StringPtrOutput `pulumi:"seed"` }
The resource `RandomShuffle` generates a random permutation of a list of strings given as an argument.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/elb" "github.com/pulumi/pulumi-random/sdk/v4/go/random" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { az, err := random.NewRandomShuffle(ctx, "az", &random.RandomShuffleArgs{ Inputs: pulumi.StringArray{ pulumi.String("us-west-1a"), pulumi.String("us-west-1c"), pulumi.String("us-west-1d"), pulumi.String("us-west-1e"), }, ResultCount: pulumi.Int(2), }) if err != nil { return err } _, err = elb.NewLoadBalancer(ctx, "example", &elb.LoadBalancerArgs{ AvailabilityZones: az.Results, }) if err != nil { return err } return nil }) }
```
func GetRandomShuffle ¶
func GetRandomShuffle(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RandomShuffleState, opts ...pulumi.ResourceOption) (*RandomShuffle, error)
GetRandomShuffle gets an existing RandomShuffle resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRandomShuffle ¶
func NewRandomShuffle(ctx *pulumi.Context, name string, args *RandomShuffleArgs, opts ...pulumi.ResourceOption) (*RandomShuffle, error)
NewRandomShuffle registers a new resource with the given unique name, arguments, and options.
func (*RandomShuffle) ElementType ¶
func (*RandomShuffle) ElementType() reflect.Type
func (*RandomShuffle) ToRandomShuffleOutput ¶
func (i *RandomShuffle) ToRandomShuffleOutput() RandomShuffleOutput
func (*RandomShuffle) ToRandomShuffleOutputWithContext ¶
func (i *RandomShuffle) ToRandomShuffleOutputWithContext(ctx context.Context) RandomShuffleOutput
func (*RandomShuffle) ToRandomShufflePtrOutput ¶
func (i *RandomShuffle) ToRandomShufflePtrOutput() RandomShufflePtrOutput
func (*RandomShuffle) ToRandomShufflePtrOutputWithContext ¶
func (i *RandomShuffle) ToRandomShufflePtrOutputWithContext(ctx context.Context) RandomShufflePtrOutput
type RandomShuffleArgs ¶
type RandomShuffleArgs struct { // The list of strings to shuffle. Inputs pulumi.StringArrayInput // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // 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. ResultCount pulumi.IntPtrInput // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Seed pulumi.StringPtrInput }
The set of arguments for constructing a RandomShuffle resource.
func (RandomShuffleArgs) ElementType ¶
func (RandomShuffleArgs) ElementType() reflect.Type
type RandomShuffleArray ¶
type RandomShuffleArray []RandomShuffleInput
func (RandomShuffleArray) ElementType ¶
func (RandomShuffleArray) ElementType() reflect.Type
func (RandomShuffleArray) ToRandomShuffleArrayOutput ¶
func (i RandomShuffleArray) ToRandomShuffleArrayOutput() RandomShuffleArrayOutput
func (RandomShuffleArray) ToRandomShuffleArrayOutputWithContext ¶
func (i RandomShuffleArray) ToRandomShuffleArrayOutputWithContext(ctx context.Context) RandomShuffleArrayOutput
type RandomShuffleArrayInput ¶
type RandomShuffleArrayInput interface { pulumi.Input ToRandomShuffleArrayOutput() RandomShuffleArrayOutput ToRandomShuffleArrayOutputWithContext(context.Context) RandomShuffleArrayOutput }
RandomShuffleArrayInput is an input type that accepts RandomShuffleArray and RandomShuffleArrayOutput values. You can construct a concrete instance of `RandomShuffleArrayInput` via:
RandomShuffleArray{ RandomShuffleArgs{...} }
type RandomShuffleArrayOutput ¶
type RandomShuffleArrayOutput struct{ *pulumi.OutputState }
func (RandomShuffleArrayOutput) ElementType ¶
func (RandomShuffleArrayOutput) ElementType() reflect.Type
func (RandomShuffleArrayOutput) Index ¶
func (o RandomShuffleArrayOutput) Index(i pulumi.IntInput) RandomShuffleOutput
func (RandomShuffleArrayOutput) ToRandomShuffleArrayOutput ¶
func (o RandomShuffleArrayOutput) ToRandomShuffleArrayOutput() RandomShuffleArrayOutput
func (RandomShuffleArrayOutput) ToRandomShuffleArrayOutputWithContext ¶
func (o RandomShuffleArrayOutput) ToRandomShuffleArrayOutputWithContext(ctx context.Context) RandomShuffleArrayOutput
type RandomShuffleInput ¶
type RandomShuffleInput interface { pulumi.Input ToRandomShuffleOutput() RandomShuffleOutput ToRandomShuffleOutputWithContext(ctx context.Context) RandomShuffleOutput }
type RandomShuffleMap ¶
type RandomShuffleMap map[string]RandomShuffleInput
func (RandomShuffleMap) ElementType ¶
func (RandomShuffleMap) ElementType() reflect.Type
func (RandomShuffleMap) ToRandomShuffleMapOutput ¶
func (i RandomShuffleMap) ToRandomShuffleMapOutput() RandomShuffleMapOutput
func (RandomShuffleMap) ToRandomShuffleMapOutputWithContext ¶
func (i RandomShuffleMap) ToRandomShuffleMapOutputWithContext(ctx context.Context) RandomShuffleMapOutput
type RandomShuffleMapInput ¶
type RandomShuffleMapInput interface { pulumi.Input ToRandomShuffleMapOutput() RandomShuffleMapOutput ToRandomShuffleMapOutputWithContext(context.Context) RandomShuffleMapOutput }
RandomShuffleMapInput is an input type that accepts RandomShuffleMap and RandomShuffleMapOutput values. You can construct a concrete instance of `RandomShuffleMapInput` via:
RandomShuffleMap{ "key": RandomShuffleArgs{...} }
type RandomShuffleMapOutput ¶
type RandomShuffleMapOutput struct{ *pulumi.OutputState }
func (RandomShuffleMapOutput) ElementType ¶
func (RandomShuffleMapOutput) ElementType() reflect.Type
func (RandomShuffleMapOutput) MapIndex ¶
func (o RandomShuffleMapOutput) MapIndex(k pulumi.StringInput) RandomShuffleOutput
func (RandomShuffleMapOutput) ToRandomShuffleMapOutput ¶
func (o RandomShuffleMapOutput) ToRandomShuffleMapOutput() RandomShuffleMapOutput
func (RandomShuffleMapOutput) ToRandomShuffleMapOutputWithContext ¶
func (o RandomShuffleMapOutput) ToRandomShuffleMapOutputWithContext(ctx context.Context) RandomShuffleMapOutput
type RandomShuffleOutput ¶
type RandomShuffleOutput struct {
*pulumi.OutputState
}
func (RandomShuffleOutput) ElementType ¶
func (RandomShuffleOutput) ElementType() reflect.Type
func (RandomShuffleOutput) ToRandomShuffleOutput ¶
func (o RandomShuffleOutput) ToRandomShuffleOutput() RandomShuffleOutput
func (RandomShuffleOutput) ToRandomShuffleOutputWithContext ¶
func (o RandomShuffleOutput) ToRandomShuffleOutputWithContext(ctx context.Context) RandomShuffleOutput
func (RandomShuffleOutput) ToRandomShufflePtrOutput ¶
func (o RandomShuffleOutput) ToRandomShufflePtrOutput() RandomShufflePtrOutput
func (RandomShuffleOutput) ToRandomShufflePtrOutputWithContext ¶
func (o RandomShuffleOutput) ToRandomShufflePtrOutputWithContext(ctx context.Context) RandomShufflePtrOutput
type RandomShufflePtrInput ¶
type RandomShufflePtrInput interface { pulumi.Input ToRandomShufflePtrOutput() RandomShufflePtrOutput ToRandomShufflePtrOutputWithContext(ctx context.Context) RandomShufflePtrOutput }
type RandomShufflePtrOutput ¶
type RandomShufflePtrOutput struct {
*pulumi.OutputState
}
func (RandomShufflePtrOutput) ElementType ¶
func (RandomShufflePtrOutput) ElementType() reflect.Type
func (RandomShufflePtrOutput) ToRandomShufflePtrOutput ¶
func (o RandomShufflePtrOutput) ToRandomShufflePtrOutput() RandomShufflePtrOutput
func (RandomShufflePtrOutput) ToRandomShufflePtrOutputWithContext ¶
func (o RandomShufflePtrOutput) ToRandomShufflePtrOutputWithContext(ctx context.Context) RandomShufflePtrOutput
type RandomShuffleState ¶
type RandomShuffleState struct { // The list of strings to shuffle. Inputs pulumi.StringArrayInput // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // 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. ResultCount pulumi.IntPtrInput // Random permutation of the list of strings given in `input`. Results pulumi.StringArrayInput // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Seed pulumi.StringPtrInput }
func (RandomShuffleState) ElementType ¶
func (RandomShuffleState) ElementType() reflect.Type
type RandomString ¶
type RandomString struct { pulumi.CustomResourceState // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapOutput `pulumi:"keepers"` // The length of the string desired. Length pulumi.IntOutput `pulumi:"length"` // Include lowercase alphabet characters in the result. Lower pulumi.BoolPtrOutput `pulumi:"lower"` // Minimum number of lowercase alphabet characters in the result. MinLower pulumi.IntPtrOutput `pulumi:"minLower"` // Minimum number of numeric characters in the result. MinNumeric pulumi.IntPtrOutput `pulumi:"minNumeric"` // Minimum number of special characters in the result. MinSpecial pulumi.IntPtrOutput `pulumi:"minSpecial"` // Minimum number of uppercase alphabet characters in the result. MinUpper pulumi.IntPtrOutput `pulumi:"minUpper"` // Include numeric characters in the result. Number pulumi.BoolPtrOutput `pulumi:"number"` // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrOutput `pulumi:"overrideSpecial"` // The generated random string. Result pulumi.StringOutput `pulumi:"result"` // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` Special pulumi.BoolPtrOutput `pulumi:"special"` // Include uppercase alphabet characters in the result. Upper pulumi.BoolPtrOutput `pulumi:"upper"` }
The resource `RandomString` generates a random permutation of alphanumeric characters and optionally special characters.
This resource *does* use a cryptographic random number generator.
Historically this resource's intended usage has been ambiguous as the original example used it in a password. For backwards compatibility it will continue to exist. For unique ids please use random_id, for sensitive random values please use random_password.
## Example Usage
```go package main
import (
"fmt" "github.com/pulumi/pulumi-random/sdk/v4/go/random" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := random.NewRandomString(ctx, "random", &random.RandomStringArgs{ Length: pulumi.Int(16), OverrideSpecial: pulumi.String(fmt.Sprintf("%v%v", "/@£", "$")), Special: pulumi.Bool(true), }) if err != nil { return err } return nil }) }
```
## Import
Strings can be imported by just specifying the value of the string ¶
```sh
$ pulumi import random:index/randomString:RandomString test test
```
func GetRandomString ¶
func GetRandomString(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RandomStringState, opts ...pulumi.ResourceOption) (*RandomString, error)
GetRandomString gets an existing RandomString resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRandomString ¶
func NewRandomString(ctx *pulumi.Context, name string, args *RandomStringArgs, opts ...pulumi.ResourceOption) (*RandomString, error)
NewRandomString registers a new resource with the given unique name, arguments, and options.
func (*RandomString) ElementType ¶
func (*RandomString) ElementType() reflect.Type
func (*RandomString) ToRandomStringOutput ¶
func (i *RandomString) ToRandomStringOutput() RandomStringOutput
func (*RandomString) ToRandomStringOutputWithContext ¶
func (i *RandomString) ToRandomStringOutputWithContext(ctx context.Context) RandomStringOutput
func (*RandomString) ToRandomStringPtrOutput ¶
func (i *RandomString) ToRandomStringPtrOutput() RandomStringPtrOutput
func (*RandomString) ToRandomStringPtrOutputWithContext ¶
func (i *RandomString) ToRandomStringPtrOutputWithContext(ctx context.Context) RandomStringPtrOutput
type RandomStringArgs ¶
type RandomStringArgs struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The length of the string desired. Length pulumi.IntInput // Include lowercase alphabet characters in the result. Lower pulumi.BoolPtrInput // Minimum number of lowercase alphabet characters in the result. MinLower pulumi.IntPtrInput // Minimum number of numeric characters in the result. MinNumeric pulumi.IntPtrInput // Minimum number of special characters in the result. MinSpecial pulumi.IntPtrInput // Minimum number of uppercase alphabet characters in the result. MinUpper pulumi.IntPtrInput // Include numeric characters in the result. Number pulumi.BoolPtrInput // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrInput // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` Special pulumi.BoolPtrInput // Include uppercase alphabet characters in the result. Upper pulumi.BoolPtrInput }
The set of arguments for constructing a RandomString resource.
func (RandomStringArgs) ElementType ¶
func (RandomStringArgs) ElementType() reflect.Type
type RandomStringArray ¶
type RandomStringArray []RandomStringInput
func (RandomStringArray) ElementType ¶
func (RandomStringArray) ElementType() reflect.Type
func (RandomStringArray) ToRandomStringArrayOutput ¶
func (i RandomStringArray) ToRandomStringArrayOutput() RandomStringArrayOutput
func (RandomStringArray) ToRandomStringArrayOutputWithContext ¶
func (i RandomStringArray) ToRandomStringArrayOutputWithContext(ctx context.Context) RandomStringArrayOutput
type RandomStringArrayInput ¶
type RandomStringArrayInput interface { pulumi.Input ToRandomStringArrayOutput() RandomStringArrayOutput ToRandomStringArrayOutputWithContext(context.Context) RandomStringArrayOutput }
RandomStringArrayInput is an input type that accepts RandomStringArray and RandomStringArrayOutput values. You can construct a concrete instance of `RandomStringArrayInput` via:
RandomStringArray{ RandomStringArgs{...} }
type RandomStringArrayOutput ¶
type RandomStringArrayOutput struct{ *pulumi.OutputState }
func (RandomStringArrayOutput) ElementType ¶
func (RandomStringArrayOutput) ElementType() reflect.Type
func (RandomStringArrayOutput) Index ¶
func (o RandomStringArrayOutput) Index(i pulumi.IntInput) RandomStringOutput
func (RandomStringArrayOutput) ToRandomStringArrayOutput ¶
func (o RandomStringArrayOutput) ToRandomStringArrayOutput() RandomStringArrayOutput
func (RandomStringArrayOutput) ToRandomStringArrayOutputWithContext ¶
func (o RandomStringArrayOutput) ToRandomStringArrayOutputWithContext(ctx context.Context) RandomStringArrayOutput
type RandomStringInput ¶
type RandomStringInput interface { pulumi.Input ToRandomStringOutput() RandomStringOutput ToRandomStringOutputWithContext(ctx context.Context) RandomStringOutput }
type RandomStringMap ¶
type RandomStringMap map[string]RandomStringInput
func (RandomStringMap) ElementType ¶
func (RandomStringMap) ElementType() reflect.Type
func (RandomStringMap) ToRandomStringMapOutput ¶
func (i RandomStringMap) ToRandomStringMapOutput() RandomStringMapOutput
func (RandomStringMap) ToRandomStringMapOutputWithContext ¶
func (i RandomStringMap) ToRandomStringMapOutputWithContext(ctx context.Context) RandomStringMapOutput
type RandomStringMapInput ¶
type RandomStringMapInput interface { pulumi.Input ToRandomStringMapOutput() RandomStringMapOutput ToRandomStringMapOutputWithContext(context.Context) RandomStringMapOutput }
RandomStringMapInput is an input type that accepts RandomStringMap and RandomStringMapOutput values. You can construct a concrete instance of `RandomStringMapInput` via:
RandomStringMap{ "key": RandomStringArgs{...} }
type RandomStringMapOutput ¶
type RandomStringMapOutput struct{ *pulumi.OutputState }
func (RandomStringMapOutput) ElementType ¶
func (RandomStringMapOutput) ElementType() reflect.Type
func (RandomStringMapOutput) MapIndex ¶
func (o RandomStringMapOutput) MapIndex(k pulumi.StringInput) RandomStringOutput
func (RandomStringMapOutput) ToRandomStringMapOutput ¶
func (o RandomStringMapOutput) ToRandomStringMapOutput() RandomStringMapOutput
func (RandomStringMapOutput) ToRandomStringMapOutputWithContext ¶
func (o RandomStringMapOutput) ToRandomStringMapOutputWithContext(ctx context.Context) RandomStringMapOutput
type RandomStringOutput ¶
type RandomStringOutput struct {
*pulumi.OutputState
}
func (RandomStringOutput) ElementType ¶
func (RandomStringOutput) ElementType() reflect.Type
func (RandomStringOutput) ToRandomStringOutput ¶
func (o RandomStringOutput) ToRandomStringOutput() RandomStringOutput
func (RandomStringOutput) ToRandomStringOutputWithContext ¶
func (o RandomStringOutput) ToRandomStringOutputWithContext(ctx context.Context) RandomStringOutput
func (RandomStringOutput) ToRandomStringPtrOutput ¶
func (o RandomStringOutput) ToRandomStringPtrOutput() RandomStringPtrOutput
func (RandomStringOutput) ToRandomStringPtrOutputWithContext ¶
func (o RandomStringOutput) ToRandomStringPtrOutputWithContext(ctx context.Context) RandomStringPtrOutput
type RandomStringPtrInput ¶
type RandomStringPtrInput interface { pulumi.Input ToRandomStringPtrOutput() RandomStringPtrOutput ToRandomStringPtrOutputWithContext(ctx context.Context) RandomStringPtrOutput }
type RandomStringPtrOutput ¶
type RandomStringPtrOutput struct {
*pulumi.OutputState
}
func (RandomStringPtrOutput) ElementType ¶
func (RandomStringPtrOutput) ElementType() reflect.Type
func (RandomStringPtrOutput) ToRandomStringPtrOutput ¶
func (o RandomStringPtrOutput) ToRandomStringPtrOutput() RandomStringPtrOutput
func (RandomStringPtrOutput) ToRandomStringPtrOutputWithContext ¶
func (o RandomStringPtrOutput) ToRandomStringPtrOutputWithContext(ctx context.Context) RandomStringPtrOutput
type RandomStringState ¶
type RandomStringState struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The length of the string desired. Length pulumi.IntPtrInput // Include lowercase alphabet characters in the result. Lower pulumi.BoolPtrInput // Minimum number of lowercase alphabet characters in the result. MinLower pulumi.IntPtrInput // Minimum number of numeric characters in the result. MinNumeric pulumi.IntPtrInput // Minimum number of special characters in the result. MinSpecial pulumi.IntPtrInput // Minimum number of uppercase alphabet characters in the result. MinUpper pulumi.IntPtrInput // Include numeric characters in the result. Number pulumi.BoolPtrInput // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrInput // The generated random string. Result pulumi.StringPtrInput // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` Special pulumi.BoolPtrInput // Include uppercase alphabet characters in the result. Upper pulumi.BoolPtrInput }
func (RandomStringState) ElementType ¶
func (RandomStringState) ElementType() reflect.Type
type RandomUuid ¶
type RandomUuid struct { pulumi.CustomResourceState // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapOutput `pulumi:"keepers"` // The generated uuid presented in string format. Result pulumi.StringOutput `pulumi:"result"` }
The resource `RandomUuid` generates random uuid string that is intended to be used as unique identifiers 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 needed a unique string identifier.
## Example Usage
```go package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core" "github.com/pulumi/pulumi-random/sdk/v4/go/random" "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() { pulumi.Run(func(ctx *pulumi.Context) error { _, err := random.NewRandomUuid(ctx, "testRandomUuid", nil) if err != nil { return err } _, err = core.NewResourceGroup(ctx, "testResourceGroup", &core.ResourceGroupArgs{ Location: pulumi.String("Central US"), }) if err != nil { return err } return nil }) }
```
## 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
```
func GetRandomUuid ¶
func GetRandomUuid(ctx *pulumi.Context, name string, id pulumi.IDInput, state *RandomUuidState, opts ...pulumi.ResourceOption) (*RandomUuid, error)
GetRandomUuid gets an existing RandomUuid resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).
func NewRandomUuid ¶
func NewRandomUuid(ctx *pulumi.Context, name string, args *RandomUuidArgs, opts ...pulumi.ResourceOption) (*RandomUuid, error)
NewRandomUuid registers a new resource with the given unique name, arguments, and options.
func (*RandomUuid) ElementType ¶
func (*RandomUuid) ElementType() reflect.Type
func (*RandomUuid) ToRandomUuidOutput ¶
func (i *RandomUuid) ToRandomUuidOutput() RandomUuidOutput
func (*RandomUuid) ToRandomUuidOutputWithContext ¶
func (i *RandomUuid) ToRandomUuidOutputWithContext(ctx context.Context) RandomUuidOutput
func (*RandomUuid) ToRandomUuidPtrOutput ¶
func (i *RandomUuid) ToRandomUuidPtrOutput() RandomUuidPtrOutput
func (*RandomUuid) ToRandomUuidPtrOutputWithContext ¶
func (i *RandomUuid) ToRandomUuidPtrOutputWithContext(ctx context.Context) RandomUuidPtrOutput
type RandomUuidArgs ¶
type RandomUuidArgs struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput }
The set of arguments for constructing a RandomUuid resource.
func (RandomUuidArgs) ElementType ¶
func (RandomUuidArgs) ElementType() reflect.Type
type RandomUuidArray ¶
type RandomUuidArray []RandomUuidInput
func (RandomUuidArray) ElementType ¶
func (RandomUuidArray) ElementType() reflect.Type
func (RandomUuidArray) ToRandomUuidArrayOutput ¶
func (i RandomUuidArray) ToRandomUuidArrayOutput() RandomUuidArrayOutput
func (RandomUuidArray) ToRandomUuidArrayOutputWithContext ¶
func (i RandomUuidArray) ToRandomUuidArrayOutputWithContext(ctx context.Context) RandomUuidArrayOutput
type RandomUuidArrayInput ¶
type RandomUuidArrayInput interface { pulumi.Input ToRandomUuidArrayOutput() RandomUuidArrayOutput ToRandomUuidArrayOutputWithContext(context.Context) RandomUuidArrayOutput }
RandomUuidArrayInput is an input type that accepts RandomUuidArray and RandomUuidArrayOutput values. You can construct a concrete instance of `RandomUuidArrayInput` via:
RandomUuidArray{ RandomUuidArgs{...} }
type RandomUuidArrayOutput ¶
type RandomUuidArrayOutput struct{ *pulumi.OutputState }
func (RandomUuidArrayOutput) ElementType ¶
func (RandomUuidArrayOutput) ElementType() reflect.Type
func (RandomUuidArrayOutput) Index ¶
func (o RandomUuidArrayOutput) Index(i pulumi.IntInput) RandomUuidOutput
func (RandomUuidArrayOutput) ToRandomUuidArrayOutput ¶
func (o RandomUuidArrayOutput) ToRandomUuidArrayOutput() RandomUuidArrayOutput
func (RandomUuidArrayOutput) ToRandomUuidArrayOutputWithContext ¶
func (o RandomUuidArrayOutput) ToRandomUuidArrayOutputWithContext(ctx context.Context) RandomUuidArrayOutput
type RandomUuidInput ¶
type RandomUuidInput interface { pulumi.Input ToRandomUuidOutput() RandomUuidOutput ToRandomUuidOutputWithContext(ctx context.Context) RandomUuidOutput }
type RandomUuidMap ¶
type RandomUuidMap map[string]RandomUuidInput
func (RandomUuidMap) ElementType ¶
func (RandomUuidMap) ElementType() reflect.Type
func (RandomUuidMap) ToRandomUuidMapOutput ¶
func (i RandomUuidMap) ToRandomUuidMapOutput() RandomUuidMapOutput
func (RandomUuidMap) ToRandomUuidMapOutputWithContext ¶
func (i RandomUuidMap) ToRandomUuidMapOutputWithContext(ctx context.Context) RandomUuidMapOutput
type RandomUuidMapInput ¶
type RandomUuidMapInput interface { pulumi.Input ToRandomUuidMapOutput() RandomUuidMapOutput ToRandomUuidMapOutputWithContext(context.Context) RandomUuidMapOutput }
RandomUuidMapInput is an input type that accepts RandomUuidMap and RandomUuidMapOutput values. You can construct a concrete instance of `RandomUuidMapInput` via:
RandomUuidMap{ "key": RandomUuidArgs{...} }
type RandomUuidMapOutput ¶
type RandomUuidMapOutput struct{ *pulumi.OutputState }
func (RandomUuidMapOutput) ElementType ¶
func (RandomUuidMapOutput) ElementType() reflect.Type
func (RandomUuidMapOutput) MapIndex ¶
func (o RandomUuidMapOutput) MapIndex(k pulumi.StringInput) RandomUuidOutput
func (RandomUuidMapOutput) ToRandomUuidMapOutput ¶
func (o RandomUuidMapOutput) ToRandomUuidMapOutput() RandomUuidMapOutput
func (RandomUuidMapOutput) ToRandomUuidMapOutputWithContext ¶
func (o RandomUuidMapOutput) ToRandomUuidMapOutputWithContext(ctx context.Context) RandomUuidMapOutput
type RandomUuidOutput ¶
type RandomUuidOutput struct {
*pulumi.OutputState
}
func (RandomUuidOutput) ElementType ¶
func (RandomUuidOutput) ElementType() reflect.Type
func (RandomUuidOutput) ToRandomUuidOutput ¶
func (o RandomUuidOutput) ToRandomUuidOutput() RandomUuidOutput
func (RandomUuidOutput) ToRandomUuidOutputWithContext ¶
func (o RandomUuidOutput) ToRandomUuidOutputWithContext(ctx context.Context) RandomUuidOutput
func (RandomUuidOutput) ToRandomUuidPtrOutput ¶
func (o RandomUuidOutput) ToRandomUuidPtrOutput() RandomUuidPtrOutput
func (RandomUuidOutput) ToRandomUuidPtrOutputWithContext ¶
func (o RandomUuidOutput) ToRandomUuidPtrOutputWithContext(ctx context.Context) RandomUuidPtrOutput
type RandomUuidPtrInput ¶
type RandomUuidPtrInput interface { pulumi.Input ToRandomUuidPtrOutput() RandomUuidPtrOutput ToRandomUuidPtrOutputWithContext(ctx context.Context) RandomUuidPtrOutput }
type RandomUuidPtrOutput ¶
type RandomUuidPtrOutput struct {
*pulumi.OutputState
}
func (RandomUuidPtrOutput) ElementType ¶
func (RandomUuidPtrOutput) ElementType() reflect.Type
func (RandomUuidPtrOutput) ToRandomUuidPtrOutput ¶
func (o RandomUuidPtrOutput) ToRandomUuidPtrOutput() RandomUuidPtrOutput
func (RandomUuidPtrOutput) ToRandomUuidPtrOutputWithContext ¶
func (o RandomUuidPtrOutput) ToRandomUuidPtrOutputWithContext(ctx context.Context) RandomUuidPtrOutput
type RandomUuidState ¶
type RandomUuidState struct { // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. Keepers pulumi.MapInput // The generated uuid presented in string format. Result pulumi.StringPtrInput }
func (RandomUuidState) ElementType ¶
func (RandomUuidState) ElementType() reflect.Type