Cloudflare v5.33.1 published on Wednesday, Jun 26, 2024 by Pulumi
cloudflare.getList
Explore with Pulumi AI
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:
- account_
id str - The account identifier to target for the resource.
- name str
- The list name to target for the resource.
getList Result
The following output properties are available:
- 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.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.