1. Packages
  2. Ibm Provider
  3. API Docs
  4. CisCustomListItems
ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud

ibm.CisCustomListItems

Explore with Pulumi AI

ibm logo
ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud

    Provides an IBM Cloud Internet Services custom list items resource to create, update, and delete the custom list items of an instance. For more information, see Using custom lists.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    // adding items in ip list
    const itemsCisCustomListItems = new ibm.CisCustomListItems("itemsCisCustomListItems", {
        cisId: ibm_cis.instance.id,
        listId: ibm_cis.custom_list.list_id,
        items: [
            {
                ip: _var.ip1,
            },
            {
                ip: _var.ip2,
            },
        ],
    });
    // adding items in asn list
    const itemsIndex_cisCustomListItemsCisCustomListItems = new ibm.CisCustomListItems("itemsIndex/cisCustomListItemsCisCustomListItems", {
        cisId: ibm_cis.instance.id,
        listId: ibm_cis.custom_list.list_id,
        items: [
            {
                asn: 23,
            },
            {
                asn: 213,
            },
        ],
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    # adding items in ip list
    items_cis_custom_list_items = ibm.CisCustomListItems("itemsCisCustomListItems",
        cis_id=ibm_cis["instance"]["id"],
        list_id=ibm_cis["custom_list"]["list_id"],
        items=[
            {
                "ip": var["ip1"],
            },
            {
                "ip": var["ip2"],
            },
        ])
    # adding items in asn list
    items_index_cis_custom_list_items_cis_custom_list_items = ibm.CisCustomListItems("itemsIndex/cisCustomListItemsCisCustomListItems",
        cis_id=ibm_cis["instance"]["id"],
        list_id=ibm_cis["custom_list"]["list_id"],
        items=[
            {
                "asn": 23,
            },
            {
                "asn": 213,
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// adding items in ip list
    		_, err := ibm.NewCisCustomListItems(ctx, "itemsCisCustomListItems", &ibm.CisCustomListItemsArgs{
    			CisId:  pulumi.Any(ibm_cis.Instance.Id),
    			ListId: pulumi.Any(ibm_cis.Custom_list.List_id),
    			Items: ibm.CisCustomListItemsItemArray{
    				&ibm.CisCustomListItemsItemArgs{
    					Ip: pulumi.Any(_var.Ip1),
    				},
    				&ibm.CisCustomListItemsItemArgs{
    					Ip: pulumi.Any(_var.Ip2),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// adding items in asn list
    		_, err = ibm.NewCisCustomListItems(ctx, "itemsIndex/cisCustomListItemsCisCustomListItems", &ibm.CisCustomListItemsArgs{
    			CisId:  pulumi.Any(ibm_cis.Instance.Id),
    			ListId: pulumi.Any(ibm_cis.Custom_list.List_id),
    			Items: ibm.CisCustomListItemsItemArray{
    				&ibm.CisCustomListItemsItemArgs{
    					Asn: pulumi.Float64(23),
    				},
    				&ibm.CisCustomListItemsItemArgs{
    					Asn: pulumi.Float64(213),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        // adding items in ip list
        var itemsCisCustomListItems = new Ibm.CisCustomListItems("itemsCisCustomListItems", new()
        {
            CisId = ibm_cis.Instance.Id,
            ListId = ibm_cis.Custom_list.List_id,
            Items = new[]
            {
                new Ibm.Inputs.CisCustomListItemsItemArgs
                {
                    Ip = @var.Ip1,
                },
                new Ibm.Inputs.CisCustomListItemsItemArgs
                {
                    Ip = @var.Ip2,
                },
            },
        });
    
        // adding items in asn list
        var itemsIndex_cisCustomListItemsCisCustomListItems = new Ibm.CisCustomListItems("itemsIndex/cisCustomListItemsCisCustomListItems", new()
        {
            CisId = ibm_cis.Instance.Id,
            ListId = ibm_cis.Custom_list.List_id,
            Items = new[]
            {
                new Ibm.Inputs.CisCustomListItemsItemArgs
                {
                    Asn = 23,
                },
                new Ibm.Inputs.CisCustomListItemsItemArgs
                {
                    Asn = 213,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.CisCustomListItems;
    import com.pulumi.ibm.CisCustomListItemsArgs;
    import com.pulumi.ibm.inputs.CisCustomListItemsItemArgs;
    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) {
            // adding items in ip list
            var itemsCisCustomListItems = new CisCustomListItems("itemsCisCustomListItems", CisCustomListItemsArgs.builder()
                .cisId(ibm_cis.instance().id())
                .listId(ibm_cis.custom_list().list_id())
                .items(            
                    CisCustomListItemsItemArgs.builder()
                        .ip(var_.ip1())
                        .build(),
                    CisCustomListItemsItemArgs.builder()
                        .ip(var_.ip2())
                        .build())
                .build());
    
            // adding items in asn list
            var itemsIndex_cisCustomListItemsCisCustomListItems = new CisCustomListItems("itemsIndex/cisCustomListItemsCisCustomListItems", CisCustomListItemsArgs.builder()
                .cisId(ibm_cis.instance().id())
                .listId(ibm_cis.custom_list().list_id())
                .items(            
                    CisCustomListItemsItemArgs.builder()
                        .asn(23)
                        .build(),
                    CisCustomListItemsItemArgs.builder()
                        .asn(213)
                        .build())
                .build());
    
        }
    }
    
    resources:
      # adding items in ip list
      itemsCisCustomListItems:
        type: ibm:CisCustomListItems
        properties:
          cisId: ${ibm_cis.instance.id}
          listId: ${ibm_cis.custom_list.list_id}
          items:
            - ip: ${var.ip1}
            - ip: ${var.ip2}
      # adding items in asn list
      itemsIndex/cisCustomListItemsCisCustomListItems:
        type: ibm:CisCustomListItems
        properties:
          cisId: ${ibm_cis.instance.id}
          listId: ${ibm_cis.custom_list.list_id}
          items:
            - asn: 23
            - asn: 213
    

    Create CisCustomListItems Resource

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

    Constructor syntax

    new CisCustomListItems(name: string, args: CisCustomListItemsArgs, opts?: CustomResourceOptions);
    @overload
    def CisCustomListItems(resource_name: str,
                           args: CisCustomListItemsArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def CisCustomListItems(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           cis_id: Optional[str] = None,
                           items: Optional[Sequence[CisCustomListItemsItemArgs]] = None,
                           list_id: Optional[str] = None,
                           cis_custom_list_items_id: Optional[str] = None)
    func NewCisCustomListItems(ctx *Context, name string, args CisCustomListItemsArgs, opts ...ResourceOption) (*CisCustomListItems, error)
    public CisCustomListItems(string name, CisCustomListItemsArgs args, CustomResourceOptions? opts = null)
    public CisCustomListItems(String name, CisCustomListItemsArgs args)
    public CisCustomListItems(String name, CisCustomListItemsArgs args, CustomResourceOptions options)
    
    type: ibm:CisCustomListItems
    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 CisCustomListItemsArgs
    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 CisCustomListItemsArgs
    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 CisCustomListItemsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CisCustomListItemsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CisCustomListItemsArgs
    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 cisCustomListItemsResource = new Ibm.CisCustomListItems("cisCustomListItemsResource", new()
    {
        CisId = "string",
        Items = new[]
        {
            new Ibm.Inputs.CisCustomListItemsItemArgs
            {
                Asn = 0,
                Comment = "string",
                CreatedOn = "string",
                Hostname = "string",
                Ip = "string",
                ItemId = "string",
                ModifiedOn = "string",
            },
        },
        ListId = "string",
        CisCustomListItemsId = "string",
    });
    
    example, err := ibm.NewCisCustomListItems(ctx, "cisCustomListItemsResource", &ibm.CisCustomListItemsArgs{
    	CisId: pulumi.String("string"),
    	Items: ibm.CisCustomListItemsItemArray{
    		&ibm.CisCustomListItemsItemArgs{
    			Asn:        pulumi.Float64(0),
    			Comment:    pulumi.String("string"),
    			CreatedOn:  pulumi.String("string"),
    			Hostname:   pulumi.String("string"),
    			Ip:         pulumi.String("string"),
    			ItemId:     pulumi.String("string"),
    			ModifiedOn: pulumi.String("string"),
    		},
    	},
    	ListId:               pulumi.String("string"),
    	CisCustomListItemsId: pulumi.String("string"),
    })
    
    var cisCustomListItemsResource = new CisCustomListItems("cisCustomListItemsResource", CisCustomListItemsArgs.builder()
        .cisId("string")
        .items(CisCustomListItemsItemArgs.builder()
            .asn(0.0)
            .comment("string")
            .createdOn("string")
            .hostname("string")
            .ip("string")
            .itemId("string")
            .modifiedOn("string")
            .build())
        .listId("string")
        .cisCustomListItemsId("string")
        .build());
    
    cis_custom_list_items_resource = ibm.CisCustomListItems("cisCustomListItemsResource",
        cis_id="string",
        items=[{
            "asn": 0,
            "comment": "string",
            "created_on": "string",
            "hostname": "string",
            "ip": "string",
            "item_id": "string",
            "modified_on": "string",
        }],
        list_id="string",
        cis_custom_list_items_id="string")
    
    const cisCustomListItemsResource = new ibm.CisCustomListItems("cisCustomListItemsResource", {
        cisId: "string",
        items: [{
            asn: 0,
            comment: "string",
            createdOn: "string",
            hostname: "string",
            ip: "string",
            itemId: "string",
            modifiedOn: "string",
        }],
        listId: "string",
        cisCustomListItemsId: "string",
    });
    
    type: ibm:CisCustomListItems
    properties:
        cisCustomListItemsId: string
        cisId: string
        items:
            - asn: 0
              comment: string
              createdOn: string
              hostname: string
              ip: string
              itemId: string
              modifiedOn: string
        listId: string
    

    CisCustomListItems 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 CisCustomListItems resource accepts the following input properties:

    CisId string
    The ID of the CIS service instance.
    Items List<CisCustomListItemsItem>
    Items list
    ListId string
    ID of the custom list.
    CisCustomListItemsId string
    CisId string
    The ID of the CIS service instance.
    Items []CisCustomListItemsItemArgs
    Items list
    ListId string
    ID of the custom list.
    CisCustomListItemsId string
    cisId String
    The ID of the CIS service instance.
    items List<CisCustomListItemsItem>
    Items list
    listId String
    ID of the custom list.
    cisCustomListItemsId String
    cisId string
    The ID of the CIS service instance.
    items CisCustomListItemsItem[]
    Items list
    listId string
    ID of the custom list.
    cisCustomListItemsId string
    cis_id str
    The ID of the CIS service instance.
    items Sequence[CisCustomListItemsItemArgs]
    Items list
    list_id str
    ID of the custom list.
    cis_custom_list_items_id str
    cisId String
    The ID of the CIS service instance.
    items List<Property Map>
    Items list
    listId String
    ID of the custom list.
    cisCustomListItemsId String

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing CisCustomListItems Resource

    Get an existing CisCustomListItems 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?: CisCustomListItemsState, opts?: CustomResourceOptions): CisCustomListItems
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cis_custom_list_items_id: Optional[str] = None,
            cis_id: Optional[str] = None,
            items: Optional[Sequence[CisCustomListItemsItemArgs]] = None,
            list_id: Optional[str] = None) -> CisCustomListItems
    func GetCisCustomListItems(ctx *Context, name string, id IDInput, state *CisCustomListItemsState, opts ...ResourceOption) (*CisCustomListItems, error)
    public static CisCustomListItems Get(string name, Input<string> id, CisCustomListItemsState? state, CustomResourceOptions? opts = null)
    public static CisCustomListItems get(String name, Output<String> id, CisCustomListItemsState state, CustomResourceOptions options)
    resources:  _:    type: ibm:CisCustomListItems    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:
    CisCustomListItemsId string
    CisId string
    The ID of the CIS service instance.
    Items List<CisCustomListItemsItem>
    Items list
    ListId string
    ID of the custom list.
    CisCustomListItemsId string
    CisId string
    The ID of the CIS service instance.
    Items []CisCustomListItemsItemArgs
    Items list
    ListId string
    ID of the custom list.
    cisCustomListItemsId String
    cisId String
    The ID of the CIS service instance.
    items List<CisCustomListItemsItem>
    Items list
    listId String
    ID of the custom list.
    cisCustomListItemsId string
    cisId string
    The ID of the CIS service instance.
    items CisCustomListItemsItem[]
    Items list
    listId string
    ID of the custom list.
    cis_custom_list_items_id str
    cis_id str
    The ID of the CIS service instance.
    items Sequence[CisCustomListItemsItemArgs]
    Items list
    list_id str
    ID of the custom list.
    cisCustomListItemsId String
    cisId String
    The ID of the CIS service instance.
    items List<Property Map>
    Items list
    listId String
    ID of the custom list.

    Supporting Types

    CisCustomListItemsItem, CisCustomListItemsItemArgs

    Asn double
    Defines a non-negative 32-bit integer. It is used with the list where kind is asn.
    Comment string
    Defines an informative summary of the list item.
    CreatedOn string
    (string) The timestamp of when the item was created.
    Hostname string
    Defines the hostname. It is used with the list where kind is hostname.
    Ip string
    An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a maximum of /64. It is used with the list where kind is ip.
    ItemId string
    Custom List Item ID
    ModifiedOn string
    (string) The timestamp of when the item was last modified.
    Asn float64
    Defines a non-negative 32-bit integer. It is used with the list where kind is asn.
    Comment string
    Defines an informative summary of the list item.
    CreatedOn string
    (string) The timestamp of when the item was created.
    Hostname string
    Defines the hostname. It is used with the list where kind is hostname.
    Ip string
    An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a maximum of /64. It is used with the list where kind is ip.
    ItemId string
    Custom List Item ID
    ModifiedOn string
    (string) The timestamp of when the item was last modified.
    asn Double
    Defines a non-negative 32-bit integer. It is used with the list where kind is asn.
    comment String
    Defines an informative summary of the list item.
    createdOn String
    (string) The timestamp of when the item was created.
    hostname String
    Defines the hostname. It is used with the list where kind is hostname.
    ip String
    An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a maximum of /64. It is used with the list where kind is ip.
    itemId String
    Custom List Item ID
    modifiedOn String
    (string) The timestamp of when the item was last modified.
    asn number
    Defines a non-negative 32-bit integer. It is used with the list where kind is asn.
    comment string
    Defines an informative summary of the list item.
    createdOn string
    (string) The timestamp of when the item was created.
    hostname string
    Defines the hostname. It is used with the list where kind is hostname.
    ip string
    An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a maximum of /64. It is used with the list where kind is ip.
    itemId string
    Custom List Item ID
    modifiedOn string
    (string) The timestamp of when the item was last modified.
    asn float
    Defines a non-negative 32-bit integer. It is used with the list where kind is asn.
    comment str
    Defines an informative summary of the list item.
    created_on str
    (string) The timestamp of when the item was created.
    hostname str
    Defines the hostname. It is used with the list where kind is hostname.
    ip str
    An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a maximum of /64. It is used with the list where kind is ip.
    item_id str
    Custom List Item ID
    modified_on str
    (string) The timestamp of when the item was last modified.
    asn Number
    Defines a non-negative 32-bit integer. It is used with the list where kind is asn.
    comment String
    Defines an informative summary of the list item.
    createdOn String
    (string) The timestamp of when the item was created.
    hostname String
    Defines the hostname. It is used with the list where kind is hostname.
    ip String
    An IPv4 address, an IPv4 CIDR, or an IPv6 CIDR. IPv6 CIDRs are limited to a maximum of /64. It is used with the list where kind is ip.
    itemId String
    Custom List Item ID
    modifiedOn String
    (string) The timestamp of when the item was last modified.

    Import

    Import is not possible.

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

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    ibm 1.81.1 published on Wednesday, Aug 6, 2025 by ibm-cloud