harness.platform.Slo
Explore with Pulumi AI
Resource for creating an SLO.
Example Usage
Coming soon!
Coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.Slo;
import com.pulumi.harness.platform.SloArgs;
import com.pulumi.harness.platform.inputs.SloRequestArgs;
import com.pulumi.harness.platform.inputs.SloRequestSloTargetArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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()        
            .accountId("account_id")
            .orgId("default")
            .projectId("default_project")
            .identifier("TerraformSLO")
            .request(SloRequestArgs.builder()
                .name("TSLO")
                .description("description")
                .tags(                
                    "foo:bar",
                    "bar:foo")
                .userJourneyRefs(                
                    "one",
                    "two")
                .sloTarget(SloRequestSloTargetArgs.builder()
                    .type("Rolling")
                    .sloTargetPercentage(10)
                    .spec(serializeJson(
                        jsonObject(
                            jsonProperty("periodLength", "28d")
                        )))
                    .build())
                .type("Simple")
                .spec(serializeJson(
                    jsonObject(
                        jsonProperty("monitoredServiceRef", "monitoredServiceRef"),
                        jsonProperty("healthSourceRef", "healthSourceRef"),
                        jsonProperty("serviceLevelIndicatorType", "serviceLevelIndicatorType")
                    )))
                .notificationRuleRefs(SloRequestNotificationRuleRefArgs.builder()
                    .notificationRuleRef("notification_rule_ref")
                    .enabled(true)
                    .build())
                .build())
            .build());
    }
}
Coming soon!
Coming soon!
resources:
  example:
    type: harness:platform:Slo
    properties:
      accountId: account_id
      orgId: default
      projectId: default_project
      identifier: TerraformSLO
      request:
        name: TSLO
        description: description
        tags:
          - foo:bar
          - bar:foo
        userJourneyRefs:
          - one
          - two
        sloTarget:
          type: Rolling
          sloTargetPercentage: 10
          spec:
            fn::toJSON:
              periodLength: 28d
        type: Simple
        spec:
          fn::toJSON:
            monitoredServiceRef: monitoredServiceRef
            healthSourceRef: healthSourceRef
            serviceLevelIndicatorType: serviceLevelIndicatorType
        notificationRuleRefs:
          - notificationRuleRef: notification_rule_ref
            enabled: true
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,
        identifier: Optional[str] = None,
        org_id: Optional[str] = None,
        project_id: Optional[str] = None,
        request: Optional[SloRequestArgs] = None)func NewSlo(ctx *Context, name string, args SloArgs, opts ...ResourceOption) (*Slo, error)public Slo(string name, SloArgs args, CustomResourceOptions? opts = null)type: harness:platform: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 Harness.Platform.Slo("sloResource", new()
{
    Identifier = "string",
    OrgId = "string",
    ProjectId = "string",
    Request = new Harness.Platform.Inputs.SloRequestArgs
    {
        Name = "string",
        SloTarget = new Harness.Platform.Inputs.SloRequestSloTargetArgs
        {
            SloTargetPercentage = 0,
            Spec = "string",
            Type = "string",
        },
        Spec = "string",
        Type = "string",
        UserJourneyRefs = new[]
        {
            "string",
        },
        Description = "string",
        NotificationRuleRefs = new[]
        {
            new Harness.Platform.Inputs.SloRequestNotificationRuleRefArgs
            {
                Enabled = false,
                NotificationRuleRef = "string",
            },
        },
        Tags = new[]
        {
            "string",
        },
    },
});
example, err := platform.NewSlo(ctx, "sloResource", &platform.SloArgs{
	Identifier: pulumi.String("string"),
	OrgId:      pulumi.String("string"),
	ProjectId:  pulumi.String("string"),
	Request: &platform.SloRequestArgs{
		Name: pulumi.String("string"),
		SloTarget: &platform.SloRequestSloTargetArgs{
			SloTargetPercentage: pulumi.Float64(0),
			Spec:                pulumi.String("string"),
			Type:                pulumi.String("string"),
		},
		Spec: pulumi.String("string"),
		Type: pulumi.String("string"),
		UserJourneyRefs: pulumi.StringArray{
			pulumi.String("string"),
		},
		Description: pulumi.String("string"),
		NotificationRuleRefs: platform.SloRequestNotificationRuleRefArray{
			&platform.SloRequestNotificationRuleRefArgs{
				Enabled:             pulumi.Bool(false),
				NotificationRuleRef: pulumi.String("string"),
			},
		},
		Tags: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
})
var sloResource = new Slo("sloResource", SloArgs.builder()
    .identifier("string")
    .orgId("string")
    .projectId("string")
    .request(SloRequestArgs.builder()
        .name("string")
        .sloTarget(SloRequestSloTargetArgs.builder()
            .sloTargetPercentage(0)
            .spec("string")
            .type("string")
            .build())
        .spec("string")
        .type("string")
        .userJourneyRefs("string")
        .description("string")
        .notificationRuleRefs(SloRequestNotificationRuleRefArgs.builder()
            .enabled(false)
            .notificationRuleRef("string")
            .build())
        .tags("string")
        .build())
    .build());
slo_resource = harness.platform.Slo("sloResource",
    identifier="string",
    org_id="string",
    project_id="string",
    request=harness.platform.SloRequestArgs(
        name="string",
        slo_target=harness.platform.SloRequestSloTargetArgs(
            slo_target_percentage=0,
            spec="string",
            type="string",
        ),
        spec="string",
        type="string",
        user_journey_refs=["string"],
        description="string",
        notification_rule_refs=[harness.platform.SloRequestNotificationRuleRefArgs(
            enabled=False,
            notification_rule_ref="string",
        )],
        tags=["string"],
    ))
const sloResource = new harness.platform.Slo("sloResource", {
    identifier: "string",
    orgId: "string",
    projectId: "string",
    request: {
        name: "string",
        sloTarget: {
            sloTargetPercentage: 0,
            spec: "string",
            type: "string",
        },
        spec: "string",
        type: "string",
        userJourneyRefs: ["string"],
        description: "string",
        notificationRuleRefs: [{
            enabled: false,
            notificationRuleRef: "string",
        }],
        tags: ["string"],
    },
});
type: harness:platform:Slo
properties:
    identifier: string
    orgId: string
    projectId: string
    request:
        description: string
        name: string
        notificationRuleRefs:
            - enabled: false
              notificationRuleRef: string
        sloTarget:
            sloTargetPercentage: 0
            spec: string
            type: string
        spec: string
        tags:
            - string
        type: string
        userJourneyRefs:
            - 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
The Slo resource accepts the following input properties:
- Identifier string
 - Identifier of the SLO.
 - Org
Id string - Identifier of the organization in which the SLO is configured.
 - Project
Id string - Identifier of the project in which the SLO is configured.
 - Request
Lbrlabs.
Pulumi Package. Harness. Platform. Inputs. Slo Request  - Request for creating or updating SLO.
 
- Identifier string
 - Identifier of the SLO.
 - Org
Id string - Identifier of the organization in which the SLO is configured.
 - Project
Id string - Identifier of the project in which the SLO is configured.
 - Request
Slo
Request Args  - Request for creating or updating SLO.
 
- identifier String
 - Identifier of the SLO.
 - org
Id String - Identifier of the organization in which the SLO is configured.
 - project
Id String - Identifier of the project in which the SLO is configured.
 - request
Slo
Request  - Request for creating or updating SLO.
 
- identifier string
 - Identifier of the SLO.
 - org
Id string - Identifier of the organization in which the SLO is configured.
 - project
Id string - Identifier of the project in which the SLO is configured.
 - request
Slo
Request  - Request for creating or updating SLO.
 
- identifier str
 - Identifier of the SLO.
 - org_
id str - Identifier of the organization in which the SLO is configured.
 - project_
id str - Identifier of the project in which the SLO is configured.
 - request
Slo
Request Args  - Request for creating or updating SLO.
 
- identifier String
 - Identifier of the SLO.
 - org
Id String - Identifier of the organization in which the SLO is configured.
 - project
Id String - Identifier of the project in which the SLO is configured.
 - request Property Map
 - Request for creating or updating SLO.
 
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,
        identifier: Optional[str] = None,
        org_id: Optional[str] = None,
        project_id: Optional[str] = None,
        request: Optional[SloRequestArgs] = 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)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.
 
