1. Packages
  2. Coralogix Provider
  3. API Docs
  4. Slo
coralogix 2.0.17 published on Tuesday, Apr 22, 2025 by coralogix

coralogix.Slo

Explore with Pulumi AI

coralogix logo
coralogix 2.0.17 published on Tuesday, Apr 22, 2025 by coralogix

    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)
    public Slo(String name, SloArgs args)
    public Slo(String name, SloArgs args, CustomResourceOptions options)
    
    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"]
    ServiceName string
    Service name. This is the name of the service that the SLO is associated with.
    TargetPercentage 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<SloFilter>
    Name string
    SLO name.
    ThresholdMicroseconds double
    Threshold in microseconds. Required when type is latency.
    ThresholdSymbolType string
    Threshold symbol type. Required when type is latency. 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"]
    ServiceName string
    Service name. This is the name of the service that the SLO is associated with.
    TargetPercentage 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 []SloFilterArgs
    Name string
    SLO name.
    ThresholdMicroseconds float64
    Threshold in microseconds. Required when type is latency.
    ThresholdSymbolType string
    Threshold symbol type. Required when type is latency. 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"]
    serviceName String
    Service name. This is the name of the service that the SLO is associated with.
    targetPercentage 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<SloFilter>
    name String
    SLO name.
    thresholdMicroseconds Double
    Threshold in microseconds. Required when type is latency.
    thresholdSymbolType String
    Threshold symbol type. Required when type is latency. 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"]
    serviceName string
    Service name. This is the name of the service that the SLO is associated with.
    targetPercentage 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 SloFilter[]
    name string
    SLO name.
    thresholdMicroseconds number
    Threshold in microseconds. Required when type is latency.
    thresholdSymbolType string
    Threshold symbol type. Required when type is latency. 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[SloFilterArgs]
    name str
    SLO name.
    threshold_microseconds float
    Threshold in microseconds. Required when type is latency.
    threshold_symbol_type str
    Threshold symbol type. Required when type is latency. 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"]
    serviceName String
    Service name. This is the name of the service that the SLO is associated with.
    targetPercentage 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.
    thresholdMicroseconds Number
    Threshold in microseconds. Required when type is latency.
    thresholdSymbolType String
    Threshold symbol type. Required when type is latency. 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.
    RemainingErrorBudgetPercentage double
    Status string
    Id string
    The provider-assigned unique ID for this managed resource.
    RemainingErrorBudgetPercentage float64
    Status string
    id String
    The provider-assigned unique ID for this managed resource.
    remainingErrorBudgetPercentage Double
    status String
    id string
    The provider-assigned unique ID for this managed resource.
    remainingErrorBudgetPercentage number
    status string
    id str
    The provider-assigned unique ID for this managed resource.
    remaining_error_budget_percentage float
    status str
    id String
    The provider-assigned unique ID for this managed resource.
    remainingErrorBudgetPercentage Number
    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.
    The following state arguments are supported:
    Description string
    Optional SLO description.
    Filters List<SloFilter>
    Name string
    SLO name.
    Period string
    Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
    RemainingErrorBudgetPercentage double
    ServiceName string
    Service name. This is the name of the service that the SLO is associated with.
    Status string
    TargetPercentage double
    Target percentage. This is the target percentage of the SLO.
    ThresholdMicroseconds double
    Threshold in microseconds. Required when type is latency.
    ThresholdSymbolType string
    Threshold symbol type. Required when type is latency. 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 []SloFilterArgs
    Name string
    SLO name.
    Period string
    Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
    RemainingErrorBudgetPercentage float64
    ServiceName string
    Service name. This is the name of the service that the SLO is associated with.
    Status string
    TargetPercentage float64
    Target percentage. This is the target percentage of the SLO.
    ThresholdMicroseconds float64
    Threshold in microseconds. Required when type is latency.
    ThresholdSymbolType string
    Threshold symbol type. Required when type is latency. 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<SloFilter>
    name String
    SLO name.
    period String
    Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
    remainingErrorBudgetPercentage Double
    serviceName String
    Service name. This is the name of the service that the SLO is associated with.
    status String
    targetPercentage Double
    Target percentage. This is the target percentage of the SLO.
    thresholdMicroseconds Double
    Threshold in microseconds. Required when type is latency.
    thresholdSymbolType String
    Threshold symbol type. Required when type is latency. 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 SloFilter[]
    name string
    SLO name.
    period string
    Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
    remainingErrorBudgetPercentage number
    serviceName string
    Service name. This is the name of the service that the SLO is associated with.
    status string
    targetPercentage number
    Target percentage. This is the target percentage of the SLO.
    thresholdMicroseconds number
    Threshold in microseconds. Required when type is latency.
    thresholdSymbolType string
    Threshold symbol type. Required when type is latency. 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[SloFilterArgs]
    name str
    SLO name.
    period str
    Period. This is the period of the SLO. Valid values are: ["14days" "30days" "7_days" "unspecified"]
    remaining_error_budget_percentage float
    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 is latency.
    threshold_symbol_type str
    Threshold symbol type. Required when type is latency. 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"]
    remainingErrorBudgetPercentage Number
    serviceName String
    Service name. This is the name of the service that the SLO is associated with.
    status String
    targetPercentage Number
    Target percentage. This is the target percentage of the SLO.
    thresholdMicroseconds Number
    Threshold in microseconds. Required when type is latency.
    thresholdSymbolType String
    Threshold symbol type. Required when type is latency. 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

    CompareType string
    Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
    Field string
    FieldValues List<string>
    CompareType string
    Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
    Field string
    FieldValues []string
    compareType String
    Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
    field String
    fieldValues List<String>
    compareType string
    Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
    field string
    fieldValues 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]
    compareType String
    Compare type. This is the compare type of the SLO. Valid values are: ["endswith" "includes" "is" "startswith" "unspecified"]
    field String
    fieldValues List<String>

    Package Details

    Repository
    coralogix coralogix/terraform-provider-coralogix
    License
    Notes
    This Pulumi package is based on the coralogix Terraform Provider.
    coralogix logo
    coralogix 2.0.17 published on Tuesday, Apr 22, 2025 by coralogix