Class InputList<T>
A list of values that can be passed in as the arguments to a Resource.
The individual values are themselves Input<T>s. i.e. the individual values
can be concrete values or Output<T>s.
InputList<T> differs from a normal System.Collections.Generic.IList`1 in that it is itself
an Input<T>. For example, a Resource that accepts an InputList<T> will accept not just a list but an Output<T>
of a list. This is important for cases where the Output<T>
list from some Resource needs to be passed into another Resource. Or for cases where creating the list invariably produces an Output<T> because its resultant value is dependent on other Output<T>s.
This benefit of InputList<T> is also a limitation. Because it represents a
list of values that may eventually be created, there is no way to simply iterate over, or
access the elements of the list synchronously.
InputList<T> is designed to be easily used in object and collection
initializers. For example, a resource that accepts a list of inputs can be written in
either of these forms:
new SomeResource("name", new SomeResourceArgs {
ListProperty = { Value1, Value2, Value3 },
});
or
new SomeResource("name", new SomeResourceArgs {
ListProperty = new [] { Value1, Value2, Value3 },
});
Inheritance
System.Object
Input<
System.Collections.Immutable.ImmutableArray<T>>
InputList<T>
Implements
System.Collections.IEnumerable
System.Collections.Generic.IAsyncEnumerable<
Input<T>>
Inherited Members
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()
Assembly: Pulumi.dll
public sealed class InputList<T> : Input<ImmutableArray<T>>, IEnumerable, IAsyncEnumerable<Input<T>>
Type Parameters
Constructors
View Source
Declaration
Methods
View Source
Declaration
public void Add(params Input<T>[] inputs)
Parameters
Type |
Name |
Description |
Input<T>[] |
inputs |
|
View Source
Note: this is non-standard convenience for use with collection initializers.
Declaration
public void Add(InputList<T> inputs)
Parameters
View Source
Declaration
public void AddRange(InputList<T> inputs)
Parameters
View Source
Concatenates the values in this list with the values in other
,
returning the concatenated sequence in a new InputList<T>.
Declaration
public InputList<T> Concat(InputList<T> other)
Parameters
Returns
View Source
Declaration
public async IAsyncEnumerator<Input<T>> GetAsyncEnumerator(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Collections.Generic.IAsyncEnumerator<Input<T>> |
|
Operators
View Source
Declaration
public static implicit operator InputList<T>(T value)
Parameters
Type |
Name |
Description |
T |
value |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(T[] values)
Parameters
Type |
Name |
Description |
T[] |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(Input<T> value)
Parameters
Type |
Name |
Description |
Input<T> |
value |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(Input<T>[] values)
Parameters
Type |
Name |
Description |
Input<T>[] |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(Output<T[]> values)
Parameters
Type |
Name |
Description |
Output<T[]> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(Output<T> value)
Parameters
Type |
Name |
Description |
Output<T> |
value |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(Output<T>[] values)
Parameters
Type |
Name |
Description |
Output<T>[] |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(Output<IEnumerable<T>> values)
Parameters
Type |
Name |
Description |
Output<System.Collections.Generic.IEnumerable<T>> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(Output<List<T>> values)
Parameters
Type |
Name |
Description |
Output<System.Collections.Generic.List<T>> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(Output<ImmutableArray<T>> values)
Parameters
Type |
Name |
Description |
Output<System.Collections.Immutable.ImmutableArray<T>> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(List<T> values)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<T> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(List<Input<T>> values)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<Input<T>> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(List<Output<T>> values)
Parameters
Type |
Name |
Description |
System.Collections.Generic.List<Output<T>> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(ImmutableArray<T> values)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.ImmutableArray<T> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(ImmutableArray<Input<T>> values)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.ImmutableArray<Input<T>> |
values |
|
Returns
View Source
Declaration
public static implicit operator InputList<T>(ImmutableArray<Output<T>> values)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.ImmutableArray<Output<T>> |
values |
|
Returns
Explicit Interface Implementations
View Source
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
Implements
System.Collections.IEnumerable
System.Collections.Generic.IAsyncEnumerable<T>
Extension Methods