- Identifier string
 - Identifier of the SLO.
 - Org
Id string - Identifier of the organization in which the SLO is configured.
 - Project
Id string - Identifier of the project in which the SLO is configured.
 - Request
Lbrlabs.
Pulumi Package. Harness. Platform. Inputs. Slo Request  - Request for creating or updating SLO.
 
- Identifier string
 - Identifier of the SLO.
 - Org
Id string - Identifier of the organization in which the SLO is configured.
 - Project
Id string - Identifier of the project in which the SLO is configured.
 - Request
Slo
Request Args  - Request for creating or updating SLO.
 
- identifier String
 - Identifier of the SLO.
 - org
Id String - Identifier of the organization in which the SLO is configured.
 - project
Id String - Identifier of the project in which the SLO is configured.
 - request
Slo
Request  - Request for creating or updating SLO.
 
- identifier string
 - Identifier of the SLO.
 - org
Id string - Identifier of the organization in which the SLO is configured.
 - project
Id string - Identifier of the project in which the SLO is configured.
 - request
Slo
Request  - Request for creating or updating SLO.
 
- identifier str
 - Identifier of the SLO.
 - org_
id str - Identifier of the organization in which the SLO is configured.
 - project_
id str - Identifier of the project in which the SLO is configured.
 - request
Slo
Request Args  - Request for creating or updating SLO.
 
