1. Packages
  2. Standard Library
  3. API Docs
  4. csvdecode
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

    Decodes a string containing CSV-formatted data and produces a list of maps representing that data. The first line of the CSV data is interpreted as a “header” row: the values given are used as the keys in the resulting maps. Each subsequent line becomes a single map in the resulting list, matching the keys from the header row with the given values by index. All lines in the file must contain the same number of fields, or this function will produce an error. Follows the format defined in RFC 4180.

    Using csvdecode

    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 csvdecode(args: CsvdecodeArgs, opts?: InvokeOptions): Promise<CsvdecodeResult>
    function csvdecodeOutput(args: CsvdecodeOutputArgs, opts?: InvokeOptions): Output<CsvdecodeResult>
    def csvdecode(input: Optional[str] = None,
                  opts: Optional[InvokeOptions] = None) -> CsvdecodeResult
    def csvdecode_output(input: Optional[pulumi.Input[str]] = None,
                  opts: Optional[InvokeOptions] = None) -> Output[CsvdecodeResult]
    func Csvdecode(ctx *Context, args *CsvdecodeArgs, opts ...InvokeOption) (*CsvdecodeResult, error)
    func CsvdecodeOutput(ctx *Context, args *CsvdecodeOutputArgs, opts ...InvokeOption) CsvdecodeResultOutput

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

    public static class Csvdecode 
    {
        public static Task<CsvdecodeResult> InvokeAsync(CsvdecodeArgs args, InvokeOptions? opts = null)
        public static Output<CsvdecodeResult> Invoke(CsvdecodeInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<CsvdecodeResult> csvdecode(CsvdecodeArgs args, InvokeOptions options)
    public static Output<CsvdecodeResult> csvdecode(CsvdecodeArgs args, InvokeOptions options)
    
    fn::invoke:
      function: std:csvdecode
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Input string
    Input string
    input String
    input string
    input str
    input String

    csvdecode Result

    The following output properties are available:

    Result List<ImmutableDictionary<string, string>>
    Result []map[string]string
    result List<Map<String,String>>
    result {[key: string]: string}[]
    result Sequence[Mapping[str, str]]
    result List<Map<String>>

    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