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

oci.Budget.getAlertRule

Explore with Pulumi AI

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

    This data source provides details about a specific Alert Rule resource in Oracle Cloud Infrastructure Budget service.

    Gets an Alert Rule for a specified budget.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAlertRule = oci.Budget.getAlertRule({
        alertRuleId: testAlertRuleOciBudgetAlertRule.id,
        budgetId: testBudget.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_alert_rule = oci.Budget.get_alert_rule(alert_rule_id=test_alert_rule_oci_budget_alert_rule["id"],
        budget_id=test_budget["id"])
    
    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.GetAlertRule(ctx, &budget.GetAlertRuleArgs{
    			AlertRuleId: testAlertRuleOciBudgetAlertRule.Id,
    			BudgetId:    testBudget.Id,
    		}, nil)
    		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 = Oci.Budget.GetAlertRule.Invoke(new()
        {
            AlertRuleId = testAlertRuleOciBudgetAlertRule.Id,
            BudgetId = testBudget.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Budget.BudgetFunctions;
    import com.pulumi.oci.Budget.inputs.GetAlertRuleArgs;
    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 testAlertRule = BudgetFunctions.getAlertRule(GetAlertRuleArgs.builder()
                .alertRuleId(testAlertRuleOciBudgetAlertRule.id())
                .budgetId(testBudget.id())
                .build());
    
        }
    }
    
    variables:
      testAlertRule:
        fn::invoke:
          Function: oci:Budget:getAlertRule
          Arguments:
            alertRuleId: ${testAlertRuleOciBudgetAlertRule.id}
            budgetId: ${testBudget.id}
    

    Using getAlertRule

    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 getAlertRule(args: GetAlertRuleArgs, opts?: InvokeOptions): Promise<GetAlertRuleResult>
    function getAlertRuleOutput(args: GetAlertRuleOutputArgs, opts?: InvokeOptions): Output<GetAlertRuleResult>
    def get_alert_rule(alert_rule_id: Optional[str] = None,
                       budget_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetAlertRuleResult
    def get_alert_rule_output(alert_rule_id: Optional[pulumi.Input[str]] = None,
                       budget_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetAlertRuleResult]
    func GetAlertRule(ctx *Context, args *GetAlertRuleArgs, opts ...InvokeOption) (*GetAlertRuleResult, error)
    func GetAlertRuleOutput(ctx *Context, args *GetAlertRuleOutputArgs, opts ...InvokeOption) GetAlertRuleResultOutput

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

    public static class GetAlertRule 
    {
        public static Task<GetAlertRuleResult> InvokeAsync(GetAlertRuleArgs args, InvokeOptions? opts = null)
        public static Output<GetAlertRuleResult> Invoke(GetAlertRuleInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAlertRuleResult> getAlertRule(GetAlertRuleArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:Budget/getAlertRule:getAlertRule
      arguments:
        # arguments dictionary

    The following arguments are supported:

    AlertRuleId string
    The unique Alert Rule OCID.
    BudgetId string
    The unique budget OCID.
    AlertRuleId string
    The unique Alert Rule OCID.
    BudgetId string
    The unique budget OCID.
    alertRuleId String
    The unique Alert Rule OCID.
    budgetId String
    The unique budget OCID.
    alertRuleId string
    The unique Alert Rule OCID.
    budgetId string
    The unique budget OCID.
    alert_rule_id str
    The unique Alert Rule OCID.
    budget_id str
    The unique budget OCID.
    alertRuleId String
    The unique Alert Rule OCID.
    budgetId String
    The unique budget OCID.

    getAlertRule Result

    The following output properties are available:

    AlertRuleId string
    BudgetId string
    The OCID of the budget.
    DefinedTags Dictionary<string, string>
    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
    The description of the alert rule.
    DisplayName string
    The name of the alert rule. Avoid entering confidential information.
    FreeformTags Dictionary<string, string>
    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"}
    Id string
    The OCID of the alert rule.
    Message string
    The custom message that will be sent when the alert is triggered.
    Recipients string
    The delimited list of email addresses to receive the alert when it triggers. Delimiter characters can be a comma, space, TAB, or semicolon.
    State string
    The current state of the alert rule.
    Threshold double
    The threshold for triggering the alert. If the thresholdType is PERCENTAGE, the maximum value is 10000.
    ThresholdType string
    The type of threshold.
    TimeCreated string
    The time when the budget was created.
    TimeUpdated string
    The time when the budget was updated.
    Type string
    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).
    Version int
    The version of the alert rule. Starts from 1 and increments by 1.
    AlertRuleId string
    BudgetId string
    The OCID of the budget.
    DefinedTags map[string]string
    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
    The description of the alert rule.
    DisplayName string
    The name of the alert rule. Avoid entering confidential information.
    FreeformTags map[string]string
    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"}
    Id string
    The OCID of the alert rule.
    Message string
    The custom message that will be sent when the alert is triggered.
    Recipients string
    The delimited list of email addresses to receive the alert when it triggers. Delimiter characters can be a comma, space, TAB, or semicolon.
    State string
    The current state of the alert rule.
    Threshold float64
    The threshold for triggering the alert. If the thresholdType is PERCENTAGE, the maximum value is 10000.
    ThresholdType string
    The type of threshold.
    TimeCreated string
    The time when the budget was created.
    TimeUpdated string
    The time when the budget was updated.
    Type string
    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).
    Version int
    The version of the alert rule. Starts from 1 and increments by 1.
    alertRuleId String
    budgetId String
    The OCID of the budget.
    definedTags Map<String,String>
    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
    The description of the alert rule.
    displayName String
    The name of the alert rule. Avoid entering confidential information.
    freeformTags Map<String,String>
    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"}
    id String
    The OCID of the alert rule.
    message String
    The custom message that will be sent when the alert is triggered.
    recipients String
    The delimited list of email addresses to receive the alert when it triggers. Delimiter characters can be a comma, space, TAB, or semicolon.
    state String
    The current state of the alert rule.
    threshold Double
    The threshold for triggering the alert. If the thresholdType is PERCENTAGE, the maximum value is 10000.
    thresholdType String
    The type of threshold.
    timeCreated String
    The time when the budget was created.
    timeUpdated String
    The time when the budget was updated.
    type String
    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).
    version Integer
    The version of the alert rule. Starts from 1 and increments by 1.
    alertRuleId string
    budgetId string
    The OCID of the budget.
    definedTags {[key: string]: string}
    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
    The description of the alert rule.
    displayName string
    The name of the alert rule. Avoid entering confidential information.
    freeformTags {[key: string]: string}
    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"}
    id string
    The OCID of the alert rule.
    message string
    The custom message that will be sent when the alert is triggered.
    recipients string
    The delimited list of email addresses to receive the alert when it triggers. Delimiter characters can be a comma, space, TAB, or semicolon.
    state string
    The current state of the alert rule.
    threshold number
    The threshold for triggering the alert. If the thresholdType is PERCENTAGE, the maximum value is 10000.
    thresholdType string
    The type of threshold.
    timeCreated string
    The time when the budget was created.
    timeUpdated string
    The time when the budget was updated.
    type string
    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).
    version number
    The version of the alert rule. Starts from 1 and increments by 1.
    alert_rule_id str
    budget_id str
    The OCID of the budget.
    defined_tags Mapping[str, str]
    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
    The description of the alert rule.
    display_name str
    The name of the alert rule. Avoid entering confidential information.
    freeform_tags Mapping[str, str]
    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"}
    id str
    The OCID of the alert rule.
    message str
    The custom message that will be sent when the alert is triggered.
    recipients str
    The delimited list of email addresses to receive the alert when it triggers. Delimiter characters can be a comma, space, TAB, or semicolon.
    state str
    The current state of the alert rule.
    threshold float
    The threshold for triggering the alert. If the thresholdType is PERCENTAGE, the maximum value is 10000.
    threshold_type str
    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
    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).
    version int
    The version of the alert rule. Starts from 1 and increments by 1.
    alertRuleId String
    budgetId String
    The OCID of the budget.
    definedTags Map<String>
    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
    The description of the alert rule.
    displayName String
    The name of the alert rule. Avoid entering confidential information.
    freeformTags Map<String>
    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"}
    id String
    The OCID of the alert rule.
    message String
    The custom message that will be sent when the alert is triggered.
    recipients String
    The delimited list of email addresses to receive the alert when it triggers. Delimiter characters can be a comma, space, TAB, or semicolon.
    state String
    The current state of the alert rule.
    threshold Number
    The threshold for triggering the alert. If the thresholdType is PERCENTAGE, the maximum value is 10000.
    thresholdType String
    The type of threshold.
    timeCreated String
    The time when the budget was created.
    timeUpdated String
    The time when the budget was updated.
    type String
    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).
    version Number
    The version of the alert rule. Starts from 1 and increments by 1.

    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