Show / Hide Table of Contents

Class RandomShuffle

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

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;
using Random = Pulumi.Random;

class MyStack : Stack
{
public MyStack()
{
    var az = new Random.RandomShuffle("az", new Random.RandomShuffleArgs
    {
        Inputs = 
        {
            "us-west-1a",
            "us-west-1c",
            "us-west-1d",
            "us-west-1e",
        },
        ResultCount = 2,
    });
    var example = new Aws.Elb.LoadBalancer("example", new Aws.Elb.LoadBalancerArgs
    {
        AvailabilityZones = az.Results,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
RandomShuffle
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Random
Assembly: Pulumi.Random.dll
Syntax
public class RandomShuffle : CustomResource

Constructors

View Source

RandomShuffle(String, RandomShuffleArgs, CustomResourceOptions)

Create a RandomShuffle resource with the given unique name, arguments, and options.

Declaration
public RandomShuffle(string name, RandomShuffleArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

RandomShuffleArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

Inputs

The list of strings to shuffle.

Declaration
public Output<ImmutableArray<string>> Inputs { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Keepers

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

Declaration
public Output<ImmutableDictionary<string, object>> Keepers { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

ResultCount

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.

Declaration
public Output<int?> ResultCount { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Results

Random permutation of the list of strings given in input.

Declaration
public Output<ImmutableArray<string>> Results { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Seed

Declaration
public Output<string> Seed { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, RandomShuffleState, CustomResourceOptions)

Get an existing RandomShuffle resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static RandomShuffle Get(string name, Input<string> id, RandomShuffleState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

RandomShuffleState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
RandomShuffle
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.