github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/workspaces/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 workspaces 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 WorkSpaces directory in AWS WorkSpaces Service. 16 // 17 // > **NOTE:** AWS WorkSpaces service requires [`workspaces_DefaultRole`](https://docs.aws.amazon.com/workspaces/latest/adminguide/workspaces-access-control.html#create-default-role) IAM role to operate normally. 18 // 19 // ## Example Usage 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-aws/sdk/v6/go/aws/iam" 30 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/workspaces" 31 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 32 // 33 // ) 34 // 35 // func main() { 36 // pulumi.Run(func(ctx *pulumi.Context) error { 37 // exampleVpc, err := ec2.NewVpc(ctx, "example", &ec2.VpcArgs{ 38 // CidrBlock: pulumi.String("10.0.0.0/16"), 39 // }) 40 // if err != nil { 41 // return err 42 // } 43 // exampleA, err := ec2.NewSubnet(ctx, "example_a", &ec2.SubnetArgs{ 44 // VpcId: exampleVpc.ID(), 45 // AvailabilityZone: pulumi.String("us-east-1a"), 46 // CidrBlock: pulumi.String("10.0.0.0/24"), 47 // }) 48 // if err != nil { 49 // return err 50 // } 51 // exampleB, err := ec2.NewSubnet(ctx, "example_b", &ec2.SubnetArgs{ 52 // VpcId: exampleVpc.ID(), 53 // AvailabilityZone: pulumi.String("us-east-1b"), 54 // CidrBlock: pulumi.String("10.0.1.0/24"), 55 // }) 56 // if err != nil { 57 // return err 58 // } 59 // exampleDirectory, err := directoryservice.NewDirectory(ctx, "example", &directoryservice.DirectoryArgs{ 60 // Name: pulumi.String("corp.example.com"), 61 // Password: pulumi.String("#S1ncerely"), 62 // Size: pulumi.String("Small"), 63 // VpcSettings: &directoryservice.DirectoryVpcSettingsArgs{ 64 // VpcId: exampleVpc.ID(), 65 // SubnetIds: pulumi.StringArray{ 66 // exampleA.ID(), 67 // exampleB.ID(), 68 // }, 69 // }, 70 // }) 71 // if err != nil { 72 // return err 73 // } 74 // workspaces, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 75 // Statements: []iam.GetPolicyDocumentStatement{ 76 // { 77 // Actions: []string{ 78 // "sts:AssumeRole", 79 // }, 80 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 81 // { 82 // Type: "Service", 83 // Identifiers: []string{ 84 // "workspaces.amazonaws.com", 85 // }, 86 // }, 87 // }, 88 // }, 89 // }, 90 // }, nil) 91 // if err != nil { 92 // return err 93 // } 94 // workspacesDefault, err := iam.NewRole(ctx, "workspaces_default", &iam.RoleArgs{ 95 // Name: pulumi.String("workspaces_DefaultRole"), 96 // AssumeRolePolicy: pulumi.String(workspaces.Json), 97 // }) 98 // if err != nil { 99 // return err 100 // } 101 // workspacesDefaultServiceAccess, err := iam.NewRolePolicyAttachment(ctx, "workspaces_default_service_access", &iam.RolePolicyAttachmentArgs{ 102 // Role: workspacesDefault.Name, 103 // PolicyArn: pulumi.String("arn:aws:iam::aws:policy/AmazonWorkSpacesServiceAccess"), 104 // }) 105 // if err != nil { 106 // return err 107 // } 108 // workspacesDefaultSelfServiceAccess, err := iam.NewRolePolicyAttachment(ctx, "workspaces_default_self_service_access", &iam.RolePolicyAttachmentArgs{ 109 // Role: workspacesDefault.Name, 110 // PolicyArn: pulumi.String("arn:aws:iam::aws:policy/AmazonWorkSpacesSelfServiceAccess"), 111 // }) 112 // if err != nil { 113 // return err 114 // } 115 // exampleC, err := ec2.NewSubnet(ctx, "example_c", &ec2.SubnetArgs{ 116 // VpcId: exampleVpc.ID(), 117 // AvailabilityZone: pulumi.String("us-east-1c"), 118 // CidrBlock: pulumi.String("10.0.2.0/24"), 119 // }) 120 // if err != nil { 121 // return err 122 // } 123 // exampleD, err := ec2.NewSubnet(ctx, "example_d", &ec2.SubnetArgs{ 124 // VpcId: exampleVpc.ID(), 125 // AvailabilityZone: pulumi.String("us-east-1d"), 126 // CidrBlock: pulumi.String("10.0.3.0/24"), 127 // }) 128 // if err != nil { 129 // return err 130 // } 131 // _, err = workspaces.NewDirectory(ctx, "example", &workspaces.DirectoryArgs{ 132 // DirectoryId: exampleDirectory.ID(), 133 // SubnetIds: pulumi.StringArray{ 134 // exampleC.ID(), 135 // exampleD.ID(), 136 // }, 137 // Tags: pulumi.StringMap{ 138 // "Example": pulumi.String("true"), 139 // }, 140 // SelfServicePermissions: &workspaces.DirectorySelfServicePermissionsArgs{ 141 // ChangeComputeType: pulumi.Bool(true), 142 // IncreaseVolumeSize: pulumi.Bool(true), 143 // RebuildWorkspace: pulumi.Bool(true), 144 // RestartWorkspace: pulumi.Bool(true), 145 // SwitchRunningMode: pulumi.Bool(true), 146 // }, 147 // WorkspaceAccessProperties: &workspaces.DirectoryWorkspaceAccessPropertiesArgs{ 148 // DeviceTypeAndroid: pulumi.String("ALLOW"), 149 // DeviceTypeChromeos: pulumi.String("ALLOW"), 150 // DeviceTypeIos: pulumi.String("ALLOW"), 151 // DeviceTypeLinux: pulumi.String("DENY"), 152 // DeviceTypeOsx: pulumi.String("ALLOW"), 153 // DeviceTypeWeb: pulumi.String("DENY"), 154 // DeviceTypeWindows: pulumi.String("DENY"), 155 // DeviceTypeZeroclient: pulumi.String("DENY"), 156 // }, 157 // WorkspaceCreationProperties: &workspaces.DirectoryWorkspaceCreationPropertiesArgs{ 158 // CustomSecurityGroupId: pulumi.Any(exampleAwsSecurityGroup.Id), 159 // DefaultOu: pulumi.String("OU=AWS,DC=Workgroup,DC=Example,DC=com"), 160 // EnableInternetAccess: pulumi.Bool(true), 161 // EnableMaintenanceMode: pulumi.Bool(true), 162 // UserEnabledAsLocalAdministrator: pulumi.Bool(true), 163 // }, 164 // }, pulumi.DependsOn([]pulumi.Resource{ 165 // workspacesDefaultServiceAccess, 166 // workspacesDefaultSelfServiceAccess, 167 // })) 168 // if err != nil { 169 // return err 170 // } 171 // return nil 172 // }) 173 // } 174 // 175 // ``` 176 // <!--End PulumiCodeChooser --> 177 // 178 // ### IP Groups 179 // 180 // <!--Start PulumiCodeChooser --> 181 // ```go 182 // package main 183 // 184 // import ( 185 // 186 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/workspaces" 187 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 188 // 189 // ) 190 // 191 // func main() { 192 // pulumi.Run(func(ctx *pulumi.Context) error { 193 // exampleIpGroup, err := workspaces.NewIpGroup(ctx, "example", &workspaces.IpGroupArgs{ 194 // Name: pulumi.String("example"), 195 // }) 196 // if err != nil { 197 // return err 198 // } 199 // _, err = workspaces.NewDirectory(ctx, "example", &workspaces.DirectoryArgs{ 200 // DirectoryId: pulumi.Any(exampleAwsDirectoryServiceDirectory.Id), 201 // IpGroupIds: pulumi.StringArray{ 202 // exampleIpGroup.ID(), 203 // }, 204 // }) 205 // if err != nil { 206 // return err 207 // } 208 // return nil 209 // }) 210 // } 211 // 212 // ``` 213 // <!--End PulumiCodeChooser --> 214 // 215 // ## Import 216 // 217 // Using `pulumi import`, import Workspaces directory using the directory ID. For example: 218 // 219 // ```sh 220 // $ pulumi import aws:workspaces/directory:Directory main d-4444444444 221 // ``` 222 type Directory struct { 223 pulumi.CustomResourceState 224 225 // The directory alias. 226 Alias pulumi.StringOutput `pulumi:"alias"` 227 // The user name for the service account. 228 CustomerUserName pulumi.StringOutput `pulumi:"customerUserName"` 229 // The directory identifier for registration in WorkSpaces service. 230 DirectoryId pulumi.StringOutput `pulumi:"directoryId"` 231 // The name of the directory. 232 DirectoryName pulumi.StringOutput `pulumi:"directoryName"` 233 // The directory type. 234 DirectoryType pulumi.StringOutput `pulumi:"directoryType"` 235 // The IP addresses of the DNS servers for the directory. 236 DnsIpAddresses pulumi.StringArrayOutput `pulumi:"dnsIpAddresses"` 237 // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces to make calls to other services, such as Amazon EC2, on your behalf. 238 IamRoleId pulumi.StringOutput `pulumi:"iamRoleId"` 239 // The identifiers of the IP access control groups associated with the directory. 240 IpGroupIds pulumi.StringArrayOutput `pulumi:"ipGroupIds"` 241 // The registration code for the directory. This is the code that users enter in their Amazon WorkSpaces client application to connect to the directory. 242 RegistrationCode pulumi.StringOutput `pulumi:"registrationCode"` 243 // Permissions to enable or disable self-service capabilities. Defined below. 244 SelfServicePermissions DirectorySelfServicePermissionsOutput `pulumi:"selfServicePermissions"` 245 // The identifiers of the subnets where the directory resides. 246 SubnetIds pulumi.StringArrayOutput `pulumi:"subnetIds"` 247 // A map of tags assigned to the WorkSpaces directory. 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 // Specifies which devices and operating systems users can use to access their WorkSpaces. Defined below. 254 WorkspaceAccessProperties DirectoryWorkspaceAccessPropertiesOutput `pulumi:"workspaceAccessProperties"` 255 // Default properties that are used for creating WorkSpaces. Defined below. 256 WorkspaceCreationProperties DirectoryWorkspaceCreationPropertiesOutput `pulumi:"workspaceCreationProperties"` 257 // The identifier of the security group that is assigned to new WorkSpaces. 258 WorkspaceSecurityGroupId pulumi.StringOutput `pulumi:"workspaceSecurityGroupId"` 259 } 260 261 // NewDirectory registers a new resource with the given unique name, arguments, and options. 262 func NewDirectory(ctx *pulumi.Context, 263 name string, args *DirectoryArgs, opts ...pulumi.ResourceOption) (*Directory, error) { 264 if args == nil { 265 return nil, errors.New("missing one or more required arguments") 266 } 267 268 if args.DirectoryId == nil { 269 return nil, errors.New("invalid value for required argument 'DirectoryId'") 270 } 271 opts = internal.PkgResourceDefaultOpts(opts) 272 var resource Directory 273 err := ctx.RegisterResource("aws:workspaces/directory:Directory", name, args, &resource, opts...) 274 if err != nil { 275 return nil, err 276 } 277 return &resource, nil 278 } 279 280 // GetDirectory gets an existing Directory resource's state with the given name, ID, and optional 281 // state properties that are used to uniquely qualify the lookup (nil if not required). 282 func GetDirectory(ctx *pulumi.Context, 283 name string, id pulumi.IDInput, state *DirectoryState, opts ...pulumi.ResourceOption) (*Directory, error) { 284 var resource Directory 285 err := ctx.ReadResource("aws:workspaces/directory:Directory", name, id, state, &resource, opts...) 286 if err != nil { 287 return nil, err 288 } 289 return &resource, nil 290 } 291 292 // Input properties used for looking up and filtering Directory resources. 293 type directoryState struct { 294 // The directory alias. 295 Alias *string `pulumi:"alias"` 296 // The user name for the service account. 297 CustomerUserName *string `pulumi:"customerUserName"` 298 // The directory identifier for registration in WorkSpaces service. 299 DirectoryId *string `pulumi:"directoryId"` 300 // The name of the directory. 301 DirectoryName *string `pulumi:"directoryName"` 302 // The directory type. 303 DirectoryType *string `pulumi:"directoryType"` 304 // The IP addresses of the DNS servers for the directory. 305 DnsIpAddresses []string `pulumi:"dnsIpAddresses"` 306 // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces to make calls to other services, such as Amazon EC2, on your behalf. 307 IamRoleId *string `pulumi:"iamRoleId"` 308 // The identifiers of the IP access control groups associated with the directory. 309 IpGroupIds []string `pulumi:"ipGroupIds"` 310 // The registration code for the directory. This is the code that users enter in their Amazon WorkSpaces client application to connect to the directory. 311 RegistrationCode *string `pulumi:"registrationCode"` 312 // Permissions to enable or disable self-service capabilities. Defined below. 313 SelfServicePermissions *DirectorySelfServicePermissions `pulumi:"selfServicePermissions"` 314 // The identifiers of the subnets where the directory resides. 315 SubnetIds []string `pulumi:"subnetIds"` 316 // A map of tags assigned to the WorkSpaces directory. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 317 Tags map[string]string `pulumi:"tags"` 318 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 319 // 320 // Deprecated: Please use `tags` instead. 321 TagsAll map[string]string `pulumi:"tagsAll"` 322 // Specifies which devices and operating systems users can use to access their WorkSpaces. Defined below. 323 WorkspaceAccessProperties *DirectoryWorkspaceAccessProperties `pulumi:"workspaceAccessProperties"` 324 // Default properties that are used for creating WorkSpaces. Defined below. 325 WorkspaceCreationProperties *DirectoryWorkspaceCreationProperties `pulumi:"workspaceCreationProperties"` 326 // The identifier of the security group that is assigned to new WorkSpaces. 327 WorkspaceSecurityGroupId *string `pulumi:"workspaceSecurityGroupId"` 328 } 329 330 type DirectoryState struct { 331 // The directory alias. 332 Alias pulumi.StringPtrInput 333 // The user name for the service account. 334 CustomerUserName pulumi.StringPtrInput 335 // The directory identifier for registration in WorkSpaces service. 336 DirectoryId pulumi.StringPtrInput 337 // The name of the directory. 338 DirectoryName pulumi.StringPtrInput 339 // The directory type. 340 DirectoryType pulumi.StringPtrInput 341 // The IP addresses of the DNS servers for the directory. 342 DnsIpAddresses pulumi.StringArrayInput 343 // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces to make calls to other services, such as Amazon EC2, on your behalf. 344 IamRoleId pulumi.StringPtrInput 345 // The identifiers of the IP access control groups associated with the directory. 346 IpGroupIds pulumi.StringArrayInput 347 // The registration code for the directory. This is the code that users enter in their Amazon WorkSpaces client application to connect to the directory. 348 RegistrationCode pulumi.StringPtrInput 349 // Permissions to enable or disable self-service capabilities. Defined below. 350 SelfServicePermissions DirectorySelfServicePermissionsPtrInput 351 // The identifiers of the subnets where the directory resides. 352 SubnetIds pulumi.StringArrayInput 353 // A map of tags assigned to the WorkSpaces directory. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 354 Tags pulumi.StringMapInput 355 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 356 // 357 // Deprecated: Please use `tags` instead. 358 TagsAll pulumi.StringMapInput 359 // Specifies which devices and operating systems users can use to access their WorkSpaces. Defined below. 360 WorkspaceAccessProperties DirectoryWorkspaceAccessPropertiesPtrInput 361 // Default properties that are used for creating WorkSpaces. Defined below. 362 WorkspaceCreationProperties DirectoryWorkspaceCreationPropertiesPtrInput 363 // The identifier of the security group that is assigned to new WorkSpaces. 364 WorkspaceSecurityGroupId pulumi.StringPtrInput 365 } 366 367 func (DirectoryState) ElementType() reflect.Type { 368 return reflect.TypeOf((*directoryState)(nil)).Elem() 369 } 370 371 type directoryArgs struct { 372 // The directory identifier for registration in WorkSpaces service. 373 DirectoryId string `pulumi:"directoryId"` 374 // The identifiers of the IP access control groups associated with the directory. 375 IpGroupIds []string `pulumi:"ipGroupIds"` 376 // Permissions to enable or disable self-service capabilities. Defined below. 377 SelfServicePermissions *DirectorySelfServicePermissions `pulumi:"selfServicePermissions"` 378 // The identifiers of the subnets where the directory resides. 379 SubnetIds []string `pulumi:"subnetIds"` 380 // A map of tags assigned to the WorkSpaces directory. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 381 Tags map[string]string `pulumi:"tags"` 382 // Specifies which devices and operating systems users can use to access their WorkSpaces. Defined below. 383 WorkspaceAccessProperties *DirectoryWorkspaceAccessProperties `pulumi:"workspaceAccessProperties"` 384 // Default properties that are used for creating WorkSpaces. Defined below. 385 WorkspaceCreationProperties *DirectoryWorkspaceCreationProperties `pulumi:"workspaceCreationProperties"` 386 } 387 388 // The set of arguments for constructing a Directory resource. 389 type DirectoryArgs struct { 390 // The directory identifier for registration in WorkSpaces service. 391 DirectoryId pulumi.StringInput 392 // The identifiers of the IP access control groups associated with the directory. 393 IpGroupIds pulumi.StringArrayInput 394 // Permissions to enable or disable self-service capabilities. Defined below. 395 SelfServicePermissions DirectorySelfServicePermissionsPtrInput 396 // The identifiers of the subnets where the directory resides. 397 SubnetIds pulumi.StringArrayInput 398 // A map of tags assigned to the WorkSpaces directory. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 399 Tags pulumi.StringMapInput 400 // Specifies which devices and operating systems users can use to access their WorkSpaces. Defined below. 401 WorkspaceAccessProperties DirectoryWorkspaceAccessPropertiesPtrInput 402 // Default properties that are used for creating WorkSpaces. Defined below. 403 WorkspaceCreationProperties DirectoryWorkspaceCreationPropertiesPtrInput 404 } 405 406 func (DirectoryArgs) ElementType() reflect.Type { 407 return reflect.TypeOf((*directoryArgs)(nil)).Elem() 408 } 409 410 type DirectoryInput interface { 411 pulumi.Input 412 413 ToDirectoryOutput() DirectoryOutput 414 ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput 415 } 416 417 func (*Directory) ElementType() reflect.Type { 418 return reflect.TypeOf((**Directory)(nil)).Elem() 419 } 420 421 func (i *Directory) ToDirectoryOutput() DirectoryOutput { 422 return i.ToDirectoryOutputWithContext(context.Background()) 423 } 424 425 func (i *Directory) ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput { 426 return pulumi.ToOutputWithContext(ctx, i).(DirectoryOutput) 427 } 428 429 // DirectoryArrayInput is an input type that accepts DirectoryArray and DirectoryArrayOutput values. 430 // You can construct a concrete instance of `DirectoryArrayInput` via: 431 // 432 // DirectoryArray{ DirectoryArgs{...} } 433 type DirectoryArrayInput interface { 434 pulumi.Input 435 436 ToDirectoryArrayOutput() DirectoryArrayOutput 437 ToDirectoryArrayOutputWithContext(context.Context) DirectoryArrayOutput 438 } 439 440 type DirectoryArray []DirectoryInput 441 442 func (DirectoryArray) ElementType() reflect.Type { 443 return reflect.TypeOf((*[]*Directory)(nil)).Elem() 444 } 445 446 func (i DirectoryArray) ToDirectoryArrayOutput() DirectoryArrayOutput { 447 return i.ToDirectoryArrayOutputWithContext(context.Background()) 448 } 449 450 func (i DirectoryArray) ToDirectoryArrayOutputWithContext(ctx context.Context) DirectoryArrayOutput { 451 return pulumi.ToOutputWithContext(ctx, i).(DirectoryArrayOutput) 452 } 453 454 // DirectoryMapInput is an input type that accepts DirectoryMap and DirectoryMapOutput values. 455 // You can construct a concrete instance of `DirectoryMapInput` via: 456 // 457 // DirectoryMap{ "key": DirectoryArgs{...} } 458 type DirectoryMapInput interface { 459 pulumi.Input 460 461 ToDirectoryMapOutput() DirectoryMapOutput 462 ToDirectoryMapOutputWithContext(context.Context) DirectoryMapOutput 463 } 464 465 type DirectoryMap map[string]DirectoryInput 466 467 func (DirectoryMap) ElementType() reflect.Type { 468 return reflect.TypeOf((*map[string]*Directory)(nil)).Elem() 469 } 470 471 func (i DirectoryMap) ToDirectoryMapOutput() DirectoryMapOutput { 472 return i.ToDirectoryMapOutputWithContext(context.Background()) 473 } 474 475 func (i DirectoryMap) ToDirectoryMapOutputWithContext(ctx context.Context) DirectoryMapOutput { 476 return pulumi.ToOutputWithContext(ctx, i).(DirectoryMapOutput) 477 } 478 479 type DirectoryOutput struct{ *pulumi.OutputState } 480 481 func (DirectoryOutput) ElementType() reflect.Type { 482 return reflect.TypeOf((**Directory)(nil)).Elem() 483 } 484 485 func (o DirectoryOutput) ToDirectoryOutput() DirectoryOutput { 486 return o 487 } 488 489 func (o DirectoryOutput) ToDirectoryOutputWithContext(ctx context.Context) DirectoryOutput { 490 return o 491 } 492 493 // The directory alias. 494 func (o DirectoryOutput) Alias() pulumi.StringOutput { 495 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.Alias }).(pulumi.StringOutput) 496 } 497 498 // The user name for the service account. 499 func (o DirectoryOutput) CustomerUserName() pulumi.StringOutput { 500 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.CustomerUserName }).(pulumi.StringOutput) 501 } 502 503 // The directory identifier for registration in WorkSpaces service. 504 func (o DirectoryOutput) DirectoryId() pulumi.StringOutput { 505 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.DirectoryId }).(pulumi.StringOutput) 506 } 507 508 // The name of the directory. 509 func (o DirectoryOutput) DirectoryName() pulumi.StringOutput { 510 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.DirectoryName }).(pulumi.StringOutput) 511 } 512 513 // The directory type. 514 func (o DirectoryOutput) DirectoryType() pulumi.StringOutput { 515 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.DirectoryType }).(pulumi.StringOutput) 516 } 517 518 // The IP addresses of the DNS servers for the directory. 519 func (o DirectoryOutput) DnsIpAddresses() pulumi.StringArrayOutput { 520 return o.ApplyT(func(v *Directory) pulumi.StringArrayOutput { return v.DnsIpAddresses }).(pulumi.StringArrayOutput) 521 } 522 523 // The identifier of the IAM role. This is the role that allows Amazon WorkSpaces to make calls to other services, such as Amazon EC2, on your behalf. 524 func (o DirectoryOutput) IamRoleId() pulumi.StringOutput { 525 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.IamRoleId }).(pulumi.StringOutput) 526 } 527 528 // The identifiers of the IP access control groups associated with the directory. 529 func (o DirectoryOutput) IpGroupIds() pulumi.StringArrayOutput { 530 return o.ApplyT(func(v *Directory) pulumi.StringArrayOutput { return v.IpGroupIds }).(pulumi.StringArrayOutput) 531 } 532 533 // The registration code for the directory. This is the code that users enter in their Amazon WorkSpaces client application to connect to the directory. 534 func (o DirectoryOutput) RegistrationCode() pulumi.StringOutput { 535 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.RegistrationCode }).(pulumi.StringOutput) 536 } 537 538 // Permissions to enable or disable self-service capabilities. Defined below. 539 func (o DirectoryOutput) SelfServicePermissions() DirectorySelfServicePermissionsOutput { 540 return o.ApplyT(func(v *Directory) DirectorySelfServicePermissionsOutput { return v.SelfServicePermissions }).(DirectorySelfServicePermissionsOutput) 541 } 542 543 // The identifiers of the subnets where the directory resides. 544 func (o DirectoryOutput) SubnetIds() pulumi.StringArrayOutput { 545 return o.ApplyT(func(v *Directory) pulumi.StringArrayOutput { return v.SubnetIds }).(pulumi.StringArrayOutput) 546 } 547 548 // A map of tags assigned to the WorkSpaces directory. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 549 func (o DirectoryOutput) Tags() pulumi.StringMapOutput { 550 return o.ApplyT(func(v *Directory) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 551 } 552 553 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 554 // 555 // Deprecated: Please use `tags` instead. 556 func (o DirectoryOutput) TagsAll() pulumi.StringMapOutput { 557 return o.ApplyT(func(v *Directory) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 558 } 559 560 // Specifies which devices and operating systems users can use to access their WorkSpaces. Defined below. 561 func (o DirectoryOutput) WorkspaceAccessProperties() DirectoryWorkspaceAccessPropertiesOutput { 562 return o.ApplyT(func(v *Directory) DirectoryWorkspaceAccessPropertiesOutput { return v.WorkspaceAccessProperties }).(DirectoryWorkspaceAccessPropertiesOutput) 563 } 564 565 // Default properties that are used for creating WorkSpaces. Defined below. 566 func (o DirectoryOutput) WorkspaceCreationProperties() DirectoryWorkspaceCreationPropertiesOutput { 567 return o.ApplyT(func(v *Directory) DirectoryWorkspaceCreationPropertiesOutput { return v.WorkspaceCreationProperties }).(DirectoryWorkspaceCreationPropertiesOutput) 568 } 569 570 // The identifier of the security group that is assigned to new WorkSpaces. 571 func (o DirectoryOutput) WorkspaceSecurityGroupId() pulumi.StringOutput { 572 return o.ApplyT(func(v *Directory) pulumi.StringOutput { return v.WorkspaceSecurityGroupId }).(pulumi.StringOutput) 573 } 574 575 type DirectoryArrayOutput struct{ *pulumi.OutputState } 576 577 func (DirectoryArrayOutput) ElementType() reflect.Type { 578 return reflect.TypeOf((*[]*Directory)(nil)).Elem() 579 } 580 581 func (o DirectoryArrayOutput) ToDirectoryArrayOutput() DirectoryArrayOutput { 582 return o 583 } 584 585 func (o DirectoryArrayOutput) ToDirectoryArrayOutputWithContext(ctx context.Context) DirectoryArrayOutput { 586 return o 587 } 588 589 func (o DirectoryArrayOutput) Index(i pulumi.IntInput) DirectoryOutput { 590 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Directory { 591 return vs[0].([]*Directory)[vs[1].(int)] 592 }).(DirectoryOutput) 593 } 594 595 type DirectoryMapOutput struct{ *pulumi.OutputState } 596 597 func (DirectoryMapOutput) ElementType() reflect.Type { 598 return reflect.TypeOf((*map[string]*Directory)(nil)).Elem() 599 } 600 601 func (o DirectoryMapOutput) ToDirectoryMapOutput() DirectoryMapOutput { 602 return o 603 } 604 605 func (o DirectoryMapOutput) ToDirectoryMapOutputWithContext(ctx context.Context) DirectoryMapOutput { 606 return o 607 } 608 609 func (o DirectoryMapOutput) MapIndex(k pulumi.StringInput) DirectoryOutput { 610 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Directory { 611 return vs[0].(map[string]*Directory)[vs[1].(string)] 612 }).(DirectoryOutput) 613 } 614 615 func init() { 616 pulumi.RegisterInputType(reflect.TypeOf((*DirectoryInput)(nil)).Elem(), &Directory{}) 617 pulumi.RegisterInputType(reflect.TypeOf((*DirectoryArrayInput)(nil)).Elem(), DirectoryArray{}) 618 pulumi.RegisterInputType(reflect.TypeOf((*DirectoryMapInput)(nil)).Elem(), DirectoryMap{}) 619 pulumi.RegisterOutputType(DirectoryOutput{}) 620 pulumi.RegisterOutputType(DirectoryArrayOutput{}) 621 pulumi.RegisterOutputType(DirectoryMapOutput{}) 622 }