/
getAzureServiceDiscovery.go
213 lines (186 loc) · 8.81 KB
/
getAzureServiceDiscovery.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
// 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 fast
import (
"context"
"reflect"
"github.com/pulumi/pulumi-f5bigip/sdk/v3/go/f5bigip/internal"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Use this data source (`fast.getAzureServiceDiscovery`) to get the Azure Service discovery config to be used for `http`/`https` app deployment in FAST.
//
// ## Example Usage
//
// <!--Start PulumiCodeChooser -->
// ```go
// package main
//
// import (
//
// "github.com/pulumi/pulumi-f5bigip/sdk/v3/go/f5bigip/fast"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
//
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := fast.GetAzureServiceDiscovery(ctx, &fast.GetAzureServiceDiscoveryArgs{
// ResourceGroup: "testazurerg",
// SubscriptionId: "testazuresid",
// TagKey: pulumi.StringRef("testazuretag"),
// TagValue: pulumi.StringRef("testazurevalue"),
// }, nil)
// if err != nil {
// return err
// }
// return nil
// })
// }
//
// ```
// <!--End PulumiCodeChooser -->
func GetAzureServiceDiscovery(ctx *pulumi.Context, args *GetAzureServiceDiscoveryArgs, opts ...pulumi.InvokeOption) (*GetAzureServiceDiscoveryResult, error) {
opts = internal.PkgInvokeDefaultOpts(opts)
var rv GetAzureServiceDiscoveryResult
err := ctx.Invoke("f5bigip:fast/getAzureServiceDiscovery:getAzureServiceDiscovery", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getAzureServiceDiscovery.
type GetAzureServiceDiscoveryArgs struct {
// Specifies whether to look for public or private IP addresses,default `private`.
AddressRealm *string `pulumi:"addressRealm"`
// Specifies whether you are updating your credentials,default `false`.
CredentialUpdate *bool `pulumi:"credentialUpdate"`
// Member is down when fewer than minimum monitors report it healthy.
MinimumMonitors *string `pulumi:"minimumMonitors"`
// Port to be used for Azure service discovery,default `80`.
Port *int `pulumi:"port"`
// Azure Resource Group name.
ResourceGroup string `pulumi:"resourceGroup"`
// Azure subscription ID.
SubscriptionId string `pulumi:"subscriptionId"`
// The tag key associated with the node to add to this pool.
TagKey *string `pulumi:"tagKey"`
// The tag value associated with the node to add to this pool.
TagValue *string `pulumi:"tagValue"`
Type *string `pulumi:"type"`
// Action to take when node cannot be detected,default `remove`.
UndetectableAction *string `pulumi:"undetectableAction"`
// Update interval for service discovery.
UpdateInterval *string `pulumi:"updateInterval"`
}
// A collection of values returned by getAzureServiceDiscovery.
type GetAzureServiceDiscoveryResult struct {
AddressRealm *string `pulumi:"addressRealm"`
// The JSON for Azure service discovery block.
AzureSdJson string `pulumi:"azureSdJson"`
CredentialUpdate *bool `pulumi:"credentialUpdate"`
// The provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
MinimumMonitors *string `pulumi:"minimumMonitors"`
Port *int `pulumi:"port"`
ResourceGroup string `pulumi:"resourceGroup"`
SubscriptionId string `pulumi:"subscriptionId"`
TagKey *string `pulumi:"tagKey"`
TagValue *string `pulumi:"tagValue"`
Type *string `pulumi:"type"`
UndetectableAction *string `pulumi:"undetectableAction"`
UpdateInterval *string `pulumi:"updateInterval"`
}
func GetAzureServiceDiscoveryOutput(ctx *pulumi.Context, args GetAzureServiceDiscoveryOutputArgs, opts ...pulumi.InvokeOption) GetAzureServiceDiscoveryResultOutput {
return pulumi.ToOutputWithContext(context.Background(), args).
ApplyT(func(v interface{}) (GetAzureServiceDiscoveryResult, error) {
args := v.(GetAzureServiceDiscoveryArgs)
r, err := GetAzureServiceDiscovery(ctx, &args, opts...)
var s GetAzureServiceDiscoveryResult
if r != nil {
s = *r
}
return s, err
}).(GetAzureServiceDiscoveryResultOutput)
}
// A collection of arguments for invoking getAzureServiceDiscovery.
type GetAzureServiceDiscoveryOutputArgs struct {
// Specifies whether to look for public or private IP addresses,default `private`.
AddressRealm pulumi.StringPtrInput `pulumi:"addressRealm"`
// Specifies whether you are updating your credentials,default `false`.
CredentialUpdate pulumi.BoolPtrInput `pulumi:"credentialUpdate"`
// Member is down when fewer than minimum monitors report it healthy.
MinimumMonitors pulumi.StringPtrInput `pulumi:"minimumMonitors"`
// Port to be used for Azure service discovery,default `80`.
Port pulumi.IntPtrInput `pulumi:"port"`
// Azure Resource Group name.
ResourceGroup pulumi.StringInput `pulumi:"resourceGroup"`
// Azure subscription ID.
SubscriptionId pulumi.StringInput `pulumi:"subscriptionId"`
// The tag key associated with the node to add to this pool.
TagKey pulumi.StringPtrInput `pulumi:"tagKey"`
// The tag value associated with the node to add to this pool.
TagValue pulumi.StringPtrInput `pulumi:"tagValue"`
Type pulumi.StringPtrInput `pulumi:"type"`
// Action to take when node cannot be detected,default `remove`.
UndetectableAction pulumi.StringPtrInput `pulumi:"undetectableAction"`
// Update interval for service discovery.
UpdateInterval pulumi.StringPtrInput `pulumi:"updateInterval"`
}
func (GetAzureServiceDiscoveryOutputArgs) ElementType() reflect.Type {
return reflect.TypeOf((*GetAzureServiceDiscoveryArgs)(nil)).Elem()
}
// A collection of values returned by getAzureServiceDiscovery.
type GetAzureServiceDiscoveryResultOutput struct{ *pulumi.OutputState }
func (GetAzureServiceDiscoveryResultOutput) ElementType() reflect.Type {
return reflect.TypeOf((*GetAzureServiceDiscoveryResult)(nil)).Elem()
}
func (o GetAzureServiceDiscoveryResultOutput) ToGetAzureServiceDiscoveryResultOutput() GetAzureServiceDiscoveryResultOutput {
return o
}
func (o GetAzureServiceDiscoveryResultOutput) ToGetAzureServiceDiscoveryResultOutputWithContext(ctx context.Context) GetAzureServiceDiscoveryResultOutput {
return o
}
func (o GetAzureServiceDiscoveryResultOutput) AddressRealm() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *string { return v.AddressRealm }).(pulumi.StringPtrOutput)
}
// The JSON for Azure service discovery block.
func (o GetAzureServiceDiscoveryResultOutput) AzureSdJson() pulumi.StringOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) string { return v.AzureSdJson }).(pulumi.StringOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) CredentialUpdate() pulumi.BoolPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *bool { return v.CredentialUpdate }).(pulumi.BoolPtrOutput)
}
// The provider-assigned unique ID for this managed resource.
func (o GetAzureServiceDiscoveryResultOutput) Id() pulumi.StringOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) string { return v.Id }).(pulumi.StringOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) MinimumMonitors() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *string { return v.MinimumMonitors }).(pulumi.StringPtrOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) Port() pulumi.IntPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *int { return v.Port }).(pulumi.IntPtrOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) ResourceGroup() pulumi.StringOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) string { return v.ResourceGroup }).(pulumi.StringOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) SubscriptionId() pulumi.StringOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) string { return v.SubscriptionId }).(pulumi.StringOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) TagKey() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *string { return v.TagKey }).(pulumi.StringPtrOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) TagValue() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *string { return v.TagValue }).(pulumi.StringPtrOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) Type() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *string { return v.Type }).(pulumi.StringPtrOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) UndetectableAction() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *string { return v.UndetectableAction }).(pulumi.StringPtrOutput)
}
func (o GetAzureServiceDiscoveryResultOutput) UpdateInterval() pulumi.StringPtrOutput {
return o.ApplyT(func(v GetAzureServiceDiscoveryResult) *string { return v.UpdateInterval }).(pulumi.StringPtrOutput)
}
func init() {
pulumi.RegisterOutputType(GetAzureServiceDiscoveryResultOutput{})
}