cloudflare.List
Explore with Pulumi AI
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)
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:
- Account
Id 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 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 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 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.
- account
Id 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:
- Created
On string - The RFC 3339 timestamp of when the list was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - The RFC 3339 timestamp of when the list was last modified.
- Num
Items double - The number of items in the list.
- Num
Referencing doubleFilters - The number of filters referencing the list.
- Created
On string - The RFC 3339 timestamp of when the list was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Modified
On string - The RFC 3339 timestamp of when the list was last modified.
- Num
Items float64 - The number of items in the list.
- Num
Referencing float64Filters - The number of filters referencing the list.
- created
On String - The RFC 3339 timestamp of when the list was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - The RFC 3339 timestamp of when the list was last modified.
- num
Items Double - The number of items in the list.
- num
Referencing DoubleFilters - The number of filters referencing the list.
- created
On string - The RFC 3339 timestamp of when the list was created.
- id string
- The provider-assigned unique ID for this managed resource.
- modified
On string - The RFC 3339 timestamp of when the list was last modified.
- num
Items number - The number of items in the list.
- num
Referencing numberFilters - 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_ floatfilters - The number of filters referencing the list.
- created
On String - The RFC 3339 timestamp of when the list was created.
- id String
- The provider-assigned unique ID for this managed resource.
- modified
On String - The RFC 3339 timestamp of when the list was last modified.
- num
Items Number - The number of items in the list.
- num
Referencing NumberFilters - 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.
- Account
Id string - Identifier
- Created
On 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".
- Modified
On 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.
- Num
Items double - The number of items in the list.
- Num
Referencing doubleFilters - The number of filters referencing the list.
- Account
Id string - Identifier
- Created
On 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".
- Modified
On 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.
- Num
Items float64 - The number of items in the list.
- Num
Referencing float64Filters - The number of filters referencing the list.
- account
Id String - Identifier
- created
On 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".
- modified
On 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.
- num
Items Double - The number of items in the list.
- num
Referencing DoubleFilters - The number of filters referencing the list.
- account
Id string - Identifier
- created
On 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".
- modified
On 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.
- num
Items number - The number of items in the list.
- num
Referencing numberFilters - 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_ floatfilters - The number of filters referencing the list.
- account
Id String - Identifier
- created
On 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".
- modified
On 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.
- num
Items Number - The number of items in the list.
- num
Referencing NumberFilters - 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.