chronosphere.SLO
Explore with Pulumi AI
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,
        collection_id: Optional[str] = None,
        definition: Optional[SLODefinitionArgs] = None,
        name: Optional[str] = None,
        sli: Optional[SLOSliArgs] = None,
        annotations: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        notification_policy_id: Optional[str] = None,
        signal_grouping: Optional[SLOSignalGroupingArgs] = None,
        slug: 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: chronosphere: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 Pulumi.SLO("sloResource", new()
{
    CollectionId = "string",
    Definition = new Pulumi.Inputs.SLODefinitionArgs
    {
        Objective = 0,
        ReportingWindows = new[]
        {
            new Pulumi.Inputs.SLODefinitionReportingWindowArgs
            {
                Duration = "string",
            },
        },
        LowVolume = false,
    },
    Name = "string",
    Sli = new Pulumi.Inputs.SLOSliArgs
    {
        CustomDimensionLabels = new[]
        {
            "string",
        },
        CustomIndicator = new Pulumi.Inputs.SLOSliCustomIndicatorArgs
        {
            TotalQueryTemplate = "string",
            BadQueryTemplate = "string",
            GoodQueryTemplate = "string",
        },
        EndpointAvailability = new Pulumi.Inputs.SLOSliEndpointAvailabilityArgs
        {
            EndpointsMonitoreds = new[]
            {
                "string",
            },
            AdditionalPromqlFilters = new[]
            {
                new Pulumi.Inputs.SLOSliEndpointAvailabilityAdditionalPromqlFilterArgs
                {
                    Name = "string",
                    Type = "string",
                    Value = "string",
                },
            },
            ErrorCodes = new[]
            {
                "string",
            },
            SuccessCodes = new[]
            {
                "string",
            },
        },
        EndpointLabel = "string",
        EndpointLatency = new Pulumi.Inputs.SLOSliEndpointLatencyArgs
        {
            EndpointsMonitoreds = new[]
            {
                "string",
            },
            LatencyBucket = "string",
            AdditionalPromqlFilters = new[]
            {
                new Pulumi.Inputs.SLOSliEndpointLatencyAdditionalPromqlFilterArgs
                {
                    Name = "string",
                    Type = "string",
                    Value = "string",
                },
            },
        },
        LensTemplateIndicator = "string",
    },
    Annotations = 
    {
        { "string", "string" },
    },
    Description = "string",
    Labels = 
    {
        { "string", "string" },
    },
    NotificationPolicyId = "string",
    SignalGrouping = new Pulumi.Inputs.SLOSignalGroupingArgs
    {
        LabelNames = new[]
        {
            "string",
        },
        SignalPerSeries = false,
    },
    Slug = "string",
});
example, err := chronosphere.NewSLO(ctx, "sloResource", &chronosphere.SLOArgs{
	CollectionId: pulumi.String("string"),
	Definition: &chronosphere.SLODefinitionArgs{
		Objective: pulumi.Float64(0),
		ReportingWindows: chronosphere.SLODefinitionReportingWindowArray{
			&chronosphere.SLODefinitionReportingWindowArgs{
				Duration: pulumi.String("string"),
			},
		},
		LowVolume: pulumi.Bool(false),
	},
	Name: pulumi.String("string"),
	Sli: &chronosphere.SLOSliArgs{
		CustomDimensionLabels: pulumi.StringArray{
			pulumi.String("string"),
		},
		CustomIndicator: &chronosphere.SLOSliCustomIndicatorArgs{
			TotalQueryTemplate: pulumi.String("string"),
			BadQueryTemplate:   pulumi.String("string"),
			GoodQueryTemplate:  pulumi.String("string"),
		},
		EndpointAvailability: &chronosphere.SLOSliEndpointAvailabilityArgs{
			EndpointsMonitoreds: pulumi.StringArray{
				pulumi.String("string"),
			},
			AdditionalPromqlFilters: chronosphere.SLOSliEndpointAvailabilityAdditionalPromqlFilterArray{
				&chronosphere.SLOSliEndpointAvailabilityAdditionalPromqlFilterArgs{
					Name:  pulumi.String("string"),
					Type:  pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
			ErrorCodes: pulumi.StringArray{
				pulumi.String("string"),
			},
			SuccessCodes: pulumi.StringArray{
				pulumi.String("string"),
			},
		},
		EndpointLabel: pulumi.String("string"),
		EndpointLatency: &chronosphere.SLOSliEndpointLatencyArgs{
			EndpointsMonitoreds: pulumi.StringArray{
				pulumi.String("string"),
			},
			LatencyBucket: pulumi.String("string"),
			AdditionalPromqlFilters: chronosphere.SLOSliEndpointLatencyAdditionalPromqlFilterArray{
				&chronosphere.SLOSliEndpointLatencyAdditionalPromqlFilterArgs{
					Name:  pulumi.String("string"),
					Type:  pulumi.String("string"),
					Value: pulumi.String("string"),
				},
			},
		},
		LensTemplateIndicator: pulumi.String("string"),
	},
	Annotations: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	Labels: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	NotificationPolicyId: pulumi.String("string"),
	SignalGrouping: &chronosphere.SLOSignalGroupingArgs{
		LabelNames: pulumi.StringArray{
			pulumi.String("string"),
		},
		SignalPerSeries: pulumi.Bool(false),
	},
	Slug: pulumi.String("string"),
})
var sloResource = new SLO("sloResource", SLOArgs.builder()
    .collectionId("string")
    .definition(SLODefinitionArgs.builder()
        .objective(0)
        .reportingWindows(SLODefinitionReportingWindowArgs.builder()
            .duration("string")
            .build())
        .lowVolume(false)
        .build())
    .name("string")
    .sli(SLOSliArgs.builder()
        .customDimensionLabels("string")
        .customIndicator(SLOSliCustomIndicatorArgs.builder()
            .totalQueryTemplate("string")
            .badQueryTemplate("string")
            .goodQueryTemplate("string")
            .build())
        .endpointAvailability(SLOSliEndpointAvailabilityArgs.builder()
            .endpointsMonitoreds("string")
            .additionalPromqlFilters(SLOSliEndpointAvailabilityAdditionalPromqlFilterArgs.builder()
                .name("string")
                .type("string")
                .value("string")
                .build())
            .errorCodes("string")
            .successCodes("string")
            .build())
        .endpointLabel("string")
        .endpointLatency(SLOSliEndpointLatencyArgs.builder()
            .endpointsMonitoreds("string")
            .latencyBucket("string")
            .additionalPromqlFilters(SLOSliEndpointLatencyAdditionalPromqlFilterArgs.builder()
                .name("string")
                .type("string")
                .value("string")
                .build())
            .build())
        .lensTemplateIndicator("string")
        .build())
    .annotations(Map.of("string", "string"))
    .description("string")
    .labels(Map.of("string", "string"))
    .notificationPolicyId("string")
    .signalGrouping(SLOSignalGroupingArgs.builder()
        .labelNames("string")
        .signalPerSeries(false)
        .build())
    .slug("string")
    .build());
slo_resource = chronosphere.SLO("sloResource",
    collection_id="string",
    definition={
        "objective": 0,
        "reporting_windows": [{
            "duration": "string",
        }],
        "low_volume": False,
    },
    name="string",
    sli={
        "custom_dimension_labels": ["string"],
        "custom_indicator": {
            "total_query_template": "string",
            "bad_query_template": "string",
            "good_query_template": "string",
        },
        "endpoint_availability": {
            "endpoints_monitoreds": ["string"],
            "additional_promql_filters": [{
                "name": "string",
                "type": "string",
                "value": "string",
            }],
            "error_codes": ["string"],
            "success_codes": ["string"],
        },
        "endpoint_label": "string",
        "endpoint_latency": {
            "endpoints_monitoreds": ["string"],
            "latency_bucket": "string",
            "additional_promql_filters": [{
                "name": "string",
                "type": "string",
                "value": "string",
            }],
        },
        "lens_template_indicator": "string",
    },
    annotations={
        "string": "string",
    },
    description="string",
    labels={
        "string": "string",
    },
    notification_policy_id="string",
    signal_grouping={
        "label_names": ["string"],
        "signal_per_series": False,
    },
    slug="string")
const sloResource = new chronosphere.SLO("sloResource", {
    collectionId: "string",
    definition: {
        objective: 0,
        reportingWindows: [{
            duration: "string",
        }],
        lowVolume: false,
    },
    name: "string",
    sli: {
        customDimensionLabels: ["string"],
        customIndicator: {
            totalQueryTemplate: "string",
            badQueryTemplate: "string",
            goodQueryTemplate: "string",
        },
        endpointAvailability: {
            endpointsMonitoreds: ["string"],
            additionalPromqlFilters: [{
                name: "string",
                type: "string",
                value: "string",
            }],
            errorCodes: ["string"],
            successCodes: ["string"],
        },
        endpointLabel: "string",
        endpointLatency: {
            endpointsMonitoreds: ["string"],
            latencyBucket: "string",
            additionalPromqlFilters: [{
                name: "string",
                type: "string",
                value: "string",
            }],
        },
        lensTemplateIndicator: "string",
    },
    annotations: {
        string: "string",
    },
    description: "string",
    labels: {
        string: "string",
    },
    notificationPolicyId: "string",
    signalGrouping: {
        labelNames: ["string"],
        signalPerSeries: false,
    },
    slug: "string",
});
type: chronosphere:SLO
properties:
    annotations:
        string: string
    collectionId: string
    definition:
        lowVolume: false
        objective: 0
        reportingWindows:
            - duration: string
    description: string
    labels:
        string: string
    name: string
    notificationPolicyId: string
    signalGrouping:
        labelNames:
            - string
        signalPerSeries: false
    sli:
        customDimensionLabels:
            - string
        customIndicator:
            badQueryTemplate: string
            goodQueryTemplate: string
            totalQueryTemplate: string
        endpointAvailability:
            additionalPromqlFilters:
                - name: string
                  type: string
                  value: string
            endpointsMonitoreds:
                - string
            errorCodes:
                - string
            successCodes:
                - string
        endpointLabel: string
        endpointLatency:
            additionalPromqlFilters:
                - name: string
                  type: string
                  value: string
            endpointsMonitoreds:
                - string
            latencyBucket: string
        lensTemplateIndicator: string
    slug: 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:
- CollectionId string
- Definition
Chronosphere.Pulumi. Inputs. SLODefinition 
- Name string
- Sli
Chronosphere.Pulumi. Inputs. SLOSli 
- Annotations Dictionary<string, string>
- Description string
- Labels Dictionary<string, string>
- NotificationPolicy stringId 
- SignalGrouping Chronosphere.Pulumi. Inputs. SLOSignal Grouping 
- Slug string
- CollectionId string
- Definition
SLODefinitionArgs 
- Name string
- Sli
SLOSliArgs 
- Annotations map[string]string
- Description string
- Labels map[string]string
- NotificationPolicy stringId 
- SignalGrouping SLOSignalGrouping Args 
- Slug string
- collectionId String
- definition SLODefinition
- name String
- sli SLOSli
- annotations Map<String,String>
- description String
- labels Map<String,String>
- notificationPolicy StringId 
- signalGrouping SLOSignalGrouping 
- slug String
- collectionId string
- definition SLODefinition
- name string
- sli SLOSli
- annotations {[key: string]: string}
- description string
- labels {[key: string]: string}
- notificationPolicy stringId 
- signalGrouping SLOSignalGrouping 
- slug string
- collection_id str
- definition
SLODefinitionArgs 
- name str
- sli
SLOSliArgs 
- annotations Mapping[str, str]
- description str
- labels Mapping[str, str]
- notification_policy_ strid 
- signal_grouping SLOSignalGrouping Args 
- slug str
- collectionId String
- definition Property Map
- name String
- sli Property Map
- annotations Map<String>
- description String
- labels Map<String>
- notificationPolicy StringId 
- signalGrouping Property Map
- slug String
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.
- 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 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,
        annotations: Optional[Mapping[str, str]] = None,
        collection_id: Optional[str] = None,
        definition: Optional[SLODefinitionArgs] = None,
        description: Optional[str] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        notification_policy_id: Optional[str] = None,
        signal_grouping: Optional[SLOSignalGroupingArgs] = None,
        sli: Optional[SLOSliArgs] = None,
        slug: Optional[str] = None) -> SLOfunc 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: chronosphere: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.
- Annotations Dictionary<string, string>
- CollectionId string
- Definition
Chronosphere.Pulumi. Inputs. SLODefinition 
- Description string
- Labels Dictionary<string, string>
- Name string
- NotificationPolicy stringId 
- SignalGrouping Chronosphere.Pulumi. Inputs. SLOSignal Grouping 
- Sli
Chronosphere.Pulumi. Inputs. SLOSli 
- Slug string
- Annotations map[string]string
- CollectionId string
- Definition
SLODefinitionArgs 
- Description string
- Labels map[string]string
- Name string
- NotificationPolicy stringId 
- SignalGrouping SLOSignalGrouping Args 
- Sli
SLOSliArgs 
- Slug string
- annotations Map<String,String>
- collectionId String
- definition SLODefinition
- description String
- labels Map<String,String>
- name String
- notificationPolicy StringId 
- signalGrouping SLOSignalGrouping 
- sli SLOSli
- slug String
- annotations {[key: string]: string}
- collectionId string
- definition SLODefinition
- description string
- labels {[key: string]: string}
- name string
- notificationPolicy stringId 
- signalGrouping SLOSignalGrouping 
- sli SLOSli
- slug string
- annotations Mapping[str, str]
- collection_id str
- definition
SLODefinitionArgs 
- description str
- labels Mapping[str, str]
- name str
- notification_policy_ strid 
- signal_grouping SLOSignalGrouping Args 
- sli
SLOSliArgs 
- slug str
- annotations Map<String>
- collectionId String
- definition Property Map
- description String
- labels Map<String>
- name String
- notificationPolicy StringId 
- signalGrouping Property Map
- sli Property Map
- slug String
Supporting Types
SLODefinition, SLODefinitionArgs  
- objective number
- reportingWindows SLODefinitionReporting Window[] 
- lowVolume boolean
- objective Number
- reportingWindows List<Property Map>
- lowVolume Boolean
SLODefinitionReportingWindow, SLODefinitionReportingWindowArgs      
- Duration string
- Duration string
- duration String
- duration string
- duration str
- duration String
SLOSignalGrouping, SLOSignalGroupingArgs    
- LabelNames List<string>
- SignalPer boolSeries 
- LabelNames []string
- SignalPer boolSeries 
- labelNames List<String>
- signalPer BooleanSeries 
- labelNames string[]
- signalPer booleanSeries 
- label_names Sequence[str]
- signal_per_ boolseries 
- labelNames List<String>
- signalPer BooleanSeries 
SLOSli, SLOSliArgs  
SLOSliCustomIndicator, SLOSliCustomIndicatorArgs      
- TotalQuery stringTemplate 
- BadQuery stringTemplate 
- GoodQuery stringTemplate 
- TotalQuery stringTemplate 
- BadQuery stringTemplate 
- GoodQuery stringTemplate 
- totalQuery StringTemplate 
- badQuery StringTemplate 
- goodQuery StringTemplate 
- totalQuery stringTemplate 
- badQuery stringTemplate 
- goodQuery stringTemplate 
- totalQuery StringTemplate 
- badQuery StringTemplate 
- goodQuery StringTemplate 
SLOSliEndpointAvailability, SLOSliEndpointAvailabilityArgs      
- EndpointsMonitoreds List<string>
- AdditionalPromql List<Chronosphere.Filters Pulumi. Inputs. SLOSli Endpoint Availability Additional Promql Filter> 
- ErrorCodes List<string>
- SuccessCodes List<string>
- endpointsMonitoreds List<String>
- additionalPromql List<SLOSliFilters Endpoint Availability Additional Promql Filter> 
- errorCodes List<String>
- successCodes List<String>
- endpoints_monitoreds Sequence[str]
- additional_promql_ Sequence[SLOSlifilters Endpoint Availability Additional Promql Filter] 
- error_codes Sequence[str]
- success_codes Sequence[str]
- endpointsMonitoreds List<String>
- additionalPromql List<Property Map>Filters 
- errorCodes List<String>
- successCodes List<String>
SLOSliEndpointAvailabilityAdditionalPromqlFilter, SLOSliEndpointAvailabilityAdditionalPromqlFilterArgs            
SLOSliEndpointLatency, SLOSliEndpointLatencyArgs      
- endpointsMonitoreds List<String>
- latencyBucket String
- additionalPromql List<Property Map>Filters 
SLOSliEndpointLatencyAdditionalPromqlFilter, SLOSliEndpointLatencyAdditionalPromqlFilterArgs            
Package Details
- Repository
- chronosphere chronosphereio/pulumi-chronosphere
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the chronosphereTerraform Provider.