1. Packages
  2. Sumo Logic
  3. API Docs
  4. Folder
Sumo Logic v0.21.0 published on Thursday, Apr 11, 2024 by Pulumi

sumologic.Folder

Explore with Pulumi AI

sumologic logo
Sumo Logic v0.21.0 published on Thursday, Apr 11, 2024 by Pulumi

    Provides the ability to create, read, delete, update, and manage of folders.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const folder = new sumologic.Folder("folder", {
        description: "A test folder",
        parentId: "<personal folder id>",
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    folder = sumologic.Folder("folder",
        description="A test folder",
        parent_id="<personal folder id>")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-sumologic/sdk/go/sumologic"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sumologic.NewFolder(ctx, "folder", &sumologic.FolderArgs{
    			Description: pulumi.String("A test folder"),
    			ParentId:    pulumi.String("<personal folder id>"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using SumoLogic = Pulumi.SumoLogic;
    
    return await Deployment.RunAsync(() => 
    {
        var folder = new SumoLogic.Folder("folder", new()
        {
            Description = "A test folder",
            ParentId = "<personal folder id>",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sumologic.Folder;
    import com.pulumi.sumologic.FolderArgs;
    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 folder = new Folder("folder", FolderArgs.builder()        
                .description("A test folder")
                .parentId("<personal folder id>")
                .build());
    
        }
    }
    
    resources:
      folder:
        type: sumologic:Folder
        properties:
          description: A test folder
          parentId: <personal folder id>
    

    Create Folder Resource

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

    Constructor syntax

    new Folder(name: string, args: FolderArgs, opts?: CustomResourceOptions);
    @overload
    def Folder(resource_name: str,
               args: FolderArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Folder(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               description: Optional[str] = None,
               parent_id: Optional[str] = None,
               name: Optional[str] = None)
    func NewFolder(ctx *Context, name string, args FolderArgs, opts ...ResourceOption) (*Folder, error)
    public Folder(string name, FolderArgs args, CustomResourceOptions? opts = null)
    public Folder(String name, FolderArgs args)
    public Folder(String name, FolderArgs args, CustomResourceOptions options)
    
    type: sumologic:Folder
    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 FolderArgs
    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 FolderArgs
    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 FolderArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args FolderArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args FolderArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var folderResource = new SumoLogic.Folder("folderResource", new()
    {
        Description = "string",
        ParentId = "string",
        Name = "string",
    });
    
    example, err := sumologic.NewFolder(ctx, "folderResource", &sumologic.FolderArgs{
    	Description: pulumi.String("string"),
    	ParentId:    pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var folderResource = new Folder("folderResource", FolderArgs.builder()        
        .description("string")
        .parentId("string")
        .name("string")
        .build());
    
    folder_resource = sumologic.Folder("folderResource",
        description="string",
        parent_id="string",
        name="string")
    
    const folderResource = new sumologic.Folder("folderResource", {
        description: "string",
        parentId: "string",
        name: "string",
    });
    
    type: sumologic:Folder
    properties:
        description: string
        name: string
        parentId: string
    

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

    Description string
    The description of the folder.
    ParentId string
    The ID of the folder in which you want to create the new folder.
    Name string
    The name of the folder. This is required, and has to be unique.
    Description string
    The description of the folder.
    ParentId string
    The ID of the folder in which you want to create the new folder.
    Name string
    The name of the folder. This is required, and has to be unique.
    description String
    The description of the folder.
    parentId String
    The ID of the folder in which you want to create the new folder.
    name String
    The name of the folder. This is required, and has to be unique.
    description string
    The description of the folder.
    parentId string
    The ID of the folder in which you want to create the new folder.
    name string
    The name of the folder. This is required, and has to be unique.
    description str
    The description of the folder.
    parent_id str
    The ID of the folder in which you want to create the new folder.
    name str
    The name of the folder. This is required, and has to be unique.
    description String
    The description of the folder.
    parentId String
    The ID of the folder in which you want to create the new folder.
    name String
    The name of the folder. This is required, and has to be unique.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Folder 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 Folder Resource

    Get an existing Folder 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?: FolderState, opts?: CustomResourceOptions): Folder
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            name: Optional[str] = None,
            parent_id: Optional[str] = None) -> Folder
    func GetFolder(ctx *Context, name string, id IDInput, state *FolderState, opts ...ResourceOption) (*Folder, error)
    public static Folder Get(string name, Input<string> id, FolderState? state, CustomResourceOptions? opts = null)
    public static Folder get(String name, Output<String> id, FolderState 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:
    Description string
    The description of the folder.
    Name string
    The name of the folder. This is required, and has to be unique.
    ParentId string
    The ID of the folder in which you want to create the new folder.
    Description string
    The description of the folder.
    Name string
    The name of the folder. This is required, and has to be unique.
    ParentId string
    The ID of the folder in which you want to create the new folder.
    description String
    The description of the folder.
    name String
    The name of the folder. This is required, and has to be unique.
    parentId String
    The ID of the folder in which you want to create the new folder.
    description string
    The description of the folder.
    name string
    The name of the folder. This is required, and has to be unique.
    parentId string
    The ID of the folder in which you want to create the new folder.
    description str
    The description of the folder.
    name str
    The name of the folder. This is required, and has to be unique.
    parent_id str
    The ID of the folder in which you want to create the new folder.
    description String
    The description of the folder.
    name String
    The name of the folder. This is required, and has to be unique.
    parentId String
    The ID of the folder in which you want to create the new folder.

    Import

    Timeouts

    sumologic_folder provides the following Timeouts configuration options:

    • delete - (Default 1 minute) Used for waiting for the deletion job to be successful

    Additional data provided in state

    • created_at - (Computed) When the folder was created.

    • created_by - (Computed) Who created the folder.

    • modified_at - (Computed) When was the folder last modified.

    • modified_by - (Computed) The ID of the user who modified the folder last.

    • item_type - (Computed) What the type of the content item is (will obviously be “Folder”).

    • permissions - (Computed) List of permissions the user has on the content item.

    • children - (Computed) A list of all the content items in the created folder (can be folders or other content items).

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

    Package Details

    Repository
    Sumo Logic pulumi/pulumi-sumologic
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the sumologic Terraform Provider.
    sumologic logo
    Sumo Logic v0.21.0 published on Thursday, Apr 11, 2024 by Pulumi