/
alarmNotifyGroups.go
166 lines (144 loc) · 5.87 KB
/
alarmNotifyGroups.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package tls
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/internal"
)
// Use this data source to query detailed information of tls alarm notify groups
// ## Example Usage
//
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// "github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/tls"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := tls.AlarmNotifyGroups(ctx, nil, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
func AlarmNotifyGroups(ctx *pulumi.Context, args *AlarmNotifyGroupsArgs, opts ...pulumi.InvokeOption) (*AlarmNotifyGroupsResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv AlarmNotifyGroupsResult
err := ctx.Invoke("volcengine:tls/alarmNotifyGroups:AlarmNotifyGroups", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking AlarmNotifyGroups.
type AlarmNotifyGroupsArgs struct {
// The id of the alarm notify group.
AlarmNotifyGroupId *string `pulumi:"alarmNotifyGroupId"`
// The name of the alarm notify group.
AlarmNotifyGroupName *string `pulumi:"alarmNotifyGroupName"`
// The name of the iam project.
IamProjectName *string `pulumi:"iamProjectName"`
// File name where to save data source results.
OutputFile *string `pulumi:"outputFile"`
// The name of the receiver.
ReceiverName *string `pulumi:"receiverName"`
}
// A collection of values returned by AlarmNotifyGroups.
type AlarmNotifyGroupsResult struct {
// The id of the notify group.
AlarmNotifyGroupId *string `pulumi:"alarmNotifyGroupId"`
// Name of the notification group.
AlarmNotifyGroupName *string `pulumi:"alarmNotifyGroupName"`
// The list of the notify groups.
Groups []AlarmNotifyGroupsGroup `pulumi:"groups"`
// The iam project name.
IamProjectName *string `pulumi:"iamProjectName"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
OutputFile *string `pulumi:"outputFile"`
ReceiverName *string `pulumi:"receiverName"`
// The total count of query.
TotalCount int `pulumi:"totalCount"`
}
func AlarmNotifyGroupsOutput(ctx *pulumi.Context, args AlarmNotifyGroupsOutputArgs, opts ...pulumi.InvokeOption) AlarmNotifyGroupsResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (AlarmNotifyGroupsResult, error) {
args := v.(AlarmNotifyGroupsArgs)
r, err := AlarmNotifyGroups(ctx, &args, opts...)
var s AlarmNotifyGroupsResult
if r != nil {
s = *r
}
return s, err
}).(AlarmNotifyGroupsResultOutput)
}
// A collection of arguments for invoking AlarmNotifyGroups.
type AlarmNotifyGroupsOutputArgs struct {
// The id of the alarm notify group.
AlarmNotifyGroupId pulumi.StringPtrInput `pulumi:"alarmNotifyGroupId"`
// The name of the alarm notify group.
AlarmNotifyGroupName pulumi.StringPtrInput `pulumi:"alarmNotifyGroupName"`
// The name of the iam project.
IamProjectName pulumi.StringPtrInput `pulumi:"iamProjectName"`
// File name where to save data source results.
OutputFile pulumi.StringPtrInput `pulumi:"outputFile"`
// The name of the receiver.
ReceiverName pulumi.StringPtrInput `pulumi:"receiverName"`
}
func (AlarmNotifyGroupsOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*AlarmNotifyGroupsArgs)(nil)).Elem()
}
// A collection of values returned by AlarmNotifyGroups.
type AlarmNotifyGroupsResultOutput struct{ *pulumi.OutputState }
func (AlarmNotifyGroupsResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*AlarmNotifyGroupsResult)(nil)).Elem()
}
func (o AlarmNotifyGroupsResultOutput) ToAlarmNotifyGroupsResultOutput() AlarmNotifyGroupsResultOutput {
return o
}
func (o AlarmNotifyGroupsResultOutput) ToAlarmNotifyGroupsResultOutputWithContext(ctx context.Context) AlarmNotifyGroupsResultOutput {
return o
}
// The id of the notify group.
func (o AlarmNotifyGroupsResultOutput) AlarmNotifyGroupId() pulumi.StringPtrOutput {
return o.ApplyT(func(v AlarmNotifyGroupsResult) *string { return v.AlarmNotifyGroupId }).(pulumi.StringPtrOutput)
}
// Name of the notification group.
func (o AlarmNotifyGroupsResultOutput) AlarmNotifyGroupName() pulumi.StringPtrOutput {
return o.ApplyT(func(v AlarmNotifyGroupsResult) *string { return v.AlarmNotifyGroupName }).(pulumi.StringPtrOutput)
}
// The list of the notify groups.
func (o AlarmNotifyGroupsResultOutput) Groups() AlarmNotifyGroupsGroupArrayOutput {
return o.ApplyT(func(v AlarmNotifyGroupsResult) []AlarmNotifyGroupsGroup { return v.Groups }).(AlarmNotifyGroupsGroupArrayOutput)
}
// The iam project name.
func (o AlarmNotifyGroupsResultOutput) IamProjectName() pulumi.StringPtrOutput {
return o.ApplyT(func(v AlarmNotifyGroupsResult) *string { return v.IamProjectName }).(pulumi.StringPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o AlarmNotifyGroupsResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v AlarmNotifyGroupsResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o AlarmNotifyGroupsResultOutput) OutputFile() pulumi.StringPtrOutput {
return o.ApplyT(func(v AlarmNotifyGroupsResult) *string { return v.OutputFile }).(pulumi.StringPtrOutput)
}
func (o AlarmNotifyGroupsResultOutput) ReceiverName() pulumi.StringPtrOutput {
return o.ApplyT(func(v AlarmNotifyGroupsResult) *string { return v.ReceiverName }).(pulumi.StringPtrOutput)
}
// The total count of query.
func (o AlarmNotifyGroupsResultOutput) TotalCount() pulumi.IntOutput {
return o.ApplyT(func(v AlarmNotifyGroupsResult) int { return v.TotalCount }).(pulumi.IntOutput)
}
func init() {
pulumi.RegisterOutputType(AlarmNotifyGroupsResultOutput{})
}