1. Packages
  2. Standard Library
  3. API Docs
  4. reverse
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 a sequence with the same elements but in reverse order.

    Using reverse

    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 reverse(args: ReverseArgs, opts?: InvokeOptions): Promise<ReverseResult>
    function reverseOutput(args: ReverseOutputArgs, opts?: InvokeOptions): Output<ReverseResult>
    def reverse(input: Optional[Sequence[Any]] = None,
                opts: Optional[InvokeOptions] = None) -> ReverseResult
    def reverse_output(input: Optional[pulumi.Input[Sequence[Any]]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[ReverseResult]
    func Reverse(ctx *Context, args *ReverseArgs, opts ...InvokeOption) (*ReverseResult, error)
    func ReverseOutput(ctx *Context, args *ReverseOutputArgs, opts ...InvokeOption) ReverseResultOutput

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

    public static class Reverse 
    {
        public static Task<ReverseResult> InvokeAsync(ReverseArgs args, InvokeOptions? opts = null)
        public static Output<ReverseResult> Invoke(ReverseInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<ReverseResult> reverse(ReverseArgs args, InvokeOptions options)
    public static Output<ReverseResult> reverse(ReverseArgs args, InvokeOptions options)
    
    fn::invoke:
      function: std:reverse
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Input List<object>
    Input []interface{}
    input List<Object>
    input any[]
    input Sequence[Any]
    input List<Any>

    reverse Result

    The following output properties are available:

    Result List<object>
    Result []interface{}
    result List<Object>
    result any[]
    result Sequence[Any]
    result List<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