/
publicDnsNamespace.go
277 lines (231 loc) · 10.9 KB
/
publicDnsNamespace.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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package servicediscovery
import (
"context"
"reflect"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
// Provides a Service Discovery Public DNS Namespace resource.
//
// ## Example Usage
//
// ```go
// package main
//
// import (
// "github.com/pulumi/pulumi-aws/sdk/v4/go/aws/servicediscovery"
// "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
// )
//
// func main() {
// pulumi.Run(func(ctx *pulumi.Context) error {
// _, err := servicediscovery.NewPublicDnsNamespace(ctx, "example", &servicediscovery.PublicDnsNamespaceArgs{
// Description: pulumi.String("example"),
// })
// if err != nil {
// return err
// }
// return nil
// })
// }
// ```
//
// ## Import
//
// Service Discovery Public DNS Namespace can be imported using the namespace ID, e.g.,
//
// ```sh
// $ pulumi import aws:servicediscovery/publicDnsNamespace:PublicDnsNamespace example 0123456789
// ```
type PublicDnsNamespace struct {
pulumi.CustomResourceState
// The ARN that Amazon Route 53 assigns to the namespace when you create it.
Arn pulumi.StringOutput `pulumi:"arn"`
// The description that you specify for the namespace when you create it.
Description pulumi.StringPtrOutput `pulumi:"description"`
// The ID for the hosted zone that Amazon Route 53 creates when you create a namespace.
HostedZone pulumi.StringOutput `pulumi:"hostedZone"`
// The name of the namespace.
Name pulumi.StringOutput `pulumi:"name"`
// A map of tags to assign to the namespace. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapOutput `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"`
}
// NewPublicDnsNamespace registers a new resource with the given unique name, arguments, and options.
func NewPublicDnsNamespace(ctx *pulumi.Context,
name string, args *PublicDnsNamespaceArgs, opts ...pulumi.ResourceOption) (*PublicDnsNamespace, error) {
if args == nil {
args = &PublicDnsNamespaceArgs{}
}
var resource PublicDnsNamespace
err := ctx.RegisterResource("aws:servicediscovery/publicDnsNamespace:PublicDnsNamespace", name, args, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// GetPublicDnsNamespace gets an existing PublicDnsNamespace 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 GetPublicDnsNamespace(ctx *pulumi.Context,
name string, id pulumi.IDInput, state *PublicDnsNamespaceState, opts ...pulumi.ResourceOption) (*PublicDnsNamespace, error) {
var resource PublicDnsNamespace
err := ctx.ReadResource("aws:servicediscovery/publicDnsNamespace:PublicDnsNamespace", name, id, state, &resource, opts...)
if err != nil {
return nil, err
}
return &resource, nil
}
// Input properties used for looking up and filtering PublicDnsNamespace resources.
type publicDnsNamespaceState struct {
// The ARN that Amazon Route 53 assigns to the namespace when you create it.
Arn *string `pulumi:"arn"`
// The description that you specify for the namespace when you create it.
Description *string `pulumi:"description"`
// The ID for the hosted zone that Amazon Route 53 creates when you create a namespace.
HostedZone *string `pulumi:"hostedZone"`
// The name of the namespace.
Name *string `pulumi:"name"`
// A map of tags to assign to the namespace. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll map[string]string `pulumi:"tagsAll"`
}
type PublicDnsNamespaceState struct {
// The ARN that Amazon Route 53 assigns to the namespace when you create it.
Arn pulumi.StringPtrInput
// The description that you specify for the namespace when you create it.
Description pulumi.StringPtrInput
// The ID for the hosted zone that Amazon Route 53 creates when you create a namespace.
HostedZone pulumi.StringPtrInput
// The name of the namespace.
Name pulumi.StringPtrInput
// A map of tags to assign to the namespace. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
// A map of tags assigned to the resource, including those inherited from the provider .
TagsAll pulumi.StringMapInput
}
func (PublicDnsNamespaceState) ElementType() reflect.Type {
return reflect.TypeOf((*publicDnsNamespaceState)(nil)).Elem()
}
type publicDnsNamespaceArgs struct {
// The description that you specify for the namespace when you create it.
Description *string `pulumi:"description"`
// The name of the namespace.
Name *string `pulumi:"name"`
// A map of tags to assign to the namespace. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags map[string]string `pulumi:"tags"`
}
// The set of arguments for constructing a PublicDnsNamespace resource.
type PublicDnsNamespaceArgs struct {
// The description that you specify for the namespace when you create it.
Description pulumi.StringPtrInput
// The name of the namespace.
Name pulumi.StringPtrInput
// A map of tags to assign to the namespace. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
Tags pulumi.StringMapInput
}
func (PublicDnsNamespaceArgs) ElementType() reflect.Type {
return reflect.TypeOf((*publicDnsNamespaceArgs)(nil)).Elem()
}
type PublicDnsNamespaceInput interface {
pulumi.Input
ToPublicDnsNamespaceOutput() PublicDnsNamespaceOutput
ToPublicDnsNamespaceOutputWithContext(ctx context.Context) PublicDnsNamespaceOutput
}
func (*PublicDnsNamespace) ElementType() reflect.Type {
return reflect.TypeOf((**PublicDnsNamespace)(nil)).Elem()
}
func (i *PublicDnsNamespace) ToPublicDnsNamespaceOutput() PublicDnsNamespaceOutput {
return i.ToPublicDnsNamespaceOutputWithContext(context.Background())
}
func (i *PublicDnsNamespace) ToPublicDnsNamespaceOutputWithContext(ctx context.Context) PublicDnsNamespaceOutput {
return pulumi.ToOutputWithContext(ctx, i).(PublicDnsNamespaceOutput)
}
// PublicDnsNamespaceArrayInput is an input type that accepts PublicDnsNamespaceArray and PublicDnsNamespaceArrayOutput values.
// You can construct a concrete instance of `PublicDnsNamespaceArrayInput` via:
//
// PublicDnsNamespaceArray{ PublicDnsNamespaceArgs{...} }
type PublicDnsNamespaceArrayInput interface {
pulumi.Input
ToPublicDnsNamespaceArrayOutput() PublicDnsNamespaceArrayOutput
ToPublicDnsNamespaceArrayOutputWithContext(context.Context) PublicDnsNamespaceArrayOutput
}
type PublicDnsNamespaceArray []PublicDnsNamespaceInput
func (PublicDnsNamespaceArray) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PublicDnsNamespace)(nil)).Elem()
}
func (i PublicDnsNamespaceArray) ToPublicDnsNamespaceArrayOutput() PublicDnsNamespaceArrayOutput {
return i.ToPublicDnsNamespaceArrayOutputWithContext(context.Background())
}
func (i PublicDnsNamespaceArray) ToPublicDnsNamespaceArrayOutputWithContext(ctx context.Context) PublicDnsNamespaceArrayOutput {
return pulumi.ToOutputWithContext(ctx, i).(PublicDnsNamespaceArrayOutput)
}
// PublicDnsNamespaceMapInput is an input type that accepts PublicDnsNamespaceMap and PublicDnsNamespaceMapOutput values.
// You can construct a concrete instance of `PublicDnsNamespaceMapInput` via:
//
// PublicDnsNamespaceMap{ "key": PublicDnsNamespaceArgs{...} }
type PublicDnsNamespaceMapInput interface {
pulumi.Input
ToPublicDnsNamespaceMapOutput() PublicDnsNamespaceMapOutput
ToPublicDnsNamespaceMapOutputWithContext(context.Context) PublicDnsNamespaceMapOutput
}
type PublicDnsNamespaceMap map[string]PublicDnsNamespaceInput
func (PublicDnsNamespaceMap) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PublicDnsNamespace)(nil)).Elem()
}
func (i PublicDnsNamespaceMap) ToPublicDnsNamespaceMapOutput() PublicDnsNamespaceMapOutput {
return i.ToPublicDnsNamespaceMapOutputWithContext(context.Background())
}
func (i PublicDnsNamespaceMap) ToPublicDnsNamespaceMapOutputWithContext(ctx context.Context) PublicDnsNamespaceMapOutput {
return pulumi.ToOutputWithContext(ctx, i).(PublicDnsNamespaceMapOutput)
}
type PublicDnsNamespaceOutput struct{ *pulumi.OutputState }
func (PublicDnsNamespaceOutput) ElementType() reflect.Type {
return reflect.TypeOf((**PublicDnsNamespace)(nil)).Elem()
}
func (o PublicDnsNamespaceOutput) ToPublicDnsNamespaceOutput() PublicDnsNamespaceOutput {
return o
}
func (o PublicDnsNamespaceOutput) ToPublicDnsNamespaceOutputWithContext(ctx context.Context) PublicDnsNamespaceOutput {
return o
}
type PublicDnsNamespaceArrayOutput struct{ *pulumi.OutputState }
func (PublicDnsNamespaceArrayOutput) ElementType() reflect.Type {
return reflect.TypeOf((*[]*PublicDnsNamespace)(nil)).Elem()
}
func (o PublicDnsNamespaceArrayOutput) ToPublicDnsNamespaceArrayOutput() PublicDnsNamespaceArrayOutput {
return o
}
func (o PublicDnsNamespaceArrayOutput) ToPublicDnsNamespaceArrayOutputWithContext(ctx context.Context) PublicDnsNamespaceArrayOutput {
return o
}
func (o PublicDnsNamespaceArrayOutput) Index(i pulumi.IntInput) PublicDnsNamespaceOutput {
return pulumi.All(o, i).ApplyT(func(vs []interface{}) *PublicDnsNamespace {
return vs[0].([]*PublicDnsNamespace)[vs[1].(int)]
}).(PublicDnsNamespaceOutput)
}
type PublicDnsNamespaceMapOutput struct{ *pulumi.OutputState }
func (PublicDnsNamespaceMapOutput) ElementType() reflect.Type {
return reflect.TypeOf((*map[string]*PublicDnsNamespace)(nil)).Elem()
}
func (o PublicDnsNamespaceMapOutput) ToPublicDnsNamespaceMapOutput() PublicDnsNamespaceMapOutput {
return o
}
func (o PublicDnsNamespaceMapOutput) ToPublicDnsNamespaceMapOutputWithContext(ctx context.Context) PublicDnsNamespaceMapOutput {
return o
}
func (o PublicDnsNamespaceMapOutput) MapIndex(k pulumi.StringInput) PublicDnsNamespaceOutput {
return pulumi.All(o, k).ApplyT(func(vs []interface{}) *PublicDnsNamespace {
return vs[0].(map[string]*PublicDnsNamespace)[vs[1].(string)]
}).(PublicDnsNamespaceOutput)
}
func init() {
pulumi.RegisterInputType(reflect.TypeOf((*PublicDnsNamespaceInput)(nil)).Elem(), &PublicDnsNamespace{})
pulumi.RegisterInputType(reflect.TypeOf((*PublicDnsNamespaceArrayInput)(nil)).Elem(), PublicDnsNamespaceArray{})
pulumi.RegisterInputType(reflect.TypeOf((*PublicDnsNamespaceMapInput)(nil)).Elem(), PublicDnsNamespaceMap{})
pulumi.RegisterOutputType(PublicDnsNamespaceOutput{})
pulumi.RegisterOutputType(PublicDnsNamespaceArrayOutput{})
pulumi.RegisterOutputType(PublicDnsNamespaceMapOutput{})
}