1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. Slo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.platform.Slo

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    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)
    public Slo(String name, SloArgs args)
    public Slo(String name, SloArgs args, CustomResourceOptions options)
    
    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.

    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.
    OrgId string
    Identifier of the organization in which the SLO is configured.
    ProjectId string
    Identifier of the project in which the SLO is configured.
    Request Lbrlabs.PulumiPackage.Harness.Platform.Inputs.SloRequest
    Request for creating or updating SLO.
    Identifier string
    Identifier of the SLO.
    OrgId string
    Identifier of the organization in which the SLO is configured.
    ProjectId string
    Identifier of the project in which the SLO is configured.
    Request SloRequestArgs
    Request for creating or updating SLO.
    identifier String
    Identifier of the SLO.
    orgId String
    Identifier of the organization in which the SLO is configured.
    projectId String
    Identifier of the project in which the SLO is configured.
    request SloRequest
    Request for creating or updating SLO.
    identifier string
    Identifier of the SLO.
    orgId string
    Identifier of the organization in which the SLO is configured.
    projectId string
    Identifier of the project in which the SLO is configured.
    request SloRequest
    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 SloRequestArgs
    Request for creating or updating SLO.
    identifier String
    Identifier of the SLO.
    orgId String
    Identifier of the organization in which the SLO is configured.
    projectId 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) -> 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)
    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.
    The following state arguments are supported:
    Identifier string
    Identifier of the SLO.
    OrgId string
    Identifier of the organization in which the SLO is configured.
    ProjectId string
    Identifier of the project in which the SLO is configured.
    Request Lbrlabs.PulumiPackage.Harness.Platform.Inputs.SloRequest
    Request for creating or updating SLO.
    Identifier string
    Identifier of the SLO.
    OrgId string
    Identifier of the organization in which the SLO is configured.
    ProjectId string
    Identifier of the project in which the SLO is configured.
    Request SloRequestArgs
    Request for creating or updating SLO.
    identifier String
    Identifier of the SLO.
    orgId String
    Identifier of the organization in which the SLO is configured.
    projectId String
    Identifier of the project in which the SLO is configured.
    request SloRequest
    Request for creating or updating SLO.
    identifier string
    Identifier of the SLO.
    orgId string
    Identifier of the organization in which the SLO is configured.
    projectId string
    Identifier of the project in which the SLO is configured.
    request SloRequest
    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 SloRequestArgs
    Request for creating or updating SLO.
    identifier String
    Identifier of the SLO.
    orgId String
    Identifier of the organization in which the SLO is configured.
    projectId 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.
    SloTarget Lbrlabs.PulumiPackage.Harness.Platform.Inputs.SloRequestSloTarget
    SLO Target specification.
    Spec string
    Specification of the SLO.
    Type string
    Type of the SLO.
    UserJourneyRefs List<string>
    User journey reference list for the SLO.
    Description string
    Description for the SLO.
    NotificationRuleRefs List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.SloRequestNotificationRuleRef>
    Notification rule references for the SLO.
    Tags List<string>
    Tags for the SLO. comma-separated key value string pairs.
    Name string
    Name for the SLO.
    SloTarget SloRequestSloTarget
    SLO Target specification.
    Spec string
    Specification of the SLO.
    Type string
    Type of the SLO.
    UserJourneyRefs []string
    User journey reference list for the SLO.
    Description string
    Description for the SLO.
    NotificationRuleRefs []SloRequestNotificationRuleRef
    Notification rule references for the SLO.
    Tags []string
    Tags for the SLO. comma-separated key value string pairs.
    name String
    Name for the SLO.
    sloTarget SloRequestSloTarget
    SLO Target specification.
    spec String
    Specification of the SLO.
    type String
    Type of the SLO.
    userJourneyRefs List<String>
    User journey reference list for the SLO.
    description String
    Description for the SLO.
    notificationRuleRefs List<SloRequestNotificationRuleRef>
    Notification rule references for the SLO.
    tags List<String>
    Tags for the SLO. comma-separated key value string pairs.
    name string
    Name for the SLO.
    sloTarget SloRequestSloTarget
    SLO Target specification.
    spec string
    Specification of the SLO.
    type string
    Type of the SLO.
    userJourneyRefs string[]
    User journey reference list for the SLO.
    description string
    Description for the SLO.
    notificationRuleRefs SloRequestNotificationRuleRef[]
    Notification rule references for the SLO.
    tags string[]
    Tags for the SLO. comma-separated key value string pairs.
    name str
    Name for the SLO.
    slo_target SloRequestSloTarget
    SLO Target specification.
    spec str
    Specification of the SLO.
    type str
    Type of the SLO.
    user_journey_refs Sequence[str]
    User journey reference list for the SLO.
    description str
    Description for the SLO.
    notification_rule_refs Sequence[SloRequestNotificationRuleRef]
    Notification rule references for the SLO.
    tags Sequence[str]
    Tags for the SLO. comma-separated key value string pairs.
    name String
    Name for the SLO.
    sloTarget Property Map
    SLO Target specification.
    spec String
    Specification of the SLO.
    type String
    Type of the SLO.
    userJourneyRefs List<String>
    User journey reference list for the SLO.
    description String
    Description for the SLO.
    notificationRuleRefs List<Property Map>
    Notification rule references for the SLO.
    tags List<String>
    Tags for the SLO. comma-separated key value string pairs.

    SloRequestNotificationRuleRef, SloRequestNotificationRuleRefArgs

    SloRequestSloTarget, SloRequestSloTargetArgs

    SloTargetPercentage double
    Spec string
    Type string
    SloTargetPercentage float64
    Spec string
    Type string
    sloTargetPercentage Double
    spec String
    type String
    sloTargetPercentage number
    spec string
    type string
    sloTargetPercentage Number
    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 harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs