Alibaba Cloud v3.65.0 published on Monday, Nov 4, 2024 by Pulumi
alicloud.arms.getDispatchRules
Explore with Pulumi AI
This data source provides the Arms Dispatch Rules of the current Alibaba Cloud user.
NOTE: Available in v1.136.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const ids = alicloud.arms.getDispatchRules({});
export const armsDispatchRuleId1 = ids.then(ids => ids.rules?.[0]?.id);
const nameRegex = alicloud.arms.getDispatchRules({
nameRegex: "^my-DispatchRule",
});
export const armsDispatchRuleId2 = nameRegex.then(nameRegex => nameRegex.rules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
ids = alicloud.arms.get_dispatch_rules()
pulumi.export("armsDispatchRuleId1", ids.rules[0].id)
name_regex = alicloud.arms.get_dispatch_rules(name_regex="^my-DispatchRule")
pulumi.export("armsDispatchRuleId2", name_regex.rules[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/arms"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
ids, err := arms.GetDispatchRules(ctx, &arms.GetDispatchRulesArgs{}, nil)
if err != nil {
return err
}
ctx.Export("armsDispatchRuleId1", ids.Rules[0].Id)
nameRegex, err := arms.GetDispatchRules(ctx, &arms.GetDispatchRulesArgs{
NameRegex: pulumi.StringRef("^my-DispatchRule"),
}, nil)
if err != nil {
return err
}
ctx.Export("armsDispatchRuleId2", nameRegex.Rules[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var ids = AliCloud.Arms.GetDispatchRules.Invoke();
var nameRegex = AliCloud.Arms.GetDispatchRules.Invoke(new()
{
NameRegex = "^my-DispatchRule",
});
return new Dictionary<string, object?>
{
["armsDispatchRuleId1"] = ids.Apply(getDispatchRulesResult => getDispatchRulesResult.Rules[0]?.Id),
["armsDispatchRuleId2"] = nameRegex.Apply(getDispatchRulesResult => getDispatchRulesResult.Rules[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.arms.ArmsFunctions;
import com.pulumi.alicloud.arms.inputs.GetDispatchRulesArgs;
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 ids = ArmsFunctions.getDispatchRules();
ctx.export("armsDispatchRuleId1", ids.applyValue(getDispatchRulesResult -> getDispatchRulesResult.rules()[0].id()));
final var nameRegex = ArmsFunctions.getDispatchRules(GetDispatchRulesArgs.builder()
.nameRegex("^my-DispatchRule")
.build());
ctx.export("armsDispatchRuleId2", nameRegex.applyValue(getDispatchRulesResult -> getDispatchRulesResult.rules()[0].id()));
}
}
variables:
ids:
fn::invoke:
Function: alicloud:arms:getDispatchRules
Arguments: {}
nameRegex:
fn::invoke:
Function: alicloud:arms:getDispatchRules
Arguments:
nameRegex: ^my-DispatchRule
outputs:
armsDispatchRuleId1: ${ids.rules[0].id}
armsDispatchRuleId2: ${nameRegex.rules[0].id}
Using getDispatchRules
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 getDispatchRules(args: GetDispatchRulesArgs, opts?: InvokeOptions): Promise<GetDispatchRulesResult>
function getDispatchRulesOutput(args: GetDispatchRulesOutputArgs, opts?: InvokeOptions): Output<GetDispatchRulesResult>
def get_dispatch_rules(dispatch_rule_name: Optional[str] = None,
enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDispatchRulesResult
def get_dispatch_rules_output(dispatch_rule_name: Optional[pulumi.Input[str]] = None,
enable_details: Optional[pulumi.Input[bool]] = None,
ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name_regex: Optional[pulumi.Input[str]] = None,
output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDispatchRulesResult]
func GetDispatchRules(ctx *Context, args *GetDispatchRulesArgs, opts ...InvokeOption) (*GetDispatchRulesResult, error)
func GetDispatchRulesOutput(ctx *Context, args *GetDispatchRulesOutputArgs, opts ...InvokeOption) GetDispatchRulesResultOutput
> Note: This function is named GetDispatchRules
in the Go SDK.
public static class GetDispatchRules
{
public static Task<GetDispatchRulesResult> InvokeAsync(GetDispatchRulesArgs args, InvokeOptions? opts = null)
public static Output<GetDispatchRulesResult> Invoke(GetDispatchRulesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDispatchRulesResult> getDispatchRules(GetDispatchRulesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:arms/getDispatchRules:getDispatchRules
arguments:
# arguments dictionary
The following arguments are supported:
- Dispatch
Rule stringName - The name of the dispatch rule.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids List<string>
- A list of dispatch rule id.
- Name
Regex string - A regex string to filter results by Dispatch Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Dispatch
Rule stringName - The name of the dispatch rule.
- Enable
Details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - Ids []string
- A list of dispatch rule id.
- Name
Regex string - A regex string to filter results by Dispatch Rule name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- dispatch
Rule StringName - The name of the dispatch rule.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of dispatch rule id.
- name
Regex String - A regex string to filter results by Dispatch Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- dispatch
Rule stringName - The name of the dispatch rule.
- enable
Details boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids string[]
- A list of dispatch rule id.
- name
Regex string - A regex string to filter results by Dispatch Rule name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- dispatch_
rule_ strname - The name of the dispatch rule.
- enable_
details bool - Default to
false
. Set it totrue
can output more details about resource attributes. - ids Sequence[str]
- A list of dispatch rule id.
- name_
regex str - A regex string to filter results by Dispatch Rule name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- dispatch
Rule StringName - The name of the dispatch rule.
- enable
Details Boolean - Default to
false
. Set it totrue
can output more details about resource attributes. - ids List<String>
- A list of dispatch rule id.
- name
Regex String - A regex string to filter results by Dispatch Rule name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getDispatchRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Rules
List<Pulumi.
Ali Cloud. Arms. Outputs. Get Dispatch Rules Rule> - Dispatch
Rule stringName - Enable
Details bool - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Rules
[]Get
Dispatch Rules Rule - Dispatch
Rule stringName - Enable
Details bool - Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- rules
List<Get
Dispatch Rules Rule> - dispatch
Rule StringName - enable
Details Boolean - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- rules
Get
Dispatch Rules Rule[] - dispatch
Rule stringName - enable
Details boolean - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- rules
Sequence[Get
Dispatch Rules Rule] - dispatch_
rule_ strname - enable_
details bool - name_
regex str - output_
file str
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- rules List<Property Map>
- dispatch
Rule StringName - enable
Details Boolean - name
Regex String - output
File String
Supporting Types
GetDispatchRulesRule
- Dispatch
Rule stringId - Dispatch rule ID.
- Dispatch
Rule stringName - The name of the dispatch rule.
- Dispatch
Type string - Group
Rules List<Pulumi.Ali Cloud. Arms. Inputs. Get Dispatch Rules Rule Group Rule> - Sets the event group.
- Id string
- The ID of the Dispatch Rule.
- Label
Match List<Pulumi.Expression Grids Ali Cloud. Arms. Inputs. Get Dispatch Rules Rule Label Match Expression Grid> - Sets the dispatch rule.
- Notify
Rules List<Pulumi.Ali Cloud. Arms. Inputs. Get Dispatch Rules Rule Notify Rule> - Sets the notification rule.
- Status string
- The resource status of Alert Dispatch Rule.
- Dispatch
Rule stringId - Dispatch rule ID.
- Dispatch
Rule stringName - The name of the dispatch rule.
- Dispatch
Type string - Group
Rules []GetDispatch Rules Rule Group Rule - Sets the event group.
- Id string
- The ID of the Dispatch Rule.
- Label
Match []GetExpression Grids Dispatch Rules Rule Label Match Expression Grid - Sets the dispatch rule.
- Notify
Rules []GetDispatch Rules Rule Notify Rule - Sets the notification rule.
- Status string
- The resource status of Alert Dispatch Rule.
- dispatch
Rule StringId - Dispatch rule ID.
- dispatch
Rule StringName - The name of the dispatch rule.
- dispatch
Type String - group
Rules List<GetDispatch Rules Rule Group Rule> - Sets the event group.
- id String
- The ID of the Dispatch Rule.
- label
Match List<GetExpression Grids Dispatch Rules Rule Label Match Expression Grid> - Sets the dispatch rule.
- notify
Rules List<GetDispatch Rules Rule Notify Rule> - Sets the notification rule.
- status String
- The resource status of Alert Dispatch Rule.
- dispatch
Rule stringId - Dispatch rule ID.
- dispatch
Rule stringName - The name of the dispatch rule.
- dispatch
Type string - group
Rules GetDispatch Rules Rule Group Rule[] - Sets the event group.
- id string
- The ID of the Dispatch Rule.
- label
Match GetExpression Grids Dispatch Rules Rule Label Match Expression Grid[] - Sets the dispatch rule.
- notify
Rules GetDispatch Rules Rule Notify Rule[] - Sets the notification rule.
- status string
- The resource status of Alert Dispatch Rule.
- dispatch_
rule_ strid - Dispatch rule ID.
- dispatch_
rule_ strname - The name of the dispatch rule.
- dispatch_
type str - group_
rules Sequence[GetDispatch Rules Rule Group Rule] - Sets the event group.
- id str
- The ID of the Dispatch Rule.
- label_
match_ Sequence[Getexpression_ grids Dispatch Rules Rule Label Match Expression Grid] - Sets the dispatch rule.
- notify_
rules Sequence[GetDispatch Rules Rule Notify Rule] - Sets the notification rule.
- status str
- The resource status of Alert Dispatch Rule.
- dispatch
Rule StringId - Dispatch rule ID.
- dispatch
Rule StringName - The name of the dispatch rule.
- dispatch
Type String - group
Rules List<Property Map> - Sets the event group.
- id String
- The ID of the Dispatch Rule.
- label
Match List<Property Map>Expression Grids - Sets the dispatch rule.
- notify
Rules List<Property Map> - Sets the notification rule.
- status String
- The resource status of Alert Dispatch Rule.
GetDispatchRulesRuleGroupRule
- Group
Id int - Group
Interval int - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- Group
Wait intTime - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- Grouping
Fields List<string> - The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.
- Repeat
Interval int - The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.
- Group
Id int - Group
Interval int - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- Group
Wait intTime - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- Grouping
Fields []string - The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.
- Repeat
Interval int - The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.
- group
Id Integer - group
Interval Integer - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- group
Wait IntegerTime - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- grouping
Fields List<String> - The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.
- repeat
Interval Integer - The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.
- group
Id number - group
Interval number - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- group
Wait numberTime - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- grouping
Fields string[] - The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.
- repeat
Interval number - The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.
- group_
id int - group_
interval int - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- group_
wait_ inttime - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- grouping_
fields Sequence[str] - The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.
- repeat_
interval int - The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.
- group
Id Number - group
Interval Number - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- group
Wait NumberTime - The duration for which the system waits after the first alert is sent. After the duration, all alerts are sent in a single notification to the handler.
- grouping
Fields List<String> - The fields that are used to group events. Events with the same field content are assigned to a group. Alerts with the same specified grouping field are sent to the handler in separate notifications.
- repeat
Interval Number - The silence period of repeated alerts. All alerts are repeatedly sent at specified intervals until the alerts are cleared. The minimum value is 61. Default to 600.
GetDispatchRulesRuleLabelMatchExpressionGrid
- label
Match List<Property Map>Expression Groups - Sets the dispatch rule.
GetDispatchRulesRuleLabelMatchExpressionGridLabelMatchExpressionGroup
- label
Match List<Property Map>Expressions - Sets the dispatch rule.
GetDispatchRulesRuleLabelMatchExpressionGridLabelMatchExpressionGroupLabelMatchExpression
GetDispatchRulesRuleNotifyRule
- Notify
Channels List<string> - The notification method.
- Notify
Objects List<Pulumi.Ali Cloud. Arms. Inputs. Get Dispatch Rules Rule Notify Rule Notify Object> - Sets the notification object.
- Notify
Channels []string - The notification method.
- Notify
Objects []GetDispatch Rules Rule Notify Rule Notify Object - Sets the notification object.
- notify
Channels List<String> - The notification method.
- notify
Objects List<GetDispatch Rules Rule Notify Rule Notify Object> - Sets the notification object.
- notify
Channels string[] - The notification method.
- notify
Objects GetDispatch Rules Rule Notify Rule Notify Object[] - Sets the notification object.
- notify_
channels Sequence[str] - The notification method.
- notify_
objects Sequence[GetDispatch Rules Rule Notify Rule Notify Object] - Sets the notification object.
- notify
Channels List<String> - The notification method.
- notify
Objects List<Property Map> - Sets the notification object.
GetDispatchRulesRuleNotifyRuleNotifyObject
- Name string
- The name of the contact or contact group.
- Notify
Object stringId - The ID of the contact or contact group.
- Notify
Type string - The type of the alert contact.
- Name string
- The name of the contact or contact group.
- Notify
Object stringId - The ID of the contact or contact group.
- Notify
Type string - The type of the alert contact.
- name String
- The name of the contact or contact group.
- notify
Object StringId - The ID of the contact or contact group.
- notify
Type String - The type of the alert contact.
- name string
- The name of the contact or contact group.
- notify
Object stringId - The ID of the contact or contact group.
- notify
Type string - The type of the alert contact.
- name str
- The name of the contact or contact group.
- notify_
object_ strid - The ID of the contact or contact group.
- notify_
type str - The type of the alert contact.
- name String
- The name of the contact or contact group.
- notify
Object StringId - The ID of the contact or contact group.
- notify
Type String - The type of the alert contact.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.