// Copyright 2016-2020, Pulumi Corporation
using System.Collections.Immutable;
using System.Threading.Tasks;
namespace Pulumi.Utilities
{
///
/// Allows extracting some internal insights about an instance of
/// .
///
public static class OutputUtilities
{
///
/// Retrieve the Is Known status of the given output.
/// Note: generally, this should never be used in combination with await for
/// a program control flow to avoid deadlock situations.
///
/// The to evaluate.
public static async Task GetIsKnownAsync(Output output)
{
var data = await output.DataTask.ConfigureAwait(false);
return data.IsKnown;
}
///
/// Retrieve a set of resources that the given output depends on.
///
/// The to get dependencies of.
public static Task> GetDependenciesAsync(Output output)
=> ((IOutput)output).GetResourcesAsync();
}
}