1. Packages
  2. Impart Security
  3. API Docs
  4. List
Impart Security v0.7.0 published on Tuesday, Sep 24, 2024 by Impart Security

impart.List

Explore with Pulumi AI

impart logo
Impart Security v0.7.0 published on Tuesday, Sep 24, 2024 by Impart Security

    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", {
        items: [
            {
                value: "item1",
            },
            {
                value: "item2",
            },
        ],
        kind: "string",
        name: "list_example",
    });
    
    import pulumi
    import pulumi_impart as impart
    
    # Create a new list
    example = impart.List("example",
        items=[
            impart.ListItemArgs(
                value="item1",
            ),
            impart.ListItemArgs(
                value="item2",
            ),
        ],
        kind="string",
        name="list_example")
    
    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{
    			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
    	})
    }
    
    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()
        {
            Items = new[]
            {
                new Impart.Inputs.ListItemArgs
                {
                    Value = "item1",
                },
                new Impart.Inputs.ListItemArgs
                {
                    Value = "item2",
                },
            },
            Kind = "string",
            Name = "list_example",
        });
    
    });
    
    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()
                .items(            
                    ListItemArgs.builder()
                        .value("item1")
                        .build(),
                    ListItemArgs.builder()
                        .value("item2")
                        .build())
                .kind("string")
                .name("list_example")
                .build());
    
        }
    }
    
    resources:
      # Create a new list
      example:
        type: impart:List
        properties:
          items:
            - value: item1
            - value: item2
          kind: string
          name: list_example
    

    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,
             functionality: Optional[str] = None,
             items: Optional[Sequence[ListItemArgs]] = 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 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 Impart.List("listResource", new()
    {
        Kind = "string",
        Name = "string",
        Functionality = "string",
        Items = new[]
        {
            new Impart.Inputs.ListItemArgs
            {
                Value = "string",
                Expiration = "string",
            },
        },
        Subkind = "string",
    });
    
    example, err := impart.NewList(ctx, "listResource", &impart.ListArgs{
    	Kind:          pulumi.String("string"),
    	Name:          pulumi.String("string"),
    	Functionality: pulumi.String("string"),
    	Items: impart.ListItemArray{
    		&impart.ListItemArgs{
    			Value:      pulumi.String("string"),
    			Expiration: pulumi.String("string"),
    		},
    	},
    	Subkind: pulumi.String("string"),
    })
    
    var listResource = new List("listResource", ListArgs.builder()
        .kind("string")
        .name("string")
        .functionality("string")
        .items(ListItemArgs.builder()
            .value("string")
            .expiration("string")
            .build())
        .subkind("string")
        .build());
    
    list_resource = impart.List("listResource",
        kind="string",
        name="string",
        functionality="string",
        items=[impart.ListItemArgs(
            value="string",
            expiration="string",
        )],
        subkind="string")
    
    const listResource = new impart.List("listResource", {
        kind: "string",
        name: "string",
        functionality: "string",
        items: [{
            value: "string",
            expiration: "string",
        }],
        subkind: "string",
    });
    
    type: impart:List
    properties:
        functionality: string
        items:
            - expiration: string
              value: string
        kind: string
        name: string
        subkind: 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

    The List resource accepts the following input properties:

    Kind string
    The list kind.
    Name string
    The name for this list.
    Functionality string
    The list functionality. Allowed values are add, add/remove.
    Items List<ListItem>
    The list items.
    Subkind string
    The list subkind.
    Kind string
    The list kind.
    Name string
    The name for this list.
    Functionality string
    The list functionality. Allowed values are add, add/remove.
    Items []ListItemArgs
    The list items.
    Subkind string
    The list subkind.
    kind String
    The list kind.
    name String
    The name for this list.
    functionality String
    The list functionality. Allowed values are add, add/remove.
    items List<ListItem>
    The list items.
    subkind String
    The list subkind.
    kind string
    The list kind.
    name string
    The name for this list.
    functionality string
    The list functionality. Allowed values are add, add/remove.
    items ListItem[]
    The list items.
    subkind string
    The list subkind.
    kind str
    The list kind.
    name str
    The name for this list.
    functionality str
    The list functionality. Allowed values are add, add/remove.
    items Sequence[ListItemArgs]
    The list items.
    subkind str
    The list subkind.
    kind String
    The list kind.
    name String
    The name for this list.
    functionality String
    The list functionality. Allowed values are add, add/remove.
    items List<Property Map>
    The list items.
    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,
            functionality: Optional[str] = None,
            items: Optional[Sequence[ListItemArgs]] = None,
            kind: Optional[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)
    Resource lookup is not supported in YAML
    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:
    Functionality string
    The list functionality. Allowed values are add, add/remove.
    Items List<ListItem>
    The list items.
    Kind string
    The list kind.
    Name string
    The name for this list.
    Subkind string
    The list subkind.
    Functionality string
    The list functionality. Allowed values are add, add/remove.
    Items []ListItemArgs
    The list items.
    Kind string
    The list kind.
    Name string
    The name for this list.
    Subkind string
    The list subkind.
    functionality String
    The list functionality. Allowed values are add, add/remove.
    items List<ListItem>
    The list items.
    kind String
    The list kind.
    name String
    The name for this list.
    subkind String
    The list subkind.
    functionality string
    The list functionality. Allowed values are add, add/remove.
    items ListItem[]
    The list items.
    kind string
    The list kind.
    name string
    The name for this list.
    subkind string
    The list subkind.
    functionality str
    The list functionality. Allowed values are add, add/remove.
    items Sequence[ListItemArgs]
    The list items.
    kind str
    The list kind.
    name str
    The name for this list.
    subkind str
    The list subkind.
    functionality String
    The list functionality. Allowed values are add, add/remove.
    items List<Property Map>
    The list items.
    kind String
    The list kind.
    name String
    The name for this list.
    subkind String
    The list subkind.

    Supporting Types

    ListItem, ListItemArgs

    Value string
    The list item value.
    Expiration string
    The list item expiration.
    Value string
    The list item value.
    Expiration string
    The list item expiration.
    value String
    The list item value.
    expiration String
    The list item expiration.
    value string
    The list item value.
    expiration string
    The list item expiration.
    value str
    The list item value.
    expiration str
    The list item expiration.
    value 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.
    impart logo
    Impart Security v0.7.0 published on Tuesday, Sep 24, 2024 by Impart Security