1. Packages
  2. Cloudflare
  3. API Docs
  4. getList
Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi

cloudflare.getList

Explore with Pulumi AI

cloudflare logo
Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi

    Use this data source to lookup a List.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const example = cloudflare.getList({
        accountId: "f037e56e89293a057740de681ac9abbe",
        name: "list_name",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example = cloudflare.get_list(account_id="f037e56e89293a057740de681ac9abbe",
        name="list_name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.LookupList(ctx, &cloudflare.LookupListArgs{
    			AccountId: "f037e56e89293a057740de681ac9abbe",
    			Name:      "list_name",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Cloudflare = Pulumi.Cloudflare;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Cloudflare.GetList.Invoke(new()
        {
            AccountId = "f037e56e89293a057740de681ac9abbe",
            Name = "list_name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetListArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var example = CloudflareFunctions.getList(GetListArgs.builder()
                .accountId("f037e56e89293a057740de681ac9abbe")
                .name("list_name")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: cloudflare:getList
          Arguments:
            accountId: f037e56e89293a057740de681ac9abbe
            name: list_name
    

    Using getList

    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 getList(args: GetListArgs, opts?: InvokeOptions): Promise<GetListResult>
    function getListOutput(args: GetListOutputArgs, opts?: InvokeOptions): Output<GetListResult>
    def get_list(account_id: Optional[str] = None,
                 name: Optional[str] = None,
                 opts: Optional[InvokeOptions] = None) -> GetListResult
    def get_list_output(account_id: Optional[pulumi.Input[str]] = None,
                 name: Optional[pulumi.Input[str]] = None,
                 opts: Optional[InvokeOptions] = None) -> Output[GetListResult]
    func LookupList(ctx *Context, args *LookupListArgs, opts ...InvokeOption) (*LookupListResult, error)
    func LookupListOutput(ctx *Context, args *LookupListOutputArgs, opts ...InvokeOption) LookupListResultOutput

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

    public static class GetList 
    {
        public static Task<GetListResult> InvokeAsync(GetListArgs args, InvokeOptions? opts = null)
        public static Output<GetListResult> Invoke(GetListInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetListResult> getList(GetListArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: cloudflare:index/getList:getList
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AccountId string
    The account identifier to target for the resource.
    Name string
    The list name to target for the resource.
    AccountId string
    The account identifier to target for the resource.
    Name string
    The list name to target for the resource.
    accountId String
    The account identifier to target for the resource.
    name String
    The list name to target for the resource.
    accountId string
    The account identifier to target for the resource.
    name string
    The list name to target for the resource.
    account_id str
    The account identifier to target for the resource.
    name str
    The list name to target for the resource.
    accountId String
    The account identifier to target for the resource.
    name String
    The list name to target for the resource.

    getList Result

    The following output properties are available:

    AccountId string
    The account identifier to target for the resource.
    Description string
    List description.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    List kind.
    Name string
    The list name to target for the resource.
    Numitems int
    Number of items in list.
    AccountId string
    The account identifier to target for the resource.
    Description string
    List description.
    Id string
    The provider-assigned unique ID for this managed resource.
    Kind string
    List kind.
    Name string
    The list name to target for the resource.
    Numitems int
    Number of items in list.
    accountId String
    The account identifier to target for the resource.
    description String
    List description.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    List kind.
    name String
    The list name to target for the resource.
    numitems Integer
    Number of items in list.
    accountId string
    The account identifier to target for the resource.
    description string
    List description.
    id string
    The provider-assigned unique ID for this managed resource.
    kind string
    List kind.
    name string
    The list name to target for the resource.
    numitems number
    Number of items in list.
    account_id str
    The account identifier to target for the resource.
    description str
    List description.
    id str
    The provider-assigned unique ID for this managed resource.
    kind str
    List kind.
    name str
    The list name to target for the resource.
    numitems int
    Number of items in list.
    accountId String
    The account identifier to target for the resource.
    description String
    List description.
    id String
    The provider-assigned unique ID for this managed resource.
    kind String
    List kind.
    name String
    The list name to target for the resource.
    numitems Number
    Number of items in list.

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi