1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Budget
  5. Rule
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.Budget.Rule

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This resource provides the Alert Rule resource in Oracle Cloud Infrastructure Budget service.

    Creates a new Alert Rule.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAlertRule = new oci.budget.Rule("test_alert_rule", {
        budgetId: testBudget.id,
        threshold: alertRuleThreshold,
        thresholdType: alertRuleThresholdType,
        type: alertRuleType,
        definedTags: {
            "Operations.CostCenter": "42",
        },
        description: alertRuleDescription,
        displayName: alertRuleDisplayName,
        freeformTags: {
            Department: "Finance",
        },
        message: alertRuleMessage,
        recipients: alertRuleRecipients,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_alert_rule = oci.budget.Rule("test_alert_rule",
        budget_id=test_budget["id"],
        threshold=alert_rule_threshold,
        threshold_type=alert_rule_threshold_type,
        type=alert_rule_type,
        defined_tags={
            "Operations.CostCenter": "42",
        },
        description=alert_rule_description,
        display_name=alert_rule_display_name,
        freeform_tags={
            "Department": "Finance",
        },
        message=alert_rule_message,
        recipients=alert_rule_recipients)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Budget"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Budget.NewRule(ctx, "test_alert_rule", &Budget.RuleArgs{
    			BudgetId:      pulumi.Any(testBudget.Id),
    			Threshold:     pulumi.Any(alertRuleThreshold),
    			ThresholdType: pulumi.Any(alertRuleThresholdType),
    			Type:          pulumi.Any(alertRuleType),
    			DefinedTags: pulumi.StringMap{
    				"Operations.CostCenter": pulumi.String("42"),
    			},
    			Description: pulumi.Any(alertRuleDescription),
    			DisplayName: pulumi.Any(alertRuleDisplayName),
    			FreeformTags: pulumi.StringMap{
    				"Department": pulumi.String("Finance"),
    			},
    			Message:    pulumi.Any(alertRuleMessage),
    			Recipients: pulumi.Any(alertRuleRecipients),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testAlertRule = new Oci.Budget.Rule("test_alert_rule", new()
        {
            BudgetId = testBudget.Id,
            Threshold = alertRuleThreshold,
            ThresholdType = alertRuleThresholdType,
            Type = alertRuleType,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            Description = alertRuleDescription,
            DisplayName = alertRuleDisplayName,
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
            Message = alertRuleMessage,
            Recipients = alertRuleRecipients,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Budget.Rule;
    import com.pulumi.oci.Budget.RuleArgs;
    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 testAlertRule = new Rule("testAlertRule", RuleArgs.builder()
                .budgetId(testBudget.id())
                .threshold(alertRuleThreshold)
                .thresholdType(alertRuleThresholdType)
                .type(alertRuleType)
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .description(alertRuleDescription)
                .displayName(alertRuleDisplayName)
                .freeformTags(Map.of("Department", "Finance"))
                .message(alertRuleMessage)
                .recipients(alertRuleRecipients)
                .build());
    
        }
    }
    
    resources:
      testAlertRule:
        type: oci:Budget:Rule
        name: test_alert_rule
        properties:
          budgetId: ${testBudget.id}
          threshold: ${alertRuleThreshold}
          thresholdType: ${alertRuleThresholdType}
          type: ${alertRuleType}
          definedTags:
            Operations.CostCenter: '42'
          description: ${alertRuleDescription}
          displayName: ${alertRuleDisplayName}
          freeformTags:
            Department: Finance
          message: ${alertRuleMessage}
          recipients: ${alertRuleRecipients}
    

    Create Rule Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Rule(name: string, args: RuleArgs, opts?: CustomResourceOptions);
    @overload
    def Rule(resource_name: str,
             args: RuleArgs,
             opts: Optional[ResourceOptions] = None)
    
    @overload
    def Rule(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             budget_id: Optional[str] = None,
             threshold: Optional[float] = None,
             threshold_type: Optional[str] = None,
             type: Optional[str] = None,
             defined_tags: Optional[Mapping[str, str]] = None,
             description: Optional[str] = None,
             display_name: Optional[str] = None,
             freeform_tags: Optional[Mapping[str, str]] = None,
             message: Optional[str] = None,
             recipients: Optional[str] = None)
    func NewRule(ctx *Context, name string, args RuleArgs, opts ...ResourceOption) (*Rule, error)
    public Rule(string name, RuleArgs args, CustomResourceOptions? opts = null)
    public Rule(String name, RuleArgs args)
    public Rule(String name, RuleArgs args, CustomResourceOptions options)
    
    type: oci:Budget:Rule
    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 RuleArgs
    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 RuleArgs
    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 RuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RuleArgs
    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 ruleResource = new Oci.Budget.Rule("ruleResource", new()
    {
        BudgetId = "string",
        Threshold = 0,
        ThresholdType = "string",
        Type = "string",
        DefinedTags = 
        {
            { "string", "string" },
        },
        Description = "string",
        DisplayName = "string",
        FreeformTags = 
        {
            { "string", "string" },
        },
        Message = "string",
        Recipients = "string",
    });
    
    example, err := Budget.NewRule(ctx, "ruleResource", &Budget.RuleArgs{
    	BudgetId:      pulumi.String("string"),
    	Threshold:     pulumi.Float64(0),
    	ThresholdType: pulumi.String("string"),
    	Type:          pulumi.String("string"),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Message:    pulumi.String("string"),
    	Recipients: pulumi.String("string"),
    })
    
    var ruleResource = new Rule("ruleResource", RuleArgs.builder()
        .budgetId("string")
        .threshold(0)
        .thresholdType("string")
        .type("string")
        .definedTags(Map.of("string", "string"))
        .description("string")
        .displayName("string")
        .freeformTags(Map.of("string", "string"))
        .message("string")
        .recipients("string")
        .build());
    
    rule_resource = oci.budget.Rule("ruleResource",
        budget_id="string",
        threshold=0,
        threshold_type="string",
        type="string",
        defined_tags={
            "string": "string",
        },
        description="string",
        display_name="string",
        freeform_tags={
            "string": "string",
        },
        message="string",
        recipients="string")
    
    const ruleResource = new oci.budget.Rule("ruleResource", {
        budgetId: "string",
        threshold: 0,
        thresholdType: "string",
        type: "string",
        definedTags: {
            string: "string",
        },
        description: "string",
        displayName: "string",
        freeformTags: {
            string: "string",
        },
        message: "string",
        recipients: "string",
    });
    
    type: oci:Budget:Rule
    properties:
        budgetId: string
        definedTags:
            string: string
        description: string
        displayName: string
        freeformTags:
            string: string
        message: string
        recipients: string
        threshold: 0
        thresholdType: string
        type: string
    

    Rule 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 Rule resource accepts the following input properties:

    BudgetId string
    The unique budget OCID.
    Threshold double
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    ThresholdType string
    (Updatable) The type of threshold.
    Type string

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) The description of the alert rule.
    DisplayName string
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Message string
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    Recipients string
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    BudgetId string
    The unique budget OCID.
    Threshold float64
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    ThresholdType string
    (Updatable) The type of threshold.
    Type string

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) The description of the alert rule.
    DisplayName string
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    FreeformTags map[string]string
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Message string
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    Recipients string
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    budgetId String
    The unique budget OCID.
    threshold Double
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    thresholdType String
    (Updatable) The type of threshold.
    type String

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) The description of the alert rule.
    displayName String
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    freeformTags Map<String,String>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    message String
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    recipients String
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    budgetId string
    The unique budget OCID.
    threshold number
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    thresholdType string
    (Updatable) The type of threshold.
    type string

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    (Updatable) The description of the alert rule.
    displayName string
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    message string
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    recipients string
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    budget_id str
    The unique budget OCID.
    threshold float
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    threshold_type str
    (Updatable) The type of threshold.
    type str

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    (Updatable) The description of the alert rule.
    display_name str
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    message str
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    recipients str
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    budgetId String
    The unique budget OCID.
    threshold Number
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    thresholdType String
    (Updatable) The type of threshold.
    type String

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) The description of the alert rule.
    displayName String
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    freeformTags Map<String>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    message String
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    recipients String
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Rule resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current state of the alert rule.
    TimeCreated string
    The time when the budget was created.
    TimeUpdated string
    The time when the budget was updated.
    Version int
    The version of the alert rule. Starts from 1 and increments by 1.
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current state of the alert rule.
    TimeCreated string
    The time when the budget was created.
    TimeUpdated string
    The time when the budget was updated.
    Version int
    The version of the alert rule. Starts from 1 and increments by 1.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current state of the alert rule.
    timeCreated String
    The time when the budget was created.
    timeUpdated String
    The time when the budget was updated.
    version Integer
    The version of the alert rule. Starts from 1 and increments by 1.
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The current state of the alert rule.
    timeCreated string
    The time when the budget was created.
    timeUpdated string
    The time when the budget was updated.
    version number
    The version of the alert rule. Starts from 1 and increments by 1.
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The current state of the alert rule.
    time_created str
    The time when the budget was created.
    time_updated str
    The time when the budget was updated.
    version int
    The version of the alert rule. Starts from 1 and increments by 1.
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current state of the alert rule.
    timeCreated String
    The time when the budget was created.
    timeUpdated String
    The time when the budget was updated.
    version Number
    The version of the alert rule. Starts from 1 and increments by 1.

    Look up Existing Rule Resource

    Get an existing Rule 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?: RuleState, opts?: CustomResourceOptions): Rule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            budget_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            message: Optional[str] = None,
            recipients: Optional[str] = None,
            state: Optional[str] = None,
            threshold: Optional[float] = None,
            threshold_type: Optional[str] = None,
            time_created: Optional[str] = None,
            time_updated: Optional[str] = None,
            type: Optional[str] = None,
            version: Optional[int] = None) -> Rule
    func GetRule(ctx *Context, name string, id IDInput, state *RuleState, opts ...ResourceOption) (*Rule, error)
    public static Rule Get(string name, Input<string> id, RuleState? state, CustomResourceOptions? opts = null)
    public static Rule get(String name, Output<String> id, RuleState 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:
    BudgetId string
    The unique budget OCID.
    DefinedTags Dictionary<string, string>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) The description of the alert rule.
    DisplayName string
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Message string
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    Recipients string
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    State string
    The current state of the alert rule.
    Threshold double
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    ThresholdType string
    (Updatable) The type of threshold.
    TimeCreated string
    The time when the budget was created.
    TimeUpdated string
    The time when the budget was updated.
    Type string

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Version int
    The version of the alert rule. Starts from 1 and increments by 1.
    BudgetId string
    The unique budget OCID.
    DefinedTags map[string]string
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    Description string
    (Updatable) The description of the alert rule.
    DisplayName string
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    FreeformTags map[string]string
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    Message string
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    Recipients string
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    State string
    The current state of the alert rule.
    Threshold float64
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    ThresholdType string
    (Updatable) The type of threshold.
    TimeCreated string
    The time when the budget was created.
    TimeUpdated string
    The time when the budget was updated.
    Type string

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Version int
    The version of the alert rule. Starts from 1 and increments by 1.
    budgetId String
    The unique budget OCID.
    definedTags Map<String,String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) The description of the alert rule.
    displayName String
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    freeformTags Map<String,String>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    message String
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    recipients String
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    state String
    The current state of the alert rule.
    threshold Double
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    thresholdType String
    (Updatable) The type of threshold.
    timeCreated String
    The time when the budget was created.
    timeUpdated String
    The time when the budget was updated.
    type String

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    version Integer
    The version of the alert rule. Starts from 1 and increments by 1.
    budgetId string
    The unique budget OCID.
    definedTags {[key: string]: string}
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description string
    (Updatable) The description of the alert rule.
    displayName string
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    message string
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    recipients string
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    state string
    The current state of the alert rule.
    threshold number
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    thresholdType string
    (Updatable) The type of threshold.
    timeCreated string
    The time when the budget was created.
    timeUpdated string
    The time when the budget was updated.
    type string

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    version number
    The version of the alert rule. Starts from 1 and increments by 1.
    budget_id str
    The unique budget OCID.
    defined_tags Mapping[str, str]
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description str
    (Updatable) The description of the alert rule.
    display_name str
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    message str
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    recipients str
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    state str
    The current state of the alert rule.
    threshold float
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    threshold_type str
    (Updatable) The type of threshold.
    time_created str
    The time when the budget was created.
    time_updated str
    The time when the budget was updated.
    type str

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    version int
    The version of the alert rule. Starts from 1 and increments by 1.
    budgetId String
    The unique budget OCID.
    definedTags Map<String>
    (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {"Operations.CostCenter": "42"}
    description String
    (Updatable) The description of the alert rule.
    displayName String
    (Updatable) The name of the alert rule. Avoid entering confidential information.
    freeformTags Map<String>
    (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {"Department": "Finance"}
    message String
    (Updatable) The message to be sent to the recipients when the alert rule is triggered.
    recipients String
    (Updatable) The audience that receives the alert when it triggers. An empty string is interpreted as null.
    state String
    The current state of the alert rule.
    threshold Number
    (Updatable) The threshold for triggering the alert, expressed as a whole number or decimal value. If the thresholdType is ABSOLUTE, the threshold can have at most 12 digits before the decimal point, and up to two digits after the decimal point. If the thresholdType is PERCENTAGE, the maximum value is 10000 and can have up to two digits after the decimal point.
    thresholdType String
    (Updatable) The type of threshold.
    timeCreated String
    The time when the budget was created.
    timeUpdated String
    The time when the budget was updated.
    type String

    (Updatable) The type of the alert. Valid values are ACTUAL (the alert triggers based on actual usage), or FORECAST (the alert triggers based on predicted usage).

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    version Number
    The version of the alert rule. Starts from 1 and increments by 1.

    Import

    AlertRules can be imported using the id, e.g.

    $ pulumi import oci:Budget/rule:Rule test_alert_rule "budgets/{budgetId}/alertRules/{alertRuleId}"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi