namespace Pulumi.FSharp open Pulumi [] module Ops = /// /// Wraps a raw value into an . /// let input<'a> (value: 'a): Input<'a> = Input.op_Implicit value /// /// Wraps an value into an value. /// let io<'a> (v: Output<'a>): Input<'a> = Input.op_Implicit v /// /// Wraps a collection of items into an . /// let inputList<'a> (items: seq>) = let result = new InputList<'a>() for item in items do result.Add item result /// /// Wraps a collection of key-value pairs into an . /// let inputMap<'a> (items: seq>) = let result = new InputMap<'a>() for (key, value) in items do result.Add(key, value) result /// /// Wraps a raw value for the first type into an . /// let inputUnion1Of2<'a, 'b> (valA: 'a) = InputUnion<'a, 'b>.op_Implicit(valA) /// /// Wraps a raw value for the second type into an . /// let inputUnion2Of2<'a, 'b> (valB: 'b) = InputUnion<'a, 'b>.op_Implicit(valB) /// /// Pulumi deployment functions. /// module Deployment = open System.Collections.Generic open System.Threading.Tasks /// /// Runs a function as a Pulumi . /// Blocks internally until the provided function completes, /// so that this function could be used directly from the main function. /// let run (f: unit -> IDictionary) = Deployment.RunAsync (fun () -> f()) |> Async.AwaitTask |> Async.RunSynchronously /// /// Runs an async function as a Pulumi . /// Blocks internally until the provided function completes, /// so that this function could be used directly from the main function. /// let runAsync (f: unit -> Async>) = Deployment.RunAsync (fun () -> f() |> Async.StartAsTask) |> Async.AwaitTask |> Async.RunSynchronously /// /// Runs a task function as a Pulumi . /// Blocks internally until the provided function completes, /// so that this function could be used directly from the main function. /// let runTask (f: unit -> Task>) = Deployment.RunAsync (fun () -> f()) |> Async.AwaitTask |> Async.RunSynchronously /// /// Module containing utility functions to work with 's. /// module Outputs = /// /// Transforms the data of with the provided function . The result remains an so that dependent resources /// can be properly tracked. /// let apply<'a, 'b> (f: 'a -> 'b) (output: Output<'a>): Output<'b> = output.Apply f /// /// Transforms the data of with the provided asynchronous function . The result remains an so that dependent resources /// can be properly tracked. /// let applyAsync<'a, 'b> (f: 'a -> Async<'b>) (output: Output<'a>): Output<'b> = output.Apply<'b> (f >> Async.StartAsTask) /// /// Transforms the data of with the provided function that returns . The result is flattened to an . /// let bind<'a, 'b> (f: 'a -> Output<'b>) (output: Output<'a>): Output<'b> = output.Apply<'b> f /// /// Combines an with an to produce an . /// let pair<'a, 'b> (a: Output<'a>) (b: Output<'b>): Output<'a * 'b> = Output.Tuple (a, b) |> apply (fun struct (a, b) -> (a, b)) /// /// Combines three values of to produce a three-way tuple . /// let pair3<'a, 'b, 'c> (a: Output<'a>) (b: Output<'b>) (c: Output<'c>): Output<'a * 'b * 'c> = Output.Tuple (io a, io b, io c) |> apply (fun struct (a, b, c) -> (a, b, c)) /// /// Combines four values of to produce a four-way tuple . /// let pair4<'a, 'b, 'c, 'd> (a: Output<'a>) (b: Output<'b>) (c: Output<'c>) (d: Output<'d>): Output<'a * 'b * 'c * 'd> = pair (pair a b) (pair c d) |> apply(fun ((a, b), (c, d)) -> a, b, c, d) /// /// Combines a list of to produce an . /// let all<'a> (values: List>): Output> = Output.All (values |> List.map io |> List.toArray) |> apply List.ofSeq