forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
connectionMonitorTest.go
219 lines (186 loc) · 8.42 KB
/
connectionMonitorTest.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
// Code generated by the Pulumi SDK Generator DO NOT EDIT.
// *** WARNING: Do not edit by hand unless you're certain you know what you are doing! ***
package peering
import (
"context"
"reflect"
"errors"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// The Connection Monitor Test class.
// Azure REST API version: 2022-10-01. Prior API version in Azure Native 1.x: 2021-06-01.
type ConnectionMonitorTest struct {
pulumi.CustomResourceState
// The Connection Monitor test destination
Destination pulumi.StringPtrOutput `pulumi:"destination"`
// The Connection Monitor test destination port
DestinationPort pulumi.IntPtrOutput `pulumi:"destinationPort"`
// The flag that indicates if the Connection Monitor test is successful or not.
IsTestSuccessful pulumi.BoolOutput `pulumi:"isTestSuccessful"`
// The name of the resource.
Name pulumi.StringOutput `pulumi:"name"`
// The path representing the Connection Monitor test.
Path pulumi.StringArrayOutput `pulumi:"path"`
// The provisioning state of the resource.
ProvisioningState pulumi.StringOutput `pulumi:"provisioningState"`
// The Connection Monitor test source agent
SourceAgent pulumi.StringPtrOutput `pulumi:"sourceAgent"`
// The Connection Monitor test frequency in seconds
TestFrequencyInSec pulumi.IntPtrOutput `pulumi:"testFrequencyInSec"`
// The type of the resource.
Type pulumi.StringOutput `pulumi:"type"`
}
// NewConnectionMonitorTest registers a new resource with the given unique name, arguments, and options.
func NewConnectionMonitorTest(ctx *pulumi.Context,
name string, args *ConnectionMonitorTestArgs, opts ...pulumi.ResourceOption) (*ConnectionMonitorTest, error) {
if args == nil {
return nil, errors.New("missing one or more required arguments")
}
if args.PeeringServiceName == nil {
return nil, errors.New("invalid value for required argument 'PeeringServiceName'")
}
if args.ResourceGroupName == nil {
return nil, errors.New("invalid value for required argument 'ResourceGroupName'")
}
aliases := pulumi.Aliases([]pulumi.Alias{
{
Type: pulumi.String("azure-native:peering/v20210601:ConnectionMonitorTest"),
},
{
Type: pulumi.String("azure-native:peering/v20220101:ConnectionMonitorTest"),
},
{
Type: pulumi.String("azure-native:peering/v20220601:ConnectionMonitorTest"),
},
{
Type: pulumi.String("azure-native:peering/v20221001:ConnectionMonitorTest"),
},
})
opts = append(opts, aliases)
opts = utilities.PkgResourceDefaultOpts(opts)
var resource ConnectionMonitorTest
err := ctx.RegisterResource("azure-native:peering:ConnectionMonitorTest", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetConnectionMonitorTest gets an existing ConnectionMonitorTest resource's state with the given name, ID, and optional
// state properties that are used to uniquely qualify the lookup (nil if not required).
func GetConnectionMonitorTest(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *ConnectionMonitorTestState, opts ...pulumi.ResourceOption) (*ConnectionMonitorTest, error) {
var resource ConnectionMonitorTest
err := ctx.ReadResource("azure-native:peering:ConnectionMonitorTest", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering ConnectionMonitorTest resources.
type connectionMonitorTestState struct {
}
type ConnectionMonitorTestState struct {
}
func (ConnectionMonitorTestState) ElementType() reflect.Type {
return reflect.TypeOf((*connectionMonitorTestState)(nil)).Elem()
}
type connectionMonitorTestArgs struct {
// The name of the connection monitor test
ConnectionMonitorTestName *string `pulumi:"connectionMonitorTestName"`
// The Connection Monitor test destination
Destination *string `pulumi:"destination"`
// The Connection Monitor test destination port
DestinationPort *int `pulumi:"destinationPort"`
// The name of the peering service.
PeeringServiceName string `pulumi:"peeringServiceName"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
// The Connection Monitor test source agent
SourceAgent *string `pulumi:"sourceAgent"`
// The Connection Monitor test frequency in seconds
TestFrequencyInSec *int `pulumi:"testFrequencyInSec"`
}
// The set of arguments for constructing a ConnectionMonitorTest resource.
type ConnectionMonitorTestArgs struct {
// The name of the connection monitor test
ConnectionMonitorTestName pulumi.StringPtrInput
// The Connection Monitor test destination
Destination pulumi.StringPtrInput
// The Connection Monitor test destination port
DestinationPort pulumi.IntPtrInput
// The name of the peering service.
PeeringServiceName pulumi.StringInput
// The name of the resource group.
ResourceGroupName pulumi.StringInput
// The Connection Monitor test source agent
SourceAgent pulumi.StringPtrInput
// The Connection Monitor test frequency in seconds
TestFrequencyInSec pulumi.IntPtrInput
}
func (ConnectionMonitorTestArgs) ElementType() reflect.Type {
return reflect.TypeOf((*connectionMonitorTestArgs)(nil)).Elem()
}
type ConnectionMonitorTestInput interface {
pulumi.Input
ToConnectionMonitorTestOutput() ConnectionMonitorTestOutput
ToConnectionMonitorTestOutputWithContext(ctx context.Context) ConnectionMonitorTestOutput
}
func (*ConnectionMonitorTest) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionMonitorTest)(nil)).Elem()
}
func (i *ConnectionMonitorTest) ToConnectionMonitorTestOutput() ConnectionMonitorTestOutput {
return i.ToConnectionMonitorTestOutputWithContext(context.Background())
}
func (i *ConnectionMonitorTest) ToConnectionMonitorTestOutputWithContext(ctx context.Context) ConnectionMonitorTestOutput {
return pulumi.ToOutputWithContext(ctx, i).(ConnectionMonitorTestOutput)
}
type ConnectionMonitorTestOutput struct{ *pulumi.OutputState }
func (ConnectionMonitorTestOutput) ElementType() reflect.Type {
return reflect.TypeOf((**ConnectionMonitorTest)(nil)).Elem()
}
func (o ConnectionMonitorTestOutput) ToConnectionMonitorTestOutput() ConnectionMonitorTestOutput {
return o
}
func (o ConnectionMonitorTestOutput) ToConnectionMonitorTestOutputWithContext(ctx context.Context) ConnectionMonitorTestOutput {
return o
}
// The Connection Monitor test destination
func (o ConnectionMonitorTestOutput) Destination() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.StringPtrOutput { return v.Destination }).(pulumi.StringPtrOutput)
}
// The Connection Monitor test destination port
func (o ConnectionMonitorTestOutput) DestinationPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.IntPtrOutput { return v.DestinationPort }).(pulumi.IntPtrOutput)
}
// The flag that indicates if the Connection Monitor test is successful or not.
func (o ConnectionMonitorTestOutput) IsTestSuccessful() pulumi.BoolOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.BoolOutput { return v.IsTestSuccessful }).(pulumi.BoolOutput)
}
// The name of the resource.
func (o ConnectionMonitorTestOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput)
}
// The path representing the Connection Monitor test.
func (o ConnectionMonitorTestOutput) Path() pulumi.StringArrayOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.StringArrayOutput { return v.Path }).(pulumi.StringArrayOutput)
}
// The provisioning state of the resource.
func (o ConnectionMonitorTestOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.StringOutput { return v.ProvisioningState }).(pulumi.StringOutput)
}
// The Connection Monitor test source agent
func (o ConnectionMonitorTestOutput) SourceAgent() pulumi.StringPtrOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.StringPtrOutput { return v.SourceAgent }).(pulumi.StringPtrOutput)
}
// The Connection Monitor test frequency in seconds
func (o ConnectionMonitorTestOutput) TestFrequencyInSec() pulumi.IntPtrOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.IntPtrOutput { return v.TestFrequencyInSec }).(pulumi.IntPtrOutput)
}
// The type of the resource.
func (o ConnectionMonitorTestOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v *ConnectionMonitorTest) pulumi.StringOutput { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(ConnectionMonitorTestOutput{})
}