sumologic.ScheduledView
Explore with Pulumi AI
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:
- Index
Name string - Name of the index (scheduled view).
- Query string
- Log query defining the scheduled view.
- Start
Time string - Start timestamp in UTC in RFC3339 format.
- Data
Forwarding stringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- Parsing
Mode 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. - Reduce
Retention boolPeriod Immediately 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.
- Index
Name string - Name of the index (scheduled view).
- Query string
- Log query defining the scheduled view.
- Start
Time string - Start timestamp in UTC in RFC3339 format.
- Data
Forwarding stringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- Parsing
Mode 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. - Reduce
Retention boolPeriod Immediately 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.
- index
Name String - Name of the index (scheduled view).
- query String
- Log query defining the scheduled view.
- start
Time String - Start timestamp in UTC in RFC3339 format.
- data
Forwarding StringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- parsing
Mode 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. - reduce
Retention BooleanPeriod Immediately 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 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.
- index
Name string - Name of the index (scheduled view).
- query string
- Log query defining the scheduled view.
- start
Time string - Start timestamp in UTC in RFC3339 format.
- data
Forwarding stringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- parsing
Mode 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. - reduce
Retention booleanPeriod Immediately 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 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_ strid - 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_ boolperiod_ immediately 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.
- index
Name String - Name of the index (scheduled view).
- query String
- Log query defining the scheduled view.
- start
Time String - Start timestamp in UTC in RFC3339 format.
- data
Forwarding StringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- parsing
Mode 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. - reduce
Retention BooleanPeriod Immediately 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 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.
- Data
Forwarding stringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- Index
Name string - Name of the index (scheduled view).
- Parsing
Mode 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.
- Reduce
Retention boolPeriod Immediately 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 string - Start timestamp in UTC in RFC3339 format.
- Data
Forwarding stringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- Index
Name string - Name of the index (scheduled view).
- Parsing
Mode 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.
- Reduce
Retention boolPeriod Immediately 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 string - Start timestamp in UTC in RFC3339 format.
- data
Forwarding StringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- index
Name String - Name of the index (scheduled view).
- parsing
Mode 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.
- reduce
Retention BooleanPeriod Immediately 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 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.
- start
Time String - Start timestamp in UTC in RFC3339 format.
- data
Forwarding stringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- index
Name string - Name of the index (scheduled view).
- parsing
Mode 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.
- reduce
Retention booleanPeriod Immediately 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 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.
- start
Time string - Start timestamp in UTC in RFC3339 format.
- data_
forwarding_ strid - 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_ boolperiod_ immediately 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.
- data
Forwarding StringId - An optional ID of a data forwarding configuration to be used by the scheduled view.
- index
Name String - Name of the index (scheduled view).
- parsing
Mode 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.
- reduce
Retention BooleanPeriod Immediately 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 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.
- start
Time 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.