github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/worklink/fleet.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 worklink 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 // Basic usage: 17 // 18 // <!--Start PulumiCodeChooser --> 19 // ```go 20 // package main 21 // 22 // import ( 23 // 24 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/worklink" 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 := worklink.NewFleet(ctx, "example", &worklink.FleetArgs{ 32 // Name: pulumi.String("example"), 33 // }) 34 // if err != nil { 35 // return err 36 // } 37 // return nil 38 // }) 39 // } 40 // 41 // ``` 42 // <!--End PulumiCodeChooser --> 43 // 44 // Network Configuration Usage: 45 // 46 // <!--Start PulumiCodeChooser --> 47 // ```go 48 // package main 49 // 50 // import ( 51 // 52 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/worklink" 53 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 54 // 55 // ) 56 // func main() { 57 // pulumi.Run(func(ctx *pulumi.Context) error { 58 // _, err := worklink.NewFleet(ctx, "example", &worklink.FleetArgs{ 59 // Name: pulumi.String("example"), 60 // Network: &worklink.FleetNetworkArgs{ 61 // VpcId: pulumi.Any(testAwsVpc.Id), 62 // SubnetIds: pulumi.StringArray{ 63 // %!v(PANIC=Format method: fatal: A failure has occurred: unlowered splat expression @ example.pp:4,25-44), 64 // }, 65 // SecurityGroupIds: pulumi.StringArray{ 66 // test.Id, 67 // }, 68 // }, 69 // }) 70 // if err != nil { 71 // return err 72 // } 73 // return nil 74 // }) 75 // } 76 // ``` 77 // <!--End PulumiCodeChooser --> 78 // 79 // Identity Provider Configuration Usage: 80 // 81 // <!--Start PulumiCodeChooser --> 82 // ```go 83 // package main 84 // 85 // import ( 86 // 87 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/worklink" 88 // "github.com/pulumi/pulumi-std/sdk/go/std" 89 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 90 // 91 // ) 92 // 93 // func main() { 94 // pulumi.Run(func(ctx *pulumi.Context) error { 95 // invokeFile, err := std.File(ctx, &std.FileArgs{ 96 // Input: "saml-metadata.xml", 97 // }, nil) 98 // if err != nil { 99 // return err 100 // } 101 // _, err = worklink.NewFleet(ctx, "test", &worklink.FleetArgs{ 102 // Name: pulumi.String("tf-worklink-fleet"), 103 // IdentityProvider: &worklink.FleetIdentityProviderArgs{ 104 // Type: pulumi.String("SAML"), 105 // SamlMetadata: invokeFile.Result, 106 // }, 107 // }) 108 // if err != nil { 109 // return err 110 // } 111 // return nil 112 // }) 113 // } 114 // 115 // ``` 116 // <!--End PulumiCodeChooser --> 117 // 118 // ## Import 119 // 120 // Using `pulumi import`, import WorkLink using the ARN. For example: 121 // 122 // ```sh 123 // $ pulumi import aws:worklink/fleet:Fleet test arn:aws:worklink::123456789012:fleet/example 124 // ``` 125 type Fleet struct { 126 pulumi.CustomResourceState 127 128 // The ARN of the created WorkLink Fleet. 129 Arn pulumi.StringOutput `pulumi:"arn"` 130 // The ARN of the Amazon Kinesis data stream that receives the audit events. Kinesis data stream name must begin with `"AmazonWorkLink-"`. 131 AuditStreamArn pulumi.StringPtrOutput `pulumi:"auditStreamArn"` 132 // The identifier used by users to sign in to the Amazon WorkLink app. 133 CompanyCode pulumi.StringOutput `pulumi:"companyCode"` 134 // The time that the fleet was created. 135 CreatedTime pulumi.StringOutput `pulumi:"createdTime"` 136 // The certificate chain, including intermediate certificates and the root certificate authority certificate used to issue device certificates. 137 DeviceCaCertificate pulumi.StringPtrOutput `pulumi:"deviceCaCertificate"` 138 // The name of the fleet. 139 DisplayName pulumi.StringPtrOutput `pulumi:"displayName"` 140 // Provide this to allow manage the identity provider configuration for the fleet. Fields documented below. 141 IdentityProvider FleetIdentityProviderPtrOutput `pulumi:"identityProvider"` 142 // The time that the fleet was last updated. 143 LastUpdatedTime pulumi.StringOutput `pulumi:"lastUpdatedTime"` 144 // A region-unique name for the AMI. 145 Name pulumi.StringOutput `pulumi:"name"` 146 // Provide this to allow manage the company network configuration for the fleet. Fields documented below. 147 Network FleetNetworkPtrOutput `pulumi:"network"` 148 // The option to optimize for better performance by routing traffic through the closest AWS Region to users, which may be outside of your home Region. Defaults to `true`. 149 // 150 // **network** requires the following: 151 // 152 // > **NOTE:** `network` is cannot removed without force recreating. 153 OptimizeForEndUserLocation pulumi.BoolPtrOutput `pulumi:"optimizeForEndUserLocation"` 154 } 155 156 // NewFleet registers a new resource with the given unique name, arguments, and options. 157 func NewFleet(ctx *pulumi.Context, 158 name string, args *FleetArgs, opts ...pulumi.ResourceOption) (*Fleet, error) { 159 if args == nil { 160 args = &FleetArgs{} 161 } 162 163 opts = internal.PkgResourceDefaultOpts(opts) 164 var resource Fleet 165 err := ctx.RegisterResource("aws:worklink/fleet:Fleet", name, args, &resource, opts...) 166 if err != nil { 167 return nil, err 168 } 169 return &resource, nil 170 } 171 172 // GetFleet gets an existing Fleet resource's state with the given name, ID, and optional 173 // state properties that are used to uniquely qualify the lookup (nil if not required). 174 func GetFleet(ctx *pulumi.Context, 175 name string, id pulumi.IDInput, state *FleetState, opts ...pulumi.ResourceOption) (*Fleet, error) { 176 var resource Fleet 177 err := ctx.ReadResource("aws:worklink/fleet:Fleet", name, id, state, &resource, opts...) 178 if err != nil { 179 return nil, err 180 } 181 return &resource, nil 182 } 183 184 // Input properties used for looking up and filtering Fleet resources. 185 type fleetState struct { 186 // The ARN of the created WorkLink Fleet. 187 Arn *string `pulumi:"arn"` 188 // The ARN of the Amazon Kinesis data stream that receives the audit events. Kinesis data stream name must begin with `"AmazonWorkLink-"`. 189 AuditStreamArn *string `pulumi:"auditStreamArn"` 190 // The identifier used by users to sign in to the Amazon WorkLink app. 191 CompanyCode *string `pulumi:"companyCode"` 192 // The time that the fleet was created. 193 CreatedTime *string `pulumi:"createdTime"` 194 // The certificate chain, including intermediate certificates and the root certificate authority certificate used to issue device certificates. 195 DeviceCaCertificate *string `pulumi:"deviceCaCertificate"` 196 // The name of the fleet. 197 DisplayName *string `pulumi:"displayName"` 198 // Provide this to allow manage the identity provider configuration for the fleet. Fields documented below. 199 IdentityProvider *FleetIdentityProvider `pulumi:"identityProvider"` 200 // The time that the fleet was last updated. 201 LastUpdatedTime *string `pulumi:"lastUpdatedTime"` 202 // A region-unique name for the AMI. 203 Name *string `pulumi:"name"` 204 // Provide this to allow manage the company network configuration for the fleet. Fields documented below. 205 Network *FleetNetwork `pulumi:"network"` 206 // The option to optimize for better performance by routing traffic through the closest AWS Region to users, which may be outside of your home Region. Defaults to `true`. 207 // 208 // **network** requires the following: 209 // 210 // > **NOTE:** `network` is cannot removed without force recreating. 211 OptimizeForEndUserLocation *bool `pulumi:"optimizeForEndUserLocation"` 212 } 213 214 type FleetState struct { 215 // The ARN of the created WorkLink Fleet. 216 Arn pulumi.StringPtrInput 217 // The ARN of the Amazon Kinesis data stream that receives the audit events. Kinesis data stream name must begin with `"AmazonWorkLink-"`. 218 AuditStreamArn pulumi.StringPtrInput 219 // The identifier used by users to sign in to the Amazon WorkLink app. 220 CompanyCode pulumi.StringPtrInput 221 // The time that the fleet was created. 222 CreatedTime pulumi.StringPtrInput 223 // The certificate chain, including intermediate certificates and the root certificate authority certificate used to issue device certificates. 224 DeviceCaCertificate pulumi.StringPtrInput 225 // The name of the fleet. 226 DisplayName pulumi.StringPtrInput 227 // Provide this to allow manage the identity provider configuration for the fleet. Fields documented below. 228 IdentityProvider FleetIdentityProviderPtrInput 229 // The time that the fleet was last updated. 230 LastUpdatedTime pulumi.StringPtrInput 231 // A region-unique name for the AMI. 232 Name pulumi.StringPtrInput 233 // Provide this to allow manage the company network configuration for the fleet. Fields documented below. 234 Network FleetNetworkPtrInput 235 // The option to optimize for better performance by routing traffic through the closest AWS Region to users, which may be outside of your home Region. Defaults to `true`. 236 // 237 // **network** requires the following: 238 // 239 // > **NOTE:** `network` is cannot removed without force recreating. 240 OptimizeForEndUserLocation pulumi.BoolPtrInput 241 } 242 243 func (FleetState) ElementType() reflect.Type { 244 return reflect.TypeOf((*fleetState)(nil)).Elem() 245 } 246 247 type fleetArgs struct { 248 // The ARN of the Amazon Kinesis data stream that receives the audit events. Kinesis data stream name must begin with `"AmazonWorkLink-"`. 249 AuditStreamArn *string `pulumi:"auditStreamArn"` 250 // The certificate chain, including intermediate certificates and the root certificate authority certificate used to issue device certificates. 251 DeviceCaCertificate *string `pulumi:"deviceCaCertificate"` 252 // The name of the fleet. 253 DisplayName *string `pulumi:"displayName"` 254 // Provide this to allow manage the identity provider configuration for the fleet. Fields documented below. 255 IdentityProvider *FleetIdentityProvider `pulumi:"identityProvider"` 256 // A region-unique name for the AMI. 257 Name *string `pulumi:"name"` 258 // Provide this to allow manage the company network configuration for the fleet. Fields documented below. 259 Network *FleetNetwork `pulumi:"network"` 260 // The option to optimize for better performance by routing traffic through the closest AWS Region to users, which may be outside of your home Region. Defaults to `true`. 261 // 262 // **network** requires the following: 263 // 264 // > **NOTE:** `network` is cannot removed without force recreating. 265 OptimizeForEndUserLocation *bool `pulumi:"optimizeForEndUserLocation"` 266 } 267 268 // The set of arguments for constructing a Fleet resource. 269 type FleetArgs struct { 270 // The ARN of the Amazon Kinesis data stream that receives the audit events. Kinesis data stream name must begin with `"AmazonWorkLink-"`. 271 AuditStreamArn pulumi.StringPtrInput 272 // The certificate chain, including intermediate certificates and the root certificate authority certificate used to issue device certificates. 273 DeviceCaCertificate pulumi.StringPtrInput 274 // The name of the fleet. 275 DisplayName pulumi.StringPtrInput 276 // Provide this to allow manage the identity provider configuration for the fleet. Fields documented below. 277 IdentityProvider FleetIdentityProviderPtrInput 278 // A region-unique name for the AMI. 279 Name pulumi.StringPtrInput 280 // Provide this to allow manage the company network configuration for the fleet. Fields documented below. 281 Network FleetNetworkPtrInput 282 // The option to optimize for better performance by routing traffic through the closest AWS Region to users, which may be outside of your home Region. Defaults to `true`. 283 // 284 // **network** requires the following: 285 // 286 // > **NOTE:** `network` is cannot removed without force recreating. 287 OptimizeForEndUserLocation pulumi.BoolPtrInput 288 } 289 290 func (FleetArgs) ElementType() reflect.Type { 291 return reflect.TypeOf((*fleetArgs)(nil)).Elem() 292 } 293 294 type FleetInput interface { 295 pulumi.Input 296 297 ToFleetOutput() FleetOutput 298 ToFleetOutputWithContext(ctx context.Context) FleetOutput 299 } 300 301 func (*Fleet) ElementType() reflect.Type { 302 return reflect.TypeOf((**Fleet)(nil)).Elem() 303 } 304 305 func (i *Fleet) ToFleetOutput() FleetOutput { 306 return i.ToFleetOutputWithContext(context.Background()) 307 } 308 309 func (i *Fleet) ToFleetOutputWithContext(ctx context.Context) FleetOutput { 310 return pulumi.ToOutputWithContext(ctx, i).(FleetOutput) 311 } 312 313 // FleetArrayInput is an input type that accepts FleetArray and FleetArrayOutput values. 314 // You can construct a concrete instance of `FleetArrayInput` via: 315 // 316 // FleetArray{ FleetArgs{...} } 317 type FleetArrayInput interface { 318 pulumi.Input 319 320 ToFleetArrayOutput() FleetArrayOutput 321 ToFleetArrayOutputWithContext(context.Context) FleetArrayOutput 322 } 323 324 type FleetArray []FleetInput 325 326 func (FleetArray) ElementType() reflect.Type { 327 return reflect.TypeOf((*[]*Fleet)(nil)).Elem() 328 } 329 330 func (i FleetArray) ToFleetArrayOutput() FleetArrayOutput { 331 return i.ToFleetArrayOutputWithContext(context.Background()) 332 } 333 334 func (i FleetArray) ToFleetArrayOutputWithContext(ctx context.Context) FleetArrayOutput { 335 return pulumi.ToOutputWithContext(ctx, i).(FleetArrayOutput) 336 } 337 338 // FleetMapInput is an input type that accepts FleetMap and FleetMapOutput values. 339 // You can construct a concrete instance of `FleetMapInput` via: 340 // 341 // FleetMap{ "key": FleetArgs{...} } 342 type FleetMapInput interface { 343 pulumi.Input 344 345 ToFleetMapOutput() FleetMapOutput 346 ToFleetMapOutputWithContext(context.Context) FleetMapOutput 347 } 348 349 type FleetMap map[string]FleetInput 350 351 func (FleetMap) ElementType() reflect.Type { 352 return reflect.TypeOf((*map[string]*Fleet)(nil)).Elem() 353 } 354 355 func (i FleetMap) ToFleetMapOutput() FleetMapOutput { 356 return i.ToFleetMapOutputWithContext(context.Background()) 357 } 358 359 func (i FleetMap) ToFleetMapOutputWithContext(ctx context.Context) FleetMapOutput { 360 return pulumi.ToOutputWithContext(ctx, i).(FleetMapOutput) 361 } 362 363 type FleetOutput struct{ *pulumi.OutputState } 364 365 func (FleetOutput) ElementType() reflect.Type { 366 return reflect.TypeOf((**Fleet)(nil)).Elem() 367 } 368 369 func (o FleetOutput) ToFleetOutput() FleetOutput { 370 return o 371 } 372 373 func (o FleetOutput) ToFleetOutputWithContext(ctx context.Context) FleetOutput { 374 return o 375 } 376 377 // The ARN of the created WorkLink Fleet. 378 func (o FleetOutput) Arn() pulumi.StringOutput { 379 return o.ApplyT(func(v *Fleet) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 380 } 381 382 // The ARN of the Amazon Kinesis data stream that receives the audit events. Kinesis data stream name must begin with `"AmazonWorkLink-"`. 383 func (o FleetOutput) AuditStreamArn() pulumi.StringPtrOutput { 384 return o.ApplyT(func(v *Fleet) pulumi.StringPtrOutput { return v.AuditStreamArn }).(pulumi.StringPtrOutput) 385 } 386 387 // The identifier used by users to sign in to the Amazon WorkLink app. 388 func (o FleetOutput) CompanyCode() pulumi.StringOutput { 389 return o.ApplyT(func(v *Fleet) pulumi.StringOutput { return v.CompanyCode }).(pulumi.StringOutput) 390 } 391 392 // The time that the fleet was created. 393 func (o FleetOutput) CreatedTime() pulumi.StringOutput { 394 return o.ApplyT(func(v *Fleet) pulumi.StringOutput { return v.CreatedTime }).(pulumi.StringOutput) 395 } 396 397 // The certificate chain, including intermediate certificates and the root certificate authority certificate used to issue device certificates. 398 func (o FleetOutput) DeviceCaCertificate() pulumi.StringPtrOutput { 399 return o.ApplyT(func(v *Fleet) pulumi.StringPtrOutput { return v.DeviceCaCertificate }).(pulumi.StringPtrOutput) 400 } 401 402 // The name of the fleet. 403 func (o FleetOutput) DisplayName() pulumi.StringPtrOutput { 404 return o.ApplyT(func(v *Fleet) pulumi.StringPtrOutput { return v.DisplayName }).(pulumi.StringPtrOutput) 405 } 406 407 // Provide this to allow manage the identity provider configuration for the fleet. Fields documented below. 408 func (o FleetOutput) IdentityProvider() FleetIdentityProviderPtrOutput { 409 return o.ApplyT(func(v *Fleet) FleetIdentityProviderPtrOutput { return v.IdentityProvider }).(FleetIdentityProviderPtrOutput) 410 } 411 412 // The time that the fleet was last updated. 413 func (o FleetOutput) LastUpdatedTime() pulumi.StringOutput { 414 return o.ApplyT(func(v *Fleet) pulumi.StringOutput { return v.LastUpdatedTime }).(pulumi.StringOutput) 415 } 416 417 // A region-unique name for the AMI. 418 func (o FleetOutput) Name() pulumi.StringOutput { 419 return o.ApplyT(func(v *Fleet) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 420 } 421 422 // Provide this to allow manage the company network configuration for the fleet. Fields documented below. 423 func (o FleetOutput) Network() FleetNetworkPtrOutput { 424 return o.ApplyT(func(v *Fleet) FleetNetworkPtrOutput { return v.Network }).(FleetNetworkPtrOutput) 425 } 426 427 // The option to optimize for better performance by routing traffic through the closest AWS Region to users, which may be outside of your home Region. Defaults to `true`. 428 // 429 // **network** requires the following: 430 // 431 // > **NOTE:** `network` is cannot removed without force recreating. 432 func (o FleetOutput) OptimizeForEndUserLocation() pulumi.BoolPtrOutput { 433 return o.ApplyT(func(v *Fleet) pulumi.BoolPtrOutput { return v.OptimizeForEndUserLocation }).(pulumi.BoolPtrOutput) 434 } 435 436 type FleetArrayOutput struct{ *pulumi.OutputState } 437 438 func (FleetArrayOutput) ElementType() reflect.Type { 439 return reflect.TypeOf((*[]*Fleet)(nil)).Elem() 440 } 441 442 func (o FleetArrayOutput) ToFleetArrayOutput() FleetArrayOutput { 443 return o 444 } 445 446 func (o FleetArrayOutput) ToFleetArrayOutputWithContext(ctx context.Context) FleetArrayOutput { 447 return o 448 } 449 450 func (o FleetArrayOutput) Index(i pulumi.IntInput) FleetOutput { 451 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Fleet { 452 return vs[0].([]*Fleet)[vs[1].(int)] 453 }).(FleetOutput) 454 } 455 456 type FleetMapOutput struct{ *pulumi.OutputState } 457 458 func (FleetMapOutput) ElementType() reflect.Type { 459 return reflect.TypeOf((*map[string]*Fleet)(nil)).Elem() 460 } 461 462 func (o FleetMapOutput) ToFleetMapOutput() FleetMapOutput { 463 return o 464 } 465 466 func (o FleetMapOutput) ToFleetMapOutputWithContext(ctx context.Context) FleetMapOutput { 467 return o 468 } 469 470 func (o FleetMapOutput) MapIndex(k pulumi.StringInput) FleetOutput { 471 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Fleet { 472 return vs[0].(map[string]*Fleet)[vs[1].(string)] 473 }).(FleetOutput) 474 } 475 476 func init() { 477 pulumi.RegisterInputType(reflect.TypeOf((*FleetInput)(nil)).Elem(), &Fleet{}) 478 pulumi.RegisterInputType(reflect.TypeOf((*FleetArrayInput)(nil)).Elem(), FleetArray{}) 479 pulumi.RegisterInputType(reflect.TypeOf((*FleetMapInput)(nil)).Elem(), FleetMap{}) 480 pulumi.RegisterOutputType(FleetOutput{}) 481 pulumi.RegisterOutputType(FleetArrayOutput{}) 482 pulumi.RegisterOutputType(FleetMapOutput{}) 483 }