Alibaba Cloud v3.68.0 published on Monday, Dec 2, 2024 by Pulumi
alicloud.arms.getAlertContactGroups
Explore with Pulumi AI
This data source provides the Arms Alert Contact Groups of the current Alibaba Cloud user.
NOTE: Available in v1.131.0+.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const nameRegex = alicloud.arms.getAlertContactGroups({
nameRegex: "^my-AlertContactGroup",
});
export const armsAlertContactGroupId = nameRegex.then(nameRegex => nameRegex.groups?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
name_regex = alicloud.arms.get_alert_contact_groups(name_regex="^my-AlertContactGroup")
pulumi.export("armsAlertContactGroupId", name_regex.groups[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 {
nameRegex, err := arms.GetAlertContactGroups(ctx, &arms.GetAlertContactGroupsArgs{
NameRegex: pulumi.StringRef("^my-AlertContactGroup"),
}, nil)
if err != nil {
return err
}
ctx.Export("armsAlertContactGroupId", nameRegex.Groups[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var nameRegex = AliCloud.Arms.GetAlertContactGroups.Invoke(new()
{
NameRegex = "^my-AlertContactGroup",
});
return new Dictionary<string, object?>
{
["armsAlertContactGroupId"] = nameRegex.Apply(getAlertContactGroupsResult => getAlertContactGroupsResult.Groups[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.GetAlertContactGroupsArgs;
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 nameRegex = ArmsFunctions.getAlertContactGroups(GetAlertContactGroupsArgs.builder()
.nameRegex("^my-AlertContactGroup")
.build());
ctx.export("armsAlertContactGroupId", nameRegex.applyValue(getAlertContactGroupsResult -> getAlertContactGroupsResult.groups()[0].id()));
}
}
variables:
nameRegex:
fn::invoke:
Function: alicloud:arms:getAlertContactGroups
Arguments:
nameRegex: ^my-AlertContactGroup
outputs:
armsAlertContactGroupId: ${nameRegex.groups[0].id}
Using getAlertContactGroups
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 getAlertContactGroups(args: GetAlertContactGroupsArgs, opts?: InvokeOptions): Promise<GetAlertContactGroupsResult>
function getAlertContactGroupsOutput(args: GetAlertContactGroupsOutputArgs, opts?: InvokeOptions): Output<GetAlertContactGroupsResult>
def get_alert_contact_groups(alert_contact_group_name: Optional[str] = None,
contact_id: Optional[str] = None,
contact_name: Optional[str] = None,
ids: Optional[Sequence[str]] = None,
name_regex: Optional[str] = None,
output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAlertContactGroupsResult
def get_alert_contact_groups_output(alert_contact_group_name: Optional[pulumi.Input[str]] = None,
contact_id: Optional[pulumi.Input[str]] = None,
contact_name: Optional[pulumi.Input[str]] = 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[GetAlertContactGroupsResult]
func GetAlertContactGroups(ctx *Context, args *GetAlertContactGroupsArgs, opts ...InvokeOption) (*GetAlertContactGroupsResult, error)
func GetAlertContactGroupsOutput(ctx *Context, args *GetAlertContactGroupsOutputArgs, opts ...InvokeOption) GetAlertContactGroupsResultOutput
> Note: This function is named GetAlertContactGroups
in the Go SDK.
public static class GetAlertContactGroups
{
public static Task<GetAlertContactGroupsResult> InvokeAsync(GetAlertContactGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetAlertContactGroupsResult> Invoke(GetAlertContactGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAlertContactGroupsResult> getAlertContactGroups(GetAlertContactGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:arms/getAlertContactGroups:getAlertContactGroups
arguments:
# arguments dictionary
The following arguments are supported:
- Alert
Contact stringGroup Name - The name of the resource.
- Contact
Id string - The contact id.
- Contact
Name string - The contact name.
- Ids List<string>
- A list of Alert Contact Group IDs.
- Name
Regex string - A regex string to filter results by Alert Contact Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Alert
Contact stringGroup Name - The name of the resource.
- Contact
Id string - The contact id.
- Contact
Name string - The contact name.
- Ids []string
- A list of Alert Contact Group IDs.
- Name
Regex string - A regex string to filter results by Alert Contact Group name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- alert
Contact StringGroup Name - The name of the resource.
- contact
Id String - The contact id.
- contact
Name String - The contact name.
- ids List<String>
- A list of Alert Contact Group IDs.
- name
Regex String - A regex string to filter results by Alert Contact Group name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- alert
Contact stringGroup Name - The name of the resource.
- contact
Id string - The contact id.
- contact
Name string - The contact name.
- ids string[]
- A list of Alert Contact Group IDs.
- name
Regex string - A regex string to filter results by Alert Contact Group name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- alert_
contact_ strgroup_ name - The name of the resource.
- contact_
id str - The contact id.
- contact_
name str - The contact name.
- ids Sequence[str]
- A list of Alert Contact Group IDs.
- name_
regex str - A regex string to filter results by Alert Contact Group name.
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- alert
Contact StringGroup Name - The name of the resource.
- contact
Id String - The contact id.
- contact
Name String - The contact name.
- ids List<String>
- A list of Alert Contact Group IDs.
- name
Regex String - A regex string to filter results by Alert Contact Group name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
getAlertContactGroups Result
The following output properties are available:
- Groups
List<Pulumi.
Ali Cloud. Arms. Outputs. Get Alert Contact Groups Group> - Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- Names List<string>
- Alert
Contact stringGroup Name - Contact
Id string - Contact
Name string - Name
Regex string - Output
File string
- Groups
[]Get
Alert Contact Groups Group - Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Alert
Contact stringGroup Name - Contact
Id string - Contact
Name string - Name
Regex string - Output
File string
- groups
List<Get
Alert Contact Groups Group> - id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- alert
Contact StringGroup Name - contact
Id String - contact
Name String - name
Regex String - output
File String
- groups
Get
Alert Contact Groups Group[] - id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- alert
Contact stringGroup Name - contact
Id string - contact
Name string - name
Regex string - output
File string
- groups
Sequence[Get
Alert Contact Groups Group] - id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- alert_
contact_ strgroup_ name - contact_
id str - contact_
name str - name_
regex str - output_
file str
- groups List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- alert
Contact StringGroup Name - contact
Id String - contact
Name String - name
Regex String - output
File String
Supporting Types
GetAlertContactGroupsGroup
- Alert
Contact stringGroup Id - The first ID of the resource.
- Alert
Contact stringGroup Name - The name of the resource.
- Contact
Ids List<string> - contact ids.
- Create
Time string - The creation time of the resource.
- Id string
- The ID of the Alert Contact Group.
- Alert
Contact stringGroup Id - The first ID of the resource.
- Alert
Contact stringGroup Name - The name of the resource.
- Contact
Ids []string - contact ids.
- Create
Time string - The creation time of the resource.
- Id string
- The ID of the Alert Contact Group.
- alert
Contact StringGroup Id - The first ID of the resource.
- alert
Contact StringGroup Name - The name of the resource.
- contact
Ids List<String> - contact ids.
- create
Time String - The creation time of the resource.
- id String
- The ID of the Alert Contact Group.
- alert
Contact stringGroup Id - The first ID of the resource.
- alert
Contact stringGroup Name - The name of the resource.
- contact
Ids string[] - contact ids.
- create
Time string - The creation time of the resource.
- id string
- The ID of the Alert Contact Group.
- alert_
contact_ strgroup_ id - The first ID of the resource.
- alert_
contact_ strgroup_ name - The name of the resource.
- contact_
ids Sequence[str] - contact ids.
- create_
time str - The creation time of the resource.
- id str
- The ID of the Alert Contact Group.
- alert
Contact StringGroup Id - The first ID of the resource.
- alert
Contact StringGroup Name - The name of the resource.
- contact
Ids List<String> - contact ids.
- create
Time String - The creation time of the resource.
- id String
- The ID of the Alert Contact Group.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.