aws-cdk-lib 2.144.0__py3-none-any.whl → 2.145.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.

@@ -303,6 +303,9 @@ can use the `environment` property to customize the build environment:
303
303
  * `environmentVariables` can be set at this level (and also at the project
304
304
  level).
305
305
 
306
+ Finally, you can also set the build environment `fleet` property to create
307
+ a reserved capacity project. See [Fleet](#fleet) for more information.
308
+
306
309
  ## Images
307
310
 
308
311
  The CodeBuild library supports both Linux and Windows images via the
@@ -433,6 +436,47 @@ codebuild.Project(self, "Project",
433
436
 
434
437
  > Visit [AWS Lambda compute in AWS CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/lambda.html) for more details.
435
438
 
439
+ ## Fleet
440
+
441
+ By default, a CodeBuild project will request on-demand compute resources
442
+ to process your build requests. While being able to scale and handle high load,
443
+ on-demand resources can also be slow to provision.
444
+
445
+ Reserved capacity fleets are an alternative to on-demand.
446
+ Dedicated instances, maintained by CodeBuild,
447
+ will be ready to fulfill your build requests immediately.
448
+ Skipping the provisioning step in your project will reduce your build time,
449
+ at the cost of paying for these reserved instances, even when idling, until they are released.
450
+
451
+ For more information, see [Working with reserved capacity in AWS CodeBuild](https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html) in the CodeBuild documentation.
452
+
453
+ ```python
454
+ fleet = codebuild.Fleet(self, "Fleet",
455
+ compute_type=codebuild.FleetComputeType.MEDIUM,
456
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
457
+ base_capacity=1
458
+ )
459
+
460
+ codebuild.Project(self, "Project",
461
+ environment=codebuild.BuildEnvironment(
462
+ fleet=fleet,
463
+ build_image=codebuild.LinuxBuildImage.STANDARD_7_0
464
+ )
465
+ )
466
+ ```
467
+
468
+ You can also import an existing fleet to share its resources
469
+ among several projects across multiple stacks:
470
+
471
+ ```python
472
+ codebuild.Project(self, "Project",
473
+ environment=codebuild.BuildEnvironment(
474
+ fleet=codebuild.Fleet.from_fleet_arn(self, "SharedFleet", "arn:aws:codebuild:us-east-1:123456789012:fleet/MyFleet:ed0d0823-e38a-4c10-90a1-1bf25f50fa76"),
475
+ build_image=codebuild.LinuxBuildImage.STANDARD_7_0
476
+ )
477
+ )
478
+ ```
479
+
436
480
  ## Logs
437
481
 
438
482
  CodeBuild lets you specify an S3 Bucket, CloudWatch Log Group or both to receive logs from your projects.
@@ -1375,6 +1419,7 @@ class BucketCacheOptions:
1375
1419
  "certificate": "certificate",
1376
1420
  "compute_type": "computeType",
1377
1421
  "environment_variables": "environmentVariables",
1422
+ "fleet": "fleet",
1378
1423
  "privileged": "privileged",
1379
1424
  },
1380
1425
  )
@@ -1386,6 +1431,7 @@ class BuildEnvironment:
1386
1431
  certificate: typing.Optional[typing.Union["BuildEnvironmentCertificate", typing.Dict[builtins.str, typing.Any]]] = None,
1387
1432
  compute_type: typing.Optional["ComputeType"] = None,
1388
1433
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union["BuildEnvironmentVariable", typing.Dict[builtins.str, typing.Any]]]] = None,
1434
+ fleet: typing.Optional["IFleet"] = None,
1389
1435
  privileged: typing.Optional[builtins.bool] = None,
1390
1436
  ) -> None:
1391
1437
  '''
@@ -1393,6 +1439,7 @@ class BuildEnvironment:
1393
1439
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
1394
1440
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
1395
1441
  :param environment_variables: The environment variables that your builds can use.
1442
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
1396
1443
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
1397
1444
 
1398
1445
  :exampleMetadata: infused
@@ -1434,6 +1481,7 @@ class BuildEnvironment:
1434
1481
  check_type(argname="argument certificate", value=certificate, expected_type=type_hints["certificate"])
1435
1482
  check_type(argname="argument compute_type", value=compute_type, expected_type=type_hints["compute_type"])
1436
1483
  check_type(argname="argument environment_variables", value=environment_variables, expected_type=type_hints["environment_variables"])
1484
+ check_type(argname="argument fleet", value=fleet, expected_type=type_hints["fleet"])
1437
1485
  check_type(argname="argument privileged", value=privileged, expected_type=type_hints["privileged"])
1438
1486
  self._values: typing.Dict[builtins.str, typing.Any] = {}
1439
1487
  if build_image is not None:
@@ -1444,6 +1492,8 @@ class BuildEnvironment:
1444
1492
  self._values["compute_type"] = compute_type
1445
1493
  if environment_variables is not None:
1446
1494
  self._values["environment_variables"] = environment_variables
1495
+ if fleet is not None:
1496
+ self._values["fleet"] = fleet
1447
1497
  if privileged is not None:
1448
1498
  self._values["privileged"] = privileged
1449
1499
 
@@ -1484,6 +1534,22 @@ class BuildEnvironment:
1484
1534
  result = self._values.get("environment_variables")
1485
1535
  return typing.cast(typing.Optional[typing.Mapping[builtins.str, "BuildEnvironmentVariable"]], result)
1486
1536
 
1537
+ @builtins.property
1538
+ def fleet(self) -> typing.Optional["IFleet"]:
1539
+ '''Fleet resource for a reserved capacity CodeBuild project.
1540
+
1541
+ Fleets allow for process builds or tests to run immediately and reduces build durations,
1542
+ by reserving compute resources for your projects.
1543
+
1544
+ You will be charged for the resources in the fleet, even if they are idle.
1545
+
1546
+ :default: - No fleet will be attached to the project, which will remain on-demand.
1547
+
1548
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html
1549
+ '''
1550
+ result = self._values.get("fleet")
1551
+ return typing.cast(typing.Optional["IFleet"], result)
1552
+
1487
1553
  @builtins.property
1488
1554
  def privileged(self) -> typing.Optional[builtins.bool]:
1489
1555
  '''Indicates how the project builds Docker images.
@@ -7421,6 +7487,7 @@ class CommonProjectProps:
7421
7487
  # build_spec: codebuild.BuildSpec
