aws-cdk-lib 2.217.0__py3-none-any.whl → 2.219.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aws-cdk-lib might be problematic. Click here for more details.

Files changed (140) hide show
  1. aws_cdk/__init__.py +19 -19
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.217.0.jsii.tgz → aws-cdk-lib@2.219.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_amazonmq/__init__.py +185 -87
  5. aws_cdk/aws_apigateway/__init__.py +242 -0
  6. aws_cdk/aws_apigatewayv2/__init__.py +58 -0
  7. aws_cdk/aws_appconfig/__init__.py +145 -0
  8. aws_cdk/aws_appflow/__init__.py +116 -0
  9. aws_cdk/aws_appintegrations/__init__.py +116 -0
  10. aws_cdk/aws_appstream/__init__.py +87 -0
  11. aws_cdk/aws_appsync/__init__.py +58 -0
  12. aws_cdk/aws_apptest/__init__.py +58 -0
  13. aws_cdk/aws_athena/__init__.py +58 -0
  14. aws_cdk/aws_auditmanager/__init__.py +58 -0
  15. aws_cdk/aws_backup/__init__.py +145 -0
  16. aws_cdk/aws_batch/__init__.py +58 -0
  17. aws_cdk/aws_bcmdataexports/__init__.py +9 -0
  18. aws_cdk/aws_bedrock/__init__.py +501 -1
  19. aws_cdk/aws_bedrockagentcore/__init__.py +297 -157
  20. aws_cdk/aws_cassandra/__init__.py +29 -0
  21. aws_cdk/aws_certificatemanager/__init__.py +29 -0
  22. aws_cdk/aws_cloudfront/__init__.py +57 -0
  23. aws_cdk/aws_cloudfront_origins/__init__.py +87 -7
  24. aws_cdk/aws_cloudtrail/__init__.py +58 -0
  25. aws_cdk/aws_cloudwatch/__init__.py +145 -0
  26. aws_cdk/aws_codebuild/__init__.py +454 -74
  27. aws_cdk/aws_codedeploy/__init__.py +29 -0
  28. aws_cdk/aws_codeguruprofiler/__init__.py +58 -0
  29. aws_cdk/aws_codepipeline/__init__.py +29 -0
  30. aws_cdk/aws_cognito/__init__.py +87 -0
  31. aws_cdk/aws_config/__init__.py +58 -0
  32. aws_cdk/aws_connect/__init__.py +9 -9
  33. aws_cdk/aws_cur/__init__.py +34 -3
  34. aws_cdk/aws_customerprofiles/__init__.py +58 -0
  35. aws_cdk/aws_datapipeline/__init__.py +29 -0
  36. aws_cdk/aws_datasync/__init__.py +44 -22
  37. aws_cdk/aws_datazone/__init__.py +93 -33
  38. aws_cdk/aws_dms/__init__.py +61 -5
  39. aws_cdk/aws_docdb/__init__.py +153 -25
  40. aws_cdk/aws_dsql/__init__.py +29 -0
  41. aws_cdk/aws_dynamodb/__init__.py +58 -0
  42. aws_cdk/aws_ec2/__init__.py +4598 -22
  43. aws_cdk/aws_ecr/__init__.py +116 -0
  44. aws_cdk/aws_ecs/__init__.py +2768 -79
  45. aws_cdk/aws_efs/__init__.py +116 -0
  46. aws_cdk/aws_eks/__init__.py +118 -0
  47. aws_cdk/aws_elasticache/__init__.py +261 -0
  48. aws_cdk/aws_elasticbeanstalk/__init__.py +29 -0
  49. aws_cdk/aws_emr/__init__.py +87 -0
  50. aws_cdk/aws_emrcontainers/__init__.py +58 -0
  51. aws_cdk/aws_emrserverless/__init__.py +58 -0
  52. aws_cdk/aws_entityresolution/__init__.py +163 -0
  53. aws_cdk/aws_events/__init__.py +290 -0
  54. aws_cdk/aws_finspace/__init__.py +58 -0
  55. aws_cdk/aws_gamelift/__init__.py +435 -0
  56. aws_cdk/aws_glue/__init__.py +145 -0
  57. aws_cdk/aws_greengrass/__init__.py +464 -0
  58. aws_cdk/aws_greengrassv2/__init__.py +29 -0
  59. aws_cdk/aws_groundstation/__init__.py +87 -0
  60. aws_cdk/aws_guardduty/__init__.py +87 -0
  61. aws_cdk/aws_healthimaging/__init__.py +58 -0
  62. aws_cdk/aws_healthlake/__init__.py +29 -0
  63. aws_cdk/aws_internetmonitor/__init__.py +58 -0
  64. aws_cdk/aws_iot/__init__.py +957 -0
  65. aws_cdk/aws_iotanalytics/__init__.py +116 -0
  66. aws_cdk/aws_iotcoredeviceadvisor/__init__.py +58 -0
  67. aws_cdk/aws_iotevents/__init__.py +87 -0
  68. aws_cdk/aws_iotfleethub/__init__.py +58 -0
  69. aws_cdk/aws_iotfleetwise/__init__.py +116 -0
  70. aws_cdk/aws_iotsitewise/__init__.py +493 -0
  71. aws_cdk/aws_iottwinmaker/__init__.py +145 -0
  72. aws_cdk/aws_iotwireless/__init__.py +464 -0
  73. aws_cdk/aws_kendra/__init__.py +116 -0
  74. aws_cdk/aws_kinesis/__init__.py +58 -0
  75. aws_cdk/aws_kinesisanalytics/__init__.py +31 -0
  76. aws_cdk/aws_kinesisanalyticsv2/__init__.py +29 -0
  77. aws_cdk/aws_kinesisfirehose/__init__.py +58 -0
  78. aws_cdk/aws_kinesisvideo/__init__.py +29 -0
  79. aws_cdk/aws_kms/__init__.py +58 -0
  80. aws_cdk/aws_lambda/__init__.py +58 -0
  81. aws_cdk/aws_lex/__init__.py +29 -0
  82. aws_cdk/aws_location/__init__.py +348 -0
  83. aws_cdk/aws_logs/__init__.py +232 -0
  84. aws_cdk/aws_lookoutequipment/__init__.py +29 -0
  85. aws_cdk/aws_lookoutvision/__init__.py +58 -0
  86. aws_cdk/aws_managedblockchain/__init__.py +145 -0
  87. aws_cdk/aws_medialive/__init__.py +435 -0
  88. aws_cdk/aws_mediatailor/__init__.py +174 -0
  89. aws_cdk/aws_memorydb/__init__.py +203 -0
  90. aws_cdk/aws_msk/__init__.py +4 -2
  91. aws_cdk/aws_mwaa/__init__.py +58 -0
  92. aws_cdk/aws_networkfirewall/__init__.py +6 -2
  93. aws_cdk/aws_networkmanager/__init__.py +29 -0
  94. aws_cdk/aws_nimblestudio/__init__.py +29 -0
  95. aws_cdk/aws_omics/__init__.py +174 -0
  96. aws_cdk/aws_opensearchserverless/__init__.py +58 -0
  97. aws_cdk/aws_opensearchservice/__init__.py +58 -0
  98. aws_cdk/aws_opsworks/__init__.py +29 -0
  99. aws_cdk/aws_organizations/__init__.py +116 -0
  100. aws_cdk/aws_panorama/__init__.py +116 -0
  101. aws_cdk/aws_pinpoint/__init__.py +116 -0
  102. aws_cdk/aws_qbusiness/__init__.py +232 -0
  103. aws_cdk/aws_qldb/__init__.py +29 -0
  104. aws_cdk/aws_quicksight/__init__.py +38 -0
  105. aws_cdk/aws_rds/__init__.py +97 -14
  106. aws_cdk/aws_redshift/__init__.py +29 -0
  107. aws_cdk/aws_rekognition/__init__.py +87 -0
  108. aws_cdk/aws_resourcegroups/__init__.py +58 -0
  109. aws_cdk/aws_rolesanywhere/__init__.py +145 -0
  110. aws_cdk/aws_route53/__init__.py +8 -2
  111. aws_cdk/aws_route53recoveryreadiness/__init__.py +58 -0
  112. aws_cdk/aws_route53resolver/__init__.py +29 -0
  113. aws_cdk/aws_s3/__init__.py +116 -0
  114. aws_cdk/aws_s3express/__init__.py +116 -0
  115. aws_cdk/aws_sagemaker/__init__.py +464 -0
  116. aws_cdk/aws_scheduler/__init__.py +29 -0
  117. aws_cdk/aws_secretsmanager/__init__.py +29 -0
  118. aws_cdk/aws_servicecatalog/__init__.py +107 -86
  119. aws_cdk/aws_servicecatalogappregistry/__init__.py +116 -0
  120. aws_cdk/aws_servicediscovery/__init__.py +58 -0
  121. aws_cdk/aws_ses/__init__.py +261 -0
  122. aws_cdk/aws_simspaceweaver/__init__.py +29 -0
  123. aws_cdk/aws_smsvoice/__init__.py +319 -0
  124. aws_cdk/aws_ssm/__init__.py +87 -0
  125. aws_cdk/aws_synthetics/__init__.py +29 -0
  126. aws_cdk/aws_timestream/__init__.py +87 -0
  127. aws_cdk/aws_transfer/__init__.py +261 -0
  128. aws_cdk/aws_verifiedpermissions/__init__.py +58 -0
  129. aws_cdk/aws_voiceid/__init__.py +29 -0
  130. aws_cdk/aws_wisdom/__init__.py +232 -0
  131. aws_cdk/aws_workspaces/__init__.py +58 -0
  132. aws_cdk/aws_workspacesinstances/__init__.py +29 -0
  133. aws_cdk/aws_workspacesthinclient/__init__.py +58 -0
  134. aws_cdk/pipelines/__init__.py +5 -1
  135. {aws_cdk_lib-2.217.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/METADATA +2 -2
  136. {aws_cdk_lib-2.217.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/RECORD +140 -140
  137. {aws_cdk_lib-2.217.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/LICENSE +0 -0
  138. {aws_cdk_lib-2.217.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/NOTICE +0 -0
  139. {aws_cdk_lib-2.217.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/WHEEL +0 -0
  140. {aws_cdk_lib-2.217.0.dist-info → aws_cdk_lib-2.219.0.dist-info}/top_level.txt +0 -0
@@ -584,6 +584,82 @@ fleet = codebuild.Fleet(self, "MyFleet",
584
584
  )
585
585
  ```
586
586
 
587
+ ### Custom instance types
588
+
589
+ You can use [specific EC2 instance
590
+ types](https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types)
591
+ for your fleet by setting the `computeType` to `CUSTOM_INSTANCE_TYPE`. This
592
+ allows you to specify the `instanceType` in `computeConfiguration`. Only certain
593
+ EC2 instance types are supported; see the linked documentation for details.
594
+
595
+ ```python
596
+ from aws_cdk import Size
597
+
598
+
599
+ fleet = codebuild.Fleet(self, "MyFleet",
600
+ base_capacity=1,
601
+ compute_type=codebuild.FleetComputeType.CUSTOM_INSTANCE_TYPE,
602
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
603
+ compute_configuration=codebuild.ComputeConfiguration(
604
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
605
+ # By default, 64 GiB of disk space is included. Any value optionally
606
+ # specified here is _incremental_ on top of the included disk space.
607
+ disk=Size.gibibytes(10)
608
+ )
609
+ )
610
+ ```
611
+
612
+ ### Fleet overflow behavior
613
+
614
+ When your builds exceed the capacity of your fleet, you can specify how CodeBuild should handle the overflow builds by setting the `overflowBehavior` property:
615
+
616
+ ```python
617
+ fleet = codebuild.Fleet(self, "Fleet",
618
+ compute_type=codebuild.FleetComputeType.MEDIUM,
619
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
620
+ base_capacity=1,
621
+ overflow_behavior=codebuild.FleetOverflowBehavior.ON_DEMAND
622
+ )
623
+ ```
624
+
625
+ The available overflow behaviors are:
626
+
627
+ * `QUEUE` (default): Overflow builds wait for existing fleet instances to become available
628
+ * `ON_DEMAND`: Overflow builds run on CodeBuild on-demand instances
629
+
630
+ Note: If you set overflow behavior to `ON_DEMAND` for a VPC-connected fleet, ensure your VPC settings allow access to public AWS services.
631
+
632
+ ### VPCs
633
+
634
+ The same considerations that apply to [Project
635
+ VPCs](#definition-of-vpc-configuration-in-codebuild-project) also apply to Fleet
636
+ VPCs. When using a Fleet in a CodeBuild Project, it is an error to configure a
637
+ VPC on the Project. Configure a VPC on the fleet instead.
638
+
639
+ ```python
640
+ # load_balancer: elbv2.ApplicationLoadBalancer
641
+
642
+
643
+ vpc = ec2.Vpc(self, "MyVPC")
644
+ fleet = codebuild.Fleet(self, "MyProject",
645
+ compute_type=codebuild.FleetComputeType.MEDIUM,
646
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
647
+ base_capacity=1,
648
+ vpc=vpc
649
+ )
650
+
651
+ fleet.connections.allow_to(load_balancer, ec2.Port.tcp(443))
652
+
653
+ project = codebuild.Project(self, "MyProject",
654
+ environment=codebuild.BuildEnvironment(
655
+ fleet=fleet
656
+ ),
657
+ build_spec=codebuild.BuildSpec.from_object({})
658
+ )
659
+ ```
660
+
661
+ > > > > > > > 39ec36ec6a (feat(codebuild): add custom instance type and VPC to Fleets)
662
+
587
663
  ## Logs
588
664
 
589
665
  CodeBuild lets you specify an S3 Bucket, CloudWatch Log Group or both to receive logs from your projects.
@@ -1160,6 +1236,7 @@ from ..aws_ec2 import (
1160
1236
  IConnectable as _IConnectable_10015a05,
1161
1237
  ISecurityGroup as _ISecurityGroup_acf8a799,
1162
1238
  IVpc as _IVpc_f30d5663,
1239
+ InstanceType as _InstanceType_f64915b9,
1163
1240
  SubnetSelection as _SubnetSelection_e57d76df,
1164
1241
  )
1165
1242
  from ..aws_ecr import IRepository as _IRepository_e6004aa6
@@ -2284,7 +2361,11 @@ class Cache(
2284
2361
  # Control the build environment
2285
2362
  build_environment=codebuild.BuildEnvironment(
2286
2363
  compute_type=codebuild.ComputeType.LARGE,
2287
- privileged=True
2364
+ privileged=True,
2365
+ docker_server=codebuild.DockerServerOptions(
2366
+ compute_type=codebuild.DockerServerComputeType.SMALL,
2367
+ security_groups=[my_security_group]
2368
+ )
2288
2369
  ),
2289
2370
  timeout=Duration.minutes(90),
2290
2371
  file_system_locations=[
@@ -4291,6 +4372,7 @@ class CommonProjectProps:
4291
4372
  jsii_struct_bases=[],
4292
4373
  name_mapping={
4293
4374
  "disk": "disk",
4375
+ "instance_type": "instanceType",
4294
4376
  "machine_type": "machineType",
4295
4377
  "memory": "memory",
4296
4378
  "v_cpu": "vCpu",
@@ -4301,23 +4383,18 @@ class ComputeConfiguration:
4301
4383
  self,
4302
4384
  *,
4303
4385
  disk: typing.Optional[_Size_7b441c34] = None,
4386
+ instance_type: typing.Optional[_InstanceType_f64915b9] = None,
4304
4387
  machine_type: typing.Optional["MachineType"] = None,
4305
4388
  memory: typing.Optional[_Size_7b441c34] = None,
4306
4389
  v_cpu: typing.Optional[jsii.Number] = None,
4307
4390
  ) -> None:
4308
4391
  '''The compute configuration for the fleet.
4309
4392
 
4310
- Despite what the CloudFormation schema says, the numeric properties (disk, memory, vCpu) are not optional.
4311
- An ``undefined`` value will cause the CloudFormation deployment to fail, e.g.
4312
- .. epigraph::
4313
-
4314
- Cannot invoke "java.lang.Integer.intValue()" because the return value of "software.amazon.codebuild.fleet.ComputeConfiguration.getMemory()" is null
4315
- Therefore, these properties default value is set to 0.
4316
-
4317
- :param disk: The amount of disk space of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties
4318
- :param machine_type: The machine type of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties
4319
- :param memory: The amount of memory of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties
4320
- :param v_cpu: The number of vCPUs of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties
4393
+ :param disk: When using ATTRIBUTE_BASED, the amount of disk space of the instance type included in your fleet. When using CUSTOM_INSTANCE_TYPE, the additional amount of disk space to provision over the 64GB included by default. Default: - No requirement, the actual value will be based on the other selected configuration properties
4394
+ :param instance_type: When using CUSTOM_INSTANCE_TYPE, the EC2 instance type to use for fleet instances. Not all instance types are supported by CodeBuild. If you use a disallowed type, the CloudFormation deployment will fail. Default: none
4395
+ :param machine_type: When using ATTRIBUTE_BASED, the machine type of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties
4396
+ :param memory: When using ATTRIBUTE_BASED, the amount of memory of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties
4397
+ :param v_cpu: When using ATTRIBUTE_BASED, the number of vCPUs of the instance type included in your fleet. Default: - No requirement, the actual value will be based on the other selected configuration properties
4321
4398
 
4322
4399
  :exampleMetadata: infused
4323
4400
 
@@ -4341,12 +4418,15 @@ class ComputeConfiguration:
4341
4418
  if __debug__:
4342
4419
  type_hints = typing.get_type_hints(_typecheckingstub__b104977b55c72c0577553444ac08838cdefde5acef91d6c00ad996d1c464b61b)
4343
4420
  check_type(argname="argument disk", value=disk, expected_type=type_hints["disk"])
4421
+ check_type(argname="argument instance_type", value=instance_type, expected_type=type_hints["instance_type"])
4344
4422
  check_type(argname="argument machine_type", value=machine_type, expected_type=type_hints["machine_type"])
4345
4423
  check_type(argname="argument memory", value=memory, expected_type=type_hints["memory"])
4346
4424
  check_type(argname="argument v_cpu", value=v_cpu, expected_type=type_hints["v_cpu"])
4347
4425
  self._values: typing.Dict[builtins.str, typing.Any] = {}
4348
4426
  if disk is not None:
4349
4427
  self._values["disk"] = disk
4428
+ if instance_type is not None:
4429
+ self._values["instance_type"] = instance_type
4350
4430
  if machine_type is not None:
4351
4431
  self._values["machine_type"] = machine_type
4352
4432
  if memory is not None:
@@ -4356,16 +4436,34 @@ class ComputeConfiguration:
4356
4436
 
4357
4437
  @builtins.property
4358
4438
  def disk(self) -> typing.Optional[_Size_7b441c34]:
4359
- '''The amount of disk space of the instance type included in your fleet.
4439
+ '''When using ATTRIBUTE_BASED, the amount of disk space of the instance type included in your fleet.
4440
+
4441
+ When using CUSTOM_INSTANCE_TYPE,
4442
+ the additional amount of disk space to provision over the 64GB included by
4443
+ default.
4360
4444
 
4361
4445
  :default: - No requirement, the actual value will be based on the other selected configuration properties
4362
4446
  '''
4363
4447
  result = self._values.get("disk")
4364
4448
  return typing.cast(typing.Optional[_Size_7b441c34], result)
4365
4449
 
4450
+ @builtins.property
4451
+ def instance_type(self) -> typing.Optional[_InstanceType_f64915b9]:
4452
+ '''When using CUSTOM_INSTANCE_TYPE, the EC2 instance type to use for fleet instances.
4453
+
4454
+ Not all instance types are supported by CodeBuild. If you use a disallowed type, the
4455
+ CloudFormation deployment will fail.
4456
+
4457
+ :default: none
4458
+
4459
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types
4460
+ '''
4461
+ result = self._values.get("instance_type")
4462
+ return typing.cast(typing.Optional[_InstanceType_f64915b9], result)
4463
+
4366
4464
  @builtins.property
4367
4465
  def machine_type(self) -> typing.Optional["MachineType"]:
4368
- '''The machine type of the instance type included in your fleet.
4466
+ '''When using ATTRIBUTE_BASED, the machine type of the instance type included in your fleet.
4369
4467
 
4370
4468
  :default: - No requirement, the actual value will be based on the other selected configuration properties
4371
4469
  '''
@@ -4374,7 +4472,7 @@ class ComputeConfiguration:
4374
4472
 
4375
4473
  @builtins.property
4376
4474
  def memory(self) -> typing.Optional[_Size_7b441c34]:
4377
- '''The amount of memory of the instance type included in your fleet.
4475
+ '''When using ATTRIBUTE_BASED, the amount of memory of the instance type included in your fleet.
4378
4476
 
4379
4477
  :default: - No requirement, the actual value will be based on the other selected configuration properties
4380
4478
  '''
@@ -4383,7 +4481,7 @@ class ComputeConfiguration:
4383
4481
 
4384
4482
  @builtins.property
4385
4483
  def v_cpu(self) -> typing.Optional[jsii.Number]:
4386
- '''The number of vCPUs of the instance type included in your fleet.
4484
+ '''When using ATTRIBUTE_BASED, the number of vCPUs of the instance type included in your fleet.
4387
4485
 
4388
4486
  :default: - No requirement, the actual value will be based on the other selected configuration properties
4389
4487
  '''
@@ -4434,7 +4532,11 @@ class ComputeType(enum.Enum):
4434
4532
  # Control the build environment
4435
4533
  build_environment=codebuild.BuildEnvironment(
4436
4534
  compute_type=codebuild.ComputeType.LARGE,
4437
- privileged=True
4535
+ privileged=True,
4536
+ docker_server=codebuild.DockerServerOptions(
4537
+ compute_type=codebuild.DockerServerComputeType.SMALL,
4538
+ security_groups=[my_security_group]
4539
+ )
4438
4540
  ),
4439
4541
  timeout=Duration.minutes(90),
4440
4542
  file_system_locations=[
@@ -4472,6 +4574,7 @@ class ComputeType(enum.Enum):
4472
4574
  LAMBDA_8GB = "LAMBDA_8GB"
4473
4575
  LAMBDA_10GB = "LAMBDA_10GB"
4474
4576
  ATTRIBUTE_BASED = "ATTRIBUTE_BASED"
4577
+ CUSTOM_INSTANCE_TYPE = "CUSTOM_INSTANCE_TYPE"
4475
4578
 
4476
4579
 
4477
4580
  @jsii.data_type(
@@ -4532,6 +4635,62 @@ class DockerServerComputeType(enum.Enum):
4532
4635
  '''Docker server compute type.
4533
4636
 
4534
4637
  :see: https://docs.aws.amazon.com/codebuild/latest/APIReference/API_DockerServer.html
4638
+ :exampleMetadata: infused
4639
+
4640
+ Example::
4641
+
4642
+ # vpc: ec2.Vpc
4643
+ # my_security_group: ec2.SecurityGroup
4644
+
4645
+ pipelines.CodeBuildStep("Synth",
4646
+ # ...standard ShellStep props...
4647
+ commands=[],
4648
+ env={},
4649
+
4650
+ # If you are using a CodeBuildStep explicitly, set the 'cdk.out' directory
4651
+ # to be the synth step's output.
4652
+ primary_output_directory="cdk.out",
4653
+
4654
+ # Control the name of the project
4655
+ project_name="MyProject",
4656
+
4657
+ # Control parts of the BuildSpec other than the regular 'build' and 'install' commands
4658
+ partial_build_spec=codebuild.BuildSpec.from_object({
4659
+ "version": "0.2"
4660
+ }),
4661
+
4662
+ # Control the build environment
4663
+ build_environment=codebuild.BuildEnvironment(
4664
+ compute_type=codebuild.ComputeType.LARGE,
4665
+ privileged=True,
4666
+ docker_server=codebuild.DockerServerOptions(
4667
+ compute_type=codebuild.DockerServerComputeType.SMALL,
4668
+ security_groups=[my_security_group]
4669
+ )
4670
+ ),
4671
+ timeout=Duration.minutes(90),
4672
+ file_system_locations=[
4673
+ codebuild.FileSystemLocation.efs(
4674
+ identifier="myidentifier2",
4675
+ location="myclodation.mydnsroot.com:/loc",
4676
+ mount_point="/media",
4677
+ mount_options="opts"
4678
+ )
4679
+ ],
4680
+
4681
+ # Control Elastic Network Interface creation
4682
+ vpc=vpc,
4683
+ subnet_selection=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS),
4684
+ security_groups=[my_security_group],
4685
+
4686
+ # Control caching
4687
+ cache=codebuild.Cache.bucket(s3.Bucket(self, "Cache")),
4688
+
4689
+ # Additional policy statements for the execution role
4690
+ role_policy_statements=[
4691
+ iam.PolicyStatement()
4692
+ ]
4693
+ )
4535
4694
  '''
4536
4695
 
4537
4696
  SMALL = "SMALL"
@@ -4563,22 +4722,61 @@ class DockerServerOptions:
4563
4722
  :param compute_type: The type of compute to use for the docker server. See the ``DockerServerComputeType`` enum for the possible values.
4564
4723
  :param security_groups: A list of maximum 5 security groups. Default: - no security group
4565
4724
 
4566
- :exampleMetadata: fixture=_generated
4725
+ :exampleMetadata: infused
4567
4726
 
4568
4727
  Example::
4569
4728
 
4570
- # The code below shows an example of how to instantiate this type.
4571
- # The values are placeholders you should change.
4572
- from aws_cdk import aws_codebuild as codebuild
4573
- from aws_cdk import aws_ec2 as ec2
4729
+ # vpc: ec2.Vpc
4730
+ # my_security_group: ec2.SecurityGroup
4574
4731
 
4575
- # security_group: ec2.SecurityGroup
4732
+ pipelines.CodeBuildStep("Synth",
4733
+ # ...standard ShellStep props...
4734
+ commands=[],
4735
+ env={},
4576
4736
 
4577
- docker_server_options = codebuild.DockerServerOptions(
4578
- compute_type=codebuild.DockerServerComputeType.SMALL,
4737
+ # If you are using a CodeBuildStep explicitly, set the 'cdk.out' directory
4738
+ # to be the synth step's output.
4739
+ primary_output_directory="cdk.out",
4579
4740
 
4580
- # the properties below are optional
4581
- security_groups=[security_group]
4741
+ # Control the name of the project
4742
+ project_name="MyProject",
4743
+
4744
+ # Control parts of the BuildSpec other than the regular 'build' and 'install' commands
4745
+ partial_build_spec=codebuild.BuildSpec.from_object({
4746
+ "version": "0.2"
4747
+ }),
4748
+
4749
+ # Control the build environment
4750
+ build_environment=codebuild.BuildEnvironment(
4751
+ compute_type=codebuild.ComputeType.LARGE,
4752
+ privileged=True,
4753
+ docker_server=codebuild.DockerServerOptions(
4754
+ compute_type=codebuild.DockerServerComputeType.SMALL,
4755
+ security_groups=[my_security_group]
4756
+ )
4757
+ ),
4758
+ timeout=Duration.minutes(90),
4759
+ file_system_locations=[
4760
+ codebuild.FileSystemLocation.efs(
4761
+ identifier="myidentifier2",
4762
+ location="myclodation.mydnsroot.com:/loc",
4763
+ mount_point="/media",
4764
+ mount_options="opts"
4765
+ )
4766
+ ],
4767
+
4768
+ # Control Elastic Network Interface creation
4769
+ vpc=vpc,
4770
+ subnet_selection=ec2.SubnetSelection(subnet_type=ec2.SubnetType.PRIVATE_WITH_EGRESS),
4771
+ security_groups=[my_security_group],
4772
+
4773
+ # Control caching
4774
+ cache=codebuild.Cache.bucket(s3.Bucket(self, "Cache")),
4775
+
4776
+ # Additional policy statements for the execution role
4777
+ role_policy_statements=[
4778
+ iam.PolicyStatement()
4779
+ ]
4582
4780
  )
4583
4781
  '''
4584
4782
  if __debug__:
@@ -4739,16 +4937,18 @@ class EnvironmentType(enum.Enum):
4739
4937
 
4740
4938
  Example::
4741
4939
 
4742
- fleet = codebuild.Fleet(self, "Fleet",
4743
- compute_type=codebuild.FleetComputeType.MEDIUM,
4744
- environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
4745
- base_capacity=1
4746
- )
4940
+ from aws_cdk import Size
4747
4941
 
4748
- codebuild.Project(self, "Project",
4749
- environment=codebuild.BuildEnvironment(
4750
- fleet=fleet,
4751
- build_image=codebuild.LinuxBuildImage.STANDARD_7_0
4942
+
4943
+ fleet = codebuild.Fleet(self, "MyFleet",
4944
+ base_capacity=1,
4945
+ compute_type=codebuild.FleetComputeType.CUSTOM_INSTANCE_TYPE,
4946
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
4947
+ compute_configuration=codebuild.ComputeConfiguration(
4948
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
4949
+ # By default, 64 GiB of disk space is included. Any value optionally
4950
+ # specified here is _incremental_ on top of the included disk space.
4951
+ disk=Size.gibibytes(10)
4752
4952
  )
4753
4953
  )
4754
4954
  '''
@@ -5208,7 +5408,7 @@ class FilterGroup(
5208
5408
 
5209
5409
  @jsii.enum(jsii_type="aws-cdk-lib.aws_codebuild.FleetComputeType")
5210
5410
  class FleetComputeType(enum.Enum):
5211
- '''Fleet build machine compute type. Subset of Fleet compatible {@link ComputeType} values.
5411
+ '''Fleet build machine compute type. Subset of Fleet compatible ComputeType values.
5212
5412
 
5213
5413
  The allocated memory, vCPU count and disk space of the build machine for a
5214
5414
  given compute type are dependent on the environment type.
@@ -5219,16 +5419,18 @@ class FleetComputeType(enum.Enum):
5219
5419
 
5220
5420
  Example::
5221
5421
 
5222
- fleet = codebuild.Fleet(self, "Fleet",
5223
- compute_type=codebuild.FleetComputeType.MEDIUM,
5224
- environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
5225
- base_capacity=1
5226
- )
5422
+ from aws_cdk import Size
5227
5423
 
5228
- codebuild.Project(self, "Project",
5229
- environment=codebuild.BuildEnvironment(
5230
- fleet=fleet,
5231
- build_image=codebuild.LinuxBuildImage.STANDARD_7_0
5424
+
5425
+ fleet = codebuild.Fleet(self, "MyFleet",
5426
+ base_capacity=1,
5427
+ compute_type=codebuild.FleetComputeType.CUSTOM_INSTANCE_TYPE,
5428
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
5429
+ compute_configuration=codebuild.ComputeConfiguration(
5430
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
5431
+ # By default, 64 GiB of disk space is included. Any value optionally
5432
+ # specified here is _incremental_ on top of the included disk space.
5433
+ disk=Size.gibibytes(10)
5232
5434
  )
5233
5435
  )
5234
5436
  '''
@@ -5236,32 +5438,32 @@ class FleetComputeType(enum.Enum):
5236
5438
  SMALL = "SMALL"
5237
5439
  '''Small compute type.
5238
5440
 
5239
- May not be available for all environment types, see
5240
- {@link https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types docs}
5241
- for more information.
5441
+ May not be available for all environment types.
5442
+
5443
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
5242
5444
  '''
5243
5445
  MEDIUM = "MEDIUM"
5244
5446
  '''Medium compute type.
5245
5447
 
5246
- May not be available for all environment types, see
5247
- {@link https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types docs}
5248
- for more information.
5448
+ May not be available for all environment types.
5449
+
5450
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
5249
5451
  '''
5250
5452
  LARGE = "LARGE"
5251
5453
  '''Large compute type.'''
5252
5454
  X_LARGE = "X_LARGE"
5253
5455
  '''Extra Large compute type.
5254
5456
 
5255
- May not be available for all environment types, see
5256
- {@link https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types docs}
5257
- for more information.
5457
+ May not be available for all environment types.
5458
+
5459
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
5258
5460
  '''
5259
5461
  X2_LARGE = "X2_LARGE"
5260
5462
  '''Extra, Extra Large compute type.
5261
5463
 
5262
- May not be available for all environment types, see
5263
- {@link https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types docs}
5264
- for more information.
5464
+ May not be available for all environment types.
5465
+
5466
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
5265
5467
  '''
5266
5468
  ATTRIBUTE_BASED = "ATTRIBUTE_BASED"
5267
5469
  '''Specify the amount of vCPUs, memory, disk space, and the type of machine.
@@ -5270,6 +5472,36 @@ class FleetComputeType(enum.Enum):
5270
5472
 
5271
5473
  :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.types
5272
5474
  '''
5475
+ CUSTOM_INSTANCE_TYPE = "CUSTOM_INSTANCE_TYPE"
5476
+ '''Specify a specific EC2 instance type to use for compute.
5477
+
5478
+ You must set ``instanceType`` on ``computeConfiguration``, and optionally set a
5479
+ ``disk`` size if the provided 64GB is insufficient.
5480
+
5481
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment-reserved-capacity.instance-types
5482
+ '''
5483
+
5484
+
5485
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_codebuild.FleetOverflowBehavior")
5486
+ class FleetOverflowBehavior(enum.Enum):
5487
+ '''The compute fleet overflow behavior.
5488
+
5489
+ :exampleMetadata: infused
5490
+
5491
+ Example::
5492
+
5493
+ fleet = codebuild.Fleet(self, "Fleet",
5494
+ compute_type=codebuild.FleetComputeType.MEDIUM,
5495
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
5496
+ base_capacity=1,
5497
+ overflow_behavior=codebuild.FleetOverflowBehavior.ON_DEMAND
5498
+ )
5499
+ '''
5500
+
5501
+ QUEUE = "QUEUE"
5502
+ '''Overflow builds wait for existing fleet instances to become available.'''
5503
+ ON_DEMAND = "ON_DEMAND"
5504
+ '''Overflow builds run on CodeBuild on-demand instances.'''
5273
5505
 
5274
5506
 
5275
5507
  @jsii.data_type(
@@ -5281,6 +5513,11 @@ class FleetComputeType(enum.Enum):
5281
5513
  "environment_type": "environmentType",
5282
5514
  "compute_configuration": "computeConfiguration",
5283
5515
  "fleet_name": "fleetName",
5516
+ "overflow_behavior": "overflowBehavior",
5517
+ "role": "role",
5518
+ "security_groups": "securityGroups",
5519
+ "subnet_selection": "subnetSelection",
5520
+ "vpc": "vpc",
5284
5521
  },
5285
5522
  )
5286
5523
  class FleetProps:
@@ -5292,34 +5529,48 @@ class FleetProps:
5292
5529
  environment_type: EnvironmentType,
5293
5530
  compute_configuration: typing.Optional[typing.Union[ComputeConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
5294
5531
  fleet_name: typing.Optional[builtins.str] = None,
5532
+ overflow_behavior: typing.Optional[FleetOverflowBehavior] = None,
5533
+ role: typing.Optional[_IRole_235f5d8e] = None,
5534
+ security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
5535
+ subnet_selection: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
5536
+ vpc: typing.Optional[_IVpc_f30d5663] = None,
5295
5537
  ) -> None:
5296
- '''Construction properties of a CodeBuild {@link Fleet}.
5538
+ '''Construction properties of a CodeBuild Fleet.
5297
5539
 
5298
5540
  :param base_capacity: The number of machines allocated to the compute fleet. Defines the number of builds that can run in parallel. Minimum value of 1.
5299
5541
  :param compute_type: The instance type of the compute fleet.
5300
5542
  :param environment_type: The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.
5301
- :param compute_configuration: The compute configuration of the compute fleet. This is only required if ``computeType`` is set to ATTRIBUTE_BASED. Default: - do not specify compute configuration
5543
+ :param compute_configuration: The compute configuration of the compute fleet. This is only permitted if ``computeType`` is set to ATTRIBUTE_BASED or CUSTOM_INSTANCE_TYPE. In such cases, this is required. Default: - do not specify compute configuration
5302
5544
  :param fleet_name: The name of the Fleet. Default: - CloudFormation generated name
5545
+ :param overflow_behavior: The compute fleet overflow behavior. For overflow behavior ``QUEUE``, overflow builds need to wait on the existing fleet instances to become available. For overflow behavior ``ON_DEMAND``, overflow builds run on CodeBuild on-demand. Default: undefined - AWS CodeBuild default behavior is QUEUE
5546
+ :param role: Service Role assumed by Fleet instances. This Role is not used by Project builds running on Fleet instances; Project builds assume the ``role`` on Project instead. Default: - A role will be created if any permissions are granted
5547
+ :param security_groups: What security groups to associate with the fleet's network interfaces. If none are provided, one will be created automatically. Only used if ``vpc`` is supplied. Default: - A security group will be automatically created.
5548
+ :param subnet_selection: Where to place the network interfaces within the VPC. To access AWS services, your fleet needs to be in one of the following types of subnets: 1. Subnets with access to the internet (of type PRIVATE_WITH_EGRESS). 2. Private subnets unconnected to the internet, but with `VPC endpoints <https://docs.aws.amazon.com/codebuild/latest/userguide/use-vpc-endpoints-with-codebuild.html>`_ for the necessary services. If you don't specify a subnet selection, the default behavior is to use PRIVATE_WITH_EGRESS subnets first if they exist, then PRIVATE_WITHOUT_EGRESS, and finally PUBLIC subnets. If your VPC doesn't have PRIVATE_WITH_EGRESS subnets but you need AWS service access, add VPC Endpoints to your private subnets. Default: - private subnets if available else public subnets
5549
+ :param vpc: VPC network to place fleet instance network interfaces. Specify this if the fleet needs to access resources in a VPC. Default: - No VPC is specified.
5303
5550
 
5304
5551
  :exampleMetadata: infused
5305
5552
 
5306
5553
  Example::
5307
5554
 
5308
- fleet = codebuild.Fleet(self, "Fleet",
5309
- compute_type=codebuild.FleetComputeType.MEDIUM,
5310
- environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
5311
- base_capacity=1
5312
- )
5555
+ from aws_cdk import Size
5313
5556
 
5314
- codebuild.Project(self, "Project",
5315
- environment=codebuild.BuildEnvironment(
5316
- fleet=fleet,
5317
- build_image=codebuild.LinuxBuildImage.STANDARD_7_0
5557
+
5558
+ fleet = codebuild.Fleet(self, "MyFleet",
5559
+ base_capacity=1,
5560
+ compute_type=codebuild.FleetComputeType.CUSTOM_INSTANCE_TYPE,
5561
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
5562
+ compute_configuration=codebuild.ComputeConfiguration(
5563
+ instance_type=ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.MEDIUM),
5564
+ # By default, 64 GiB of disk space is included. Any value optionally
5565
+ # specified here is _incremental_ on top of the included disk space.
5566
+ disk=Size.gibibytes(10)
5318
5567
  )
5319
5568
  )
5320
5569
  '''
5321
5570
  if isinstance(compute_configuration, dict):
5322
5571
  compute_configuration = ComputeConfiguration(**compute_configuration)
5572
+ if isinstance(subnet_selection, dict):
5573
+ subnet_selection = _SubnetSelection_e57d76df(**subnet_selection)
5323
5574
  if __debug__:
5324
5575
  type_hints = typing.get_type_hints(_typecheckingstub__e7911aefc20674030e6eb6a13611d08046f9412fc45f97ff43a4ecf7591a2d5d)
5325
5576
  check_type(argname="argument base_capacity", value=base_capacity, expected_type=type_hints["base_capacity"])
@@ -5327,6 +5578,11 @@ class FleetProps:
5327
5578
  check_type(argname="argument environment_type", value=environment_type, expected_type=type_hints["environment_type"])
5328
5579
  check_type(argname="argument compute_configuration", value=compute_configuration, expected_type=type_hints["compute_configuration"])
5329
5580
  check_type(argname="argument fleet_name", value=fleet_name, expected_type=type_hints["fleet_name"])
5581
+ check_type(argname="argument overflow_behavior", value=overflow_behavior, expected_type=type_hints["overflow_behavior"])
5582
+ check_type(argname="argument role", value=role, expected_type=type_hints["role"])
5583
+ check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
5584
+ check_type(argname="argument subnet_selection", value=subnet_selection, expected_type=type_hints["subnet_selection"])
5585
+ check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
5330
5586
  self._values: typing.Dict[builtins.str, typing.Any] = {
5331
5587
  "base_capacity": base_capacity,
5332
5588
  "compute_type": compute_type,
@@ -5336,6 +5592,16 @@ class FleetProps:
5336
5592
  self._values["compute_configuration"] = compute_configuration
5337
5593
  if fleet_name is not None:
5338
5594
  self._values["fleet_name"] = fleet_name
5595
+ if overflow_behavior is not None:
5596
+ self._values["overflow_behavior"] = overflow_behavior
5597
+ if role is not None:
5598
+ self._values["role"] = role
5599
+ if security_groups is not None:
5600
+ self._values["security_groups"] = security_groups
5601
+ if subnet_selection is not None:
5602
+ self._values["subnet_selection"] = subnet_selection
5603
+ if vpc is not None:
5604
+ self._values["vpc"] = vpc
5339
5605
 
5340
5606
  @builtins.property
5341
5607
  def base_capacity(self) -> jsii.Number:
@@ -5368,7 +5634,8 @@ class FleetProps:
5368
5634
  def compute_configuration(self) -> typing.Optional[ComputeConfiguration]:
5369
5635
  '''The compute configuration of the compute fleet.
5370
5636
 
5371
- This is only required if ``computeType`` is set to ATTRIBUTE_BASED.
5637
+ This is only permitted if ``computeType`` is set to ATTRIBUTE_BASED or
5638
+ CUSTOM_INSTANCE_TYPE. In such cases, this is required.
5372
5639
 
5373
5640
  :default: - do not specify compute configuration
5374
5641
 
@@ -5386,6 +5653,73 @@ class FleetProps:
5386
5653
  result = self._values.get("fleet_name")
5387
5654
  return typing.cast(typing.Optional[builtins.str], result)
5388
5655
 
5656
+ @builtins.property
5657
+ def overflow_behavior(self) -> typing.Optional[FleetOverflowBehavior]:
5658
+ '''The compute fleet overflow behavior.
5659
+
5660
+ For overflow behavior ``QUEUE``, overflow builds need to wait on the existing fleet instances to become available.
5661
+
5662
+ For overflow behavior ``ON_DEMAND``, overflow builds run on CodeBuild on-demand.
5663
+
5664
+ :default: undefined - AWS CodeBuild default behavior is QUEUE
5665
+ '''
5666
+ result = self._values.get("overflow_behavior")
5667
+ return typing.cast(typing.Optional[FleetOverflowBehavior], result)
5668
+
5669
+ @builtins.property
5670
+ def role(self) -> typing.Optional[_IRole_235f5d8e]:
5671
+ '''Service Role assumed by Fleet instances.
5672
+
5673
+ This Role is not used by Project builds running on Fleet instances; Project
5674
+ builds assume the ``role`` on Project instead.
5675
+
5676
+ :default: - A role will be created if any permissions are granted
5677
+ '''
5678
+ result = self._values.get("role")
5679
+ return typing.cast(typing.Optional[_IRole_235f5d8e], result)
5680
+
5681
+ @builtins.property
5682
+ def security_groups(self) -> typing.Optional[typing.List[_ISecurityGroup_acf8a799]]:
5683
+ '''What security groups to associate with the fleet's network interfaces. If none are provided, one will be created automatically.
5684
+
5685
+ Only used if ``vpc`` is supplied.
5686
+
5687
+ :default: - A security group will be automatically created.
5688
+ '''
5689
+ result = self._values.get("security_groups")
5690
+ return typing.cast(typing.Optional[typing.List[_ISecurityGroup_acf8a799]], result)
5691
+
5692
+ @builtins.property
5693
+ def subnet_selection(self) -> typing.Optional[_SubnetSelection_e57d76df]:
5694
+ '''Where to place the network interfaces within the VPC.
5695
+
5696
+ To access AWS services, your fleet needs to be in one of the following types of subnets:
5697
+
5698
+ 1. Subnets with access to the internet (of type PRIVATE_WITH_EGRESS).
5699
+ 2. Private subnets unconnected to the internet, but with `VPC endpoints <https://docs.aws.amazon.com/codebuild/latest/userguide/use-vpc-endpoints-with-codebuild.html>`_ for the necessary services.
5700
+
5701
+ If you don't specify a subnet selection, the default behavior is to use PRIVATE_WITH_EGRESS subnets first if they exist,
5702
+ then PRIVATE_WITHOUT_EGRESS, and finally PUBLIC subnets. If your VPC doesn't have PRIVATE_WITH_EGRESS subnets but you need
5703
+ AWS service access, add VPC Endpoints to your private subnets.
5704
+
5705
+ :default: - private subnets if available else public subnets
5706
+
5707
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html
5708
+ '''
5709
+ result = self._values.get("subnet_selection")
5710
+ return typing.cast(typing.Optional[_SubnetSelection_e57d76df], result)
5711
+
5712
+ @builtins.property
5713
+ def vpc(self) -> typing.Optional[_IVpc_f30d5663]:
5714
+ '''VPC network to place fleet instance network interfaces.
5715
+
5716
+ Specify this if the fleet needs to access resources in a VPC.
5717
+
5718
+ :default: - No VPC is specified.
5719
+ '''
5720
+ result = self._values.get("vpc")
5721
+ return typing.cast(typing.Optional[_IVpc_f30d5663], result)
5722
+
5389
5723
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
5390
5724
  return isinstance(rhs, self.__class__) and rhs._values == self._values
5391
5725
 
@@ -5973,8 +6307,13 @@ typing.cast(typing.Any, IFileSystemLocation).__jsii_proxy_class__ = lambda : _IF
5973
6307
 
5974
6308
 
5975
6309
  @jsii.interface(jsii_type="aws-cdk-lib.aws_codebuild.IFleet")
5976
- class IFleet(_IResource_c80c4260, typing_extensions.Protocol):
5977
- '''Represents a {@link Fleet} for a reserved capacity CodeBuild project.'''
6310
+ class IFleet(
6311
+ _IResource_c80c4260,
6312
+ _IGrantable_71c4f5de,
6313
+ _IConnectable_10015a05,
6314
+ typing_extensions.Protocol,
6315
+ ):
6316
+ '''Represents a Fleet for a reserved capacity CodeBuild project.'''
5978
6317
 
5979
6318
  @builtins.property
5980
6319
  @jsii.member(jsii_name="computeType")
@@ -6012,8 +6351,10 @@ class IFleet(_IResource_c80c4260, typing_extensions.Protocol):
6012
6351
 
6013
6352
  class _IFleetProxy(
6014
6353
  jsii.proxy_for(_IResource_c80c4260), # type: ignore[misc]
6354
+ jsii.proxy_for(_IGrantable_71c4f5de), # type: ignore[misc]
6355
+ jsii.proxy_for(_IConnectable_10015a05), # type: ignore[misc]
6015
6356
  ):
6016
- '''Represents a {@link Fleet} for a reserved capacity CodeBuild project.'''
6357
+ '''Represents a Fleet for a reserved capacity CodeBuild project.'''
6017
6358
 
6018
6359
  __jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_codebuild.IFleet"
6019
6360
 
@@ -18482,6 +18823,11 @@ class Fleet(
18482
18823
  environment_type: EnvironmentType,
18483
18824
  compute_configuration: typing.Optional[typing.Union[ComputeConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
18484
18825
  fleet_name: typing.Optional[builtins.str] = None,
18826
+ overflow_behavior: typing.Optional[FleetOverflowBehavior] = None,
18827
+ role: typing.Optional[_IRole_235f5d8e] = None,
18828
+ security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
18829
+ subnet_selection: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
18830
+ vpc: typing.Optional[_IVpc_f30d5663] = None,
18485
18831
  ) -> None:
18486
18832
  '''
18487
18833
  :param scope: -
@@ -18489,8 +18835,13 @@ class Fleet(
18489
18835
  :param base_capacity: The number of machines allocated to the compute fleet. Defines the number of builds that can run in parallel. Minimum value of 1.
18490
18836
  :param compute_type: The instance type of the compute fleet.
18491
18837
  :param environment_type: The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.
18492
- :param compute_configuration: The compute configuration of the compute fleet. This is only required if ``computeType`` is set to ATTRIBUTE_BASED. Default: - do not specify compute configuration
18838
+ :param compute_configuration: The compute configuration of the compute fleet. This is only permitted if ``computeType`` is set to ATTRIBUTE_BASED or CUSTOM_INSTANCE_TYPE. In such cases, this is required. Default: - do not specify compute configuration
18493
18839
  :param fleet_name: The name of the Fleet. Default: - CloudFormation generated name
18840
+ :param overflow_behavior: The compute fleet overflow behavior. For overflow behavior ``QUEUE``, overflow builds need to wait on the existing fleet instances to become available. For overflow behavior ``ON_DEMAND``, overflow builds run on CodeBuild on-demand. Default: undefined - AWS CodeBuild default behavior is QUEUE
18841
+ :param role: Service Role assumed by Fleet instances. This Role is not used by Project builds running on Fleet instances; Project builds assume the ``role`` on Project instead. Default: - A role will be created if any permissions are granted
18842
+ :param security_groups: What security groups to associate with the fleet's network interfaces. If none are provided, one will be created automatically. Only used if ``vpc`` is supplied. Default: - A security group will be automatically created.
18843
+ :param subnet_selection: Where to place the network interfaces within the VPC. To access AWS services, your fleet needs to be in one of the following types of subnets: 1. Subnets with access to the internet (of type PRIVATE_WITH_EGRESS). 2. Private subnets unconnected to the internet, but with `VPC endpoints <https://docs.aws.amazon.com/codebuild/latest/userguide/use-vpc-endpoints-with-codebuild.html>`_ for the necessary services. If you don't specify a subnet selection, the default behavior is to use PRIVATE_WITH_EGRESS subnets first if they exist, then PRIVATE_WITHOUT_EGRESS, and finally PUBLIC subnets. If your VPC doesn't have PRIVATE_WITH_EGRESS subnets but you need AWS service access, add VPC Endpoints to your private subnets. Default: - private subnets if available else public subnets
18844
+ :param vpc: VPC network to place fleet instance network interfaces. Specify this if the fleet needs to access resources in a VPC. Default: - No VPC is specified.
18494
18845
  '''
18495
18846
  if __debug__:
18496
18847
  type_hints = typing.get_type_hints(_typecheckingstub__68e9f035c12fa2c35bc62bc8d306e3651814bea9f53875aeea43b85f6612b957)
@@ -18502,6 +18853,11 @@ class Fleet(
18502
18853
  environment_type=environment_type,
18503
18854
  compute_configuration=compute_configuration,
18504
18855
  fleet_name=fleet_name,
18856
+ overflow_behavior=overflow_behavior,
18857
+ role=role,
18858
+ security_groups=security_groups,
18859
+ subnet_selection=subnet_selection,
18860
+ vpc=vpc,
18505
18861
  )
18506
18862
 
18507
18863
  jsii.create(self.__class__, self, [scope, id, props])
@@ -18542,6 +18898,12 @@ class Fleet(
18542
18898
  '''
18543
18899
  return typing.cast(FleetComputeType, jsii.get(self, "computeType"))
18544
18900
 
18901
+ @builtins.property
18902
+ @jsii.member(jsii_name="connections")
18903
+ def connections(self) -> _Connections_0f31fce8:
18904
+ '''The network connections associated with this Fleet's security group(s) in the configured VPC.'''
18905
+ return typing.cast(_Connections_0f31fce8, jsii.get(self, "connections"))
18906
+
18545
18907
  @builtins.property
18546
18908
  @jsii.member(jsii_name="environmentType")
18547
18909
  def environment_type(self) -> EnvironmentType:
@@ -18560,6 +18922,12 @@ class Fleet(
18560
18922
  '''The name of the fleet.'''
18561
18923
  return typing.cast(builtins.str, jsii.get(self, "fleetName"))
18562
18924
 
18925
+ @builtins.property
18926
+ @jsii.member(jsii_name="grantPrincipal")
18927
+ def grant_principal(self) -> _IPrincipal_539bb2fd:
18928
+ '''The grant principal for this Fleet's service role.'''
18929
+ return typing.cast(_IPrincipal_539bb2fd, jsii.get(self, "grantPrincipal"))
18930
+
18563
18931
 
18564
18932
  @jsii.data_type(
18565
18933
  jsii_type="aws-cdk-lib.aws_codebuild.GitHubEnterpriseSourceProps",
@@ -19684,6 +20052,7 @@ __all__ = [
19684
20052
  "FilterGroup",
19685
20053
  "Fleet",
19686
20054
  "FleetComputeType",
20055
+ "FleetOverflowBehavior",
19687
20056
  "FleetProps",
19688
20057
  "FleetReference",
19689
20058
  "GitHubEnterpriseSourceCredentials",
@@ -19982,6 +20351,7 @@ def _typecheckingstub__45bdedf6c9b38dcb0797768fa0fdec382e282ebd8679405f7dd9df6cb
19982
20351
  def _typecheckingstub__b104977b55c72c0577553444ac08838cdefde5acef91d6c00ad996d1c464b61b(
19983
20352
  *,
19984
20353
  disk: typing.Optional[_Size_7b441c34] = None,
20354
+ instance_type: typing.Optional[_InstanceType_f64915b9] = None,
19985
20355
  machine_type: typing.Optional[MachineType] = None,
19986
20356
  memory: typing.Optional[_Size_7b441c34] = None,
19987
20357
  v_cpu: typing.Optional[jsii.Number] = None,
@@ -20142,6 +20512,11 @@ def _typecheckingstub__e7911aefc20674030e6eb6a13611d08046f9412fc45f97ff43a4ecf75
20142
20512
  environment_type: EnvironmentType,
20143
20513
  compute_configuration: typing.Optional[typing.Union[ComputeConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
20144
20514
  fleet_name: typing.Optional[builtins.str] = None,
20515
+ overflow_behavior: typing.Optional[FleetOverflowBehavior] = None,
20516
+ role: typing.Optional[_IRole_235f5d8e] = None,
20517
+ security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
20518
+ subnet_selection: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
20519
+ vpc: typing.Optional[_IVpc_f30d5663] = None,
20145
20520
  ) -> None:
20146
20521
  """Type checking stubs"""
20147
20522
  pass
@@ -21700,6 +22075,11 @@ def _typecheckingstub__68e9f035c12fa2c35bc62bc8d306e3651814bea9f53875aeea43b85f6
21700
22075
  environment_type: EnvironmentType,
21701
22076
  compute_configuration: typing.Optional[typing.Union[ComputeConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
21702
22077
  fleet_name: typing.Optional[builtins.str] = None,
22078
+ overflow_behavior: typing.Optional[FleetOverflowBehavior] = None,
22079
+ role: typing.Optional[_IRole_235f5d8e] = None,
22080
+ security_groups: typing.Optional[typing.Sequence[_ISecurityGroup_acf8a799]] = None,
22081
+ subnet_selection: typing.Optional[typing.Union[_SubnetSelection_e57d76df, typing.Dict[builtins.str, typing.Any]]] = None,
22082
+ vpc: typing.Optional[_IVpc_f30d5663] = None,
21703
22083
  ) -> None:
21704
22084
  """Type checking stubs"""
21705
22085
  pass