RandomShuffle

class RandomShuffle : KotlinCustomResource

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());
}
}

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val inputs: Output<List<String>>

The list of strings to shuffle.

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

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 pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resultCount: Output<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.

Link copied to clipboard
val results: Output<List<String>>

Random permutation of the list of strings given in input.

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

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

Link copied to clipboard
val urn: Output<String>