7422
7488
  # cache: codebuild.Cache
7423
7489
  # file_system_location: codebuild.IFileSystemLocation
7490
+ # fleet: codebuild.Fleet
7424
7491
  # key: kms.Key
7425
7492
  # log_group: logs.LogGroup
7426
7493
  # role: iam.Role
@@ -7454,6 +7521,7 @@ class CommonProjectProps:
7454
7521
  type=codebuild.BuildEnvironmentVariableType.PLAINTEXT
7455
7522
  )
7456
7523
  },
7524
+ fleet=fleet,
7457
7525
  privileged=False
7458
7526
  ),
7459
7527
  environment_variables={
@@ -7847,6 +7915,7 @@ class CommonProjectProps:
7847
7915
  class ComputeType(enum.Enum):
7848
7916
  '''Build machine compute type.
7849
7917
 
7918
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
7850
7919
  :exampleMetadata: infused
7851
7920
 
7852
7921
  Example::
@@ -8067,6 +8136,41 @@ class EfsFileSystemLocationProps:
8067
8136
  )
8068
8137
 
8069
8138
 
8139
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_codebuild.EnvironmentType")
8140
+ class EnvironmentType(enum.Enum):
8141
+ '''Build environment type.
8142
+
8143
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
8144
+ :exampleMetadata: infused
8145
+
8146
+ Example::
8147
+
8148
+ fleet = codebuild.Fleet(self, "Fleet",
8149
+ compute_type=codebuild.FleetComputeType.MEDIUM,
8150
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
8151
+ base_capacity=1
8152
+ )
8153
+
8154
+ codebuild.Project(self, "Project",
8155
+ environment=codebuild.BuildEnvironment(
8156
+ fleet=fleet,
8157
+ build_image=codebuild.LinuxBuildImage.STANDARD_7_0
8158
+ )
8159
+ )
8160
+ '''
8161
+
8162
+ ARM_CONTAINER = "ARM_CONTAINER"
8163
+ '''ARM container.'''
8164
+ LINUX_CONTAINER = "LINUX_CONTAINER"
8165
+ '''Linux container.'''
8166
+ LINUX_GPU_CONTAINER = "LINUX_GPU_CONTAINER"
8167
+ '''Linux GPU container.'''
8168
+ WINDOWS_SERVER_2019_CONTAINER = "WINDOWS_SERVER_2019_CONTAINER"
8169
+ '''Windows Server 2019 container.'''
8170
+ WINDOWS_SERVER_2022_CONTAINER = "WINDOWS_SERVER_2022_CONTAINER"
8171
+ '''Windows Server 2022 container.'''
8172
+
8173
+
8070
8174
  @jsii.enum(jsii_type="aws-cdk-lib.aws_codebuild.EventAction")
8071
8175
  class EventAction(enum.Enum):
8072
8176
  '''The types of webhook event actions.
@@ -8453,6 +8557,170 @@ class FilterGroup(
8453
8557
  return typing.cast("FilterGroup", jsii.invoke(self, "andTagIsNot", [tag_name]))
8454
8558
 
8455
8559
 
8560
+ @jsii.enum(jsii_type="aws-cdk-lib.aws_codebuild.FleetComputeType")
8561
+ class FleetComputeType(enum.Enum):
8562
+ '''Fleet build machine compute type. Subset of Fleet compatible {@link ComputeType} values.
8563
+
8564
+ The allocated memory, vCPU count and disk space of the build machine for a
8565
+ given compute type are dependent on the environment type.
8566
+ Some compute types may also not be available for all environment types.
8567
+
8568
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types
8569
+ :exampleMetadata: infused
8570
+
8571
+ Example::
8572
+
8573
+ fleet = codebuild.Fleet(self, "Fleet",
8574
+ compute_type=codebuild.FleetComputeType.MEDIUM,
8575
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
8576
+ base_capacity=1
8577
+ )
8578
+
8579
+ codebuild.Project(self, "Project",
8580
+ environment=codebuild.BuildEnvironment(
8581
+ fleet=fleet,
8582
+ build_image=codebuild.LinuxBuildImage.STANDARD_7_0
8583
+ )
8584
+ )
8585
+ '''
8586
+
8587
+ SMALL = "SMALL"
8588
+ '''Small compute type.
8589
+
8590
+ May not be available for all environment types, see
8591
+ {@link https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types docs}
8592
+ for more information.
8593
+ '''
8594
+ MEDIUM = "MEDIUM"
8595
+ '''Medium compute type.
8596
+
8597
+ May not be available for all environment types, see
8598
+ {@link https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types docs}
8599
+ for more information.
8600
+ '''
8601
+ LARGE = "LARGE"
8602
+ '''Large compute type.'''
8603
+ X_LARGE = "X_LARGE"
8604
+ '''Extra Large compute type.
8605
+
8606
+ May not be available for all environment types, see
8607
+ {@link https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types docs}
8608
+ for more information.
8609
+ '''
8610
+ X2_LARGE = "X2_LARGE"
8611
+ '''Extra, Extra Large compute type.
8612
+
8613
+ May not be available for all environment types, see
8614
+ {@link https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-compute-types.html#environment.types docs}
8615
+ for more information.
8616
+ '''
8617
+
8618
+
8619
+ @jsii.data_type(
8620
+ jsii_type="aws-cdk-lib.aws_codebuild.FleetProps",
8621
+ jsii_struct_bases=[],
8622
+ name_mapping={
8623
+ "base_capacity": "baseCapacity",
8624
+ "compute_type": "computeType",
8625
+ "environment_type": "environmentType",
8626
+ "fleet_name": "fleetName",
8627
+ },
8628
+ )
8629
+ class FleetProps:
8630
+ def __init__(
8631
+ self,
8632
+ *,
8633
+ base_capacity: jsii.Number,
8634
+ compute_type: FleetComputeType,
8635
+ environment_type: EnvironmentType,
8636
+ fleet_name: typing.Optional[builtins.str] = None,
8637
+ ) -> None:
8638
+ '''Construction properties of a CodeBuild {@link Fleet}.
8639
+
8640
+ :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.
8641
+ :param compute_type: The instance type of the compute fleet.
8642
+ :param environment_type: The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.
8643
+ :param fleet_name: The name of the Fleet. Default: - CloudFormation generated name
8644
+
8645
+ :exampleMetadata: infused
8646
+
8647
+ Example::
8648
+
8649
+ fleet = codebuild.Fleet(self, "Fleet",
8650
+ compute_type=codebuild.FleetComputeType.MEDIUM,
8651
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
8652
+ base_capacity=1
8653
+ )
8654
+
8655
+ codebuild.Project(self, "Project",
8656
+ environment=codebuild.BuildEnvironment(
8657
+ fleet=fleet,
8658
+ build_image=codebuild.LinuxBuildImage.STANDARD_7_0
8659
+ )
8660
+ )
8661
+ '''
8662
+ if __debug__:
8663
+ type_hints = typing.get_type_hints(_typecheckingstub__e7911aefc20674030e6eb6a13611d08046f9412fc45f97ff43a4ecf7591a2d5d)
8664
+ check_type(argname="argument base_capacity", value=base_capacity, expected_type=type_hints["base_capacity"])
8665
+ check_type(argname="argument compute_type", value=compute_type, expected_type=type_hints["compute_type"])
8666
+ check_type(argname="argument environment_type", value=environment_type, expected_type=type_hints["environment_type"])
8667
+ check_type(argname="argument fleet_name", value=fleet_name, expected_type=type_hints["fleet_name"])
8668
+ self._values: typing.Dict[builtins.str, typing.Any] = {
8669
+ "base_capacity": base_capacity,
8670
+ "compute_type": compute_type,
8671
+ "environment_type": environment_type,
8672
+ }
8673
+ if fleet_name is not None:
8674
+ self._values["fleet_name"] = fleet_name
8675
+
8676
+ @builtins.property
8677
+ def base_capacity(self) -> jsii.Number:
8678
+ '''The number of machines allocated to the compute fleet. Defines the number of builds that can run in parallel.
8679
+
8680
+ Minimum value of 1.
8681
+ '''
8682
+ result = self._values.get("base_capacity")
8683
+ assert result is not None, "Required property 'base_capacity' is missing"
8684
+ return typing.cast(jsii.Number, result)
8685
+
8686
+ @builtins.property
8687
+ def compute_type(self) -> FleetComputeType:
8688
+ '''The instance type of the compute fleet.
8689
+
8690
+ :see: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.ComputeType.html
8691
+ '''
8692
+ result = self._values.get("compute_type")
8693
+ assert result is not None, "Required property 'compute_type' is missing"
8694
+ return typing.cast(FleetComputeType, result)
8695
+
8696
+ @builtins.property
8697
+ def environment_type(self) -> EnvironmentType:
8698
+ '''The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.'''
8699
+ result = self._values.get("environment_type")
8700
+ assert result is not None, "Required property 'environment_type' is missing"
8701
+ return typing.cast(EnvironmentType, result)
8702
+
8703
+ @builtins.property
8704
+ def fleet_name(self) -> typing.Optional[builtins.str]:
8705
+ '''The name of the Fleet.
8706
+
8707
+ :default: - CloudFormation generated name
8708
+ '''
8709
+ result = self._values.get("fleet_name")
8710
+ return typing.cast(typing.Optional[builtins.str], result)
8711
+
8712
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
8713
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
8714
+
8715
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
8716
+ return not (rhs == self)
8717
+
8718
+ def __repr__(self) -> str:
8719
+ return "FleetProps(%s)" % ", ".join(
8720
+ k + "=" + repr(v) for k, v in self._values.items()
8721
+ )
8722
+
8723
+
8456
8724
  class GitHubEnterpriseSourceCredentials(
8457
8725
  _Resource_45bc6135,
8458
8726
  metaclass=jsii.JSIIMeta,
@@ -8793,6 +9061,7 @@ class IBuildImage(typing_extensions.Protocol):
8793
9061
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
8794
9062
  compute_type: typing.Optional[ComputeType] = None,
8795
9063
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
9064
+ fleet: typing.Optional["IFleet"] = None,
8796
9065
  privileged: typing.Optional[builtins.bool] = None,
8797
9066
  ) -> typing.List[builtins.str]:
8798
9067
  '''Allows the image a chance to validate whether the passed configuration is correct.
@@ -8801,6 +9070,7 @@ class IBuildImage(typing_extensions.Protocol):
8801
9070
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
8802
9071
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
8803
9072
  :param environment_variables: The environment variables that your builds can use.
9073
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
8804
9074
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
8805
9075
  '''
8806
9076
  ...
@@ -8882,6 +9152,7 @@ class _IBuildImageProxy:
8882
9152
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
8883
9153
  compute_type: typing.Optional[ComputeType] = None,
8884
9154
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
9155
+ fleet: typing.Optional["IFleet"] = None,
8885
9156
  privileged: typing.Optional[builtins.bool] = None,
8886
9157
  ) -> typing.List[builtins.str]:
8887
9158
  '''Allows the image a chance to validate whether the passed configuration is correct.
@@ -8890,6 +9161,7 @@ class _IBuildImageProxy:
8890
9161
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
8891
9162
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
8892
9163
  :param environment_variables: The environment variables that your builds can use.
9164
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
8893
9165
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
8894
9166
  '''
8895
9167
  build_environment = BuildEnvironment(
@@ -8897,6 +9169,7 @@ class _IBuildImageProxy:
8897
9169
  certificate=certificate,
8898
9170
  compute_type=compute_type,
8899
9171
  environment_variables=environment_variables,
9172
+ fleet=fleet,
8900
9173
  privileged=privileged,
8901
9174
  )
8902
9175
 
@@ -8956,6 +9229,88 @@ class _IFileSystemLocationProxy:
8956
9229
  typing.cast(typing.Any, IFileSystemLocation).__jsii_proxy_class__ = lambda : _IFileSystemLocationProxy
8957
9230
 
8958
9231
 
9232
+ @jsii.interface(jsii_type="aws-cdk-lib.aws_codebuild.IFleet")
9233
+ class IFleet(_IResource_c80c4260, typing_extensions.Protocol):
9234
+ '''Represents a {@link Fleet} for a reserved capacity CodeBuild project.'''
9235
+
9236
+ @builtins.property
9237
+ @jsii.member(jsii_name="computeType")
9238
+ def compute_type(self) -> FleetComputeType:
9239
+ '''The compute type of the fleet.
9240
+
9241
+ :see: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.ComputeType.html
9242
+ '''
9243
+ ...
9244
+
9245
+ @builtins.property
9246
+ @jsii.member(jsii_name="environmentType")
9247
+ def environment_type(self) -> EnvironmentType:
9248
+ '''The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.'''
9249
+ ...
9250
+
9251
+ @builtins.property
9252
+ @jsii.member(jsii_name="fleetArn")
9253
+ def fleet_arn(self) -> builtins.str:
9254
+ '''The ARN of the fleet.
9255
+
9256
+ :attribute: true
9257
+ '''
9258
+ ...
9259
+
9260
+ @builtins.property
9261
+ @jsii.member(jsii_name="fleetName")
9262
+ def fleet_name(self) -> builtins.str:
9263
+ '''The name of the fleet.
9264
+
9265
+ :attribute: true
9266
+ '''
9267
+ ...
9268
+
9269
+
9270
+ class _IFleetProxy(
9271
+ jsii.proxy_for(_IResource_c80c4260), # type: ignore[misc]
9272
+ ):
9273
+ '''Represents a {@link Fleet} for a reserved capacity CodeBuild project.'''
9274
+
9275
+ __jsii_type__: typing.ClassVar[str] = "aws-cdk-lib.aws_codebuild.IFleet"
9276
+
9277
+ @builtins.property
9278
+ @jsii.member(jsii_name="computeType")
9279
+ def compute_type(self) -> FleetComputeType:
9280
+ '''The compute type of the fleet.
9281
+
9282
+ :see: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.ComputeType.html
9283
+ '''
9284
+ return typing.cast(FleetComputeType, jsii.get(self, "computeType"))
9285
+
9286
+ @builtins.property
9287
+ @jsii.member(jsii_name="environmentType")
9288
+ def environment_type(self) -> EnvironmentType:
9289
+ '''The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.'''
9290
+ return typing.cast(EnvironmentType, jsii.get(self, "environmentType"))
9291
+
9292
+ @builtins.property
9293
+ @jsii.member(jsii_name="fleetArn")
9294
+ def fleet_arn(self) -> builtins.str:
9295
+ '''The ARN of the fleet.
9296
+
9297
+ :attribute: true
9298
+ '''
9299
+ return typing.cast(builtins.str, jsii.get(self, "fleetArn"))
9300
+
9301
+ @builtins.property
9302
+ @jsii.member(jsii_name="fleetName")
9303
+ def fleet_name(self) -> builtins.str:
9304
+ '''The name of the fleet.
9305
+
9306
+ :attribute: true
9307
+ '''
9308
+ return typing.cast(builtins.str, jsii.get(self, "fleetName"))
9309
+
9310
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
9311
+ typing.cast(typing.Any, IFleet).__jsii_proxy_class__ = lambda : _IFleetProxy
9312
+
9313
+
8959
9314
  @jsii.interface(jsii_type="aws-cdk-lib.aws_codebuild.IProject")
8960
9315
  class IProject(
8961
9316
  _IResource_c80c4260,
@@ -10267,6 +10622,7 @@ class LinuxArmBuildImage(
10267
10622
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
10268
10623
  compute_type: typing.Optional[ComputeType] = None,
10269
10624
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
10625
+ fleet: typing.Optional[IFleet] = None,
10270
10626
  privileged: typing.Optional[builtins.bool] = None,
10271
10627
  ) -> typing.List[builtins.str]:
10272
10628
  '''Validates by checking the BuildEnvironment computeType as aarch64 images only support ComputeType.SMALL and ComputeType.LARGE.
@@ -10275,6 +10631,7 @@ class LinuxArmBuildImage(
10275
10631
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
10276
10632
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
10277
10633
  :param environment_variables: The environment variables that your builds can use.
10634
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
10278
10635
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
10279
10636
  '''
10280
10637
  build_environment = BuildEnvironment(
@@ -10282,6 +10639,7 @@ class LinuxArmBuildImage(
10282
10639
  certificate=certificate,
10283
10640
  compute_type=compute_type,
10284
10641
  environment_variables=environment_variables,
10642
+ fleet=fleet,
10285
10643
  privileged=privileged,
10286
10644
  )
10287
10645
 
@@ -10292,7 +10650,7 @@ class LinuxArmBuildImage(
10292
10650
  def AMAZON_LINUX_2_STANDARD_1_0(cls) -> IBuildImage:
10293
10651
  '''(deprecated) Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0".
10294
10652
 
10295
- :deprecated: Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead.
10653
+ :deprecated: Use {@link LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 } instead.
10296
10654
 
10297
10655
  :stability: deprecated
10298
10656
  '''
@@ -10301,13 +10659,13 @@ class LinuxArmBuildImage(
10301
10659
  @jsii.python.classproperty
10302
10660
  @jsii.member(jsii_name="AMAZON_LINUX_2_STANDARD_2_0")
10303
10661
  def AMAZON_LINUX_2_STANDARD_2_0(cls) -> IBuildImage:
10304
- '''Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0".'''
10662
+ '''Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0" based on Amazon Linux 2.'''
10305
10663
  return typing.cast(IBuildImage, jsii.sget(cls, "AMAZON_LINUX_2_STANDARD_2_0"))
10306
10664
 
10307
10665
  @jsii.python.classproperty
10308
10666
  @jsii.member(jsii_name="AMAZON_LINUX_2_STANDARD_3_0")
10309
10667
  def AMAZON_LINUX_2_STANDARD_3_0(cls) -> IBuildImage:
10310
- '''Image "aws/codebuild/amazonlinux2-aarch64-standard:3.0".'''
10668
+ '''Image "aws/codebuild/amazonlinux2-aarch64-standard:3.0" based on Amazon Linux 2023.'''
10311
10669
  return typing.cast(IBuildImage, jsii.sget(cls, "AMAZON_LINUX_2_STANDARD_3_0"))
10312
10670
 
10313
10671
  @builtins.property
@@ -10387,6 +10745,7 @@ class LinuxArmLambdaBuildImage(
10387
10745
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
10388
10746
  compute_type: typing.Optional[ComputeType] = None,
10389
10747
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
10748
+ fleet: typing.Optional[IFleet] = None,
10390
10749
  privileged: typing.Optional[builtins.bool] = None,
10391
10750
  ) -> typing.List[builtins.str]:
10392
10751
  '''Allows the image a chance to validate whether the passed configuration is correct.
@@ -10395,6 +10754,7 @@ class LinuxArmLambdaBuildImage(
10395
10754
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
10396
10755
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
10397
10756
  :param environment_variables: The environment variables that your builds can use.
10757
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
10398
10758
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
10399
10759
  '''
10400
10760
  build_environment = BuildEnvironment(
@@ -10402,6 +10762,7 @@ class LinuxArmLambdaBuildImage(
10402
10762
  certificate=certificate,
10403
10763
  compute_type=compute_type,
10404
10764
  environment_variables=environment_variables,
10765
+ fleet=fleet,
10405
10766
  privileged=privileged,
10406
10767
  )
10407
10768
 
@@ -10698,6 +11059,7 @@ class LinuxBuildImage(
10698
11059
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
10699
11060
  compute_type: typing.Optional[ComputeType] = None,
10700
11061
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
11062
+ fleet: typing.Optional[IFleet] = None,
10701
11063
  privileged: typing.Optional[builtins.bool] = None,
10702
11064
  ) -> typing.List[builtins.str]:
10703
11065
  '''Allows the image a chance to validate whether the passed configuration is correct.
@@ -10706,6 +11068,7 @@ class LinuxBuildImage(
10706
11068
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
10707
11069
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
10708
11070
  :param environment_variables: The environment variables that your builds can use.
11071
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
10709
11072
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
10710
11073
  '''
10711
11074
  env = BuildEnvironment(
@@ -10713,6 +11076,7 @@ class LinuxBuildImage(
10713
11076
  certificate=certificate,
10714
11077
  compute_type=compute_type,
10715
11078
  environment_variables=environment_variables,
11079
+ fleet=fleet,
10716
11080
  privileged=privileged,
10717
11081
  )
10718
11082
 
@@ -10722,7 +11086,7 @@ class LinuxBuildImage(
10722
11086
  @jsii.member(jsii_name="AMAZON_LINUX_2")
10723
11087
  def AMAZON_LINUX_2(cls) -> IBuildImage:
10724
11088
  '''
10725
- :deprecated: Use LinuxBuildImage.AMAZON_LINUX_2_5 instead.
11089
+ :deprecated: Use {@link LinuxBuildImage.AMAZON_LINUX_2_5 } instead.
10726
11090
 
10727
11091
  :stability: deprecated
10728
11092
  '''
@@ -10732,7 +11096,7 @@ class LinuxBuildImage(
10732
11096
  @jsii.member(jsii_name="AMAZON_LINUX_2_2")
10733
11097
  def AMAZON_LINUX_2_2(cls) -> IBuildImage:
10734
11098
  '''
10735
- :deprecated: Use LinuxBuildImage.AMAZON_LINUX_2_5 instead.
11099
+ :deprecated: Use {@link LinuxBuildImage.AMAZON_LINUX_2_5 } instead.
10736
11100
 
10737
11101
  :stability: deprecated
10738
11102
  '''
@@ -10743,7 +11107,7 @@ class LinuxBuildImage(
10743
11107
  def AMAZON_LINUX_2_3(cls) -> IBuildImage:
10744
11108
  '''(deprecated) The Amazon Linux 2 x86_64 standard image, version ``3.0``.
10745
11109
 
10746
- :deprecated: Use LinuxBuildImage.AMAZON_LINUX_2_5 instead.
11110
+ :deprecated: Use {@link LinuxBuildImage.AMAZON_LINUX_2_5 } instead.
10747
11111
 
10748
11112
  :stability: deprecated
10749
11113
  '''
@@ -10758,15 +11122,17 @@ class LinuxBuildImage(
10758
11122
  @jsii.python.classproperty
10759
11123
  @jsii.member(jsii_name="AMAZON_LINUX_2_5")
10760
11124
  def AMAZON_LINUX_2_5(cls) -> IBuildImage:
10761
- '''The Amazon Linux 2 x86_64 standard image, version ``5.0``.'''
11125
+ '''The Amazon Linux 2023 x86_64 standard image, version ``5.0``.'''
10762
11126
  return typing.cast(IBuildImage, jsii.sget(cls, "AMAZON_LINUX_2_5"))
10763
11127
 
10764
11128
  @jsii.python.classproperty
10765
11129
  @jsii.member(jsii_name="AMAZON_LINUX_2_ARM")
10766
11130
  def AMAZON_LINUX_2_ARM(cls) -> IBuildImage:
10767
- '''
10768
- :deprecated: Use LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0 instead.
11131
+ '''(deprecated) Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0".
10769
11132
 
11133
+ :deprecated: Use {@link LinuxArmBuildImage.AMAZON_LINUX_2_ARM_3 } instead.
11134
+
11135
+ :see: {LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_1_0}
10770
11136
  :stability: deprecated
10771
11137
  '''
10772
11138
  return typing.cast(IBuildImage, jsii.sget(cls, "AMAZON_LINUX_2_ARM"))
@@ -10774,20 +11140,38 @@ class LinuxBuildImage(
10774
11140
  @jsii.python.classproperty
10775
11141
  @jsii.member(jsii_name="AMAZON_LINUX_2_ARM_2")
10776
11142
  def AMAZON_LINUX_2_ARM_2(cls) -> IBuildImage:
10777
- '''The ``aws/codebuild/amazonlinux2-aarch64-standard:2.0`` build image.'''
11143
+ '''Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0".
11144
+
11145
+ :see: {LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_2_0}
11146
+ '''
10778
11147
  return typing.cast(IBuildImage, jsii.sget(cls, "AMAZON_LINUX_2_ARM_2"))
10779
11148
 
10780
11149
  @jsii.python.classproperty
10781
11150
  @jsii.member(jsii_name="AMAZON_LINUX_2_ARM_3")
10782
11151
  def AMAZON_LINUX_2_ARM_3(cls) -> IBuildImage:
10783
- '''The ``aws/codebuild/amazonlinux2-aarch64-standard:3.0`` build image.'''
11152
+ '''Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0".
11153
+
11154
+ :see: {LinuxArmBuildImage.AMAZON_LINUX_2_STANDARD_3_0}
11155
+ '''
10784
11156
  return typing.cast(IBuildImage, jsii.sget(cls, "AMAZON_LINUX_2_ARM_3"))
10785
11157
 
11158
+ @jsii.python.classproperty
11159
+ @jsii.member(jsii_name="AMAZON_LINUX_2_CORETTO_11")
11160
+ def AMAZON_LINUX_2_CORETTO_11(cls) -> IBuildImage:
11161
+ '''The Amazon Coretto 11 image x86_64, based on Amazon Linux 2.'''
11162
+ return typing.cast(IBuildImage, jsii.sget(cls, "AMAZON_LINUX_2_CORETTO_11"))
11163
+
11164
+ @jsii.python.classproperty
11165
+ @jsii.member(jsii_name="AMAZON_LINUX_2_CORETTO_8")
11166
+ def AMAZON_LINUX_2_CORETTO_8(cls) -> IBuildImage:
11167
+ '''The Amazon Coretto 8 image x86_64, based on Amazon Linux 2.'''
11168
+ return typing.cast(IBuildImage, jsii.sget(cls, "AMAZON_LINUX_2_CORETTO_8"))
11169
+
10786
11170
  @jsii.python.classproperty
10787
11171
  @jsii.member(jsii_name="STANDARD_1_0")
10788
11172
  def STANDARD_1_0(cls) -> IBuildImage:
10789
11173
  '''
10790
- :deprecated: Use LinuxBuildImage.STANDARD_7_0 instead.
11174
+ :deprecated: Use {@link LinuxBuildImage.STANDARD_7_0 } instead.
10791
11175
 
10792
11176
  :stability: deprecated
10793
11177
  '''
@@ -10797,7 +11181,7 @@ class LinuxBuildImage(
10797
11181
  @jsii.member(jsii_name="STANDARD_2_0")
10798
11182
  def STANDARD_2_0(cls) -> IBuildImage:
10799
11183
  '''
10800
- :deprecated: Use LinuxBuildImage.STANDARD_7_0 instead.
11184
+ :deprecated: Use {@link LinuxBuildImage.STANDARD_7_0 } instead.
10801
11185
 
10802
11186
  :stability: deprecated
10803
11187
  '''
@@ -10807,7 +11191,7 @@ class LinuxBuildImage(
10807
11191
  @jsii.member(jsii_name="STANDARD_3_0")
10808
11192
  def STANDARD_3_0(cls) -> IBuildImage:
10809
11193
  '''
10810
- :deprecated: Use LinuxBuildImage.STANDARD_7_0 instead.
11194
+ :deprecated: Use {@link LinuxBuildImage.STANDARD_7_0 } instead.
10811
11195
 
10812
11196
  :stability: deprecated
10813
11197
  '''
@@ -10818,7 +11202,7 @@ class LinuxBuildImage(
10818
11202
  def STANDARD_4_0(cls) -> IBuildImage:
10819
11203
  '''(deprecated) The ``aws/codebuild/standard:4.0`` build image.
10820
11204
 
10821
- :deprecated: Use LinuxBuildImage.STANDARD_7_0 instead.
11205
+ :deprecated: Use {@link LinuxBuildImage.STANDARD_7_0 } instead.
10822
11206
 
10823
11207
  :stability: deprecated
10824
11208
  '''
@@ -10919,6 +11303,7 @@ class LinuxLambdaBuildImage(
10919
11303
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
10920
11304
  compute_type: typing.Optional[ComputeType] = None,
10921
11305
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
11306
+ fleet: typing.Optional[IFleet] = None,
10922
11307
  privileged: typing.Optional[builtins.bool] = None,
10923
11308
  ) -> typing.List[builtins.str]:
10924
11309
  '''Allows the image a chance to validate whether the passed configuration is correct.
@@ -10927,6 +11312,7 @@ class LinuxLambdaBuildImage(
10927
11312
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
10928
11313
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
10929
11314
  :param environment_variables: The environment variables that your builds can use.
11315
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
10930
11316
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
10931
11317
  '''
10932
11318
  build_environment = BuildEnvironment(
@@ -10934,6 +11320,7 @@ class LinuxLambdaBuildImage(
10934
11320
  certificate=certificate,
10935
11321
  compute_type=compute_type,
10936
11322
  environment_variables=environment_variables,
11323
+ fleet=fleet,
10937
11324
  privileged=privileged,
10938
11325
  )
10939
11326
 
@@ -14496,6 +14883,7 @@ class WindowsBuildImage(
14496
14883
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
14497
14884
  compute_type: typing.Optional[ComputeType] = None,
14498
14885
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
14886
+ fleet: typing.Optional[IFleet] = None,
14499
14887
  privileged: typing.Optional[builtins.bool] = None,
14500
14888
  ) -> typing.List[builtins.str]:
14501
14889
  '''Allows the image a chance to validate whether the passed configuration is correct.
@@ -14504,6 +14892,7 @@ class WindowsBuildImage(
14504
14892
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
14505
14893
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
14506
14894
  :param environment_variables: The environment variables that your builds can use.
14895
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
14507
14896
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
14508
14897
  '''
14509
14898
  build_environment = BuildEnvironment(
@@ -14511,6 +14900,7 @@ class WindowsBuildImage(
14511
14900
  certificate=certificate,
14512
14901
  compute_type=compute_type,
14513
14902
  environment_variables=environment_variables,
14903
+ fleet=fleet,
14514
14904
  privileged=privileged,
14515
14905
  )
14516
14906
 
@@ -14534,12 +14924,23 @@ class WindowsBuildImage(
14534
14924
  '''The standard CodeBuild image ``aws/codebuild/windows-base:2019-3.0``, which is based off Windows Server Core 2019.'''
14535
14925
  return typing.cast(IBuildImage, jsii.sget(cls, "WIN_SERVER_CORE_2019_BASE_3_0"))
14536
14926
 
14927
+ @jsii.python.classproperty
14928
+ @jsii.member(jsii_name="WIN_SERVER_CORE_2022_BASE_3_0")
14929
+ def WIN_SERVER_CORE_2022_BASE_3_0(cls) -> IBuildImage:
14930
+ '''The standard CodeBuild image ``aws/codebuild/windows-base:2022-1.0``, which is based off Windows Server Core 2022.
14931
+
14932
+ Notice: Cannot be used with on-demand compute, only with a {@link BuildEnvironment.fleet}.
14933
+
14934
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html
14935
+ '''
14936
+ return typing.cast(IBuildImage, jsii.sget(cls, "WIN_SERVER_CORE_2022_BASE_3_0"))
14937
+
14537
14938
  @jsii.python.classproperty
14538
14939
  @jsii.member(jsii_name="WINDOWS_BASE_2_0")
14539
14940
  def WINDOWS_BASE_2_0(cls) -> IBuildImage:
14540
14941
  '''(deprecated) The standard CodeBuild image ``aws/codebuild/windows-base:2.0``, which is based off Windows Server Core 2016.
14541
14942
 
14542
- :deprecated: ``WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0`` should be used instead.
14943
+ :deprecated: {@link WindowsBuildImage.WIN_SERVER_CORE_2019_BASE_3_0 } should be used instead.
14543
14944
 
14544
14945
  :stability: deprecated
14545
14946
  '''
@@ -14609,6 +15010,13 @@ class WindowsImageType(enum.Enum):
14609
15010
  '''The standard environment type, WINDOWS_CONTAINER.'''
14610
15011
  SERVER_2019 = "SERVER_2019"
14611
15012
  '''The WINDOWS_SERVER_2019_CONTAINER environment type.'''
15013
+ SERVER_2022 = "SERVER_2022"
15014
+ '''The WINDOWS_SERVER_2022_CONTAINER environment type.
15015
+
15016
+ Notice: Cannot be used with on-demand compute, only with a {@link BuildEnvironment.fleet}.
15017
+
15018
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html
15019
+ '''
14612
15020
 
14613
15021
 
14614
15022
  @jsii.implements(IArtifacts)
@@ -15111,6 +15519,118 @@ class CodeCommitSourceProps(SourceProps):
15111
15519
  )
15112
15520
 
15113
15521
 
15522
+ @jsii.implements(IFleet)
15523
+ class Fleet(
15524
+ _Resource_45bc6135,
15525
+ metaclass=jsii.JSIIMeta,
15526
+ jsii_type="aws-cdk-lib.aws_codebuild.Fleet",
15527
+ ):
15528
+ '''Fleet for a reserved capacity CodeBuild project.
15529
+
15530
+ Fleets allow for process builds or tests to run immediately and reduces build durations,
15531
+ by reserving compute resources for your projects.
15532
+
15533
+ You will be charged for the resources in the fleet, even if they are idle.
15534
+
15535
+ :see: https://docs.aws.amazon.com/codebuild/latest/userguide/fleets.html
15536
+ :exampleMetadata: infused
15537
+
15538
+ Example::
15539
+
15540
+ fleet = codebuild.Fleet(self, "Fleet",
15541
+ compute_type=codebuild.FleetComputeType.MEDIUM,
15542
+ environment_type=codebuild.EnvironmentType.LINUX_CONTAINER,
15543
+ base_capacity=1
15544
+ )
15545
+
15546
+ codebuild.Project(self, "Project",
15547
+ environment=codebuild.BuildEnvironment(
15548
+ fleet=fleet,
15549
+ build_image=codebuild.LinuxBuildImage.STANDARD_7_0
15550
+ )
15551
+ )
15552
+ '''
15553
+
15554
+ def __init__(
15555
+ self,
15556
+ scope: _constructs_77d1e7e8.Construct,
15557
+ id: builtins.str,
15558
+ *,
15559
+ base_capacity: jsii.Number,
15560
+ compute_type: FleetComputeType,
15561
+ environment_type: EnvironmentType,
15562
+ fleet_name: typing.Optional[builtins.str] = None,
15563
+ ) -> None:
15564
+ '''
15565
+ :param scope: -
15566
+ :param id: -
15567
+ :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.
15568
+ :param compute_type: The instance type of the compute fleet.
15569
+ :param environment_type: The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.
15570
+ :param fleet_name: The name of the Fleet. Default: - CloudFormation generated name
15571
+ '''
15572
+ if __debug__:
15573
+ type_hints = typing.get_type_hints(_typecheckingstub__68e9f035c12fa2c35bc62bc8d306e3651814bea9f53875aeea43b85f6612b957)
15574
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
15575
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
15576
+ props = FleetProps(
15577
+ base_capacity=base_capacity,
15578
+ compute_type=compute_type,
15579
+ environment_type=environment_type,
15580
+ fleet_name=fleet_name,
15581
+ )
15582
+
15583
+ jsii.create(self.__class__, self, [scope, id, props])
15584
+
15585
+ @jsii.member(jsii_name="fromFleetArn")
15586
+ @builtins.classmethod
15587
+ def from_fleet_arn(
15588
+ cls,
15589
+ scope: _constructs_77d1e7e8.Construct,
15590
+ id: builtins.str,
15591
+ fleet_arn: builtins.str,
15592
+ ) -> IFleet:
15593
+ '''Creates a Fleet construct that represents an external fleet.
15594
+
15595
+ :param scope: The scope creating construct (usually ``this``).
15596
+ :param id: The construct's id.
15597
+ :param fleet_arn: The ARN of the fleet.
15598
+ '''
15599
+ if __debug__:
15600
+ type_hints = typing.get_type_hints(_typecheckingstub__f1c9916e490a14e63381f197c3d3cdcf130f6420c1dc726baacfd458707222e3)
15601
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
15602
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
15603
+ check_type(argname="argument fleet_arn", value=fleet_arn, expected_type=type_hints["fleet_arn"])
15604
+ return typing.cast(IFleet, jsii.sinvoke(cls, "fromFleetArn", [scope, id, fleet_arn]))
15605
+
15606
+ @builtins.property
15607
+ @jsii.member(jsii_name="computeType")
15608
+ def compute_type(self) -> FleetComputeType:
15609
+ '''The compute type of the fleet.
15610
+
15611
+ :see: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_codebuild.ComputeType.html
15612
+ '''
15613
+ return typing.cast(FleetComputeType, jsii.get(self, "computeType"))
15614
+
15615
+ @builtins.property
15616
+ @jsii.member(jsii_name="environmentType")
15617
+ def environment_type(self) -> EnvironmentType:
15618
+ '''The build environment (operating system/architecture/accelerator) type made available to projects using this fleet.'''
15619
+ return typing.cast(EnvironmentType, jsii.get(self, "environmentType"))
15620
+
15621
+ @builtins.property
15622
+ @jsii.member(jsii_name="fleetArn")
15623
+ def fleet_arn(self) -> builtins.str:
15624
+ '''The ARN of the fleet.'''
15625
+ return typing.cast(builtins.str, jsii.get(self, "fleetArn"))
15626
+
15627
+ @builtins.property
15628
+ @jsii.member(jsii_name="fleetName")
15629
+ def fleet_name(self) -> builtins.str:
15630
+ '''The name of the fleet.'''
15631
+ return typing.cast(builtins.str, jsii.get(self, "fleetName"))
15632
+
15633
+
15114
15634
  @jsii.data_type(
15115
15635
  jsii_type="aws-cdk-lib.aws_codebuild.GitHubEnterpriseSourceProps",
15116
15636
  jsii_struct_bases=[SourceProps],
@@ -15781,6 +16301,7 @@ class LinuxGpuBuildImage(
15781
16301
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
15782
16302
  compute_type: typing.Optional[ComputeType] = None,
15783
16303
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
16304
+ fleet: typing.Optional[IFleet] = None,
15784
16305
  privileged: typing.Optional[builtins.bool] = None,
15785
16306
  ) -> typing.List[builtins.str]:
15786
16307
  '''Allows the image a chance to validate whether the passed configuration is correct.
@@ -15789,6 +16310,7 @@ class LinuxGpuBuildImage(
15789
16310
  :param certificate: The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the project
15790
16311
  :param compute_type: The type of compute to use for this build. See the ``ComputeType`` enum for the possible values. Default: taken from ``#buildImage#defaultComputeType``
15791
16312
  :param environment_variables: The environment variables that your builds can use.
16313
+ :param fleet: Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.
15792
16314
  :param privileged: Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
15793
16315
  '''
15794
16316
  build_environment = BuildEnvironment(
@@ -15796,6 +16318,7 @@ class LinuxGpuBuildImage(
15796
16318
  certificate=certificate,
15797
16319
  compute_type=compute_type,
15798
16320
  environment_variables=environment_variables,
16321
+ fleet=fleet,
15799
16322
  privileged=privileged,
15800
16323
  )
15801
16324
 
@@ -16204,10 +16727,14 @@ __all__ = [
16204
16727
  "ComputeType",
16205
16728
  "DockerImageOptions",
16206
16729
  "EfsFileSystemLocationProps",
16730
+ "EnvironmentType",
16207
16731
  "EventAction",
16208
16732
  "FileSystemConfig",
16209
16733
  "FileSystemLocation",
16210
16734
  "FilterGroup",
16735
+ "Fleet",
16736
+ "FleetComputeType",
16737
+ "FleetProps",
16211
16738
  "GitHubEnterpriseSourceCredentials",
16212
16739
  "GitHubEnterpriseSourceCredentialsProps",
16213
16740
  "GitHubEnterpriseSourceProps",
@@ -16218,6 +16745,7 @@ __all__ = [
16218
16745
  "IBindableBuildImage",
16219
16746
  "IBuildImage",
16220
16747
  "IFileSystemLocation",
16748
+ "IFleet",
16221
16749
  "IProject",
16222
16750
  "IReportGroup",
16223
16751
  "ISource",
@@ -16313,6 +16841,7 @@ def _typecheckingstub__ba89ab1467720a2862905a012ed6b6da7a2294a6ebfc22557f6a64dce
16313
16841
  certificate: typing.Optional[typing.Union[BuildEnvironmentCertificate, typing.Dict[builtins.str, typing.Any]]] = None,
16314
16842
  compute_type: typing.Optional[ComputeType] = None,
16315
16843
  environment_variables: typing.Optional[typing.Mapping[builtins.str, typing.Union[BuildEnvironmentVariable, typing.Dict[builtins.str, typing.Any]]]] = None,
16844
+ fleet: typing.Optional[IFleet] = None,
16316
16845
  privileged: typing.Optional[builtins.bool] = None,
16317
16846
  ) -> None:
16318
16847
  """Type checking stubs"""
@@ -17194,6 +17723,16 @@ def _typecheckingstub__676f5124f893dc0b6202f68555327786478ed0b8b34024f112667fcfa
17194
17723
  """Type checking stubs"""
17195
17724
  pass
17196
17725
 
17726
+ def _typecheckingstub__e7911aefc20674030e6eb6a13611d08046f9412fc45f97ff43a4ecf7591a2d5d(
17727
+ *,
17728
+ base_capacity: jsii.Number,
17729
+ compute_type: FleetComputeType,
17730
+ environment_type: EnvironmentType,
17731
+ fleet_name: typing.Optional[builtins.str] = None,
17732
+ ) -> None:
17733
+ """Type checking stubs"""
17734
+ pass
17735
+
17197
17736
  def _typecheckingstub__67a541e6087cc5285b339097a07b42d922ad04b68873f2a057bb61c841581c10(
17198
17737
  scope: _constructs_77d1e7e8.Construct,
17199
17738
  id: builtins.str,
@@ -17941,6 +18480,26 @@ def _typecheckingstub__4ad3a1902275eeef3ca62e2ddb713181b105bf4060f1ccb2e682a41f4
17941
18480
  """Type checking stubs"""
17942
18481
  pass
17943
18482
 
18483
+ def _typecheckingstub__68e9f035c12fa2c35bc62bc8d306e3651814bea9f53875aeea43b85f6612b957(
18484
+ scope: _constructs_77d1e7e8.Construct,
18485
+ id: builtins.str,
18486
+ *,
18487
+ base_capacity: jsii.Number,
18488
+ compute_type: FleetComputeType,
18489
+ environment_type: EnvironmentType,
18490
+ fleet_name: typing.Optional[builtins.str] = None,
18491
+ ) -> None:
18492
+ """Type checking stubs"""
18493
+ pass
18494
+
18495
+ def _typecheckingstub__f1c9916e490a14e63381f197c3d3cdcf130f6420c1dc726baacfd458707222e3(
18496
+ scope: _constructs_77d1e7e8.Construct,
18497
+ id: builtins.str,
18498
+ fleet_arn: builtins.str,
18499
+ ) -> None:
18500
+ """Type checking stubs"""
18501
+ pass
18502
+
17944
18503
  def _typecheckingstub__7f39f1e5e14cca44ce85e0f80353a21e81b89f72c74c9109a0c9e0a1553d31b7(
17945
18504
  *,
17946
18505
  identifier: typing.Optional[builtins.str] = None,