coralogix.Slo
Explore with Pulumi AI
Coralogix SLO.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as coralogix from "@pulumi/coralogix";
const example = new coralogix.Slo("example", {
description: "description",
period: "7_days",
serviceName: "service_name",
targetPercentage: 30,
type: "error",
});
const example2 = new coralogix.Slo("example2", {
description: "description",
filters: [{
compareType: "is",
field: "severity",
fieldValues: [
"error",
"warning",
],
}],
period: "7_days",
serviceName: "service_name",
targetPercentage: 30,
thresholdMicroseconds: 1000000,
thresholdSymbolType: "greater",
type: "latency",
});
import pulumi
import pulumi_coralogix as coralogix
example = coralogix.Slo("example",
description="description",
period="7_days",
service_name="service_name",
target_percentage=30,
type="error")
example2 = coralogix.Slo("example2",
description="description",
filters=[{
"compare_type": "is",
"field": "severity",
"field_values": [
"error",
"warning",
],
}],
period="7_days",
service_name="service_name",
target_percentage=30,
threshold_microseconds=1000000,
threshold_symbol_type="greater",
type="latency")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/coralogix/v2/coralogix"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := coralogix.NewSlo(ctx, "example", &coralogix.SloArgs{
Description: pulumi.String("description"),
Period: pulumi.String("7_days"),
ServiceName: pulumi.String("service_name"),
TargetPercentage: pulumi.Float64(30),
Type: pulumi.String("error"),
})
if err != nil {
return err
}
_, err = coralogix.NewSlo(ctx, "example2", &coralogix.SloArgs{
Description: pulumi.String("description"),
Filters: coralogix.SloFilterArray{
&coralogix.SloFilterArgs{
CompareType: pulumi.String("is"),
Field: pulumi.String("severity"),
FieldValues: pulumi.StringArray{
pulumi.String("error"),
pulumi.String("warning"),
},
},
},
Period: pulumi.String("7_days"),
ServiceName: pulumi.String("service_name"),
TargetPercentage: pulumi.Float64(30),
ThresholdMicroseconds: pulumi.Float64(1000000),
ThresholdSymbolType: pulumi.String("greater"),
Type: pulumi.String("latency"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Coralogix = Pulumi.Coralogix;
return await Deployment.RunAsync(() =>
{
var example = new Coralogix.Slo("example", new()
{
Description = "description",
Period = "7_days",
ServiceName = "service_name",
TargetPercentage = 30,
Type = "error",
});
var example2 = new Coralogix.Slo("example2", new()
{
Description = "description",
Filters = new[]
{
new Coralogix.Inputs.SloFilterArgs
{
CompareType = "is",
Field = "severity",
FieldValues = new[]
{
"error",
"warning",
},
},
},
Period = "7_days",
ServiceName = "service_name",
TargetPercentage = 30,
ThresholdMicroseconds = 1000000,
ThresholdSymbolType = "greater",
Type = "latency",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.coralogix.Slo;
import com.pulumi.coralogix.SloArgs;
import com.pulumi.coralogix.inputs.SloFilterArgs;
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 example = new Slo("example", SloArgs.builder()
.description("description")
.period("7_days")
.serviceName("service_name")
.targetPercentage(30)
.type("error")
.build());
var example2 = new Slo("example2", SloArgs.builder()
.description("description")
.filters(SloFilterArgs.builder()
.compareType("is")
.field("severity")
.fieldValues(
"error",
"warning")
.build())
.period("7_days")
.serviceName("service_name")
.targetPercentage(30)
.thresholdMicroseconds(1000000)
.thresholdSymbolType("greater")
.type("latency")
.build());
}
}
resources:
example:
type: coralogix:Slo
properties:
description: description
period: 7_days
serviceName: service_name
targetPercentage: 30
type: error
example2:
type: coralogix:Slo
properties:
description: description
filters:
- compareType: is
field: severity
fieldValues:
- error
- warning
period: 7_days
serviceName: service_name
targetPercentage: 30
thresholdMicroseconds: 1e+06
thresholdSymbolType: greater
type: latency
Create Slo Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Slo(name: string, args: SloArgs, opts?: CustomResourceOptions);
@overload
def Slo(resource_name: str,
args: SloArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Slo(resource_name: str,
opts: Optional[ResourceOptions] = None,
period: Optional[str] = None,
service_name: Optional[str] = None,
target_percentage: Optional[float] = None,
type: Optional[str] = None,
description: Optional[str] = None,
filters: Optional[Sequence[SloFilterArgs]] = None,
name: Optional[str] = None,
threshold_microseconds: Optional[float] = None,
threshold_symbol_type: Optional[str] = None)
func NewSlo(ctx *Context, name string, args SloArgs, opts ...ResourceOption) (*Slo, error)
public Slo(string name, SloArgs args, CustomResourceOptions? opts = null)
type: coralogix:Slo
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 SloArgs
- 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 SloArgs
- 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 SloArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SloArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SloArgs
- 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 sloResource = new Coralogix.Slo("sloResource", new()
{
Period = "string",
ServiceName = "string",
TargetPercentage = 0,
Type = "string",
Description = "string",
Filters = new[]
{
new Coralogix.Inputs.SloFilterArgs
{
CompareType = "string",
Field = "string",
FieldValues = new[]
{
"string",
},
},
},
Name = "string",
ThresholdMicroseconds = 0,
ThresholdSymbolType = "string",
});
example, err := coralogix.NewSlo(ctx, "sloResource", &coralogix.SloArgs{
Period: pulumi.String("string"),
ServiceName: pulumi.String("string"),
TargetPercentage: pulumi.Float64(0),
Type: pulumi.String("string"),
Description: pulumi.String("string"),
Filters: coralogix.SloFilterArray{
&coralogix.SloFilterArgs{
CompareType: pulumi.String("string"),
Field: pulumi.String("string"),
FieldValues: pulumi.StringArray{
pulumi.String("string"),
},
},
},
Name: pulumi.String("string"),
ThresholdMicroseconds: pulumi.Float64(0),
ThresholdSymbolType: pulumi.String("string"),
})
var sloResource = new Slo("sloResource", SloArgs.builder()
.period("string")
.serviceName("string")
.targetPercentage(0)
.type("string")
.description("string")
.filters(SloFilterArgs.builder()
.compareType("string")
.field("string")
.fieldValues("string")
.build())
.name("string")
.thresholdMicroseconds(0)
.thresholdSymbolType("string")
.build());
slo_resource = coralogix.Slo("sloResource",
period="string",
service_name="string",
target_percentage=0,
type="string",
description="string",
filters=[{
"compare_type": "string",
"field": "string",
"field_values": ["string"],
}],
name="string",
threshold_microseconds=0,
threshold_symbol_type="string")
const sloResource = new coralogix.Slo("sloResource", {
period: "string",
serviceName: "string",
targetPercentage: 0,
type: "string",
description: "string",
filters: [{
compareType: "string",
field: "string",
fieldValues: ["string"],
}],
name: "string",
thresholdMicroseconds: 0,
thresholdSymbolType: "string",
});
type: coralogix:Slo
properties:
description: string
filters:
- compareType: string
field: string
fieldValues:
- string
name: string
period: string
serviceName: string
targetPercentage: 0
thresholdMicroseconds: 0
thresholdSymbolType: string
type: string
Slo Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Slo resource accepts the following input properties:
- Period string
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- Service
Name string - Service name. This is the name of the service that the SLO is associated with.
- Target
Percentage double - Target percentage. This is the target percentage of the SLO.
- Type string
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- Description string
- Optional SLO description.
- Filters
List<Slo
Filter> - Name string
- SLO name.
- Threshold
Microseconds double - Threshold in microseconds. Required when
type
islatency
. - Threshold
Symbol stringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"]
- Period string
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- Service
Name string - Service name. This is the name of the service that the SLO is associated with.
- Target
Percentage float64 - Target percentage. This is the target percentage of the SLO.
- Type string
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- Description string
- Optional SLO description.
- Filters
[]Slo
Filter Args - Name string
- SLO name.
- Threshold
Microseconds float64 - Threshold in microseconds. Required when
type
islatency
. - Threshold
Symbol stringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"]
- period String
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- service
Name String - Service name. This is the name of the service that the SLO is associated with.
- target
Percentage Double - Target percentage. This is the target percentage of the SLO.
- type String
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- description String
- Optional SLO description.
- filters
List<Slo
Filter> - name String
- SLO name.
- threshold
Microseconds Double - Threshold in microseconds. Required when
type
islatency
. - threshold
Symbol StringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"]
- period string
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- service
Name string - Service name. This is the name of the service that the SLO is associated with.
- target
Percentage number - Target percentage. This is the target percentage of the SLO.
- type string
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- description string
- Optional SLO description.
- filters
Slo
Filter[] - name string
- SLO name.
- threshold
Microseconds number - Threshold in microseconds. Required when
type
islatency
. - threshold
Symbol stringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"]
- period str
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- service_
name str - Service name. This is the name of the service that the SLO is associated with.
- target_
percentage float - Target percentage. This is the target percentage of the SLO.
- type str
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- description str
- Optional SLO description.
- filters
Sequence[Slo
Filter Args] - name str
- SLO name.
- threshold_
microseconds float - Threshold in microseconds. Required when
type
islatency
. - threshold_
symbol_ strtype - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"]
- period String
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- service
Name String - Service name. This is the name of the service that the SLO is associated with.
- target
Percentage Number - Target percentage. This is the target percentage of the SLO.
- type String
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- description String
- Optional SLO description.
- filters List<Property Map>
- name String
- SLO name.
- threshold
Microseconds Number - Threshold in microseconds. Required when
type
islatency
. - threshold
Symbol StringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"]
Outputs
All input properties are implicitly available as output properties. Additionally, the Slo resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Remaining
Error doubleBudget Percentage - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Remaining
Error float64Budget Percentage - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- remaining
Error DoubleBudget Percentage - status String
- id string
- The provider-assigned unique ID for this managed resource.
- remaining
Error numberBudget Percentage - status string
- id str
- The provider-assigned unique ID for this managed resource.
- remaining_
error_ floatbudget_ percentage - status str
- id String
- The provider-assigned unique ID for this managed resource.
- remaining
Error NumberBudget Percentage - status String
Look up Existing Slo Resource
Get an existing Slo 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?: SloState, opts?: CustomResourceOptions): Slo
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
filters: Optional[Sequence[SloFilterArgs]] = None,
name: Optional[str] = None,
period: Optional[str] = None,
remaining_error_budget_percentage: Optional[float] = None,
service_name: Optional[str] = None,
status: Optional[str] = None,
target_percentage: Optional[float] = None,
threshold_microseconds: Optional[float] = None,
threshold_symbol_type: Optional[str] = None,
type: Optional[str] = None) -> Slo
func GetSlo(ctx *Context, name string, id IDInput, state *SloState, opts ...ResourceOption) (*Slo, error)
public static Slo Get(string name, Input<string> id, SloState? state, CustomResourceOptions? opts = null)
public static Slo get(String name, Output<String> id, SloState state, CustomResourceOptions options)
resources: _: type: coralogix:Slo get: id: ${id}
- 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.
- Description string
- Optional SLO description.
- Filters
List<Slo
Filter> - Name string
- SLO name.
- Period string
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- Remaining
Error doubleBudget Percentage - Service
Name string - Service name. This is the name of the service that the SLO is associated with.
- Status string
- Target
Percentage double - Target percentage. This is the target percentage of the SLO.
- Threshold
Microseconds double - Threshold in microseconds. Required when
type
islatency
. - Threshold
Symbol stringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"] - Type string
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- Description string
- Optional SLO description.
- Filters
[]Slo
Filter Args - Name string
- SLO name.
- Period string
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- Remaining
Error float64Budget Percentage - Service
Name string - Service name. This is the name of the service that the SLO is associated with.
- Status string
- Target
Percentage float64 - Target percentage. This is the target percentage of the SLO.
- Threshold
Microseconds float64 - Threshold in microseconds. Required when
type
islatency
. - Threshold
Symbol stringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"] - Type string
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- description String
- Optional SLO description.
- filters
List<Slo
Filter> - name String
- SLO name.
- period String
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- remaining
Error DoubleBudget Percentage - service
Name String - Service name. This is the name of the service that the SLO is associated with.
- status String
- target
Percentage Double - Target percentage. This is the target percentage of the SLO.
- threshold
Microseconds Double - Threshold in microseconds. Required when
type
islatency
. - threshold
Symbol StringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"] - type String
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- description string
- Optional SLO description.
- filters
Slo
Filter[] - name string
- SLO name.
- period string
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- remaining
Error numberBudget Percentage - service
Name string - Service name. This is the name of the service that the SLO is associated with.
- status string
- target
Percentage number - Target percentage. This is the target percentage of the SLO.
- threshold
Microseconds number - Threshold in microseconds. Required when
type
islatency
. - threshold
Symbol stringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"] - type string
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- description str
- Optional SLO description.
- filters
Sequence[Slo
Filter Args] - name str
- SLO name.
- period str
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- remaining_
error_ floatbudget_ percentage - service_
name str - Service name. This is the name of the service that the SLO is associated with.
- status str
- target_
percentage float - Target percentage. This is the target percentage of the SLO.
- threshold_
microseconds float - Threshold in microseconds. Required when
type
islatency
. - threshold_
symbol_ strtype - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"] - type str
- Type. This is the type of the SLO. Valid values are: "error", "latency".
- description String
- Optional SLO description.
- filters List<Property Map>
- name String
- SLO name.
- period String
- Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
- remaining
Error NumberBudget Percentage - service
Name String - Service name. This is the name of the service that the SLO is associated with.
- status String
- target
Percentage Number - Target percentage. This is the target percentage of the SLO.
- threshold
Microseconds Number - Threshold in microseconds. Required when
type
islatency
. - threshold
Symbol StringType - Threshold symbol type. Required when
type
islatency
. Valid values are: ["equal" "greater" "greaterorequal" "less" "lessorequal"] - type String
- Type. This is the type of the SLO. Valid values are: "error", "latency".
Supporting Types
SloFilter, SloFilterArgs
- Compare
Type string - Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
- Field string
- Field
Values List<string>
- Compare
Type string - Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
- Field string
- Field
Values []string
- compare
Type String - Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
- field String
- field
Values List<String>
- compare
Type string - Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
- field string
- field
Values string[]
- compare_
type str - Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
- field str
- field_
values Sequence[str]
- compare
Type String - Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
- field String
- field
Values List<String>
Package Details
- Repository
- coralogix coralogix/terraform-provider-coralogix
- License
- Notes
- This Pulumi package is based on the
coralogix
Terraform Provider.