- identifier String
 - Identifier of the SLO.
 - org
Id String - Identifier of the organization in which the SLO is configured.
 - project
Id String - Identifier of the project in which the SLO is configured.
 - request Property Map
 - Request for creating or updating SLO.
 
Supporting Types
SloRequest, SloRequestArgs    
- Name string
 - Name for the SLO.
 - Slo
Target Lbrlabs.Pulumi Package. Harness. Platform. Inputs. Slo Request Slo Target  - SLO Target specification.
 - Spec string
 - Specification of the SLO.
 - Type string
 - Type of the SLO.
 - User
Journey List<string>Refs  - User journey reference list for the SLO.
 - Description string
 - Description for the SLO.
 - Notification
Rule List<Lbrlabs.Refs Pulumi Package. Harness. Platform. Inputs. Slo Request Notification Rule Ref>  - Notification rule references for the SLO.
 - List<string>
 - Tags for the SLO. comma-separated key value string pairs.
 
- Name string
 - Name for the SLO.
 - Slo
Target SloRequest Slo Target  - SLO Target specification.
 - Spec string
 - Specification of the SLO.
 - Type string
 - Type of the SLO.
 - User
Journey []stringRefs  - User journey reference list for the SLO.
 - Description string
 - Description for the SLO.
 - Notification
Rule []SloRefs Request Notification Rule Ref  - Notification rule references for the SLO.
 - []string
 - Tags for the SLO. comma-separated key value string pairs.
 
- name String
 - Name for the SLO.
 - slo
Target SloRequest Slo Target  - SLO Target specification.
 - spec String
 - Specification of the SLO.
 - type String
 - Type of the SLO.
 - user
Journey List<String>Refs  - User journey reference list for the SLO.
 - description String
 - Description for the SLO.
 - notification
Rule List<SloRefs Request Notification Rule Ref>  - Notification rule references for the SLO.
 - List<String>
 - Tags for the SLO. comma-separated key value string pairs.
 
- name string
 - Name for the SLO.
 - slo
Target SloRequest Slo Target  - SLO Target specification.
 - spec string
 - Specification of the SLO.
 - type string
 - Type of the SLO.
 - user
Journey string[]Refs  - User journey reference list for the SLO.
 - description string
 - Description for the SLO.
 - notification
Rule SloRefs Request Notification Rule Ref[]  - Notification rule references for the SLO.
 - string[]
 - Tags for the SLO. comma-separated key value string pairs.
 
- name str
 - Name for the SLO.
 - slo_
target SloRequest Slo Target  - SLO Target specification.
 - spec str
 - Specification of the SLO.
 - type str
 - Type of the SLO.
 - user_
journey_ Sequence[str]refs  - User journey reference list for the SLO.
 - description str
 - Description for the SLO.
 - notification_
rule_ Sequence[Slorefs Request Notification Rule Ref]  - Notification rule references for the SLO.
 - Sequence[str]
 - Tags for the SLO. comma-separated key value string pairs.
 
- name String
 - Name for the SLO.
 - slo
Target Property Map - SLO Target specification.
 - spec String
 - Specification of the SLO.
 - type String
 - Type of the SLO.
 - user
Journey List<String>Refs  - User journey reference list for the SLO.
 - description String
 - Description for the SLO.
 - notification
Rule List<Property Map>Refs  - Notification rule references for the SLO.
 - List<String>
 - Tags for the SLO. comma-separated key value string pairs.
 
SloRequestNotificationRuleRef, SloRequestNotificationRuleRefArgs          
- Enabled bool
 - Notification
Rule stringRef  
- Enabled bool
 - Notification
Rule stringRef  
- enabled Boolean
 - notification
Rule StringRef  
- enabled boolean
 - notification
Rule stringRef  
- enabled bool
 - notification_
rule_ strref  
- enabled Boolean
 - notification
Rule StringRef  
SloRequestSloTarget, SloRequestSloTargetArgs        
- Slo
Target doublePercentage  - Spec string
 - Type string
 
- Slo
Target float64Percentage  - Spec string
 - Type string
 
- slo
Target DoublePercentage  - spec String
 - type String
 
- slo
Target numberPercentage  - spec string
 - type string
 
- slo_
target_ floatpercentage  - spec str
 - type str
 
- slo
Target NumberPercentage  - spec String
 - type String
 
Import
Import account level SLO
 $ pulumi import harness:platform/slo:Slo example <slo_id>
Import organization level SLO
 $ pulumi import harness:platform/slo:Slo example <org_id>/<slo_id>
Import project level SLO
 $ pulumi import harness:platform/slo:Slo example <org_id>/<project_id>/<slo_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
 - harness lbrlabs/pulumi-harness
 - License
 - Apache-2.0
 - Notes
 - This Pulumi package is based on the 
harnessTerraform Provider.