RandomShuffleArgs

data class RandomShuffleArgs(val inputs: Output<List<String>>? = null, val keepers: Output<Map<String, String>>? = null, val resultCount: Output<Int>? = null, val seed: Output<String>? = null) : ConvertibleToJava<RandomShuffleArgs>

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

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.RandomShuffle;
import com.pulumi.random.RandomShuffleArgs;
import com.pulumi.aws.elb.LoadBalancer;
import com.pulumi.aws.elb.LoadBalancerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var az = new RandomShuffle("az", RandomShuffleArgs.builder()
.inputs(
"us-west-1a",
"us-west-1c",
"us-west-1d",
"us-west-1e")
.resultCount(2)
.build());
var example = new LoadBalancer("example", LoadBalancerArgs.builder()
.availabilityZones(az.results())
.build());
}
}

Constructors

Link copied to clipboard
fun RandomShuffleArgs(inputs: Output<List<String>>? = null, keepers: Output<Map<String, String>>? = null, resultCount: Output<Int>? = null, seed: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): RandomShuffleArgs

Properties

Link copied to clipboard
val inputs: Output<List<String>>? = null

The list of strings to shuffle.

Link copied to clipboard
val keepers: Output<Map<String, String>>? = null

Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.

Link copied to clipboard
val resultCount: Output<Int>? = null

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.

Link copied to clipboard
val seed: Output<String>? = null

Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list.