1. Packages
  2. Dynatrace
  3. API Docs
  4. getSlo
Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse

dynatrace.getSlo

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse

    The dynatrace.Slo data source allows the SLO ID to be retrieved by its name.

    • name (String) - The name of the SLO

    If multiple services match the given criteria, the first result will be retrieved.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumi/dynatrace";
    
    const example = dynatrace.getSlo({
        name: "Terraform",
    });
    export const id = example.then(example => example.id);
    
    import pulumi
    import pulumi_dynatrace as dynatrace
    
    example = dynatrace.get_slo(name="Terraform")
    pulumi.export("id", example.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := dynatrace.LookupSlo(ctx, &dynatrace.LookupSloArgs{
    			Name: "Terraform",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("id", example.Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Pulumi.Dynatrace;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Dynatrace.GetSlo.Invoke(new()
        {
            Name = "Terraform",
        });
    
        return new Dictionary<string, object?>
        {
            ["id"] = example.Apply(getSloResult => getSloResult.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.DynatraceFunctions;
    import com.pulumi.dynatrace.inputs.GetSloArgs;
    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) {
            final var example = DynatraceFunctions.getSlo(GetSloArgs.builder()
                .name("Terraform")
                .build());
    
            ctx.export("id", example.applyValue(getSloResult -> getSloResult.id()));
        }
    }
    
    variables:
      example:
        fn::invoke:
          Function: dynatrace:getSlo
          Arguments:
            name: Terraform
    outputs:
      id: ${example.id}
    

    Using getSlo

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getSlo(args: GetSloArgs, opts?: InvokeOptions): Promise<GetSloResult>
    function getSloOutput(args: GetSloOutputArgs, opts?: InvokeOptions): Output<GetSloResult>
    def get_slo(name: Optional[str] = None,
                opts: Optional[InvokeOptions] = None) -> GetSloResult
    def get_slo_output(name: Optional[pulumi.Input[str]] = None,
                opts: Optional[InvokeOptions] = None) -> Output[GetSloResult]
    func LookupSlo(ctx *Context, args *LookupSloArgs, opts ...InvokeOption) (*LookupSloResult, error)
    func LookupSloOutput(ctx *Context, args *LookupSloOutputArgs, opts ...InvokeOption) LookupSloResultOutput

    > Note: This function is named LookupSlo in the Go SDK.

    public static class GetSlo 
    {
        public static Task<GetSloResult> InvokeAsync(GetSloArgs args, InvokeOptions? opts = null)
        public static Output<GetSloResult> Invoke(GetSloInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSloResult> getSlo(GetSloArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: dynatrace:index/getSlo:getSlo
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Name string
    name String
    name string
    name str
    name String

    getSlo Result

    The following output properties are available:

    BurnRateVisualizationEnabled bool
    Burn rate visualization is enabled (true) or disabled (false)
    Description string
    The custom description of the SLO
    Enabled bool
    The SLO is enabled (true) or disabled (false)
    EvaluationType string
    The evaluation type of the SLO. Currently only AGGREGATE is supported
    EvaluationWindow string
    The timeframe during which the SLO is to be evaluated. For the timeframe you can enter expressions like -1h (last hour), -1w (last week) or complex expressions like -2d to now (last two days), -1d/d to now/d (beginning of yesterday to beginning of today).
    FastBurnThreshold double
    The threshold defines when a burn rate is marked as fast-burning (high-emergency). Burn rates lower than this threshold (and greater than 1) are highlighted as slow-burn (low-emergency)
    Filter string
    The entity filter for the SLO evaluation. See syntax of entity selector for details
    Id string
    The provider-assigned unique ID for this managed resource.
    LegacyId string
    The ID of this setting when referred to by the Config REST API V1
    MetricExpression string
    The percentage-based metric expression for the calculation of the SLO
    MetricName string
    No documentation available
    Name string
    TargetSuccess double
    The target value of the SLO
    TargetWarning double
    The warning value of the SLO. At warning state the SLO is still fulfilled but is getting close to failure
    BurnRateVisualizationEnabled bool
    Burn rate visualization is enabled (true) or disabled (false)
    Description string
    The custom description of the SLO
    Enabled bool
    The SLO is enabled (true) or disabled (false)
    EvaluationType string
    The evaluation type of the SLO. Currently only AGGREGATE is supported
    EvaluationWindow string
    The timeframe during which the SLO is to be evaluated. For the timeframe you can enter expressions like -1h (last hour), -1w (last week) or complex expressions like -2d to now (last two days), -1d/d to now/d (beginning of yesterday to beginning of today).
    FastBurnThreshold float64
    The threshold defines when a burn rate is marked as fast-burning (high-emergency). Burn rates lower than this threshold (and greater than 1) are highlighted as slow-burn (low-emergency)
    Filter string
    The entity filter for the SLO evaluation. See syntax of entity selector for details
    Id string
    The provider-assigned unique ID for this managed resource.
    LegacyId string
    The ID of this setting when referred to by the Config REST API V1
    MetricExpression string
    The percentage-based metric expression for the calculation of the SLO
    MetricName string
    No documentation available
    Name string
    TargetSuccess float64
    The target value of the SLO
    TargetWarning float64
    The warning value of the SLO. At warning state the SLO is still fulfilled but is getting close to failure
    burnRateVisualizationEnabled Boolean
    Burn rate visualization is enabled (true) or disabled (false)
    description String
    The custom description of the SLO
    enabled Boolean
    The SLO is enabled (true) or disabled (false)
    evaluationType String
    The evaluation type of the SLO. Currently only AGGREGATE is supported
    evaluationWindow String
    The timeframe during which the SLO is to be evaluated. For the timeframe you can enter expressions like -1h (last hour), -1w (last week) or complex expressions like -2d to now (last two days), -1d/d to now/d (beginning of yesterday to beginning of today).
    fastBurnThreshold Double
    The threshold defines when a burn rate is marked as fast-burning (high-emergency). Burn rates lower than this threshold (and greater than 1) are highlighted as slow-burn (low-emergency)
    filter String
    The entity filter for the SLO evaluation. See syntax of entity selector for details
    id String
    The provider-assigned unique ID for this managed resource.
    legacyId String
    The ID of this setting when referred to by the Config REST API V1
    metricExpression String
    The percentage-based metric expression for the calculation of the SLO
    metricName String
    No documentation available
    name String
    targetSuccess Double
    The target value of the SLO
    targetWarning Double
    The warning value of the SLO. At warning state the SLO is still fulfilled but is getting close to failure
    burnRateVisualizationEnabled boolean
    Burn rate visualization is enabled (true) or disabled (false)
    description string
    The custom description of the SLO
    enabled boolean
    The SLO is enabled (true) or disabled (false)
    evaluationType string
    The evaluation type of the SLO. Currently only AGGREGATE is supported
    evaluationWindow string
    The timeframe during which the SLO is to be evaluated. For the timeframe you can enter expressions like -1h (last hour), -1w (last week) or complex expressions like -2d to now (last two days), -1d/d to now/d (beginning of yesterday to beginning of today).
    fastBurnThreshold number
    The threshold defines when a burn rate is marked as fast-burning (high-emergency). Burn rates lower than this threshold (and greater than 1) are highlighted as slow-burn (low-emergency)
    filter string
    The entity filter for the SLO evaluation. See syntax of entity selector for details
    id string
    The provider-assigned unique ID for this managed resource.
    legacyId string
    The ID of this setting when referred to by the Config REST API V1
    metricExpression string
    The percentage-based metric expression for the calculation of the SLO
    metricName string
    No documentation available
    name string
    targetSuccess number
    The target value of the SLO
    targetWarning number
    The warning value of the SLO. At warning state the SLO is still fulfilled but is getting close to failure
    burn_rate_visualization_enabled bool
    Burn rate visualization is enabled (true) or disabled (false)
    description str
    The custom description of the SLO
    enabled bool
    The SLO is enabled (true) or disabled (false)
    evaluation_type str
    The evaluation type of the SLO. Currently only AGGREGATE is supported
    evaluation_window str
    The timeframe during which the SLO is to be evaluated. For the timeframe you can enter expressions like -1h (last hour), -1w (last week) or complex expressions like -2d to now (last two days), -1d/d to now/d (beginning of yesterday to beginning of today).
    fast_burn_threshold float
    The threshold defines when a burn rate is marked as fast-burning (high-emergency). Burn rates lower than this threshold (and greater than 1) are highlighted as slow-burn (low-emergency)
    filter str
    The entity filter for the SLO evaluation. See syntax of entity selector for details
    id str
    The provider-assigned unique ID for this managed resource.
    legacy_id str
    The ID of this setting when referred to by the Config REST API V1
    metric_expression str
    The percentage-based metric expression for the calculation of the SLO
    metric_name str
    No documentation available
    name str
    target_success float
    The target value of the SLO
    target_warning float
    The warning value of the SLO. At warning state the SLO is still fulfilled but is getting close to failure
    burnRateVisualizationEnabled Boolean
    Burn rate visualization is enabled (true) or disabled (false)
    description String
    The custom description of the SLO
    enabled Boolean
    The SLO is enabled (true) or disabled (false)
    evaluationType String
    The evaluation type of the SLO. Currently only AGGREGATE is supported
    evaluationWindow String
    The timeframe during which the SLO is to be evaluated. For the timeframe you can enter expressions like -1h (last hour), -1w (last week) or complex expressions like -2d to now (last two days), -1d/d to now/d (beginning of yesterday to beginning of today).
    fastBurnThreshold Number
    The threshold defines when a burn rate is marked as fast-burning (high-emergency). Burn rates lower than this threshold (and greater than 1) are highlighted as slow-burn (low-emergency)
    filter String
    The entity filter for the SLO evaluation. See syntax of entity selector for details
    id String
    The provider-assigned unique ID for this managed resource.
    legacyId String
    The ID of this setting when referred to by the Config REST API V1
    metricExpression String
    The percentage-based metric expression for the calculation of the SLO
    metricName String
    No documentation available
    name String
    targetSuccess Number
    The target value of the SLO
    targetWarning Number
    The warning value of the SLO. At warning state the SLO is still fulfilled but is getting close to failure

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse