github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/servicediscovery/httpNamespace.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package servicediscovery 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // ## Example Usage 15 // 16 // <!--Start PulumiCodeChooser --> 17 // ```go 18 // package main 19 // 20 // import ( 21 // 22 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/servicediscovery" 23 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 24 // 25 // ) 26 // 27 // func main() { 28 // pulumi.Run(func(ctx *pulumi.Context) error { 29 // _, err := servicediscovery.NewHttpNamespace(ctx, "example", &servicediscovery.HttpNamespaceArgs{ 30 // Name: pulumi.String("development"), 31 // Description: pulumi.String("example"), 32 // }) 33 // if err != nil { 34 // return err 35 // } 36 // return nil 37 // }) 38 // } 39 // 40 // ``` 41 // <!--End PulumiCodeChooser --> 42 // 43 // ## Import 44 // 45 // Using `pulumi import`, import Service Discovery HTTP Namespace using the namespace ID. For example: 46 // 47 // ```sh 48 // $ pulumi import aws:servicediscovery/httpNamespace:HttpNamespace example ns-1234567890 49 // ``` 50 type HttpNamespace struct { 51 pulumi.CustomResourceState 52 53 // The ARN that Amazon Route 53 assigns to the namespace when you create it. 54 Arn pulumi.StringOutput `pulumi:"arn"` 55 // The description that you specify for the namespace when you create it. 56 Description pulumi.StringPtrOutput `pulumi:"description"` 57 // The name of an HTTP namespace. 58 HttpName pulumi.StringOutput `pulumi:"httpName"` 59 // The name of the http namespace. 60 Name pulumi.StringOutput `pulumi:"name"` 61 // 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. 62 Tags pulumi.StringMapOutput `pulumi:"tags"` 63 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 64 // 65 // Deprecated: Please use `tags` instead. 66 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 67 } 68 69 // NewHttpNamespace registers a new resource with the given unique name, arguments, and options. 70 func NewHttpNamespace(ctx *pulumi.Context, 71 name string, args *HttpNamespaceArgs, opts ...pulumi.ResourceOption) (*HttpNamespace, error) { 72 if args == nil { 73 args = &HttpNamespaceArgs{} 74 } 75 76 opts = internal.PkgResourceDefaultOpts(opts) 77 var resource HttpNamespace 78 err := ctx.RegisterResource("aws:servicediscovery/httpNamespace:HttpNamespace", name, args, &resource, opts...) 79 if err != nil { 80 return nil, err 81 } 82 return &resource, nil 83 } 84 85 // GetHttpNamespace gets an existing HttpNamespace resource's state with the given name, ID, and optional 86 // state properties that are used to uniquely qualify the lookup (nil if not required). 87 func GetHttpNamespace(ctx *pulumi.Context, 88 name string, id pulumi.IDInput, state *HttpNamespaceState, opts ...pulumi.ResourceOption) (*HttpNamespace, error) { 89 var resource HttpNamespace 90 err := ctx.ReadResource("aws:servicediscovery/httpNamespace:HttpNamespace", name, id, state, &resource, opts...) 91 if err != nil { 92 return nil, err 93 } 94 return &resource, nil 95 } 96 97 // Input properties used for looking up and filtering HttpNamespace resources. 98 type httpNamespaceState struct { 99 // The ARN that Amazon Route 53 assigns to the namespace when you create it. 100 Arn *string `pulumi:"arn"` 101 // The description that you specify for the namespace when you create it. 102 Description *string `pulumi:"description"` 103 // The name of an HTTP namespace. 104 HttpName *string `pulumi:"httpName"` 105 // The name of the http namespace. 106 Name *string `pulumi:"name"` 107 // 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. 108 Tags map[string]string `pulumi:"tags"` 109 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 110 // 111 // Deprecated: Please use `tags` instead. 112 TagsAll map[string]string `pulumi:"tagsAll"` 113 } 114 115 type HttpNamespaceState struct { 116 // The ARN that Amazon Route 53 assigns to the namespace when you create it. 117 Arn pulumi.StringPtrInput 118 // The description that you specify for the namespace when you create it. 119 Description pulumi.StringPtrInput 120 // The name of an HTTP namespace. 121 HttpName pulumi.StringPtrInput 122 // The name of the http namespace. 123 Name pulumi.StringPtrInput 124 // 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. 125 Tags pulumi.StringMapInput 126 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 127 // 128 // Deprecated: Please use `tags` instead. 129 TagsAll pulumi.StringMapInput 130 } 131 132 func (HttpNamespaceState) ElementType() reflect.Type { 133 return reflect.TypeOf((*httpNamespaceState)(nil)).Elem() 134 } 135 136 type httpNamespaceArgs struct { 137 // The description that you specify for the namespace when you create it. 138 Description *string `pulumi:"description"` 139 // The name of the http namespace. 140 Name *string `pulumi:"name"` 141 // 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. 142 Tags map[string]string `pulumi:"tags"` 143 } 144 145 // The set of arguments for constructing a HttpNamespace resource. 146 type HttpNamespaceArgs struct { 147 // The description that you specify for the namespace when you create it. 148 Description pulumi.StringPtrInput 149 // The name of the http namespace. 150 Name pulumi.StringPtrInput 151 // 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. 152 Tags pulumi.StringMapInput 153 } 154 155 func (HttpNamespaceArgs) ElementType() reflect.Type { 156 return reflect.TypeOf((*httpNamespaceArgs)(nil)).Elem() 157 } 158 159 type HttpNamespaceInput interface { 160 pulumi.Input 161 162 ToHttpNamespaceOutput() HttpNamespaceOutput 163 ToHttpNamespaceOutputWithContext(ctx context.Context) HttpNamespaceOutput 164 } 165 166 func (*HttpNamespace) ElementType() reflect.Type { 167 return reflect.TypeOf((**HttpNamespace)(nil)).Elem() 168 } 169 170 func (i *HttpNamespace) ToHttpNamespaceOutput() HttpNamespaceOutput { 171 return i.ToHttpNamespaceOutputWithContext(context.Background()) 172 } 173 174 func (i *HttpNamespace) ToHttpNamespaceOutputWithContext(ctx context.Context) HttpNamespaceOutput { 175 return pulumi.ToOutputWithContext(ctx, i).(HttpNamespaceOutput) 176 } 177 178 // HttpNamespaceArrayInput is an input type that accepts HttpNamespaceArray and HttpNamespaceArrayOutput values. 179 // You can construct a concrete instance of `HttpNamespaceArrayInput` via: 180 // 181 // HttpNamespaceArray{ HttpNamespaceArgs{...} } 182 type HttpNamespaceArrayInput interface { 183 pulumi.Input 184 185 ToHttpNamespaceArrayOutput() HttpNamespaceArrayOutput 186 ToHttpNamespaceArrayOutputWithContext(context.Context) HttpNamespaceArrayOutput 187 } 188 189 type HttpNamespaceArray []HttpNamespaceInput 190 191 func (HttpNamespaceArray) ElementType() reflect.Type { 192 return reflect.TypeOf((*[]*HttpNamespace)(nil)).Elem() 193 } 194 195 func (i HttpNamespaceArray) ToHttpNamespaceArrayOutput() HttpNamespaceArrayOutput { 196 return i.ToHttpNamespaceArrayOutputWithContext(context.Background()) 197 } 198 199 func (i HttpNamespaceArray) ToHttpNamespaceArrayOutputWithContext(ctx context.Context) HttpNamespaceArrayOutput { 200 return pulumi.ToOutputWithContext(ctx, i).(HttpNamespaceArrayOutput) 201 } 202 203 // HttpNamespaceMapInput is an input type that accepts HttpNamespaceMap and HttpNamespaceMapOutput values. 204 // You can construct a concrete instance of `HttpNamespaceMapInput` via: 205 // 206 // HttpNamespaceMap{ "key": HttpNamespaceArgs{...} } 207 type HttpNamespaceMapInput interface { 208 pulumi.Input 209 210 ToHttpNamespaceMapOutput() HttpNamespaceMapOutput 211 ToHttpNamespaceMapOutputWithContext(context.Context) HttpNamespaceMapOutput 212 } 213 214 type HttpNamespaceMap map[string]HttpNamespaceInput 215 216 func (HttpNamespaceMap) ElementType() reflect.Type { 217 return reflect.TypeOf((*map[string]*HttpNamespace)(nil)).Elem() 218 } 219 220 func (i HttpNamespaceMap) ToHttpNamespaceMapOutput() HttpNamespaceMapOutput { 221 return i.ToHttpNamespaceMapOutputWithContext(context.Background()) 222 } 223 224 func (i HttpNamespaceMap) ToHttpNamespaceMapOutputWithContext(ctx context.Context) HttpNamespaceMapOutput { 225 return pulumi.ToOutputWithContext(ctx, i).(HttpNamespaceMapOutput) 226 } 227 228 type HttpNamespaceOutput struct{ *pulumi.OutputState } 229 230 func (HttpNamespaceOutput) ElementType() reflect.Type { 231 return reflect.TypeOf((**HttpNamespace)(nil)).Elem() 232 } 233 234 func (o HttpNamespaceOutput) ToHttpNamespaceOutput() HttpNamespaceOutput { 235 return o 236 } 237 238 func (o HttpNamespaceOutput) ToHttpNamespaceOutputWithContext(ctx context.Context) HttpNamespaceOutput { 239 return o 240 } 241 242 // The ARN that Amazon Route 53 assigns to the namespace when you create it. 243 func (o HttpNamespaceOutput) Arn() pulumi.StringOutput { 244 return o.ApplyT(func(v *HttpNamespace) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 245 } 246 247 // The description that you specify for the namespace when you create it. 248 func (o HttpNamespaceOutput) Description() pulumi.StringPtrOutput { 249 return o.ApplyT(func(v *HttpNamespace) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 250 } 251 252 // The name of an HTTP namespace. 253 func (o HttpNamespaceOutput) HttpName() pulumi.StringOutput { 254 return o.ApplyT(func(v *HttpNamespace) pulumi.StringOutput { return v.HttpName }).(pulumi.StringOutput) 255 } 256 257 // The name of the http namespace. 258 func (o HttpNamespaceOutput) Name() pulumi.StringOutput { 259 return o.ApplyT(func(v *HttpNamespace) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 260 } 261 262 // 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. 263 func (o HttpNamespaceOutput) Tags() pulumi.StringMapOutput { 264 return o.ApplyT(func(v *HttpNamespace) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 265 } 266 267 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 268 // 269 // Deprecated: Please use `tags` instead. 270 func (o HttpNamespaceOutput) TagsAll() pulumi.StringMapOutput { 271 return o.ApplyT(func(v *HttpNamespace) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 272 } 273 274 type HttpNamespaceArrayOutput struct{ *pulumi.OutputState } 275 276 func (HttpNamespaceArrayOutput) ElementType() reflect.Type { 277 return reflect.TypeOf((*[]*HttpNamespace)(nil)).Elem() 278 } 279 280 func (o HttpNamespaceArrayOutput) ToHttpNamespaceArrayOutput() HttpNamespaceArrayOutput { 281 return o 282 } 283 284 func (o HttpNamespaceArrayOutput) ToHttpNamespaceArrayOutputWithContext(ctx context.Context) HttpNamespaceArrayOutput { 285 return o 286 } 287 288 func (o HttpNamespaceArrayOutput) Index(i pulumi.IntInput) HttpNamespaceOutput { 289 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *HttpNamespace { 290 return vs[0].([]*HttpNamespace)[vs[1].(int)] 291 }).(HttpNamespaceOutput) 292 } 293 294 type HttpNamespaceMapOutput struct{ *pulumi.OutputState } 295 296 func (HttpNamespaceMapOutput) ElementType() reflect.Type { 297 return reflect.TypeOf((*map[string]*HttpNamespace)(nil)).Elem() 298 } 299 300 func (o HttpNamespaceMapOutput) ToHttpNamespaceMapOutput() HttpNamespaceMapOutput { 301 return o 302 } 303 304 func (o HttpNamespaceMapOutput) ToHttpNamespaceMapOutputWithContext(ctx context.Context) HttpNamespaceMapOutput { 305 return o 306 } 307 308 func (o HttpNamespaceMapOutput) MapIndex(k pulumi.StringInput) HttpNamespaceOutput { 309 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *HttpNamespace { 310 return vs[0].(map[string]*HttpNamespace)[vs[1].(string)] 311 }).(HttpNamespaceOutput) 312 } 313 314 func init() { 315 pulumi.RegisterInputType(reflect.TypeOf((*HttpNamespaceInput)(nil)).Elem(), &HttpNamespace{}) 316 pulumi.RegisterInputType(reflect.TypeOf((*HttpNamespaceArrayInput)(nil)).Elem(), HttpNamespaceArray{}) 317 pulumi.RegisterInputType(reflect.TypeOf((*HttpNamespaceMapInput)(nil)).Elem(), HttpNamespaceMap{}) 318 pulumi.RegisterOutputType(HttpNamespaceOutput{}) 319 pulumi.RegisterOutputType(HttpNamespaceArrayOutput{}) 320 pulumi.RegisterOutputType(HttpNamespaceMapOutput{}) 321 }