1. Packages
  2. Sumo Logic
  3. API Docs
  4. ScheduledView
Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi

sumologic.ScheduledView

Explore with Pulumi AI

sumologic logo
Sumo Logic v0.22.1 published on Sunday, Jun 9, 2024 by Pulumi

    Provides a Sumologic Scheduled View.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sumologic from "@pulumi/sumologic";
    
    const failedConnections = new sumologic.ScheduledView("failed_connections", {
        indexName: "failed_connections",
        query: `_view=connections connectionStats
    | parse "connectionStats.CS *" as body
    | json field=body "exitCode", "isHttp2"
    | lookup org_name from shared/partners on partner_id=partnerid
    | timeslice 10m
    `,
        startTime: "2019-09-01T00:00:00Z",
        retentionPeriod: 365,
    });
    
    import pulumi
    import pulumi_sumologic as sumologic
    
    failed_connections = sumologic.ScheduledView("failed_connections",
        index_name="failed_connections",
        query="""_view=connections connectionStats
    | parse "connectionStats.CS *" as body
    | json field=body "exitCode", "isHttp2"
    | lookup org_name from shared/partners on partner_id=partnerid
    | timeslice 10m
    """,
        start_time="2019-09-01T00:00:00Z",
        retention_period=365)
    
    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.NewScheduledView(ctx, "failed_connections", &sumologic.ScheduledViewArgs{
    			IndexName: pulumi.String("failed_connections"),
    			Query: pulumi.String(`_view=connections connectionStats
    | parse "connectionStats.CS *" as body
    | json field=body "exitCode", "isHttp2"
    | lookup org_name from shared/partners on partner_id=partnerid
    | timeslice 10m
    `),
    			StartTime:       pulumi.String("2019-09-01T00:00:00Z"),
    			RetentionPeriod: pulumi.Int(365),
    		})
    		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 failedConnections = new SumoLogic.ScheduledView("failed_connections", new()
        {
            IndexName = "failed_connections",
            Query = @"_view=connections connectionStats
    | parse ""connectionStats.CS *"" as body
    | json field=body ""exitCode"", ""isHttp2""
    | lookup org_name from shared/partners on partner_id=partnerid
    | timeslice 10m
    ",
            StartTime = "2019-09-01T00:00:00Z",
            RetentionPeriod = 365,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sumologic.ScheduledView;
    import com.pulumi.sumologic.ScheduledViewArgs;
    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 failedConnections = new ScheduledView("failedConnections", ScheduledViewArgs.builder()
                .indexName("failed_connections")
                .query("""
    _view=connections connectionStats
    | parse "connectionStats.CS *" as body
    | json field=body "exitCode", "isHttp2"
    | lookup org_name from shared/partners on partner_id=partnerid
    | timeslice 10m
                """)
                .startTime("2019-09-01T00:00:00Z")
                .retentionPeriod(365)
                .build());
    
        }
    }
    
    resources:
      failedConnections:
        type: sumologic:ScheduledView
        name: failed_connections
        properties:
          indexName: failed_connections
          query: |
            _view=connections connectionStats
            | parse "connectionStats.CS *" as body
            | json field=body "exitCode", "isHttp2"
            | lookup org_name from shared/partners on partner_id=partnerid
            | timeslice 10m        
          startTime: 2019-09-01T00:00:00Z
          retentionPeriod: 365
    

    Create ScheduledView Resource

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

    Constructor syntax

    new ScheduledView(name: string, args: ScheduledViewArgs, opts?: CustomResourceOptions);
    @overload
    def ScheduledView(resource_name: str,
                      args: ScheduledViewArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScheduledView(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      index_name: Optional[str] = None,
                      query: Optional[str] = None,
                      start_time: Optional[str] = None,
                      data_forwarding_id: Optional[str] = None,
                      parsing_mode: Optional[str] = None,
                      reduce_retention_period_immediately: Optional[bool] = None,
                      retention_period: Optional[int] = None)
    func NewScheduledView(ctx *Context, name string, args ScheduledViewArgs, opts ...ResourceOption) (*ScheduledView, error)
    public ScheduledView(string name, ScheduledViewArgs args, CustomResourceOptions? opts = null)
    public ScheduledView(String name, ScheduledViewArgs args)
    public ScheduledView(String name, ScheduledViewArgs args, CustomResourceOptions options)
    
    type: sumologic:ScheduledView
    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 ScheduledViewArgs
    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 ScheduledViewArgs
    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 ScheduledViewArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScheduledViewArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScheduledViewArgs
    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 scheduledViewResource = new SumoLogic.ScheduledView("scheduledViewResource", new()
    {
        IndexName = "string",
        Query = "string",
        StartTime = "string",
        DataForwardingId = "string",
        ParsingMode = "string",
        ReduceRetentionPeriodImmediately = false,
        RetentionPeriod = 0,
    });
    
    example, err := sumologic.NewScheduledView(ctx, "scheduledViewResource", &sumologic.ScheduledViewArgs{
    	IndexName:                        pulumi.String("string"),
    	Query:                            pulumi.String("string"),
    	StartTime:                        pulumi.String("string"),
    	DataForwardingId:                 pulumi.String("string"),
    	ParsingMode:                      pulumi.String("string"),
    	ReduceRetentionPeriodImmediately: pulumi.Bool(false),
    	RetentionPeriod:                  pulumi.Int(0),
    })
    
    var scheduledViewResource = new ScheduledView("scheduledViewResource", ScheduledViewArgs.builder()
        .indexName("string")
        .query("string")
        .startTime("string")
        .dataForwardingId("string")
        .parsingMode("string")
        .reduceRetentionPeriodImmediately(false)
        .retentionPeriod(0)
        .build());
    
    scheduled_view_resource = sumologic.ScheduledView("scheduledViewResource",
        index_name="string",
        query="string",
        start_time="string",
        data_forwarding_id="string",
        parsing_mode="string",
        reduce_retention_period_immediately=False,
        retention_period=0)
    
    const scheduledViewResource = new sumologic.ScheduledView("scheduledViewResource", {
        indexName: "string",
        query: "string",
        startTime: "string",
        dataForwardingId: "string",
        parsingMode: "string",
        reduceRetentionPeriodImmediately: false,
        retentionPeriod: 0,
    });
    
    type: sumologic:ScheduledView
    properties:
        dataForwardingId: string
        indexName: string
        parsingMode: string
        query: string
        reduceRetentionPeriodImmediately: false
        retentionPeriod: 0
        startTime: string
    

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

    IndexName string
    Name of the index (scheduled view).
    Query string
    Log query defining the scheduled view.
    StartTime string
    Start timestamp in UTC in RFC3339 format.
    DataForwardingId string
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    ParsingMode string
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    ReduceRetentionPeriodImmediately bool

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    RetentionPeriod int
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    IndexName string
    Name of the index (scheduled view).
    Query string
    Log query defining the scheduled view.
    StartTime string
    Start timestamp in UTC in RFC3339 format.
    DataForwardingId string
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    ParsingMode string
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    ReduceRetentionPeriodImmediately bool

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    RetentionPeriod int
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    indexName String
    Name of the index (scheduled view).
    query String
    Log query defining the scheduled view.
    startTime String
    Start timestamp in UTC in RFC3339 format.
    dataForwardingId String
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    parsingMode String
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    reduceRetentionPeriodImmediately Boolean

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    retentionPeriod Integer
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    indexName string
    Name of the index (scheduled view).
    query string
    Log query defining the scheduled view.
    startTime string
    Start timestamp in UTC in RFC3339 format.
    dataForwardingId string
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    parsingMode string
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    reduceRetentionPeriodImmediately boolean

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    retentionPeriod number
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    index_name str
    Name of the index (scheduled view).
    query str
    Log query defining the scheduled view.
    start_time str
    Start timestamp in UTC in RFC3339 format.
    data_forwarding_id str
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    parsing_mode str
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    reduce_retention_period_immediately bool

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    retention_period int
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    indexName String
    Name of the index (scheduled view).
    query String
    Log query defining the scheduled view.
    startTime String
    Start timestamp in UTC in RFC3339 format.
    dataForwardingId String
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    parsingMode String
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    reduceRetentionPeriodImmediately Boolean

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    retentionPeriod Number
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.

    Outputs

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

    Get an existing ScheduledView 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?: ScheduledViewState, opts?: CustomResourceOptions): ScheduledView
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            data_forwarding_id: Optional[str] = None,
            index_name: Optional[str] = None,
            parsing_mode: Optional[str] = None,
            query: Optional[str] = None,
            reduce_retention_period_immediately: Optional[bool] = None,
            retention_period: Optional[int] = None,
            start_time: Optional[str] = None) -> ScheduledView
    func GetScheduledView(ctx *Context, name string, id IDInput, state *ScheduledViewState, opts ...ResourceOption) (*ScheduledView, error)
    public static ScheduledView Get(string name, Input<string> id, ScheduledViewState? state, CustomResourceOptions? opts = null)
    public static ScheduledView get(String name, Output<String> id, ScheduledViewState 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:
    DataForwardingId string
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    IndexName string
    Name of the index (scheduled view).
    ParsingMode string
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    Query string
    Log query defining the scheduled view.
    ReduceRetentionPeriodImmediately bool

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    RetentionPeriod int
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    StartTime string
    Start timestamp in UTC in RFC3339 format.
    DataForwardingId string
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    IndexName string
    Name of the index (scheduled view).
    ParsingMode string
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    Query string
    Log query defining the scheduled view.
    ReduceRetentionPeriodImmediately bool

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    RetentionPeriod int
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    StartTime string
    Start timestamp in UTC in RFC3339 format.
    dataForwardingId String
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    indexName String
    Name of the index (scheduled view).
    parsingMode String
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    query String
    Log query defining the scheduled view.
    reduceRetentionPeriodImmediately Boolean

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    retentionPeriod Integer
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    startTime String
    Start timestamp in UTC in RFC3339 format.
    dataForwardingId string
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    indexName string
    Name of the index (scheduled view).
    parsingMode string
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    query string
    Log query defining the scheduled view.
    reduceRetentionPeriodImmediately boolean

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    retentionPeriod number
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    startTime string
    Start timestamp in UTC in RFC3339 format.
    data_forwarding_id str
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    index_name str
    Name of the index (scheduled view).
    parsing_mode str
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    query str
    Log query defining the scheduled view.
    reduce_retention_period_immediately bool

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    retention_period int
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    start_time str
    Start timestamp in UTC in RFC3339 format.
    dataForwardingId String
    An optional ID of a data forwarding configuration to be used by the scheduled view.
    indexName String
    Name of the index (scheduled view).
    parsingMode String
    Default to Manual. Define the parsing mode to scan the JSON format log messages. Possible values are: AutoParse - In AutoParse mode, the system automatically figures out fields to parse based on the search query. Manual - While in the Manual mode, no fields are parsed out automatically. For more information see Dynamic Parsing.
    query String
    Log query defining the scheduled view.
    reduceRetentionPeriodImmediately Boolean

    This is required on update if the newly specified retention period is less than the existing retention period. In such a situation, a value of true says that data between the existing retention period and the new retention period should be deleted immediately; if false, such data will be deleted after seven days. This property is optional and ignored if the specified retentionPeriod is greater than or equal to the current retention period.

    The following attributes are exported:

    retentionPeriod Number
    The number of days to retain data in the scheduled view, or -1 to use the default value for your account. Only relevant if your account has multi-retention. enabled.
    startTime String
    Start timestamp in UTC in RFC3339 format.

    Import

    Scheduled Views can can be imported using the id. The list of scheduled views and their ids can be obtained using the Sumologic scheduled views api.

    hcl

    $ pulumi import sumologic:index/scheduledView:ScheduledView failed_connections 1234567890
    

    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.22.1 published on Sunday, Jun 9, 2024 by Pulumi