1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. List
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.List

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleList = new cloudflare.List("example_list", {
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        kind: "ip",
        name: "list1",
        description: "This is a note",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_list = cloudflare.List("example_list",
        account_id="023e105f4ecef8ad9ca31a8372d0c353",
        kind="ip",
        name="list1",
        description="This is a note")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.NewList(ctx, "example_list", &cloudflare.ListArgs{
    			AccountId:   pulumi.String("023e105f4ecef8ad9ca31a8372d0c353"),
    			Kind:        pulumi.String("ip"),
    			Name:        pulumi.String("list1"),
    			Description: pulumi.String("This is a note"),
    		})
    		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 exampleList = new Cloudflare.List("example_list", new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            Kind = "ip",
            Name = "list1",
            Description = "This is a note",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.List;
    import com.pulumi.cloudflare.ListArgs;
    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) {
            var exampleList = new List("exampleList", ListArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .kind("ip")
                .name("list1")
                .description("This is a note")
                .build());
    
        }
    }
    
    resources:
      exampleList:
        type: cloudflare:List
        name: example_list
        properties:
          accountId: 023e105f4ecef8ad9ca31a8372d0c353
          kind: ip
          name: list1
          description: This is a note
    

    Create List Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new List(name: string, args: ListArgs, opts?: CustomResourceOptions);
    @overload
    def List(resource_name: str,
             args: ListArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def List(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             account_id: Optional[str] = None,
             kind: Optional[str] = None,
             name: Optional[str] = None,
             description: Optional[str] = None)
    func NewList(ctx *Context, name string, args ListArgs, opts ...ResourceOption) (*List, error)
    public List(string name, ListArgs args, CustomResourceOptions? opts = null)
    public List(String name, ListArgs args)
    public List(String name, ListArgs args, CustomResourceOptions options)
    
    type: cloudflare:List
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ListArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ListArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var listResource = new Cloudflare.List("listResource", new()
    {
        AccountId = "string",
        Kind = "string",
        Name = "string",
        Description = "string",
    });
    
    example, err := cloudflare.NewList(ctx, "listResource", &cloudflare.ListArgs{
    	AccountId:   pulumi.String("string"),
    	Kind:        pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Description: pulumi.String("string"),
    })
    
    var listResource = new List("listResource", ListArgs.builder()
        .accountId("string")
        .kind("string")
        .name("string")
        .description("string")
        .build());
    
    list_resource = cloudflare.List("listResource",
        account_id="string",
        kind="string",
        name="string",
        description="string")
    
    const listResource = new cloudflare.List("listResource", {
        accountId: "string",
        kind: "string",
        name: "string",
        description: "string",
    });
    
    type: cloudflare:List
    properties:
        accountId: string
        description: string
        kind: string
        name: string
    

    List Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The List resource accepts the following input properties:

    AccountId string
    Identifier
    Kind string
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    Name string
    An informative name for the list. Use this name in filter and rule expressions.
    Description string
    An informative summary of the list.
    AccountId string
    Identifier
    Kind string
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    Name string
    An informative name for the list. Use this name in filter and rule expressions.
    Description string
    An informative summary of the list.
    accountId String
    Identifier
    kind String
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    name String
    An informative name for the list. Use this name in filter and rule expressions.
    description String
    An informative summary of the list.
    accountId string
    Identifier
    kind string
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    name string
    An informative name for the list. Use this name in filter and rule expressions.
    description string
    An informative summary of the list.
    account_id str
    Identifier
    kind str
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    name str
    An informative name for the list. Use this name in filter and rule expressions.
    description str
    An informative summary of the list.
    accountId String
    Identifier
    kind String
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    name String
    An informative name for the list. Use this name in filter and rule expressions.
    description String
    An informative summary of the list.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the List resource produces the following output properties:

    CreatedOn string
    The RFC 3339 timestamp of when the list was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    The RFC 3339 timestamp of when the list was last modified.
    NumItems double
    The number of items in the list.
    NumReferencingFilters double
    The number of filters referencing the list.
    CreatedOn string
    The RFC 3339 timestamp of when the list was created.
    Id string
    The provider-assigned unique ID for this managed resource.
    ModifiedOn string
    The RFC 3339 timestamp of when the list was last modified.
    NumItems float64
    The number of items in the list.
    NumReferencingFilters float64
    The number of filters referencing the list.
    createdOn String
    The RFC 3339 timestamp of when the list was created.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    The RFC 3339 timestamp of when the list was last modified.
    numItems Double
    The number of items in the list.
    numReferencingFilters Double
    The number of filters referencing the list.
    createdOn string
    The RFC 3339 timestamp of when the list was created.
    id string
    The provider-assigned unique ID for this managed resource.
    modifiedOn string
    The RFC 3339 timestamp of when the list was last modified.
    numItems number
    The number of items in the list.
    numReferencingFilters number
    The number of filters referencing the list.
    created_on str
    The RFC 3339 timestamp of when the list was created.
    id str
    The provider-assigned unique ID for this managed resource.
    modified_on str
    The RFC 3339 timestamp of when the list was last modified.
    num_items float
    The number of items in the list.
    num_referencing_filters float
    The number of filters referencing the list.
    createdOn String
    The RFC 3339 timestamp of when the list was created.
    id String
    The provider-assigned unique ID for this managed resource.
    modifiedOn String
    The RFC 3339 timestamp of when the list was last modified.
    numItems Number
    The number of items in the list.
    numReferencingFilters Number
    The number of filters referencing the list.

    Look up Existing List Resource

    Get an existing List resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ListState, opts?: CustomResourceOptions): List
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[str] = None,
            created_on: Optional[str] = None,
            description: Optional[str] = None,
            kind: Optional[str] = None,
            modified_on: Optional[str] = None,
            name: Optional[str] = None,
            num_items: Optional[float] = None,
            num_referencing_filters: Optional[float] = None) -> List
    func GetList(ctx *Context, name string, id IDInput, state *ListState, opts ...ResourceOption) (*List, error)
    public static List Get(string name, Input<string> id, ListState? state, CustomResourceOptions? opts = null)
    public static List get(String name, Output<String> id, ListState state, CustomResourceOptions options)
    resources:  _:    type: cloudflare:List    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AccountId string
    Identifier
    CreatedOn string
    The RFC 3339 timestamp of when the list was created.
    Description string
    An informative summary of the list.
    Kind string
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    ModifiedOn string
    The RFC 3339 timestamp of when the list was last modified.
    Name string
    An informative name for the list. Use this name in filter and rule expressions.
    NumItems double
    The number of items in the list.
    NumReferencingFilters double
    The number of filters referencing the list.
    AccountId string
    Identifier
    CreatedOn string
    The RFC 3339 timestamp of when the list was created.
    Description string
    An informative summary of the list.
    Kind string
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    ModifiedOn string
    The RFC 3339 timestamp of when the list was last modified.
    Name string
    An informative name for the list. Use this name in filter and rule expressions.
    NumItems float64
    The number of items in the list.
    NumReferencingFilters float64
    The number of filters referencing the list.
    accountId String
    Identifier
    createdOn String
    The RFC 3339 timestamp of when the list was created.
    description String
    An informative summary of the list.
    kind String
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    modifiedOn String
    The RFC 3339 timestamp of when the list was last modified.
    name String
    An informative name for the list. Use this name in filter and rule expressions.
    numItems Double
    The number of items in the list.
    numReferencingFilters Double
    The number of filters referencing the list.
    accountId string
    Identifier
    createdOn string
    The RFC 3339 timestamp of when the list was created.
    description string
    An informative summary of the list.
    kind string
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    modifiedOn string
    The RFC 3339 timestamp of when the list was last modified.
    name string
    An informative name for the list. Use this name in filter and rule expressions.
    numItems number
    The number of items in the list.
    numReferencingFilters number
    The number of filters referencing the list.
    account_id str
    Identifier
    created_on str
    The RFC 3339 timestamp of when the list was created.
    description str
    An informative summary of the list.
    kind str
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    modified_on str
    The RFC 3339 timestamp of when the list was last modified.
    name str
    An informative name for the list. Use this name in filter and rule expressions.
    num_items float
    The number of items in the list.
    num_referencing_filters float
    The number of filters referencing the list.
    accountId String
    Identifier
    createdOn String
    The RFC 3339 timestamp of when the list was created.
    description String
    An informative summary of the list.
    kind String
    The type of the list. Each type supports specific list items (IP addresses, ASNs, hostnames or redirects). Available values: "ip", "redirect", "hostname", "asn".
    modifiedOn String
    The RFC 3339 timestamp of when the list was last modified.
    name String
    An informative name for the list. Use this name in filter and rule expressions.
    numItems Number
    The number of items in the list.
    numReferencingFilters Number
    The number of filters referencing the list.

    Import

    $ pulumi import cloudflare:index/list:List example '<account_id>/<list_id>'
    

    To learn more about importing existing cloud resources, see Importing resources.

    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 v6.1.2 published on Monday, Apr 28, 2025 by Pulumi