github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/directoryservice/directory.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 directoryservice 5 6 import ( 7 "context" 8 "reflect" 9 10 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides a Simple or Managed Microsoft directory in AWS Directory Service. 16 // 17 // ## Example Usage 18 // 19 // ### SimpleAD 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directoryservice" 28 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 29 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 30 // 31 // ) 32 // 33 // func main() { 34 // pulumi.Run(func(ctx *pulumi.Context) error { 35 // main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ 36 // CidrBlock: pulumi.String("10.0.0.0/16"), 37 // }) 38 // if err != nil { 39 // return err 40 // } 41 // foo, err := ec2.NewSubnet(ctx, "foo", &ec2.SubnetArgs{ 42 // VpcId: main.ID(), 43 // AvailabilityZone: pulumi.String("us-west-2a"), 44 // CidrBlock: pulumi.String("10.0.1.0/24"), 45 // }) 46 // if err != nil { 47 // return err 48 // } 49 // barSubnet, err := ec2.NewSubnet(ctx, "bar", &ec2.SubnetArgs{ 50 // VpcId: main.ID(), 51 // AvailabilityZone: pulumi.String("us-west-2b"), 52 // CidrBlock: pulumi.String("10.0.2.0/24"), 53 // }) 54 // if err != nil { 55 // return err 56 // } 57 // _, err = directoryservice.NewDirectory(ctx, "bar", &directoryservice.DirectoryArgs{ 58 // Name: pulumi.String("corp.notexample.com"), 59 // Password: pulumi.String("SuperSecretPassw0rd"), 60 // Size: pulumi.String("Small"), 61 // VpcSettings: &directoryservice.DirectoryVpcSettingsArgs{ 62 // VpcId: main.ID(), 63 // SubnetIds: pulumi.StringArray{ 64 // foo.ID(), 65 // barSubnet.ID(), 66 // }, 67 // }, 68 // Tags: pulumi.StringMap{ 69 // "Project": pulumi.String("foo"), 70 // }, 71 // }) 72 // if err != nil { 73 // return err 74 // } 75 // return nil 76 // }) 77 // } 78 // 79 // ``` 80 // <!--End PulumiCodeChooser --> 81 // 82 // ### Microsoft Active Directory (MicrosoftAD) 83 // 84 // <!--Start PulumiCodeChooser --> 85 // ```go 86 // package main 87 // 88 // import ( 89 // 90 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directoryservice" 91 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 92 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 93 // 94 // ) 95 // 96 // func main() { 97 // pulumi.Run(func(ctx *pulumi.Context) error { 98 // main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ 99 // CidrBlock: pulumi.String("10.0.0.0/16"), 100 // }) 101 // if err != nil { 102 // return err 103 // } 104 // foo, err := ec2.NewSubnet(ctx, "foo", &ec2.SubnetArgs{ 105 // VpcId: main.ID(), 106 // AvailabilityZone: pulumi.String("us-west-2a"), 107 // CidrBlock: pulumi.String("10.0.1.0/24"), 108 // }) 109 // if err != nil { 110 // return err 111 // } 112 // barSubnet, err := ec2.NewSubnet(ctx, "bar", &ec2.SubnetArgs{ 113 // VpcId: main.ID(), 114 // AvailabilityZone: pulumi.String("us-west-2b"), 115 // CidrBlock: pulumi.String("10.0.2.0/24"), 116 // }) 117 // if err != nil { 118 // return err 119 // } 120 // _, err = directoryservice.NewDirectory(ctx, "bar", &directoryservice.DirectoryArgs{ 121 // Name: pulumi.String("corp.notexample.com"), 122 // Password: pulumi.String("SuperSecretPassw0rd"), 123 // Edition: pulumi.String("Standard"), 124 // Type: pulumi.String("MicrosoftAD"), 125 // VpcSettings: &directoryservice.DirectoryVpcSettingsArgs{ 126 // VpcId: main.ID(), 127 // SubnetIds: pulumi.StringArray{ 128 // foo.ID(), 129 // barSubnet.ID(), 130 // }, 131 // }, 132 // Tags: pulumi.StringMap{ 133 // "Project": pulumi.String("foo"), 134 // }, 135 // }) 136 // if err != nil { 137 // return err 138 // } 139 // return nil 140 // }) 141 // } 142 // 143 // ``` 144 // <!--End PulumiCodeChooser --> 145 // 146 // ### Microsoft Active Directory Connector (ADConnector) 147 // 148 // <!--Start PulumiCodeChooser --> 149 // ```go 150 // package main 151 // 152 // import ( 153 // 154 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/directoryservice" 155 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 156 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 157 // 158 // ) 159 // 160 // func main() { 161 // pulumi.Run(func(ctx *pulumi.Context) error { 162 // main, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ 163 // CidrBlock: pulumi.String("10.0.0.0/16"), 164 // }) 165 // if err != nil { 166 // return err 167 // } 168 // foo, err := ec2.NewSubnet(ctx, "foo", &ec2.SubnetArgs{ 169 // VpcId: main.ID(), 170 // AvailabilityZone: pulumi.String("us-west-2a"), 171 // CidrBlock: pulumi.String("10.0.1.0/24"), 172 // }) 173 // if err != nil { 174 // return err 175 // } 176 // bar, err := ec2.NewSubnet(ctx, "bar", &ec2.SubnetArgs{ 177 // VpcId: main.ID(), 178 // AvailabilityZone: pulumi.String("us-west-2b"), 179 // CidrBlock: pulumi.String("10.0.2.0/24"), 180 // }) 181 // if err != nil { 182 // return err 183 // } 184 // _, err = directoryservice.NewDirectory(ctx, "connector", &directoryservice.DirectoryArgs{ 185 // Name: pulumi.String("corp.notexample.com"), 186 // Password: pulumi.String("SuperSecretPassw0rd"), 187 // Size: pulumi.String("Small"), 188 // Type: pulumi.String("ADConnector"), 189 // ConnectSettings: &directoryservice.DirectoryConnectSettingsArgs{ 190 // CustomerDnsIps: pulumi.StringArray{ 191 // pulumi.String("A.B.C.D"), 192 // }, 193 // CustomerUsername: pulumi.String("Admin"), 194 // SubnetIds: pulumi.StringArray{ 195 // foo.ID(), 196 // bar.ID(), 197 // }, 198 // VpcId: main.ID(), 199 // }, 200 // }) 201 // if err != nil { 202 // return err 203 // } 204 // return nil 205 // }) 206 // } 207 // 208 // ``` 209 // <!--End PulumiCodeChooser --> 210 // 211 // ## Import 212 // 213 // Using `pulumi import`, import DirectoryService directories using the directory `id`. For example: 214 // 215 // ```sh 216 // $ pulumi import aws:directoryservice/directory:Directory sample d-926724cf57 217 // ``` 218 type Directory struct { 219 pulumi.CustomResourceState 220 221 // The access URL for the directory, such as `http://alias.awsapps.com`. 222 AccessUrl pulumi.StringOutput `pulumi:"accessUrl"` 223 // The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`. 224 Alias pulumi.StringOutput `pulumi:"alias"` 225 // Connector related information about the directory. Fields documented below. 226 ConnectSettings DirectoryConnectSettingsPtrOutput `pulumi:"connectSettings"` 227 // A textual description for the directory. 228 Description pulumi.StringPtrOutput `pulumi:"description"` 229 // The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories. 230 DesiredNumberOfDomainControllers pulumi.IntOutput `pulumi:"desiredNumberOfDomainControllers"` 231 // A list of IP addresses of the DNS servers for the directory or connector. 232 DnsIpAddresses pulumi.StringArrayOutput `pulumi:"dnsIpAddresses"` 233 // The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`. 234 Edition pulumi.StringOutput `pulumi:"edition"` 235 // Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`. 236 EnableSso pulumi.BoolPtrOutput `pulumi:"enableSso"` 237 // The fully qualified name for the directory, such as `corp.example.com` 238 Name pulumi.StringOutput `pulumi:"name"` 239 // The password for the directory administrator or connector user. 240 Password pulumi.StringOutput `pulumi:"password"` 241 // The ID of the security group created by the directory. 242 SecurityGroupId pulumi.StringOutput `pulumi:"securityGroupId"` 243 // The short name of the directory, such as `CORP`. 244 ShortName pulumi.StringOutput `pulumi:"shortName"` 245 // (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default. 246 Size pulumi.StringOutput `pulumi:"size"` 247 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 248 Tags pulumi.StringMapOutput `pulumi:"tags"` 249 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 250 // 251 // Deprecated: Please use `tags` instead. 252 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 253 // The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`. 254 Type pulumi.StringPtrOutput `pulumi:"type"` 255 // VPC related information about the directory. Fields documented below. 256 VpcSettings DirectoryVpcSettingsPtrOutput `pulumi:"vpcSettings"` 257 } 258 259 // NewDirectory registers a new resource with the given unique name, arguments, and options. 260 func NewDirectory(ctx *pulumi.Context, 261 name string, args *DirectoryArgs, opts ...pulumi.ResourceOption) (*Directory, error) { 262 if args == nil { 263 return nil, errors.New("missing one or more required arguments") 264 } 265 266 if args.Name == nil { 267 return nil, errors.New("invalid value for required argument 'Name'") 268 } 269 if args.Password == nil { 270 return nil, errors.New("invalid value for required argument 'Password'") 271 } 272 if args.Password != nil { 273 args.Password = pulumi.ToSecret(args.Password).(pulumi.StringInput) 274 } 275 secrets := pulumi.AdditionalSecretOutputs([]string{ 276 "password", 277 }) 278 opts = append(opts, secrets) 279 opts = internal.PkgResourceDefaultOpts(opts) 280 var resource Directory 281 err := ctx.RegisterResource("aws:directoryservice/directory:Directory", name, args, &resource, opts...) 282 if err != nil { 283 return nil, err 284 } 285 return &resource, nil 286 } 287 288 // GetDirectory gets an existing Directory resource's state with the given name, ID, and optional 289 // state properties that are used to uniquely qualify the lookup (nil if not required). 290 func GetDirectory(ctx *pulumi.Context, 291 name string, id pulumi.IDInput, state *DirectoryState, opts ...pulumi.ResourceOption) (*Directory, error) { 292 var resource Directory 293 err := ctx.ReadResource("aws:directoryservice/directory:Directory", name, id, state, &resource, opts...) 294 if err != nil { 295 return nil, err 296 } 297 return &resource, nil 298 } 299 300 // Input properties used for looking up and filtering Directory resources. 301 type directoryState struct { 302 // The access URL for the directory, such as `http://alias.awsapps.com`. 303 AccessUrl *string `pulumi:"accessUrl"` 304 // The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`. 305 Alias *string `pulumi:"alias"` 306 // Connector related information about the directory. Fields documented below. 307 ConnectSettings *DirectoryConnectSettings `pulumi:"connectSettings"` 308 // A textual description for the directory. 309 Description *string `pulumi:"description"` 310 // The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories. 311 DesiredNumberOfDomainControllers *int `pulumi:"desiredNumberOfDomainControllers"` 312 // A list of IP addresses of the DNS servers for the directory or connector. 313 DnsIpAddresses []string `pulumi:"dnsIpAddresses"` 314 // The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`. 315 Edition *string `pulumi:"edition"` 316 // Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`. 317 EnableSso *bool `pulumi:"enableSso"` 318 // The fully qualified name for the directory, such as `corp.example.com` 319 Name *string `pulumi:"name"` 320 // The password for the directory administrator or connector user. 321 Password *string `pulumi:"password"` 322 // The ID of the security group created by the directory. 323 SecurityGroupId *string `pulumi:"securityGroupId"` 324 // The short name of the directory, such as `CORP`. 325 ShortName *string `pulumi:"shortName"` 326 // (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default. 327 Size *string `pulumi:"size"` 328 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 329 Tags map[string]string `pulumi:"tags"` 330 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 331 // 332 // Deprecated: Please use `tags` instead. 333 TagsAll map[string]string `pulumi:"tagsAll"` 334 // The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`. 335 Type *string `pulumi:"type"` 336 // VPC related information about the directory. Fields documented below. 337 VpcSettings *DirectoryVpcSettings `pulumi:"vpcSettings"` 338 } 339 340 type DirectoryState struct { 341 // The access URL for the directory, such as `http://alias.awsapps.com`. 342 AccessUrl pulumi.StringPtrInput 343 // The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`. 344 Alias pulumi.StringPtrInput 345 // Connector related information about the directory. Fields documented below. 346 ConnectSettings DirectoryConnectSettingsPtrInput 347 // A textual description for the directory. 348 Description pulumi.StringPtrInput 349 // The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories. 350 DesiredNumberOfDomainControllers pulumi.IntPtrInput 351 // A list of IP addresses of the DNS servers for the directory or connector. 352 DnsIpAddresses pulumi.StringArrayInput 353 // The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`. 354 Edition pulumi.StringPtrInput 355 // Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`. 356 EnableSso pulumi.BoolPtrInput 357 // The fully qualified name for the directory, such as `corp.example.com` 358 Name pulumi.StringPtrInput 359 // The password for the directory administrator or connector user. 360 Password pulumi.StringPtrInput 361 // The ID of the security group created by the directory. 362 SecurityGroupId pulumi.StringPtrInput 363 // The short name of the directory, such as `CORP`. 364 ShortName pulumi.StringPtrInput 365 // (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default. 366 Size pulumi.StringPtrInput 367 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 368 Tags pulumi.StringMapInput 369 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 370 // 371 // Deprecated: Please use `tags` instead. 372 TagsAll pulumi.StringMapInput 373 // The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`. 374 Type pulumi.StringPtrInput 375 // VPC related information about the directory. Fields documented below. 376 VpcSettings DirectoryVpcSettingsPtrInput 377 } 378 379 func (DirectoryState) ElementType() reflect.Type { 380 return reflect.TypeOf((*directoryState)(nil)).Elem() 381 } 382 383 type directoryArgs struct { 384 // The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`. 385 Alias *string `pulumi:"alias"` 386 // Connector related information about the directory. Fields documented below. 387 ConnectSettings *DirectoryConnectSettings `pulumi:"connectSettings"` 388 // A textual description for the directory. 389 Description *string `pulumi:"description"` 390 // The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories. 391 DesiredNumberOfDomainControllers *int `pulumi:"desiredNumberOfDomainControllers"` 392 // The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`. 393 Edition *string `pulumi:"edition"` 394 // Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`. 395 EnableSso *bool `pulumi:"enableSso"` 396 // The fully qualified name for the directory, such as `corp.example.com` 397 Name string `pulumi:"name"` 398 // The password for the directory administrator or connector user. 399 Password string `pulumi:"password"` 400 // The short name of the directory, such as `CORP`. 401 ShortName *string `pulumi:"shortName"` 402 // (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default. 403 Size *string `pulumi:"size"` 404 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 405 Tags map[string]string `pulumi:"tags"` 406 // The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`. 407 Type *string `pulumi:"type"` 408 // VPC related information about the directory. Fields documented below. 409 VpcSettings *DirectoryVpcSettings `pulumi:"vpcSettings"` 410 } 411 412 // The set of arguments for constructing a Directory resource. 413 type DirectoryArgs struct { 414 // The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`. 415 Alias pulumi.StringPtrInput 416 // Connector related information about the directory. Fields documented below. 417 ConnectSettings DirectoryConnectSettingsPtrInput 418 // A textual description for the directory. 419 Description pulumi.StringPtrInput 420 // The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories. 421 DesiredNumberOfDomainControllers pulumi.IntPtrInput 422 // The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`. 423 Edition pulumi.StringPtrInput 424 // Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`. 425 EnableSso pulumi.BoolPtrInput 426 // The fully qualified name for the directory, such as `corp.example.com` 427 Name pulumi.StringInput 428 // The password for the directory administrator or connector user. 429 Password pulumi.StringInput 430 // The short name of the directory, such as `CORP`. 431 ShortName pulumi.StringPtrInput 432 // (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default. 433 Size pulumi.StringPtrInput 434 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 435 Tags pulumi.StringMapInput 436 // The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`. 437 Type pulumi.StringPtrInput 438 // VPC related information about the directory. Fields documented below. 439 VpcSettings DirectoryVpcSettingsPtrInput 440 } 441 442 func (DirectoryArgs) ElementType() reflect.Type { 443 return reflect.TypeOf((*directoryArgs)(nil)).Elem() 444 } 445 446 type DirectoryInput interface { 447 pulumi.Input 448 449 ToDirectoryOutput() DirectoryOutput 450 ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput 451 } 452 453 func (*Directory) ElementType() reflect.Type { 454 return reflect.TypeOf((**Directory)(nil)).Elem() 455 } 456 457 func (i *Directory) ToDirectoryOutput() DirectoryOutput { 458 return i.ToDirectoryOutputWithContext(context.Background()) 459 } 460 461 func (i *Directory) ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput { 462 return pulumi.ToOutputWithContext(ctx, i).(DirectoryOutput) 463 } 464 465 // DirectoryArrayInput is an input type that accepts DirectoryArray and DirectoryArrayOutput values. 466 // You can construct a concrete instance of `DirectoryArrayInput` via: 467 // 468 // DirectoryArray{ DirectoryArgs{...} } 469 type DirectoryArrayInput interface { 470 pulumi.Input 471 472 ToDirectoryArrayOutput() DirectoryArrayOutput 473 ToDirectoryArrayOutputWithContext(context.Context) DirectoryArrayOutput 474 } 475 476 type DirectoryArray []DirectoryInput 477 478 func (DirectoryArray) ElementType() reflect.Type { 479 return reflect.TypeOf((*[]*Directory)(nil)).Elem() 480 } 481 482 func (i DirectoryArray) ToDirectoryArrayOutput() DirectoryArrayOutput { 483 return i.ToDirectoryArrayOutputWithContext(context.Background()) 484 } 485 486 func (i DirectoryArray) ToDirectoryArrayOutputWithContext(ctx context.Context) DirectoryArrayOutput { 487 return pulumi.ToOutputWithContext(ctx, i).(DirectoryArrayOutput) 488 } 489 490 // DirectoryMapInput is an input type that accepts DirectoryMap and DirectoryMapOutput values. 491 // You can construct a concrete instance of `DirectoryMapInput` via: 492 // 493 // DirectoryMap{ "key": DirectoryArgs{...} } 494 type DirectoryMapInput interface { 495 pulumi.Input 496 497 ToDirectoryMapOutput() DirectoryMapOutput 498 ToDirectoryMapOutputWithContext(context.Context) DirectoryMapOutput 499 } 500 501 type DirectoryMap map[string]DirectoryInput 502 503 func (DirectoryMap) ElementType() reflect.Type { 504 return reflect.TypeOf((*map[string]*Directory)(nil)).Elem() 505 } 506 507 func (i DirectoryMap) ToDirectoryMapOutput() DirectoryMapOutput { 508 return i.ToDirectoryMapOutputWithContext(context.Background()) 509 } 510 511 func (i DirectoryMap) ToDirectoryMapOutputWithContext(ctx context.Context) DirectoryMapOutput { 512 return pulumi.ToOutputWithContext(ctx, i).(DirectoryMapOutput) 513 } 514 515 type DirectoryOutput struct{ *pulumi.OutputState } 516 517 func (DirectoryOutput) ElementType() reflect.Type { 518 return reflect.TypeOf((**Directory)(nil)).Elem() 519 } 520 521 func (o DirectoryOutput) ToDirectoryOutput() DirectoryOutput { 522 return o 523 } 524 525 func (o DirectoryOutput) ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput { 526 return o 527 } 528 529 // The access URL for the directory, such as `http://alias.awsapps.com`. 530 func (o DirectoryOutput) AccessUrl() pulumi.StringOutput { 531 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.AccessUrl }).(pulumi.StringOutput) 532 } 533 534 // The alias for the directory (must be unique amongst all aliases in AWS). Required for `enableSso`. 535 func (o DirectoryOutput) Alias() pulumi.StringOutput { 536 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.Alias }).(pulumi.StringOutput) 537 } 538 539 // Connector related information about the directory. Fields documented below. 540 func (o DirectoryOutput) ConnectSettings() DirectoryConnectSettingsPtrOutput { 541 return o.ApplyT(func(v *Directory) DirectoryConnectSettingsPtrOutput { return v.ConnectSettings }).(DirectoryConnectSettingsPtrOutput) 542 } 543 544 // A textual description for the directory. 545 func (o DirectoryOutput) Description() pulumi.StringPtrOutput { 546 return o.ApplyT(func(v *Directory) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 547 } 548 549 // The number of domain controllers desired in the directory. Minimum value of `2`. Scaling of domain controllers is only supported for `MicrosoftAD` directories. 550 func (o DirectoryOutput) DesiredNumberOfDomainControllers() pulumi.IntOutput { 551 return o.ApplyT(func(v *Directory) pulumi.IntOutput { return v.DesiredNumberOfDomainControllers }).(pulumi.IntOutput) 552 } 553 554 // A list of IP addresses of the DNS servers for the directory or connector. 555 func (o DirectoryOutput) DnsIpAddresses() pulumi.StringArrayOutput { 556 return o.ApplyT(func(v *Directory) pulumi.StringArrayOutput { return v.DnsIpAddresses }).(pulumi.StringArrayOutput) 557 } 558 559 // The MicrosoftAD edition (`Standard` or `Enterprise`). Defaults to `Enterprise`. 560 func (o DirectoryOutput) Edition() pulumi.StringOutput { 561 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.Edition }).(pulumi.StringOutput) 562 } 563 564 // Whether to enable single-sign on for the directory. Requires `alias`. Defaults to `false`. 565 func (o DirectoryOutput) EnableSso() pulumi.BoolPtrOutput { 566 return o.ApplyT(func(v *Directory) pulumi.BoolPtrOutput { return v.EnableSso }).(pulumi.BoolPtrOutput) 567 } 568 569 // The fully qualified name for the directory, such as `corp.example.com` 570 func (o DirectoryOutput) Name() pulumi.StringOutput { 571 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 572 } 573 574 // The password for the directory administrator or connector user. 575 func (o DirectoryOutput) Password() pulumi.StringOutput { 576 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.Password }).(pulumi.StringOutput) 577 } 578 579 // The ID of the security group created by the directory. 580 func (o DirectoryOutput) SecurityGroupId() pulumi.StringOutput { 581 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.SecurityGroupId }).(pulumi.StringOutput) 582 } 583 584 // The short name of the directory, such as `CORP`. 585 func (o DirectoryOutput) ShortName() pulumi.StringOutput { 586 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.ShortName }).(pulumi.StringOutput) 587 } 588 589 // (For `SimpleAD` and `ADConnector` types) The size of the directory (`Small` or `Large` are accepted values). `Large` by default. 590 func (o DirectoryOutput) Size() pulumi.StringOutput { 591 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.Size }).(pulumi.StringOutput) 592 } 593 594 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 595 func (o DirectoryOutput) Tags() pulumi.StringMapOutput { 596 return o.ApplyT(func(v *Directory) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 597 } 598 599 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 600 // 601 // Deprecated: Please use `tags` instead. 602 func (o DirectoryOutput) TagsAll() pulumi.StringMapOutput { 603 return o.ApplyT(func(v *Directory) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 604 } 605 606 // The directory type (`SimpleAD`, `ADConnector` or `MicrosoftAD` are accepted values). Defaults to `SimpleAD`. 607 func (o DirectoryOutput) Type() pulumi.StringPtrOutput { 608 return o.ApplyT(func(v *Directory) pulumi.StringPtrOutput { return v.Type }).(pulumi.StringPtrOutput) 609 } 610 611 // VPC related information about the directory. Fields documented below. 612 func (o DirectoryOutput) VpcSettings() DirectoryVpcSettingsPtrOutput { 613 return o.ApplyT(func(v *Directory) DirectoryVpcSettingsPtrOutput { return v.VpcSettings }).(DirectoryVpcSettingsPtrOutput) 614 } 615 616 type DirectoryArrayOutput struct{ *pulumi.OutputState } 617 618 func (DirectoryArrayOutput) ElementType() reflect.Type { 619 return reflect.TypeOf((*[]*Directory)(nil)).Elem() 620 } 621 622 func (o DirectoryArrayOutput) ToDirectoryArrayOutput() DirectoryArrayOutput { 623 return o 624 } 625 626 func (o DirectoryArrayOutput) ToDirectoryArrayOutputWithContext(ctx context.Context) DirectoryArrayOutput { 627 return o 628 } 629 630 func (o DirectoryArrayOutput) Index(i pulumi.IntInput) DirectoryOutput { 631 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Directory { 632 return vs[0].([]*Directory)[vs[1].(int)] 633 }).(DirectoryOutput) 634 } 635 636 type DirectoryMapOutput struct{ *pulumi.OutputState } 637 638 func (DirectoryMapOutput) ElementType() reflect.Type { 639 return reflect.TypeOf((*map[string]*Directory)(nil)).Elem() 640 } 641 642 func (o DirectoryMapOutput) ToDirectoryMapOutput() DirectoryMapOutput { 643 return o 644 } 645 646 func (o DirectoryMapOutput) ToDirectoryMapOutputWithContext(ctx context.Context) DirectoryMapOutput { 647 return o 648 } 649 650 func (o DirectoryMapOutput) MapIndex(k pulumi.StringInput) DirectoryOutput { 651 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Directory { 652 return vs[0].(map[string]*Directory)[vs[1].(string)] 653 }).(DirectoryOutput) 654 } 655 656 func init() { 657 pulumi.RegisterInputType(reflect.TypeOf((*DirectoryInput)(nil)).Elem(), &Directory{}) 658 pulumi.RegisterInputType(reflect.TypeOf((*DirectoryArrayInput)(nil)).Elem(), DirectoryArray{}) 659 pulumi.RegisterInputType(reflect.TypeOf((*DirectoryMapInput)(nil)).Elem(), DirectoryMap{}) 660 pulumi.RegisterOutputType(DirectoryOutput{}) 661 pulumi.RegisterOutputType(DirectoryArrayOutput{}) 662 pulumi.RegisterOutputType(DirectoryMapOutput{}) 663 }