published on Wednesday, Nov 11, 2026 by sumologic
published on Wednesday, Nov 11, 2026 by sumologic
Provides an easy way to retrieve a Monitor folder by its path.
You must specify the absolute path of the folder to retrieve. The Monitors library has a root folder named
Monitor, so every path starts with /Monitor. For example, a folder named Security inside the root
folder has the path /Monitor/Security, and a sub-folder named Production inside it has the path
/Monitor/Security/Production.
Monitor folders are a different object type from Content Library folders. To look up a Content Library folder, use the sumologic.Folder data source instead.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
// Look up the monitor folder "Production" inside the "Security" folder
const prod = sumologic.getMonitorFolder({
path: "/Monitor/Security/Production",
});
// Use the looked-up folder as the parent of a new monitor folder
const prodAlerts = new sumologic.MonitorFolder("prod_alerts", {
name: "Alerts",
description: "Alert monitors for production.",
parentId: prod.then(prod => prod.id),
});
import pulumi
import pulumi_sumologic as sumologic
# Look up the monitor folder "Production" inside the "Security" folder
prod = sumologic.get_monitor_folder(path="/Monitor/Security/Production")
# Use the looked-up folder as the parent of a new monitor folder
prod_alerts = sumologic.MonitorFolder("prod_alerts",
name="Alerts",
description="Alert monitors for production.",
parent_id=prod.id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Look up the monitor folder "Production" inside the "Security" folder
prod, err := sumologic.LookupMonitorFolder(ctx, &sumologic.LookupMonitorFolderArgs{
Path: "/Monitor/Security/Production",
}, nil)
if err != nil {
return err
}
// Use the looked-up folder as the parent of a new monitor folder
_, err = sumologic.NewMonitorFolder(ctx, "prod_alerts", &sumologic.MonitorFolderArgs{
Name: pulumi.String("Alerts"),
Description: pulumi.String("Alert monitors for production."),
ParentId: pulumi.String(prod.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(() =>
{
// Look up the monitor folder "Production" inside the "Security" folder
var prod = Sumologic.GetMonitorFolder.Invoke(new()
{
Path = "/Monitor/Security/Production",
});
// Use the looked-up folder as the parent of a new monitor folder
var prodAlerts = new Sumologic.MonitorFolder("prod_alerts", new()
{
Name = "Alerts",
Description = "Alert monitors for production.",
ParentId = prod.Apply(getMonitorFolderResult => getMonitorFolderResult.Id),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.SumologicFunctions;
import com.pulumi.sumologic.inputs.GetMonitorFolderArgs;
import com.pulumi.sumologic.MonitorFolder;
import com.pulumi.sumologic.MonitorFolderArgs;
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) {
// Look up the monitor folder "Production" inside the "Security" folder
final var prod = SumologicFunctions.getMonitorFolder(GetMonitorFolderArgs.builder()
.path("/Monitor/Security/Production")
.build());
// Use the looked-up folder as the parent of a new monitor folder
var prodAlerts = new MonitorFolder("prodAlerts", MonitorFolderArgs.builder()
.name("Alerts")
.description("Alert monitors for production.")
.parentId(prod.id())
.build());
}
}
resources:
# Use the looked-up folder as the parent of a new monitor folder
prodAlerts:
type: sumologic:MonitorFolder
name: prod_alerts
properties:
name: Alerts
description: Alert monitors for production.
parentId: ${prod.id}
variables:
# Look up the monitor folder "Production" inside the "Security" folder
prod:
fn::invoke:
function: sumologic:getMonitorFolder
arguments:
path: /Monitor/Security/Production
Example coming soon!
Attributes reference
The following attributes are exported:
id- The ID of the monitor folder.name- The name of the monitor folder.description- The description of the monitor folder.
Using getMonitorFolder
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 getMonitorFolder(args: GetMonitorFolderArgs, opts?: InvokeOptions): Promise<GetMonitorFolderResult>
function getMonitorFolderOutput(args: GetMonitorFolderOutputArgs, opts?: InvokeOutputOptions): Output<GetMonitorFolderResult>def get_monitor_folder(description: Optional[str] = None,
id: Optional[str] = None,
name: Optional[str] = None,
path: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetMonitorFolderResult
def get_monitor_folder_output(description: pulumi.Input[Optional[str]] = None,
id: pulumi.Input[Optional[str]] = None,
name: pulumi.Input[Optional[str]] = None,
path: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetMonitorFolderResult]func LookupMonitorFolder(ctx *Context, args *LookupMonitorFolderArgs, opts ...InvokeOption) (*LookupMonitorFolderResult, error)
func LookupMonitorFolderOutput(ctx *Context, args *LookupMonitorFolderOutputArgs, opts ...InvokeOption) LookupMonitorFolderResultOutput> Note: This function is named LookupMonitorFolder in the Go SDK.
public static class GetMonitorFolder
{
public static Task<GetMonitorFolderResult> InvokeAsync(GetMonitorFolderArgs args, InvokeOptions? opts = null)
public static Output<GetMonitorFolderResult> Invoke(GetMonitorFolderInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetMonitorFolderResult> Invoke(GetMonitorFolderInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetMonitorFolderResult> getMonitorFolder(GetMonitorFolderArgs args, InvokeOptions options)
public static Output<GetMonitorFolderResult> getMonitorFolder(GetMonitorFolderArgs args, InvokeOptions options)
public static Output<GetMonitorFolderResult> getMonitorFolder(GetMonitorFolderArgs args, InvokeOutputOptions options)
fn::invoke:
function: sumologic:index/getMonitorFolder:getMonitorFolder
arguments:
# arguments dictionarydata "sumologic_get_monitor_folder" "name" {
# arguments
}The following arguments are supported:
- Path string
- The absolute path of the monitor folder, starting with
/Monitor. For example,/Monitor/Security/Production. The data source returns an error if no folder exists at this path. - Description string
- Id string
- Name string
- Path string
- The absolute path of the monitor folder, starting with
/Monitor. For example,/Monitor/Security/Production. The data source returns an error if no folder exists at this path. - Description string
- Id string
- Name string
- path string
- The absolute path of the monitor folder, starting with
/Monitor. For example,/Monitor/Security/Production. The data source returns an error if no folder exists at this path. - description string
- id string
- name string
- path String
- The absolute path of the monitor folder, starting with
/Monitor. For example,/Monitor/Security/Production. The data source returns an error if no folder exists at this path. - description String
- id String
- name String
- path string
- The absolute path of the monitor folder, starting with
/Monitor. For example,/Monitor/Security/Production. The data source returns an error if no folder exists at this path. - description string
- id string
- name string
- path str
- The absolute path of the monitor folder, starting with
/Monitor. For example,/Monitor/Security/Production. The data source returns an error if no folder exists at this path. - description str
- id str
- name str
- path String
- The absolute path of the monitor folder, starting with
/Monitor. For example,/Monitor/Security/Production. The data source returns an error if no folder exists at this path. - description String
- id String
- name String
getMonitorFolder Result
The following output properties are available:
- Description string
- Id string
- Name string
- Path string
- Description string
- Id string
- Name string
- Path string
- description string
- id string
- name string
- path string
- description String
- id String
- name String
- path String
- description string
- id string
- name string
- path string
- description str
- id str
- name str
- path str
- description String
- id String
- name String
- path String
Package Details
- Repository
- Sumo Logic sumologic/terraform-provider-sumologic
- License
- Notes
- This Pulumi package is based on the
sumologicTerraform Provider.
published on Wednesday, Nov 11, 2026 by sumologic