github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/iot/domainConfiguration.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 iot 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 // Creates and manages an AWS IoT domain configuration. 15 // 16 // ## Example Usage 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iot" 25 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 26 // 27 // ) 28 // 29 // func main() { 30 // pulumi.Run(func(ctx *pulumi.Context) error { 31 // _, err := iot.NewDomainConfiguration(ctx, "iot", &iot.DomainConfigurationArgs{ 32 // Name: pulumi.String("iot-"), 33 // DomainName: pulumi.String("iot.example.com"), 34 // ServiceType: pulumi.String("DATA"), 35 // ServerCertificateArns: pulumi.StringArray{ 36 // cert.Arn, 37 // }, 38 // }) 39 // if err != nil { 40 // return err 41 // } 42 // return nil 43 // }) 44 // } 45 // 46 // ``` 47 // <!--End PulumiCodeChooser --> 48 // 49 // ## Import 50 // 51 // Using `pulumi import`, import domain configurations using the name. For example: 52 // 53 // ```sh 54 // $ pulumi import aws:iot/domainConfiguration:DomainConfiguration example example 55 // ``` 56 type DomainConfiguration struct { 57 pulumi.CustomResourceState 58 59 // The ARN of the domain configuration. 60 Arn pulumi.StringOutput `pulumi:"arn"` 61 // An object that specifies the authorization service for a domain. See the `authorizerConfig` Block below for details. 62 AuthorizerConfig DomainConfigurationAuthorizerConfigPtrOutput `pulumi:"authorizerConfig"` 63 // Fully-qualified domain name. 64 DomainName pulumi.StringPtrOutput `pulumi:"domainName"` 65 // The type of the domain. 66 DomainType pulumi.StringOutput `pulumi:"domainType"` 67 // The name of the domain configuration. This value must be unique to a region. 68 Name pulumi.StringOutput `pulumi:"name"` 69 // The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domainName`, the cert must include it. 70 ServerCertificateArns pulumi.StringArrayOutput `pulumi:"serverCertificateArns"` 71 // The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type. 72 ServiceType pulumi.StringPtrOutput `pulumi:"serviceType"` 73 // The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`. 74 Status pulumi.StringPtrOutput `pulumi:"status"` 75 // Map of tags to assign to this resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 76 Tags pulumi.StringMapOutput `pulumi:"tags"` 77 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 78 // 79 // Deprecated: Please use `tags` instead. 80 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 81 // An object that specifies the TLS configuration for a domain. See the `tlsConfig` Block below for details. 82 TlsConfig DomainConfigurationTlsConfigOutput `pulumi:"tlsConfig"` 83 // The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains. 84 ValidationCertificateArn pulumi.StringPtrOutput `pulumi:"validationCertificateArn"` 85 } 86 87 // NewDomainConfiguration registers a new resource with the given unique name, arguments, and options. 88 func NewDomainConfiguration(ctx *pulumi.Context, 89 name string, args *DomainConfigurationArgs, opts ...pulumi.ResourceOption) (*DomainConfiguration, error) { 90 if args == nil { 91 args = &DomainConfigurationArgs{} 92 } 93 94 opts = internal.PkgResourceDefaultOpts(opts) 95 var resource DomainConfiguration 96 err := ctx.RegisterResource("aws:iot/domainConfiguration:DomainConfiguration", name, args, &resource, opts...) 97 if err != nil { 98 return nil, err 99 } 100 return &resource, nil 101 } 102 103 // GetDomainConfiguration gets an existing DomainConfiguration resource's state with the given name, ID, and optional 104 // state properties that are used to uniquely qualify the lookup (nil if not required). 105 func GetDomainConfiguration(ctx *pulumi.Context, 106 name string, id pulumi.IDInput, state *DomainConfigurationState, opts ...pulumi.ResourceOption) (*DomainConfiguration, error) { 107 var resource DomainConfiguration 108 err := ctx.ReadResource("aws:iot/domainConfiguration:DomainConfiguration", name, id, state, &resource, opts...) 109 if err != nil { 110 return nil, err 111 } 112 return &resource, nil 113 } 114 115 // Input properties used for looking up and filtering DomainConfiguration resources. 116 type domainConfigurationState struct { 117 // The ARN of the domain configuration. 118 Arn *string `pulumi:"arn"` 119 // An object that specifies the authorization service for a domain. See the `authorizerConfig` Block below for details. 120 AuthorizerConfig *DomainConfigurationAuthorizerConfig `pulumi:"authorizerConfig"` 121 // Fully-qualified domain name. 122 DomainName *string `pulumi:"domainName"` 123 // The type of the domain. 124 DomainType *string `pulumi:"domainType"` 125 // The name of the domain configuration. This value must be unique to a region. 126 Name *string `pulumi:"name"` 127 // The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domainName`, the cert must include it. 128 ServerCertificateArns []string `pulumi:"serverCertificateArns"` 129 // The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type. 130 ServiceType *string `pulumi:"serviceType"` 131 // The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`. 132 Status *string `pulumi:"status"` 133 // Map of tags to assign to this resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 134 Tags map[string]string `pulumi:"tags"` 135 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 136 // 137 // Deprecated: Please use `tags` instead. 138 TagsAll map[string]string `pulumi:"tagsAll"` 139 // An object that specifies the TLS configuration for a domain. See the `tlsConfig` Block below for details. 140 TlsConfig *DomainConfigurationTlsConfig `pulumi:"tlsConfig"` 141 // The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains. 142 ValidationCertificateArn *string `pulumi:"validationCertificateArn"` 143 } 144 145 type DomainConfigurationState struct { 146 // The ARN of the domain configuration. 147 Arn pulumi.StringPtrInput 148 // An object that specifies the authorization service for a domain. See the `authorizerConfig` Block below for details. 149 AuthorizerConfig DomainConfigurationAuthorizerConfigPtrInput 150 // Fully-qualified domain name. 151 DomainName pulumi.StringPtrInput 152 // The type of the domain. 153 DomainType pulumi.StringPtrInput 154 // The name of the domain configuration. This value must be unique to a region. 155 Name pulumi.StringPtrInput 156 // The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domainName`, the cert must include it. 157 ServerCertificateArns pulumi.StringArrayInput 158 // The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type. 159 ServiceType pulumi.StringPtrInput 160 // The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`. 161 Status pulumi.StringPtrInput 162 // Map of tags to assign to this resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 163 Tags pulumi.StringMapInput 164 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 165 // 166 // Deprecated: Please use `tags` instead. 167 TagsAll pulumi.StringMapInput 168 // An object that specifies the TLS configuration for a domain. See the `tlsConfig` Block below for details. 169 TlsConfig DomainConfigurationTlsConfigPtrInput 170 // The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains. 171 ValidationCertificateArn pulumi.StringPtrInput 172 } 173 174 func (DomainConfigurationState) ElementType() reflect.Type { 175 return reflect.TypeOf((*domainConfigurationState)(nil)).Elem() 176 } 177 178 type domainConfigurationArgs struct { 179 // An object that specifies the authorization service for a domain. See the `authorizerConfig` Block below for details. 180 AuthorizerConfig *DomainConfigurationAuthorizerConfig `pulumi:"authorizerConfig"` 181 // Fully-qualified domain name. 182 DomainName *string `pulumi:"domainName"` 183 // The name of the domain configuration. This value must be unique to a region. 184 Name *string `pulumi:"name"` 185 // The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domainName`, the cert must include it. 186 ServerCertificateArns []string `pulumi:"serverCertificateArns"` 187 // The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type. 188 ServiceType *string `pulumi:"serviceType"` 189 // The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`. 190 Status *string `pulumi:"status"` 191 // Map of tags to assign to this resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 192 Tags map[string]string `pulumi:"tags"` 193 // An object that specifies the TLS configuration for a domain. See the `tlsConfig` Block below for details. 194 TlsConfig *DomainConfigurationTlsConfig `pulumi:"tlsConfig"` 195 // The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains. 196 ValidationCertificateArn *string `pulumi:"validationCertificateArn"` 197 } 198 199 // The set of arguments for constructing a DomainConfiguration resource. 200 type DomainConfigurationArgs struct { 201 // An object that specifies the authorization service for a domain. See the `authorizerConfig` Block below for details. 202 AuthorizerConfig DomainConfigurationAuthorizerConfigPtrInput 203 // Fully-qualified domain name. 204 DomainName pulumi.StringPtrInput 205 // The name of the domain configuration. This value must be unique to a region. 206 Name pulumi.StringPtrInput 207 // The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domainName`, the cert must include it. 208 ServerCertificateArns pulumi.StringArrayInput 209 // The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type. 210 ServiceType pulumi.StringPtrInput 211 // The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`. 212 Status pulumi.StringPtrInput 213 // Map of tags to assign to this resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 214 Tags pulumi.StringMapInput 215 // An object that specifies the TLS configuration for a domain. See the `tlsConfig` Block below for details. 216 TlsConfig DomainConfigurationTlsConfigPtrInput 217 // The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains. 218 ValidationCertificateArn pulumi.StringPtrInput 219 } 220 221 func (DomainConfigurationArgs) ElementType() reflect.Type { 222 return reflect.TypeOf((*domainConfigurationArgs)(nil)).Elem() 223 } 224 225 type DomainConfigurationInput interface { 226 pulumi.Input 227 228 ToDomainConfigurationOutput() DomainConfigurationOutput 229 ToDomainConfigurationOutputWithContext(ctx context.Context) DomainConfigurationOutput 230 } 231 232 func (*DomainConfiguration) ElementType() reflect.Type { 233 return reflect.TypeOf((**DomainConfiguration)(nil)).Elem() 234 } 235 236 func (i *DomainConfiguration) ToDomainConfigurationOutput() DomainConfigurationOutput { 237 return i.ToDomainConfigurationOutputWithContext(context.Background()) 238 } 239 240 func (i *DomainConfiguration) ToDomainConfigurationOutputWithContext(ctx context.Context) DomainConfigurationOutput { 241 return pulumi.ToOutputWithContext(ctx, i).(DomainConfigurationOutput) 242 } 243 244 // DomainConfigurationArrayInput is an input type that accepts DomainConfigurationArray and DomainConfigurationArrayOutput values. 245 // You can construct a concrete instance of `DomainConfigurationArrayInput` via: 246 // 247 // DomainConfigurationArray{ DomainConfigurationArgs{...} } 248 type DomainConfigurationArrayInput interface { 249 pulumi.Input 250 251 ToDomainConfigurationArrayOutput() DomainConfigurationArrayOutput 252 ToDomainConfigurationArrayOutputWithContext(context.Context) DomainConfigurationArrayOutput 253 } 254 255 type DomainConfigurationArray []DomainConfigurationInput 256 257 func (DomainConfigurationArray) ElementType() reflect.Type { 258 return reflect.TypeOf((*[]*DomainConfiguration)(nil)).Elem() 259 } 260 261 func (i DomainConfigurationArray) ToDomainConfigurationArrayOutput() DomainConfigurationArrayOutput { 262 return i.ToDomainConfigurationArrayOutputWithContext(context.Background()) 263 } 264 265 func (i DomainConfigurationArray) ToDomainConfigurationArrayOutputWithContext(ctx context.Context) DomainConfigurationArrayOutput { 266 return pulumi.ToOutputWithContext(ctx, i).(DomainConfigurationArrayOutput) 267 } 268 269 // DomainConfigurationMapInput is an input type that accepts DomainConfigurationMap and DomainConfigurationMapOutput values. 270 // You can construct a concrete instance of `DomainConfigurationMapInput` via: 271 // 272 // DomainConfigurationMap{ "key": DomainConfigurationArgs{...} } 273 type DomainConfigurationMapInput interface { 274 pulumi.Input 275 276 ToDomainConfigurationMapOutput() DomainConfigurationMapOutput 277 ToDomainConfigurationMapOutputWithContext(context.Context) DomainConfigurationMapOutput 278 } 279 280 type DomainConfigurationMap map[string]DomainConfigurationInput 281 282 func (DomainConfigurationMap) ElementType() reflect.Type { 283 return reflect.TypeOf((*map[string]*DomainConfiguration)(nil)).Elem() 284 } 285 286 func (i DomainConfigurationMap) ToDomainConfigurationMapOutput() DomainConfigurationMapOutput { 287 return i.ToDomainConfigurationMapOutputWithContext(context.Background()) 288 } 289 290 func (i DomainConfigurationMap) ToDomainConfigurationMapOutputWithContext(ctx context.Context) DomainConfigurationMapOutput { 291 return pulumi.ToOutputWithContext(ctx, i).(DomainConfigurationMapOutput) 292 } 293 294 type DomainConfigurationOutput struct{ *pulumi.OutputState } 295 296 func (DomainConfigurationOutput) ElementType() reflect.Type { 297 return reflect.TypeOf((**DomainConfiguration)(nil)).Elem() 298 } 299 300 func (o DomainConfigurationOutput) ToDomainConfigurationOutput() DomainConfigurationOutput { 301 return o 302 } 303 304 func (o DomainConfigurationOutput) ToDomainConfigurationOutputWithContext(ctx context.Context) DomainConfigurationOutput { 305 return o 306 } 307 308 // The ARN of the domain configuration. 309 func (o DomainConfigurationOutput) Arn() pulumi.StringOutput { 310 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 311 } 312 313 // An object that specifies the authorization service for a domain. See the `authorizerConfig` Block below for details. 314 func (o DomainConfigurationOutput) AuthorizerConfig() DomainConfigurationAuthorizerConfigPtrOutput { 315 return o.ApplyT(func(v *DomainConfiguration) DomainConfigurationAuthorizerConfigPtrOutput { return v.AuthorizerConfig }).(DomainConfigurationAuthorizerConfigPtrOutput) 316 } 317 318 // Fully-qualified domain name. 319 func (o DomainConfigurationOutput) DomainName() pulumi.StringPtrOutput { 320 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringPtrOutput { return v.DomainName }).(pulumi.StringPtrOutput) 321 } 322 323 // The type of the domain. 324 func (o DomainConfigurationOutput) DomainType() pulumi.StringOutput { 325 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringOutput { return v.DomainType }).(pulumi.StringOutput) 326 } 327 328 // The name of the domain configuration. This value must be unique to a region. 329 func (o DomainConfigurationOutput) Name() pulumi.StringOutput { 330 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 331 } 332 333 // The ARNs of the certificates that IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for Amazon Web Services-managed domains. When using a custom `domainName`, the cert must include it. 334 func (o DomainConfigurationOutput) ServerCertificateArns() pulumi.StringArrayOutput { 335 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringArrayOutput { return v.ServerCertificateArns }).(pulumi.StringArrayOutput) 336 } 337 338 // The type of service delivered by the endpoint. Note: Amazon Web Services IoT Core currently supports only the `DATA` service type. 339 func (o DomainConfigurationOutput) ServiceType() pulumi.StringPtrOutput { 340 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringPtrOutput { return v.ServiceType }).(pulumi.StringPtrOutput) 341 } 342 343 // The status to which the domain configuration should be set. Valid values are `ENABLED` and `DISABLED`. 344 func (o DomainConfigurationOutput) Status() pulumi.StringPtrOutput { 345 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringPtrOutput { return v.Status }).(pulumi.StringPtrOutput) 346 } 347 348 // Map of tags to assign to this resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 349 func (o DomainConfigurationOutput) Tags() pulumi.StringMapOutput { 350 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 351 } 352 353 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 354 // 355 // Deprecated: Please use `tags` instead. 356 func (o DomainConfigurationOutput) TagsAll() pulumi.StringMapOutput { 357 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 358 } 359 360 // An object that specifies the TLS configuration for a domain. See the `tlsConfig` Block below for details. 361 func (o DomainConfigurationOutput) TlsConfig() DomainConfigurationTlsConfigOutput { 362 return o.ApplyT(func(v *DomainConfiguration) DomainConfigurationTlsConfigOutput { return v.TlsConfig }).(DomainConfigurationTlsConfigOutput) 363 } 364 365 // The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for Amazon Web Services-managed domains. 366 func (o DomainConfigurationOutput) ValidationCertificateArn() pulumi.StringPtrOutput { 367 return o.ApplyT(func(v *DomainConfiguration) pulumi.StringPtrOutput { return v.ValidationCertificateArn }).(pulumi.StringPtrOutput) 368 } 369 370 type DomainConfigurationArrayOutput struct{ *pulumi.OutputState } 371 372 func (DomainConfigurationArrayOutput) ElementType() reflect.Type { 373 return reflect.TypeOf((*[]*DomainConfiguration)(nil)).Elem() 374 } 375 376 func (o DomainConfigurationArrayOutput) ToDomainConfigurationArrayOutput() DomainConfigurationArrayOutput { 377 return o 378 } 379 380 func (o DomainConfigurationArrayOutput) ToDomainConfigurationArrayOutputWithContext(ctx context.Context) DomainConfigurationArrayOutput { 381 return o 382 } 383 384 func (o DomainConfigurationArrayOutput) Index(i pulumi.IntInput) DomainConfigurationOutput { 385 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DomainConfiguration { 386 return vs[0].([]*DomainConfiguration)[vs[1].(int)] 387 }).(DomainConfigurationOutput) 388 } 389 390 type DomainConfigurationMapOutput struct{ *pulumi.OutputState } 391 392 func (DomainConfigurationMapOutput) ElementType() reflect.Type { 393 return reflect.TypeOf((*map[string]*DomainConfiguration)(nil)).Elem() 394 } 395 396 func (o DomainConfigurationMapOutput) ToDomainConfigurationMapOutput() DomainConfigurationMapOutput { 397 return o 398 } 399 400 func (o DomainConfigurationMapOutput) ToDomainConfigurationMapOutputWithContext(ctx context.Context) DomainConfigurationMapOutput { 401 return o 402 } 403 404 func (o DomainConfigurationMapOutput) MapIndex(k pulumi.StringInput) DomainConfigurationOutput { 405 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DomainConfiguration { 406 return vs[0].(map[string]*DomainConfiguration)[vs[1].(string)] 407 }).(DomainConfigurationOutput) 408 } 409 410 func init() { 411 pulumi.RegisterInputType(reflect.TypeOf((*DomainConfigurationInput)(nil)).Elem(), &DomainConfiguration{}) 412 pulumi.RegisterInputType(reflect.TypeOf((*DomainConfigurationArrayInput)(nil)).Elem(), DomainConfigurationArray{}) 413 pulumi.RegisterInputType(reflect.TypeOf((*DomainConfigurationMapInput)(nil)).Elem(), DomainConfigurationMap{}) 414 pulumi.RegisterOutputType(DomainConfigurationOutput{}) 415 pulumi.RegisterOutputType(DomainConfigurationArrayOutput{}) 416 pulumi.RegisterOutputType(DomainConfigurationMapOutput{}) 417 }