forked from pulumi/pulumi-azure-native-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
getConnectionMonitorTest.go
152 lines (128 loc) · 6.29 KB
/
getConnectionMonitorTest.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
// 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"
"github.com/pulumi/pulumi-azure-native-sdk/v2/utilities"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Gets an existing connection monitor test with the specified name under the given subscription, resource group and peering service.
// Azure REST API version: 2022-10-01.
func LookupConnectionMonitorTest(ctx *pulumi.Context, args *LookupConnectionMonitorTestArgs, opts ...pulumi.InvokeOption) (*LookupConnectionMonitorTestResult, error) {
opts = utilities.PkgInvokeDefaultOpts(opts)
var rv LookupConnectionMonitorTestResult
err := ctx.Invoke("azure-native:peering:getConnectionMonitorTest", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
type LookupConnectionMonitorTestArgs struct {
// The name of the connection monitor test
ConnectionMonitorTestName string `pulumi:"connectionMonitorTestName"`
// The name of the peering service.
PeeringServiceName string `pulumi:"peeringServiceName"`
// The name of the resource group.
ResourceGroupName string `pulumi:"resourceGroupName"`
}
// The Connection Monitor Test class.
type LookupConnectionMonitorTestResult struct {
// The Connection Monitor test destination
Destination *string `pulumi:"destination"`
// The Connection Monitor test destination port
DestinationPort *int `pulumi:"destinationPort"`
// The ID of the resource.
Id string `pulumi:"id"`
// The flag that indicates if the Connection Monitor test is successful or not.
IsTestSuccessful bool `pulumi:"isTestSuccessful"`
// The name of the resource.
Name string `pulumi:"name"`
// The path representing the Connection Monitor test.
Path []string `pulumi:"path"`
// The provisioning state of the resource.
ProvisioningState string `pulumi:"provisioningState"`
// The Connection Monitor test source agent
SourceAgent *string `pulumi:"sourceAgent"`
// The Connection Monitor test frequency in seconds
TestFrequencyInSec *int `pulumi:"testFrequencyInSec"`
// The type of the resource.
Type string `pulumi:"type"`
}
func LookupConnectionMonitorTestOutput(ctx *pulumi.Context, args LookupConnectionMonitorTestOutputArgs, opts ...pulumi.InvokeOption) LookupConnectionMonitorTestResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (LookupConnectionMonitorTestResult, error) {
args := v.(LookupConnectionMonitorTestArgs)
r, err := LookupConnectionMonitorTest(ctx, &args, opts...)
var s LookupConnectionMonitorTestResult
if r != nil {
s = *r
}
return s, err
}).(LookupConnectionMonitorTestResultOutput)
}
type LookupConnectionMonitorTestOutputArgs struct {
// The name of the connection monitor test
ConnectionMonitorTestName pulumi.StringInput `pulumi:"connectionMonitorTestName"`
// The name of the peering service.
PeeringServiceName pulumi.StringInput `pulumi:"peeringServiceName"`
// The name of the resource group.
ResourceGroupName pulumi.StringInput `pulumi:"resourceGroupName"`
}
func (LookupConnectionMonitorTestOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConnectionMonitorTestArgs)(nil)).Elem()
}
// The Connection Monitor Test class.
type LookupConnectionMonitorTestResultOutput struct{ *pulumi.OutputState }
func (LookupConnectionMonitorTestResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*LookupConnectionMonitorTestResult)(nil)).Elem()
}
func (o LookupConnectionMonitorTestResultOutput) ToLookupConnectionMonitorTestResultOutput() LookupConnectionMonitorTestResultOutput {
return o
}
func (o LookupConnectionMonitorTestResultOutput) ToLookupConnectionMonitorTestResultOutputWithContext(ctx context.Context) LookupConnectionMonitorTestResultOutput {
return o
}
// The Connection Monitor test destination
func (o LookupConnectionMonitorTestResultOutput) Destination() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) *string { return v.Destination }).(pulumi.StringPtrOutput)
}
// The Connection Monitor test destination port
func (o LookupConnectionMonitorTestResultOutput) DestinationPort() pulumi.IntPtrOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) *int { return v.DestinationPort }).(pulumi.IntPtrOutput)
}
// The ID of the resource.
func (o LookupConnectionMonitorTestResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) string { return v.Id }).(pulumi.StringOutput)
}
// The flag that indicates if the Connection Monitor test is successful or not.
func (o LookupConnectionMonitorTestResultOutput) IsTestSuccessful() pulumi.BoolOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) bool { return v.IsTestSuccessful }).(pulumi.BoolOutput)
}
// The name of the resource.
func (o LookupConnectionMonitorTestResultOutput) Name() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) string { return v.Name }).(pulumi.StringOutput)
}
// The path representing the Connection Monitor test.
func (o LookupConnectionMonitorTestResultOutput) Path() pulumi.StringArrayOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) []string { return v.Path }).(pulumi.StringArrayOutput)
}
// The provisioning state of the resource.
func (o LookupConnectionMonitorTestResultOutput) ProvisioningState() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) string { return v.ProvisioningState }).(pulumi.StringOutput)
}
// The Connection Monitor test source agent
func (o LookupConnectionMonitorTestResultOutput) SourceAgent() pulumi.StringPtrOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) *string { return v.SourceAgent }).(pulumi.StringPtrOutput)
}
// The Connection Monitor test frequency in seconds
func (o LookupConnectionMonitorTestResultOutput) TestFrequencyInSec() pulumi.IntPtrOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) *int { return v.TestFrequencyInSec }).(pulumi.IntPtrOutput)
}
// The type of the resource.
func (o LookupConnectionMonitorTestResultOutput) Type() pulumi.StringOutput {
return o.ApplyT(func(v LookupConnectionMonitorTestResult) string { return v.Type }).(pulumi.StringOutput)
}
func init() {
pulumi.RegisterOutputType(LookupConnectionMonitorTestResultOutput{})
}