Oracle Cloud Infrastructure
getAlertRule
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
using Pulumi;
using Oci = Pulumi.Oci;
class MyStack : Stack
{
public MyStack()
{
var testAlertRule = Output.Create(Oci.Budget.GetAlertRule.InvokeAsync(new Oci.Budget.GetAlertRuleArgs
{
AlertRuleId = oci_budget_alert_rule.Test_alert_rule.Id,
BudgetId = oci_budget_budget.Test_budget.Id,
}));
}
}
package main
import (
"github.com/pulumi/pulumi-oci/sdk/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: oci_budget_alert_rule.Test_alert_rule.Id,
BudgetId: oci_budget_budget.Test_budget.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_oci as oci
test_alert_rule = oci.Budget.get_alert_rule(alert_rule_id=oci_budget_alert_rule["test_alert_rule"]["id"],
budget_id=oci_budget_budget["test_budget"]["id"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAlertRule = oci.Budget.getAlertRule({
alertRuleId: oci_budget_alert_rule.test_alert_rule.id,
budgetId: oci_budget_budget.test_budget.id,
});
Coming soon!
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:
- Alert
Rule stringId The unique Alert Rule OCID
- Budget
Id string The unique Budget OCID
- Alert
Rule stringId The unique Alert Rule OCID
- Budget
Id string The unique Budget OCID
- alert
Rule StringId The unique Alert Rule OCID
- budget
Id String The unique Budget OCID
- alert
Rule stringId The unique Alert Rule OCID
- budget
Id string The unique Budget OCID
- alert_
rule_ strid The unique Alert Rule OCID
- budget_
id str The unique Budget OCID
- alert
Rule StringId The unique Alert Rule OCID
- budget
Id String The unique Budget OCID
getAlertRule Result
The following output properties are available:
- Alert
Rule stringId - Budget
Id string The OCID of the budget
- Dictionary<string, object>
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.
- Display
Name string The name of the alert rule.
- Dictionary<string, object>
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
Custom message that will be sent when alert is triggered
- Recipients string
Delimited list of email addresses to receive the alert when it triggers. Delimiter character can be comma, space, TAB, or semicolon.
- State string
The current state of the alert rule.
- Threshold double
The threshold for triggering the alert. If thresholdType is PERCENTAGE, the maximum value is 10000.
- Threshold
Type string The type of threshold.
- Time
Created string Time when budget was created
- Time
Updated string Time when budget was updated
- Type string
The type of alert. Valid values are ACTUAL (the alert will trigger based on actual usage) or FORECAST (the alert will trigger based on predicted usage).
- Version int
Version of the alert rule. Starts from 1 and increments by 1.
- Alert
Rule stringId - Budget
Id string The OCID of the budget
- map[string]interface{}
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.
- Display
Name string The name of the alert rule.
- map[string]interface{}
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
Custom message that will be sent when alert is triggered
- Recipients string
Delimited list of email addresses to receive the alert when it triggers. Delimiter character can be comma, space, TAB, or semicolon.
- State string
The current state of the alert rule.
- Threshold float64
The threshold for triggering the alert. If thresholdType is PERCENTAGE, the maximum value is 10000.
- Threshold
Type string The type of threshold.
- Time
Created string Time when budget was created
- Time
Updated string Time when budget was updated
- Type string
The type of alert. Valid values are ACTUAL (the alert will trigger based on actual usage) or FORECAST (the alert will trigger based on predicted usage).
- Version int
Version of the alert rule. Starts from 1 and increments by 1.
- alert
Rule StringId - budget
Id String The OCID of the budget
- Map<String,Object>
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.
- display
Name String The name of the alert rule.
- Map<String,Object>
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
Custom message that will be sent when alert is triggered
- recipients String
Delimited list of email addresses to receive the alert when it triggers. Delimiter character can be comma, space, TAB, or semicolon.
- state String
The current state of the alert rule.
- threshold Double
The threshold for triggering the alert. If thresholdType is PERCENTAGE, the maximum value is 10000.
- threshold
Type String The type of threshold.
- time
Created String Time when budget was created
- time
Updated String Time when budget was updated
- type String
The type of alert. Valid values are ACTUAL (the alert will trigger based on actual usage) or FORECAST (the alert will trigger based on predicted usage).
- version Integer
Version of the alert rule. Starts from 1 and increments by 1.
- alert
Rule stringId - budget
Id string The OCID of the budget
- {[key: string]: any}
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.
- display
Name string The name of the alert rule.
- {[key: string]: any}
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
Custom message that will be sent when alert is triggered
- recipients string
Delimited list of email addresses to receive the alert when it triggers. Delimiter character can be comma, space, TAB, or semicolon.
- state string
The current state of the alert rule.
- threshold number
The threshold for triggering the alert. If thresholdType is PERCENTAGE, the maximum value is 10000.
- threshold
Type string The type of threshold.
- time
Created string Time when budget was created
- time
Updated string Time when budget was updated
- type string
The type of alert. Valid values are ACTUAL (the alert will trigger based on actual usage) or FORECAST (the alert will trigger based on predicted usage).
- version number
Version of the alert rule. Starts from 1 and increments by 1.
- alert_
rule_ strid - budget_
id str The OCID of the budget
- Mapping[str, Any]
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.
- Mapping[str, Any]
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
Custom message that will be sent when alert is triggered
- recipients str
Delimited list of email addresses to receive the alert when it triggers. Delimiter character can be comma, space, TAB, or semicolon.
- state str
The current state of the alert rule.
- threshold float
The threshold for triggering the alert. If thresholdType is PERCENTAGE, the maximum value is 10000.
- threshold_
type str The type of threshold.
- time_
created str Time when budget was created
- time_
updated str Time when budget was updated
- type str
The type of alert. Valid values are ACTUAL (the alert will trigger based on actual usage) or FORECAST (the alert will trigger based on predicted usage).
- version int
Version of the alert rule. Starts from 1 and increments by 1.
- alert
Rule StringId - budget
Id String The OCID of the budget
- Map<Any>
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.
- display
Name String The name of the alert rule.
- Map<Any>
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
Custom message that will be sent when alert is triggered
- recipients String
Delimited list of email addresses to receive the alert when it triggers. Delimiter character can be comma, space, TAB, or semicolon.
- state String
The current state of the alert rule.
- threshold Number
The threshold for triggering the alert. If thresholdType is PERCENTAGE, the maximum value is 10000.
- threshold
Type String The type of threshold.
- time
Created String Time when budget was created
- time
Updated String Time when budget was updated
- type String
The type of alert. Valid values are ACTUAL (the alert will trigger based on actual usage) or FORECAST (the alert will trigger based on predicted usage).
- version Number
Version of the alert rule. Starts from 1 and increments by 1.
Package Details
- Repository
- https://github.com/pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
oci
Terraform Provider.