ListItem

class ListItem : KotlinCustomResource

Provides individual list items (IPs, Redirects) to be used in Edge Rules Engine across all zones within the same account.

Example Usage

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 com.pulumi.cloudflare.ListItem;
import com.pulumi.cloudflare.ListItemArgs;
import com.pulumi.cloudflare.inputs.ListItemRedirectArgs;
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 exampleIpList = new List("exampleIpList", ListArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("example_list")
.description("example IPs for a list")
.kind("ip")
.build());
var exampleIpItem = new ListItem("exampleIpItem", ListItemArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.listId(exampleIpList.id())
.comment("List Item Comment")
.ip("192.0.2.0")
.build());
var testTwo = new ListItem("testTwo", ListItemArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.listId(exampleIpList.id())
.redirect(ListItemRedirectArgs.builder()
.sourceUrl("https://source.tld")
.targetUrl("https://target.tld")
.statusCode(302)
.subpathMatching("enabled")
.build())
.build());
var exampleAsnList = new List("exampleAsnList", ListArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("example_asn_list")
.description("example ASNs for a list")
.kind("asn")
.build());
var exampleAsnItem = new ListItem("exampleAsnItem", ListItemArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.listId(exampleAsnList.id())
.comment("List Item Comment")
.asn(6789)
.build());
var exampleHostnameList = new List("exampleHostnameList", ListArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.name("example_hostname_list")
.description("example Hostnames for a list")
.kind("hostname")
.build());
var exampleHostnameItem = new ListItem("exampleHostnameItem", ListItemArgs.builder()
.accountId("f037e56e89293a057740de681ac9abbe")
.listId(exampleHostnameList.id())
.comment("List Item Comment")
.asn("example.com")
.build());
}
}

Import

$ pulumi import cloudflare:index/listItem:ListItem example <account_id>/<list_id>/<item_id>

Properties

Link copied to clipboard
val accountId: Output<String>

The account identifier to target for the resource.

Link copied to clipboard
val asn: Output<Int>?

Autonomous system number to include in the list. Must provide only one of ip, redirect, hostname, asn. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val comment: Output<String>?

An optional comment for the item.

Link copied to clipboard

Redirect configuration to store in the list. Must provide only one of ip, redirect, hostname, asn. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val ip: Output<String>?

IP address to include in the list. Must provide only one of ip, redirect, hostname, asn. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val listId: Output<String>

The list identifier to target for the resource.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Redirect configuration to store in the list. Must provide only one of ip, redirect, hostname, asn. Modifying this attribute will force creation of a new resource.

Link copied to clipboard
val urn: Output<String>