1. Packages
  2. Impart Security
  3. API Docs
  4. List
Impart Security v0.9.0 published on Friday, Mar 21, 2025 by Impart Security

impart.List

Explore with Pulumi AI

Manage a list.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as impart from "@impart-security/pulumi-impart";

// Create a new list
const example = new impart.List("example", {
    description: "list description",
    items: [
        {
            value: "item1",
        },
        {
            value: "item2",
        },
    ],
    kind: "string",
    name: "list_example",
});
Copy
import pulumi
import pulumi_impart as impart

# Create a new list
example = impart.List("example",
    description="list description",
    items=[
        {
            "value": "item1",
        },
        {
            "value": "item2",
        },
    ],
    kind="string",
    name="list_example")
Copy
package main

import (
	"github.com/impart-security/pulumi-impart/sdk/go/impart"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// Create a new list
		_, err := impart.NewList(ctx, "example", &impart.ListArgs{
			Description: pulumi.String("list description"),
			Items: impart.ListItemArray{
				&impart.ListItemArgs{
					Value: pulumi.String("item1"),
				},
				&impart.ListItemArgs{
					Value: pulumi.String("item2"),
				},
			},
			Kind: pulumi.String("string"),
			Name: pulumi.String("list_example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Impart = Pulumi.Impart;

return await Deployment.RunAsync(() => 
{
    // Create a new list
    var example = new Impart.List("example", new()
    {
        Description = "list description",
        Items = new[]
        {
            new Impart.Inputs.ListItemArgs
            {
                Value = "item1",
            },
            new Impart.Inputs.ListItemArgs
            {
                Value = "item2",
            },
        },
        Kind = "string",
        Name = "list_example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.impart.List;
import com.pulumi.impart.ListArgs;
import com.pulumi.impart.inputs.ListItemArgs;
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) {
        // Create a new list
        var example = new List("example", ListArgs.builder()
            .description("list description")
            .items(            
                ListItemArgs.builder()
                    .value("item1")
                    .build(),
                ListItemArgs.builder()
                    .value("item2")
                    .build())
            .kind("string")
            .name("list_example")
            .build());

    }
}
Copy
resources:
  # Create a new list
  example:
    type: impart:List
    properties:
      description: list description
      items:
        - value: item1
        - value: item2
      kind: string
      name: list_example
Copy

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,
         kind: Optional[str] = None,
         name: Optional[str] = None,
         description: Optional[str] = None,
         functionality: Optional[str] = None,
         items: Optional[Sequence[ListItemArgs]] = None,
         labels: Optional[Sequence[str]] = None,
         subkind: 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: impart:List
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. ListArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. ListArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. ListArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 Impart.List("listResource", new()
{
    Kind = "string",
    Name = "string",
    Description = "string",
    Functionality = "string",
    Items = new[]
    {
        new Impart.Inputs.ListItemArgs
        {
            Value = "string",
            Expiration = "string",
        },
    },
    Labels = new[]
    {
        "string",
    },
    Subkind = "string",
});
Copy
example, err := impart.NewList(ctx, "listResource", &impart.ListArgs{
	Kind:          pulumi.String("string"),
	Name:          pulumi.String("string"),
	Description:   pulumi.String("string"),
	Functionality: pulumi.String("string"),
	Items: impart.ListItemArray{
		&impart.ListItemArgs{
			Value:      pulumi.String("string"),
			Expiration: pulumi.String("string"),
		},
	},
	Labels: pulumi.StringArray{
		pulumi.String("string"),
	},
	Subkind: pulumi.String("string"),
})
Copy
var listResource = new List("listResource", ListArgs.builder()
    .kind("string")
    .name("string")
    .description("string")
    .functionality("string")
    .items(ListItemArgs.builder()
        .value("string")
        .expiration("string")
        .build())
    .labels("string")
    .subkind("string")
    .build());
Copy
list_resource = impart.List("listResource",
    kind="string",
    name="string",
    description="string",
    functionality="string",
    items=[{
        "value": "string",
        "expiration": "string",
    }],
    labels=["string"],
    subkind="string")
Copy
const listResource = new impart.List("listResource", {
    kind: "string",
    name: "string",
    description: "string",
    functionality: "string",
    items: [{
        value: "string",
        expiration: "string",
    }],
    labels: ["string"],
    subkind: "string",
});
Copy
type: impart:List
properties:
    description: string
    functionality: string
    items:
        - expiration: string
          value: string
    kind: string
    labels:
        - string
    name: string
    subkind: string
Copy

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:

Kind This property is required. string
The list kind.
Name This property is required. string
The name for this list.
Description string
The description for this list.
Functionality string
The list functionality. Allowed values are add, add/remove.
Items List<ListItem>
The list items.
Labels List<string>
The applied labels.
Subkind string
The list subkind.
Kind This property is required. string
The list kind.
Name This property is required. string
The name for this list.
Description string
The description for this list.
Functionality string
The list functionality. Allowed values are add, add/remove.
Items []ListItemArgs
The list items.
Labels []string
The applied labels.
Subkind string
The list subkind.
kind This property is required. String
The list kind.
name This property is required. String
The name for this list.
description String
The description for this list.
functionality String
The list functionality. Allowed values are add, add/remove.
items List<ListItem>
The list items.
labels List<String>
The applied labels.
subkind String
The list subkind.
kind This property is required. string
The list kind.
name This property is required. string
The name for this list.
description string
The description for this list.
functionality string
The list functionality. Allowed values are add, add/remove.
items ListItem[]
The list items.
labels string[]
The applied labels.
subkind string
The list subkind.
kind This property is required. str
The list kind.
name This property is required. str
The name for this list.
description str
The description for this list.
functionality str
The list functionality. Allowed values are add, add/remove.
items Sequence[ListItemArgs]
The list items.
labels Sequence[str]
The applied labels.
subkind str
The list subkind.
kind This property is required. String
The list kind.
name This property is required. String
The name for this list.
description String
The description for this list.
functionality String
The list functionality. Allowed values are add, add/remove.
items List<Property Map>
The list items.
labels List<String>
The applied labels.
subkind String
The list subkind.

Outputs

All input properties are implicitly available as output properties. Additionally, the List 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 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,
        description: Optional[str] = None,
        functionality: Optional[str] = None,
        items: Optional[Sequence[ListItemArgs]] = None,
        kind: Optional[str] = None,
        labels: Optional[Sequence[str]] = None,
        name: Optional[str] = None,
        subkind: Optional[str] = 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: impart:List    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
The description for this list.
Functionality string
The list functionality. Allowed values are add, add/remove.
Items List<ListItem>
The list items.
Kind string
The list kind.
Labels List<string>
The applied labels.
Name string
The name for this list.
Subkind string
The list subkind.
Description string
The description for this list.
Functionality string
The list functionality. Allowed values are add, add/remove.
Items []ListItemArgs
The list items.
Kind string
The list kind.
Labels []string
The applied labels.
Name string
The name for this list.
Subkind string
The list subkind.
description String
The description for this list.
functionality String
The list functionality. Allowed values are add, add/remove.
items List<ListItem>
The list items.
kind String
The list kind.
labels List<String>
The applied labels.
name String
The name for this list.
subkind String
The list subkind.
description string
The description for this list.
functionality string
The list functionality. Allowed values are add, add/remove.
items ListItem[]
The list items.
kind string
The list kind.
labels string[]
The applied labels.
name string
The name for this list.
subkind string
The list subkind.
description str
The description for this list.
functionality str
The list functionality. Allowed values are add, add/remove.
items Sequence[ListItemArgs]
The list items.
kind str
The list kind.
labels Sequence[str]
The applied labels.
name str
The name for this list.
subkind str
The list subkind.
description String
The description for this list.
functionality String
The list functionality. Allowed values are add, add/remove.
items List<Property Map>
The list items.
kind String
The list kind.
labels List<String>
The applied labels.
name String
The name for this list.
subkind String
The list subkind.

Supporting Types

ListItem
, ListItemArgs

Value This property is required. string
The list item value.
Expiration string
The list item expiration.
Value This property is required. string
The list item value.
Expiration string
The list item expiration.
value This property is required. String
The list item value.
expiration String
The list item expiration.
value This property is required. string
The list item value.
expiration string
The list item expiration.
value This property is required. str
The list item value.
expiration str
The list item expiration.
value This property is required. String
The list item value.
expiration String
The list item expiration.

Package Details

Repository
impart impart-security/pulumi-impart
License
Apache-2.0
Notes
This Pulumi package is based on the impart Terraform Provider.