1. Packages
  2. Standard Library
  3. API Docs
  4. element
StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi
std logo
StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi

    Returns the element at the specified index.

    Using element

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function element(args: ElementArgs, opts?: InvokeOptions): Promise<ElementResult>
    function elementOutput(args: ElementOutputArgs, opts?: InvokeOptions): Output<ElementResult>
    def element(index: Optional[int] = None,
                input: Optional[Sequence[Any]] = None,
                opts: Optional[InvokeOptions] = None) -> ElementResult
    def element_output(index: Optional[pulumi.Input[int]] = None,
                input: Optional[pulumi.Input[Sequence[Any]]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[ElementResult]
    func Element(ctx *Context, args *ElementArgs, opts ...InvokeOption) (*ElementResult, error)
    func ElementOutput(ctx *Context, args *ElementOutputArgs, opts ...InvokeOption) ElementResultOutput

    > Note: This function is named Element in the Go SDK.

    public static class Element 
    {
        public static Task<ElementResult> InvokeAsync(ElementArgs args, InvokeOptions? opts = null)
        public static Output<ElementResult> Invoke(ElementInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<ElementResult> element(ElementArgs args, InvokeOptions options)
    public static Output<ElementResult> element(ElementArgs args, InvokeOptions options)
    
    fn::invoke:
      function: std:element
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Index int
    Input List<object>
    Index int
    Input []interface{}
    index Integer
    input List<Object>
    index number
    input any[]
    index int
    input Sequence[Any]
    index Number
    input List<Any>

    element Result

    The following output properties are available:

    Result object
    Result interface{}
    result Object
    result any
    result Any
    result Any

    Package Details

    Repository
    std pulumi/pulumi-std
    License
    std logo
    StandardLibrary v2.3.2 published on Tuesday, Feb 10, 2026 by Pulumi
      Meet Neo: Your AI Platform Teammate