cloudsnorkel.cdk-github-runners 0.11.6__py3-none-any.whl → 0.12.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.
@@ -207,19 +207,13 @@ new GitHubRunners(this, 'runners', {
207
207
  Another way to customize runners is by modifying the image used to spin them up. The image contains the [runner](https://github.com/actions/runner), any required dependencies, and integration code with the provider. You may choose to customize this image by adding more packages, for example.
208
208
 
209
209
  ```python
210
- const myBuilder = CodeBuildRunnerProvider.imageBuilder(this, 'image builder', {
211
- dockerfilePath: FargateRunner.LINUX_X64_DOCKERFILE_PATH,
212
- runnerVersion: RunnerVersion.specific('2.291.0'),
213
- rebuildInterval: Duration.days(14),
214
- });
210
+ const myBuilder = FargateRunnerProvider.imageBuilder(this, 'image builder');
215
211
  myBuilder.addComponent(
216
- RunnerImageComponent.custom({ commands: ['apt install -y nginx xz-utils'] })
212
+ RunnerImageComponent.custom({ commands: ['apt install -y nginx xz-utils'] }),
217
213
  );
218
214
 
219
215
  const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
220
216
  labels: ['customized-fargate'],
221
- vpc: vpc,
222
- securityGroups: [runnerSg],
223
217
  imageBuilder: myBuilder,
224
218
  });
225
219
 
@@ -247,24 +241,20 @@ Windows images can also be customized the same way.
247
241
  const myWindowsBuilder = FargateRunnerProvider.imageBuilder(this, 'Windows image builder', {
248
242
  architecture: Architecture.X86_64,
249
243
  os: Os.WINDOWS,
250
- runnerVersion: RunnerVersion.specific('2.291.0'),
251
- rebuildInterval: Duration.days(14),
252
244
  });
253
245
  myWindowsBuilder.addComponent(
254
- RunnerImageComponent.custom({
255
- name: 'Ninja',
256
- commands: [
257
- 'Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile ninja.zip',
258
- 'Expand-Archive ninja.zip -DestinationPath C:\\actions',
259
- 'del ninja.zip',
260
- ],
261
- })
246
+ RunnerImageComponent.custom({
247
+ name: 'Ninja',
248
+ commands: [
249
+ 'Invoke-WebRequest -UseBasicParsing -Uri "https://github.com/ninja-build/ninja/releases/download/v1.11.1/ninja-win.zip" -OutFile ninja.zip',
250
+ 'Expand-Archive ninja.zip -DestinationPath C:\\actions',
251
+ 'del ninja.zip',
252
+ ],
253
+ }),
262
254
  );
263
255
 
264
256
  const myProvider = new FargateRunnerProvider(this, 'fargate runner', {
265
257
  labels: ['customized-windows-fargate'],
266
- vpc: vpc,
267
- securityGroups: [runnerSg],
268
258
  imageBuilder: myWindowsBuilder,
269
259
  });
270
260
 
@@ -2929,6 +2919,27 @@ class ImageBuilderComponent(
2929
2919
 
2930
2920
  jsii.create(self.__class__, self, [scope, id, props])
2931
2921
 
2922
+ @jsii.member(jsii_name="generateVersion")
2923
+ def _generate_version(
2924
+ self,
2925
+ type: builtins.str,
2926
+ name: builtins.str,
2927
+ data: typing.Any,
2928
+ ) -> builtins.str:
2929
+ '''
2930
+ :param type: -
2931
+ :param name: -
2932
+ :param data: -
2933
+
2934
+ :stability: deprecated
2935
+ '''
2936
+ if __debug__:
2937
+ type_hints = typing.get_type_hints(_typecheckingstub__abecb3decfe8eebf190daa2e93a508111cc10650e6b9fbf65b3a34f3ed07ca24)
2938
+ check_type(argname="argument type", value=type, expected_type=type_hints["type"])
2939
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
2940
+ check_type(argname="argument data", value=data, expected_type=type_hints["data"])
2941
+ return typing.cast(builtins.str, jsii.invoke(self, "generateVersion", [type, name, data]))
2942
+
2932
2943
  @jsii.member(jsii_name="grantAssetsRead")
2933
2944
  def grant_assets_read(self, grantee: _aws_cdk_aws_iam_ceddda9d.IGrantable) -> None:
2934
2945
  '''(deprecated) Grants read permissions to the principal on the assets buckets.
@@ -2960,27 +2971,6 @@ class ImageBuilderComponent(
2960
2971
  check_type(argname="argument commands", value=commands, expected_type=type_hints["commands"])
2961
2972
  return typing.cast(typing.List[builtins.str], jsii.invoke(self, "prefixCommandsWithErrorHandling", [platform, commands]))
2962
2973
 
2963
- @jsii.member(jsii_name="version")
2964
- def _version(
2965
- self,
2966
- type: builtins.str,
2967
- name: builtins.str,
2968
- data: typing.Any,
2969
- ) -> builtins.str:
2970
- '''
2971
- :param type: -
2972
- :param name: -
2973
- :param data: -
2974
-
2975
- :stability: deprecated
2976
- '''
2977
- if __debug__:
2978
- type_hints = typing.get_type_hints(_typecheckingstub__e11323aa6f18ef1898e18067dba5908fdeabd333bfc1604f92c4c244adb28f7f)
2979
- check_type(argname="argument type", value=type, expected_type=type_hints["type"])
2980
- check_type(argname="argument name", value=name, expected_type=type_hints["name"])
2981
- check_type(argname="argument data", value=data, expected_type=type_hints["data"])
2982
- return typing.cast(builtins.str, jsii.invoke(self, "version", [type, name, data]))
2983
-
2984
2974
  @builtins.property
2985
2975
  @jsii.member(jsii_name="arn")
2986
2976
  def arn(self) -> builtins.str:
@@ -3363,8 +3353,14 @@ class LambdaRunnerProvider(
3363
3353
  security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
3364
3354
  subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
3365
3355
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
3366
- ) -> "RunnerImageBuilder":
3367
- '''(experimental) Create new image builder that builds Lambda specific runner images using Amazon Linux 2.
3356
+ ) -> "IConfigurableRunnerImageBuilder":
3357
+ '''(experimental) Create new image builder that builds Lambda specific runner images.
3358
+
3359
+ You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
3360
+
3361
+ You can add components to the image builder by calling ``imageBuilder.addComponent()``.
3362
+
3363
+ The default OS is Amazon Linux 2 running on x64 architecture.
3368
3364
 
3369
3365
  Included components:
3370
3366
 
@@ -3420,7 +3416,7 @@ class LambdaRunnerProvider(
3420
3416
  vpc=vpc,
3421
3417
  )
3422
3418
 
3423
- return typing.cast("RunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
3419
+ return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
3424
3420
 
3425
3421
  @jsii.member(jsii_name="getStepFunctionTask")
3426
3422
  def get_step_function_task(
@@ -4396,25 +4392,30 @@ class RunnerImageAsset:
4396
4392
  )
4397
4393
 
4398
4394
 
4399
- @jsii.implements(_aws_cdk_aws_ec2_ceddda9d.IConnectable, _aws_cdk_aws_iam_ceddda9d.IGrantable, IRunnerImageBuilder)
4400
- class RunnerImageBuilder(
4401
- _constructs_77d1e7e8.Construct,
4402
- metaclass=jsii.JSIIAbstractClass,
4403
- jsii_type="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder",
4404
- ):
4405
- '''(experimental) GitHub Runner image builder. Builds a Docker image or AMI with GitHub Runner and other requirements installed.
4406
-
4407
- Images can be customized before passed into the provider by adding or removing components to be installed.
4408
-
4409
- Images are rebuilt every week by default to ensure that the latest security patches are applied.
4410
-
4411
- :stability: experimental
4412
- '''
4413
-
4395
+ @jsii.data_type(
4396
+ jsii_type="@cloudsnorkel/cdk-github-runners.RunnerImageBuilderProps",
4397
+ jsii_struct_bases=[],
4398
+ name_mapping={
4399
+ "architecture": "architecture",
4400
+ "aws_image_builder_options": "awsImageBuilderOptions",
4401
+ "base_ami": "baseAmi",
4402
+ "base_docker_image": "baseDockerImage",
4403
+ "builder_type": "builderType",
4404
+ "code_build_options": "codeBuildOptions",
4405
+ "components": "components",
4406
+ "log_removal_policy": "logRemovalPolicy",
4407
+ "log_retention": "logRetention",
4408
+ "os": "os",
4409
+ "rebuild_interval": "rebuildInterval",
4410
+ "runner_version": "runnerVersion",
4411
+ "security_groups": "securityGroups",
4412
+ "subnet_selection": "subnetSelection",
4413
+ "vpc": "vpc",
4414
+ },
4415
+ )
4416
+ class RunnerImageBuilderProps:
4414
4417
  def __init__(
4415
4418
  self,
4416
- scope: _constructs_77d1e7e8.Construct,
4417
- id: builtins.str,
4418
4419
  *,
4419
4420
  architecture: typing.Optional[Architecture] = None,
4420
4421
  aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -4433,8 +4434,6 @@ class RunnerImageBuilder(
4433
4434
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
4434
4435
  ) -> None:
4435
4436
  '''
4436
- :param scope: -
4437
- :param id: -
4438
4437
  :param architecture: (experimental) Image architecture. Default: Architecture.X86_64
4439
4438
  :param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
4440
4439
  :param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
@@ -4453,513 +4452,215 @@ class RunnerImageBuilder(
4453
4452
 
4454
4453
  :stability: experimental
4455
4454
  '''
4455
+ if isinstance(aws_image_builder_options, dict):
4456
+ aws_image_builder_options = AwsImageBuilderRunnerImageBuilderProps(**aws_image_builder_options)
4457
+ if isinstance(code_build_options, dict):
4458
+ code_build_options = CodeBuildRunnerImageBuilderProps(**code_build_options)
4459
+ if isinstance(subnet_selection, dict):
4460
+ subnet_selection = _aws_cdk_aws_ec2_ceddda9d.SubnetSelection(**subnet_selection)
4456
4461
  if __debug__:
4457
- type_hints = typing.get_type_hints(_typecheckingstub__963c9a4884bb9d7400672391dfb47486f969a1b8fe5616bba9cd493e8a71484b)
4458
- check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
4459
- check_type(argname="argument id", value=id, expected_type=type_hints["id"])
4460
- props = RunnerImageBuilderProps(
4461
- architecture=architecture,
4462
- aws_image_builder_options=aws_image_builder_options,
4463
- base_ami=base_ami,
4464
- base_docker_image=base_docker_image,
4465
- builder_type=builder_type,
4466
- code_build_options=code_build_options,
4467
- components=components,
4468
- log_removal_policy=log_removal_policy,
4469
- log_retention=log_retention,
4470
- os=os,
4471
- rebuild_interval=rebuild_interval,
4472
- runner_version=runner_version,
4473
- security_groups=security_groups,
4474
- subnet_selection=subnet_selection,
4475
- vpc=vpc,
4476
- )
4477
-
4478
- jsii.create(self.__class__, self, [scope, id, props])
4479
-
4480
- @jsii.member(jsii_name="new")
4481
- @builtins.classmethod
4482
- def new(
4483
- cls,
4484
- scope: _constructs_77d1e7e8.Construct,
4485
- id: builtins.str,
4486
- *,
4487
- architecture: typing.Optional[Architecture] = None,
4488
- aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
4489
- base_ami: typing.Optional[builtins.str] = None,
4490
- base_docker_image: typing.Optional[builtins.str] = None,
4491
- builder_type: typing.Optional["RunnerImageBuilderType"] = None,
4492
- code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
4493
- components: typing.Optional[typing.Sequence["RunnerImageComponent"]] = None,
4494
- log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
4495
- log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
4496
- os: typing.Optional[Os] = None,
4497
- rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
4498
- runner_version: typing.Optional["RunnerVersion"] = None,
4499
- security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
4500
- subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
4501
- vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
4502
- ) -> "RunnerImageBuilder":
4503
- '''(experimental) Create a new image builder based on the provided properties.
4462
+ type_hints = typing.get_type_hints(_typecheckingstub__ab96b7f3871624e8430668114e7f5748ba5d253168db5b8f9a13955d0a82e43d)
4463
+ check_type(argname="argument architecture", value=architecture, expected_type=type_hints["architecture"])
4464
+ check_type(argname="argument aws_image_builder_options", value=aws_image_builder_options, expected_type=type_hints["aws_image_builder_options"])
4465
+ check_type(argname="argument base_ami", value=base_ami, expected_type=type_hints["base_ami"])
4466
+ check_type(argname="argument base_docker_image", value=base_docker_image, expected_type=type_hints["base_docker_image"])
4467
+ check_type(argname="argument builder_type", value=builder_type, expected_type=type_hints["builder_type"])
4468
+ check_type(argname="argument code_build_options", value=code_build_options, expected_type=type_hints["code_build_options"])
4469
+ check_type(argname="argument components", value=components, expected_type=type_hints["components"])
4470
+ check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
4471
+ check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
4472
+ check_type(argname="argument os", value=os, expected_type=type_hints["os"])
4473
+ check_type(argname="argument rebuild_interval", value=rebuild_interval, expected_type=type_hints["rebuild_interval"])
4474
+ check_type(argname="argument runner_version", value=runner_version, expected_type=type_hints["runner_version"])
4475
+ check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
4476
+ check_type(argname="argument subnet_selection", value=subnet_selection, expected_type=type_hints["subnet_selection"])
4477
+ check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
4478
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
4479
+ if architecture is not None:
4480
+ self._values["architecture"] = architecture
4481
+ if aws_image_builder_options is not None:
4482
+ self._values["aws_image_builder_options"] = aws_image_builder_options
4483
+ if base_ami is not None:
4484
+ self._values["base_ami"] = base_ami
4485
+ if base_docker_image is not None:
4486
+ self._values["base_docker_image"] = base_docker_image
4487
+ if builder_type is not None:
4488
+ self._values["builder_type"] = builder_type
4489
+ if code_build_options is not None:
4490
+ self._values["code_build_options"] = code_build_options
4491
+ if components is not None:
4492
+ self._values["components"] = components
4493
+ if log_removal_policy is not None:
4494
+ self._values["log_removal_policy"] = log_removal_policy
4495
+ if log_retention is not None:
4496
+ self._values["log_retention"] = log_retention
4497
+ if os is not None:
4498
+ self._values["os"] = os
4499
+ if rebuild_interval is not None:
4500
+ self._values["rebuild_interval"] = rebuild_interval
4501
+ if runner_version is not None:
4502
+ self._values["runner_version"] = runner_version
4503
+ if security_groups is not None:
4504
+ self._values["security_groups"] = security_groups
4505
+ if subnet_selection is not None:
4506
+ self._values["subnet_selection"] = subnet_selection
4507
+ if vpc is not None:
4508
+ self._values["vpc"] = vpc
4504
4509
 
4505
- The implementation will differ based on the OS, architecture, and requested builder type.
4510
+ @builtins.property
4511
+ def architecture(self) -> typing.Optional[Architecture]:
4512
+ '''(experimental) Image architecture.
4506
4513
 
4507
- :param scope: -
4508
- :param id: -
4509
- :param architecture: (experimental) Image architecture. Default: Architecture.X86_64
4510
- :param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
4511
- :param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
4512
- :param base_docker_image: (experimental) Base image from which Docker runner images will be built. Default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
4513
- :param builder_type: Default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
4514
- :param code_build_options: (experimental) Options specific to CodeBuild image builder. Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
4515
- :param components: (experimental) Components to install on the image. Default: none
4516
- :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
4517
- :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
4518
- :param os: (experimental) Image OS. Default: OS.LINUX_UBUNTU
4519
- :param rebuild_interval: (experimental) Schedule the image to be rebuilt every given interval. Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates. Set to zero to disable. Default: Duration.days(7)
4520
- :param runner_version: (experimental) Version of GitHub Runners to install. Default: latest version available
4521
- :param security_groups: (experimental) Security Groups to assign to this instance.
4522
- :param subnet_selection: (experimental) Where to place the network interfaces within the VPC. Default: no subnet
4523
- :param vpc: (experimental) VPC to build the image in. Default: no VPC
4514
+ :default: Architecture.X86_64
4524
4515
 
4525
4516
  :stability: experimental
4526
4517
  '''
4527
- if __debug__:
4528
- type_hints = typing.get_type_hints(_typecheckingstub__c44d5704c54d7fdcf24ad39567c0e9f53f9837163bf8bf3b1b4e652e27c9ec75)
4529
- check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
4530
- check_type(argname="argument id", value=id, expected_type=type_hints["id"])
4531
- props = RunnerImageBuilderProps(
4532
- architecture=architecture,
4533
- aws_image_builder_options=aws_image_builder_options,
4534
- base_ami=base_ami,
4535
- base_docker_image=base_docker_image,
4536
- builder_type=builder_type,
4537
- code_build_options=code_build_options,
4538
- components=components,
4539
- log_removal_policy=log_removal_policy,
4540
- log_retention=log_retention,
4541
- os=os,
4542
- rebuild_interval=rebuild_interval,
4543
- runner_version=runner_version,
4544
- security_groups=security_groups,
4545
- subnet_selection=subnet_selection,
4546
- vpc=vpc,
4547
- )
4548
-
4549
- return typing.cast("RunnerImageBuilder", jsii.sinvoke(cls, "new", [scope, id, props]))
4550
-
4551
- @jsii.member(jsii_name="addComponent")
4552
- def add_component(self, component: "RunnerImageComponent") -> None:
4553
- '''(experimental) Add a component to the image builder.
4518
+ result = self._values.get("architecture")
4519
+ return typing.cast(typing.Optional[Architecture], result)
4554
4520
 
4555
- The component will be added to the end of the list of components.
4521
+ @builtins.property
4522
+ def aws_image_builder_options(
4523
+ self,
4524
+ ) -> typing.Optional[AwsImageBuilderRunnerImageBuilderProps]:
4525
+ '''(experimental) Options specific to AWS Image Builder.
4556
4526
 
4557
- :param component: component to add.
4527
+ Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
4558
4528
 
4559
4529
  :stability: experimental
4560
4530
  '''
4561
- if __debug__:
4562
- type_hints = typing.get_type_hints(_typecheckingstub__9dec4d5fbab87fa223a0eb0a144ad5bd91f9cdd54d3337c971ce6435c76dc049)
4563
- check_type(argname="argument component", value=component, expected_type=type_hints["component"])
4564
- return typing.cast(None, jsii.invoke(self, "addComponent", [component]))
4531
+ result = self._values.get("aws_image_builder_options")
4532
+ return typing.cast(typing.Optional[AwsImageBuilderRunnerImageBuilderProps], result)
4565
4533
 
4566
- @jsii.member(jsii_name="bindAmi")
4567
- @abc.abstractmethod
4568
- def bind_ami(self) -> RunnerAmi:
4569
- '''(experimental) Build and return an AMI with GitHub Runner installed in it.
4534
+ @builtins.property
4535
+ def base_ami(self) -> typing.Optional[builtins.str]:
4536
+ '''(experimental) Base AMI from which runner AMIs will be built.
4570
4537
 
4571
- Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else.
4538
+ This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version.
4572
4539
 
4573
- The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template.
4540
+ :default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
4574
4541
 
4575
4542
  :stability: experimental
4576
4543
  '''
4577
- ...
4578
-
4579
- @jsii.member(jsii_name="bindDockerImage")
4580
- @abc.abstractmethod
4581
- def bind_docker_image(self) -> RunnerImage:
4582
- '''(experimental) Build and return a Docker image with GitHub Runner installed in it.
4583
-
4584
- Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else.
4544
+ result = self._values.get("base_ami")
4545
+ return typing.cast(typing.Optional[builtins.str], result)
4585
4546
 
4586
- It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not.
4547
+ @builtins.property
4548
+ def base_docker_image(self) -> typing.Optional[builtins.str]:
4549
+ '''(experimental) Base image from which Docker runner images will be built.
4587
4550
 
4588
- The image can be further updated over time manually or using a schedule as long as it is always written to the same tag.
4551
+ :default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
4589
4552
 
4590
4553
  :stability: experimental
4591
4554
  '''
4592
- ...
4593
-
4594
- @jsii.member(jsii_name="removeComponent")
4595
- def remove_component(self, component: "RunnerImageComponent") -> None:
4596
- '''(experimental) Remove a component from the image builder.
4597
-
4598
- Removal is done by component name. Multiple components with the same name will all be removed.
4555
+ result = self._values.get("base_docker_image")
4556
+ return typing.cast(typing.Optional[builtins.str], result)
4599
4557
 
4600
- :param component: component to remove.
4558
+ @builtins.property
4559
+ def builder_type(self) -> typing.Optional["RunnerImageBuilderType"]:
4560
+ '''
4561
+ :default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
4601
4562
 
4602
4563
  :stability: experimental
4603
4564
  '''
4604
- if __debug__:
4605
- type_hints = typing.get_type_hints(_typecheckingstub__1c4318b2834e7865918b5308b85c0fd80f22d29a067d68d4ee8537a6c0c88b3b)
4606
- check_type(argname="argument component", value=component, expected_type=type_hints["component"])
4607
- return typing.cast(None, jsii.invoke(self, "removeComponent", [component]))
4565
+ result = self._values.get("builder_type")
4566
+ return typing.cast(typing.Optional["RunnerImageBuilderType"], result)
4608
4567
 
4609
4568
  @builtins.property
4610
- @jsii.member(jsii_name="connections")
4611
- @abc.abstractmethod
4612
- def connections(self) -> _aws_cdk_aws_ec2_ceddda9d.Connections:
4613
- '''(experimental) The network connections associated with this resource.
4569
+ def code_build_options(self) -> typing.Optional[CodeBuildRunnerImageBuilderProps]:
4570
+ '''(experimental) Options specific to CodeBuild image builder.
4571
+
4572
+ Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
4614
4573
 
4615
4574
  :stability: experimental
4616
4575
  '''
4617
- ...
4576
+ result = self._values.get("code_build_options")
4577
+ return typing.cast(typing.Optional[CodeBuildRunnerImageBuilderProps], result)
4618
4578
 
4619
4579
  @builtins.property
4620
- @jsii.member(jsii_name="grantPrincipal")
4621
- @abc.abstractmethod
4622
- def grant_principal(self) -> _aws_cdk_aws_iam_ceddda9d.IPrincipal:
4623
- '''(experimental) The principal to grant permissions to.
4580
+ def components(self) -> typing.Optional[typing.List["RunnerImageComponent"]]:
4581
+ '''(experimental) Components to install on the image.
4624
4582
 
4625
- :stability: experimental
4626
- '''
4627
- ...
4583
+ :default: none
4628
4584
 
4629
- @builtins.property
4630
- @jsii.member(jsii_name="components")
4631
- def _components(self) -> typing.List["RunnerImageComponent"]:
4632
- '''
4633
4585
  :stability: experimental
4634
4586
  '''
4635
- return typing.cast(typing.List["RunnerImageComponent"], jsii.get(self, "components"))
4636
-
4637
- @_components.setter
4638
- def _components(self, value: typing.List["RunnerImageComponent"]) -> None:
4639
- if __debug__:
4640
- type_hints = typing.get_type_hints(_typecheckingstub__705c18a1eedaa490aebad511aac32a801519a57162e30be4673a8ab87ca434dc)
4641
- check_type(argname="argument value", value=value, expected_type=type_hints["value"])
4642
- jsii.set(self, "components", value)
4587
+ result = self._values.get("components")
4588
+ return typing.cast(typing.Optional[typing.List["RunnerImageComponent"]], result)
4643
4589
 
4590
+ @builtins.property
4591
+ def log_removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
4592
+ '''(experimental) Removal policy for logs of image builds.
4644
4593
 
4645
- class _RunnerImageBuilderProxy(RunnerImageBuilder):
4646
- @jsii.member(jsii_name="bindAmi")
4647
- def bind_ami(self) -> RunnerAmi:
4648
- '''(experimental) Build and return an AMI with GitHub Runner installed in it.
4594
+ If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed.
4649
4595
 
4650
- Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else.
4596
+ We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
4651
4597
 
4652
- The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template.
4598
+ :default: RemovalPolicy.DESTROY
4653
4599
 
4654
4600
  :stability: experimental
4655
4601
  '''
4656
- return typing.cast(RunnerAmi, jsii.invoke(self, "bindAmi", []))
4657
-
4658
- @jsii.member(jsii_name="bindDockerImage")
4659
- def bind_docker_image(self) -> RunnerImage:
4660
- '''(experimental) Build and return a Docker image with GitHub Runner installed in it.
4602
+ result = self._values.get("log_removal_policy")
4603
+ return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
4661
4604
 
4662
- Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else.
4605
+ @builtins.property
4606
+ def log_retention(
4607
+ self,
4608
+ ) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays]:
4609
+ '''(experimental) The number of days log events are kept in CloudWatch Logs.
4663
4610
 
4664
- It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not.
4611
+ When updating
4612
+ this property, unsetting it doesn't remove the log retention policy. To
4613
+ remove the retention policy, set the value to ``INFINITE``.
4665
4614
 
4666
- The image can be further updated over time manually or using a schedule as long as it is always written to the same tag.
4615
+ :default: logs.RetentionDays.ONE_MONTH
4667
4616
 
4668
4617
  :stability: experimental
4669
4618
  '''
4670
- return typing.cast(RunnerImage, jsii.invoke(self, "bindDockerImage", []))
4619
+ result = self._values.get("log_retention")
4620
+ return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays], result)
4671
4621
 
4672
4622
  @builtins.property
4673
- @jsii.member(jsii_name="connections")
4674
- def connections(self) -> _aws_cdk_aws_ec2_ceddda9d.Connections:
4675
- '''(experimental) The network connections associated with this resource.
4623
+ def os(self) -> typing.Optional[Os]:
4624
+ '''(experimental) Image OS.
4625
+
4626
+ :default: OS.LINUX_UBUNTU
4676
4627
 
4677
4628
  :stability: experimental
4678
4629
  '''
4679
- return typing.cast(_aws_cdk_aws_ec2_ceddda9d.Connections, jsii.get(self, "connections"))
4630
+ result = self._values.get("os")
4631
+ return typing.cast(typing.Optional[Os], result)
4680
4632
 
4681
4633
  @builtins.property
4682
- @jsii.member(jsii_name="grantPrincipal")
4683
- def grant_principal(self) -> _aws_cdk_aws_iam_ceddda9d.IPrincipal:
4684
- '''(experimental) The principal to grant permissions to.
4685
-
4686
- :stability: experimental
4687
- '''
4688
- return typing.cast(_aws_cdk_aws_iam_ceddda9d.IPrincipal, jsii.get(self, "grantPrincipal"))
4634
+ def rebuild_interval(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
4635
+ '''(experimental) Schedule the image to be rebuilt every given interval.
4689
4636
 
4690
- # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
4691
- typing.cast(typing.Any, RunnerImageBuilder).__jsii_proxy_class__ = lambda : _RunnerImageBuilderProxy
4637
+ Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.
4692
4638
 
4639
+ Set to zero to disable.
4693
4640
 
4694
- @jsii.data_type(
4695
- jsii_type="@cloudsnorkel/cdk-github-runners.RunnerImageBuilderProps",
4696
- jsii_struct_bases=[],
4697
- name_mapping={
4698
- "architecture": "architecture",
4699
- "aws_image_builder_options": "awsImageBuilderOptions",
4700
- "base_ami": "baseAmi",
4701
- "base_docker_image": "baseDockerImage",
4702
- "builder_type": "builderType",
4703
- "code_build_options": "codeBuildOptions",
4704
- "components": "components",
4705
- "log_removal_policy": "logRemovalPolicy",
4706
- "log_retention": "logRetention",
4707
- "os": "os",
4708
- "rebuild_interval": "rebuildInterval",
4709
- "runner_version": "runnerVersion",
4710
- "security_groups": "securityGroups",
4711
- "subnet_selection": "subnetSelection",
4712
- "vpc": "vpc",
4713
- },
4714
- )
4715
- class RunnerImageBuilderProps:
4716
- def __init__(
4717
- self,
4718
- *,
4719
- architecture: typing.Optional[Architecture] = None,
4720
- aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
4721
- base_ami: typing.Optional[builtins.str] = None,
4722
- base_docker_image: typing.Optional[builtins.str] = None,
4723
- builder_type: typing.Optional["RunnerImageBuilderType"] = None,
4724
- code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
4725
- components: typing.Optional[typing.Sequence["RunnerImageComponent"]] = None,
4726
- log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
4727
- log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
4728
- os: typing.Optional[Os] = None,
4729
- rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
4730
- runner_version: typing.Optional["RunnerVersion"] = None,
4731
- security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
4732
- subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
4733
- vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
4734
- ) -> None:
4735
- '''
4736
- :param architecture: (experimental) Image architecture. Default: Architecture.X86_64
4737
- :param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
4738
- :param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
4739
- :param base_docker_image: (experimental) Base image from which Docker runner images will be built. Default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
4740
- :param builder_type: Default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
4741
- :param code_build_options: (experimental) Options specific to CodeBuild image builder. Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
4742
- :param components: (experimental) Components to install on the image. Default: none
4743
- :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
4744
- :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
4745
- :param os: (experimental) Image OS. Default: OS.LINUX_UBUNTU
4746
- :param rebuild_interval: (experimental) Schedule the image to be rebuilt every given interval. Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates. Set to zero to disable. Default: Duration.days(7)
4747
- :param runner_version: (experimental) Version of GitHub Runners to install. Default: latest version available
4748
- :param security_groups: (experimental) Security Groups to assign to this instance.
4749
- :param subnet_selection: (experimental) Where to place the network interfaces within the VPC. Default: no subnet
4750
- :param vpc: (experimental) VPC to build the image in. Default: no VPC
4641
+ :default: Duration.days(7)
4751
4642
 
4752
4643
  :stability: experimental
4753
4644
  '''
4754
- if isinstance(aws_image_builder_options, dict):
4755
- aws_image_builder_options = AwsImageBuilderRunnerImageBuilderProps(**aws_image_builder_options)
4756
- if isinstance(code_build_options, dict):
4757
- code_build_options = CodeBuildRunnerImageBuilderProps(**code_build_options)
4758
- if isinstance(subnet_selection, dict):
4759
- subnet_selection = _aws_cdk_aws_ec2_ceddda9d.SubnetSelection(**subnet_selection)
4760
- if __debug__:
4761
- type_hints = typing.get_type_hints(_typecheckingstub__ab96b7f3871624e8430668114e7f5748ba5d253168db5b8f9a13955d0a82e43d)
4762
- check_type(argname="argument architecture", value=architecture, expected_type=type_hints["architecture"])
4763
- check_type(argname="argument aws_image_builder_options", value=aws_image_builder_options, expected_type=type_hints["aws_image_builder_options"])
4764
- check_type(argname="argument base_ami", value=base_ami, expected_type=type_hints["base_ami"])
4765
- check_type(argname="argument base_docker_image", value=base_docker_image, expected_type=type_hints["base_docker_image"])
4766
- check_type(argname="argument builder_type", value=builder_type, expected_type=type_hints["builder_type"])
4767
- check_type(argname="argument code_build_options", value=code_build_options, expected_type=type_hints["code_build_options"])
4768
- check_type(argname="argument components", value=components, expected_type=type_hints["components"])
4769
- check_type(argname="argument log_removal_policy", value=log_removal_policy, expected_type=type_hints["log_removal_policy"])
4770
- check_type(argname="argument log_retention", value=log_retention, expected_type=type_hints["log_retention"])
4771
- check_type(argname="argument os", value=os, expected_type=type_hints["os"])
4772
- check_type(argname="argument rebuild_interval", value=rebuild_interval, expected_type=type_hints["rebuild_interval"])
4773
- check_type(argname="argument runner_version", value=runner_version, expected_type=type_hints["runner_version"])
4774
- check_type(argname="argument security_groups", value=security_groups, expected_type=type_hints["security_groups"])
4775
- check_type(argname="argument subnet_selection", value=subnet_selection, expected_type=type_hints["subnet_selection"])
4776
- check_type(argname="argument vpc", value=vpc, expected_type=type_hints["vpc"])
4777
- self._values: typing.Dict[builtins.str, typing.Any] = {}
4778
- if architecture is not None:
4779
- self._values["architecture"] = architecture
4780
- if aws_image_builder_options is not None:
4781
- self._values["aws_image_builder_options"] = aws_image_builder_options
4782
- if base_ami is not None:
4783
- self._values["base_ami"] = base_ami
4784
- if base_docker_image is not None:
4785
- self._values["base_docker_image"] = base_docker_image
4786
- if builder_type is not None:
4787
- self._values["builder_type"] = builder_type
4788
- if code_build_options is not None:
4789
- self._values["code_build_options"] = code_build_options
4790
- if components is not None:
4791
- self._values["components"] = components
4792
- if log_removal_policy is not None:
4793
- self._values["log_removal_policy"] = log_removal_policy
4794
- if log_retention is not None:
4795
- self._values["log_retention"] = log_retention
4796
- if os is not None:
4797
- self._values["os"] = os
4798
- if rebuild_interval is not None:
4799
- self._values["rebuild_interval"] = rebuild_interval
4800
- if runner_version is not None:
4801
- self._values["runner_version"] = runner_version
4802
- if security_groups is not None:
4803
- self._values["security_groups"] = security_groups
4804
- if subnet_selection is not None:
4805
- self._values["subnet_selection"] = subnet_selection
4806
- if vpc is not None:
4807
- self._values["vpc"] = vpc
4645
+ result = self._values.get("rebuild_interval")
4646
+ return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
4808
4647
 
4809
4648
  @builtins.property
4810
- def architecture(self) -> typing.Optional[Architecture]:
4811
- '''(experimental) Image architecture.
4649
+ def runner_version(self) -> typing.Optional["RunnerVersion"]:
4650
+ '''(experimental) Version of GitHub Runners to install.
4812
4651
 
4813
- :default: Architecture.X86_64
4652
+ :default: latest version available
4814
4653
 
4815
4654
  :stability: experimental
4816
4655
  '''
4817
- result = self._values.get("architecture")
4818
- return typing.cast(typing.Optional[Architecture], result)
4656
+ result = self._values.get("runner_version")
4657
+ return typing.cast(typing.Optional["RunnerVersion"], result)
4819
4658
 
4820
4659
  @builtins.property
4821
- def aws_image_builder_options(
4660
+ def security_groups(
4822
4661
  self,
4823
- ) -> typing.Optional[AwsImageBuilderRunnerImageBuilderProps]:
4824
- '''(experimental) Options specific to AWS Image Builder.
4825
-
4826
- Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
4827
-
4828
- :stability: experimental
4829
- '''
4830
- result = self._values.get("aws_image_builder_options")
4831
- return typing.cast(typing.Optional[AwsImageBuilderRunnerImageBuilderProps], result)
4832
-
4833
- @builtins.property
4834
- def base_ami(self) -> typing.Optional[builtins.str]:
4835
- '''(experimental) Base AMI from which runner AMIs will be built.
4836
-
4837
- This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version.
4838
-
4839
- :default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
4840
-
4841
- :stability: experimental
4842
- '''
4843
- result = self._values.get("base_ami")
4844
- return typing.cast(typing.Optional[builtins.str], result)
4845
-
4846
- @builtins.property
4847
- def base_docker_image(self) -> typing.Optional[builtins.str]:
4848
- '''(experimental) Base image from which Docker runner images will be built.
4849
-
4850
- :default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
4851
-
4852
- :stability: experimental
4853
- '''
4854
- result = self._values.get("base_docker_image")
4855
- return typing.cast(typing.Optional[builtins.str], result)
4856
-
4857
- @builtins.property
4858
- def builder_type(self) -> typing.Optional["RunnerImageBuilderType"]:
4859
- '''
4860
- :default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
4861
-
4862
- :stability: experimental
4863
- '''
4864
- result = self._values.get("builder_type")
4865
- return typing.cast(typing.Optional["RunnerImageBuilderType"], result)
4866
-
4867
- @builtins.property
4868
- def code_build_options(self) -> typing.Optional[CodeBuildRunnerImageBuilderProps]:
4869
- '''(experimental) Options specific to CodeBuild image builder.
4870
-
4871
- Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
4872
-
4873
- :stability: experimental
4874
- '''
4875
- result = self._values.get("code_build_options")
4876
- return typing.cast(typing.Optional[CodeBuildRunnerImageBuilderProps], result)
4877
-
4878
- @builtins.property
4879
- def components(self) -> typing.Optional[typing.List["RunnerImageComponent"]]:
4880
- '''(experimental) Components to install on the image.
4881
-
4882
- :default: none
4883
-
4884
- :stability: experimental
4885
- '''
4886
- result = self._values.get("components")
4887
- return typing.cast(typing.Optional[typing.List["RunnerImageComponent"]], result)
4888
-
4889
- @builtins.property
4890
- def log_removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
4891
- '''(experimental) Removal policy for logs of image builds.
4892
-
4893
- If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed.
4894
-
4895
- We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
4896
-
4897
- :default: RemovalPolicy.DESTROY
4898
-
4899
- :stability: experimental
4900
- '''
4901
- result = self._values.get("log_removal_policy")
4902
- return typing.cast(typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy], result)
4903
-
4904
- @builtins.property
4905
- def log_retention(
4906
- self,
4907
- ) -> typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays]:
4908
- '''(experimental) The number of days log events are kept in CloudWatch Logs.
4909
-
4910
- When updating
4911
- this property, unsetting it doesn't remove the log retention policy. To
4912
- remove the retention policy, set the value to ``INFINITE``.
4913
-
4914
- :default: logs.RetentionDays.ONE_MONTH
4915
-
4916
- :stability: experimental
4917
- '''
4918
- result = self._values.get("log_retention")
4919
- return typing.cast(typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays], result)
4920
-
4921
- @builtins.property
4922
- def os(self) -> typing.Optional[Os]:
4923
- '''(experimental) Image OS.
4924
-
4925
- :default: OS.LINUX_UBUNTU
4926
-
4927
- :stability: experimental
4928
- '''
4929
- result = self._values.get("os")
4930
- return typing.cast(typing.Optional[Os], result)
4931
-
4932
- @builtins.property
4933
- def rebuild_interval(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
4934
- '''(experimental) Schedule the image to be rebuilt every given interval.
4935
-
4936
- Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates.
4937
-
4938
- Set to zero to disable.
4939
-
4940
- :default: Duration.days(7)
4941
-
4942
- :stability: experimental
4943
- '''
4944
- result = self._values.get("rebuild_interval")
4945
- return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
4946
-
4947
- @builtins.property
4948
- def runner_version(self) -> typing.Optional["RunnerVersion"]:
4949
- '''(experimental) Version of GitHub Runners to install.
4950
-
4951
- :default: latest version available
4952
-
4953
- :stability: experimental
4954
- '''
4955
- result = self._values.get("runner_version")
4956
- return typing.cast(typing.Optional["RunnerVersion"], result)
4957
-
4958
- @builtins.property
4959
- def security_groups(
4960
- self,
4961
- ) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
4962
- '''(experimental) Security Groups to assign to this instance.
4662
+ ) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
4663
+ '''(experimental) Security Groups to assign to this instance.
4963
4664
 
4964
4665
  :stability: experimental
4965
4666
  '''
@@ -5071,7 +4772,7 @@ class RunnerImageComponent(
5071
4772
  :param assets: (experimental) Assets to copy into the built image.
5072
4773
  :param commands: (experimental) Commands to run in the built image.
5073
4774
  :param docker_commands: (experimental) Docker commands to run in the built image. For example: ``['ENV foo=bar', 'RUN echo $foo']`` These commands are ignored when building AMIs.
5074
- :param name: (experimental) Component name used for (1) image build logging and (2) identifier for {@link ImageRunnerBuilder.removeComponent }. Name must only contain alphanumeric characters and dashes.
4775
+ :param name: (experimental) Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }. Name must only contain alphanumeric characters and dashes.
5075
4776
 
5076
4777
  :stability: experimental
5077
4778
  '''
@@ -5272,7 +4973,7 @@ class RunnerImageComponent(
5272
4973
  def name(self) -> builtins.str:
5273
4974
  '''(experimental) Component name.
5274
4975
 
5275
- Used to identify component in image build logs, and for {@link RunnerImageBuilder.removeComponent }
4976
+ Used to identify component in image build logs, and for {@link IConfigurableRunnerImageBuilder.removeComponent }
5276
4977
 
5277
4978
  :stability: experimental
5278
4979
  '''
@@ -5306,7 +5007,7 @@ class _RunnerImageComponentProxy(RunnerImageComponent):
5306
5007
  def name(self) -> builtins.str:
5307
5008
  '''(experimental) Component name.
5308
5009
 
5309
- Used to identify component in image build logs, and for {@link RunnerImageBuilder.removeComponent }
5010
+ Used to identify component in image build logs, and for {@link IConfigurableRunnerImageBuilder.removeComponent }
5310
5011
 
5311
5012
  :stability: experimental
5312
5013
  '''
@@ -5339,7 +5040,7 @@ class RunnerImageComponentCustomProps:
5339
5040
  :param assets: (experimental) Assets to copy into the built image.
5340
5041
  :param commands: (experimental) Commands to run in the built image.
5341
5042
  :param docker_commands: (experimental) Docker commands to run in the built image. For example: ``['ENV foo=bar', 'RUN echo $foo']`` These commands are ignored when building AMIs.
5342
- :param name: (experimental) Component name used for (1) image build logging and (2) identifier for {@link ImageRunnerBuilder.removeComponent }. Name must only contain alphanumeric characters and dashes.
5043
+ :param name: (experimental) Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }. Name must only contain alphanumeric characters and dashes.
5343
5044
 
5344
5045
  :stability: experimental
5345
5046
  '''
@@ -5392,7 +5093,7 @@ class RunnerImageComponentCustomProps:
5392
5093
 
5393
5094
  @builtins.property
5394
5095
  def name(self) -> typing.Optional[builtins.str]:
5395
- '''(experimental) Component name used for (1) image build logging and (2) identifier for {@link ImageRunnerBuilder.removeComponent }.
5096
+ '''(experimental) Component name used for (1) image build logging and (2) identifier for {@link IConfigurableRunnerImageBuilder.removeComponent }.
5396
5097
 
5397
5098
  Name must only contain alphanumeric characters and dashes.
5398
5099
 
@@ -6608,8 +6309,14 @@ class CodeBuildRunnerProvider(
6608
6309
  security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
6609
6310
  subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
6610
6311
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
6611
- ) -> RunnerImageBuilder:
6612
- '''(experimental) Create new image builder that builds CodeBuild specific runner images using Ubuntu.
6312
+ ) -> "IConfigurableRunnerImageBuilder":
6313
+ '''(experimental) Create new image builder that builds CodeBuild specific runner images.
6314
+
6315
+ You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
6316
+
6317
+ You can add components to the image builder by calling ``imageBuilder.addComponent()``.
6318
+
6319
+ The default OS is Ubuntu running on x64 architecture.
6613
6320
 
6614
6321
  Included components:
6615
6322
 
@@ -6663,7 +6370,7 @@ class CodeBuildRunnerProvider(
6663
6370
  vpc=vpc,
6664
6371
  )
6665
6372
 
6666
- return typing.cast(RunnerImageBuilder, jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
6373
+ return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
6667
6374
 
6668
6375
  @jsii.member(jsii_name="getStepFunctionTask")
6669
6376
  def get_step_function_task(
@@ -7546,8 +7253,14 @@ class Ec2RunnerProvider(
7546
7253
  security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
7547
7254
  subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
7548
7255
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
7549
- ) -> RunnerImageBuilder:
7550
- '''(experimental) Create new image builder that builds EC2 specific runner images using Ubuntu.
7256
+ ) -> "IConfigurableRunnerImageBuilder":
7257
+ '''(experimental) Create new image builder that builds EC2 specific runner images.
7258
+
7259
+ You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
7260
+
7261
+ You can add components to the image builder by calling ``imageBuilder.addComponent()``.
7262
+
7263
+ The default OS is Ubuntu running on x64 architecture.
7551
7264
 
7552
7265
  Included components:
7553
7266
 
@@ -7601,7 +7314,7 @@ class Ec2RunnerProvider(
7601
7314
  vpc=vpc,
7602
7315
  )
7603
7316
 
7604
- return typing.cast(RunnerImageBuilder, jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
7317
+ return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
7605
7318
 
7606
7319
  @jsii.member(jsii_name="getStepFunctionTask")
7607
7320
  def get_step_function_task(
@@ -8164,8 +7877,14 @@ class EcsRunnerProvider(
8164
7877
  security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
8165
7878
  subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
8166
7879
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
8167
- ) -> RunnerImageBuilder:
8168
- '''(experimental) Create new image builder that builds ECS specific runner images using Ubuntu.
7880
+ ) -> "IConfigurableRunnerImageBuilder":
7881
+ '''(experimental) Create new image builder that builds ECS specific runner images.
7882
+
7883
+ You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
7884
+
7885
+ You can add components to the image builder by calling ``imageBuilder.addComponent()``.
7886
+
7887
+ The default OS is Ubuntu running on x64 architecture.
8169
7888
 
8170
7889
  Included components:
8171
7890
 
@@ -8219,7 +7938,7 @@ class EcsRunnerProvider(
8219
7938
  vpc=vpc,
8220
7939
  )
8221
7940
 
8222
- return typing.cast(RunnerImageBuilder, jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
7941
+ return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
8223
7942
 
8224
7943
  @jsii.member(jsii_name="getStepFunctionTask")
8225
7944
  def get_step_function_task(
@@ -8872,8 +8591,14 @@ class FargateRunnerProvider(
8872
8591
  security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
8873
8592
  subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
8874
8593
  vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
8875
- ) -> RunnerImageBuilder:
8876
- '''(experimental) Create new image builder that builds Fargate specific runner images using Ubuntu.
8594
+ ) -> "IConfigurableRunnerImageBuilder":
8595
+ '''(experimental) Create new image builder that builds Fargate specific runner images.
8596
+
8597
+ You can customize the OS, architecture, VPC, subnet, security groups, etc. by passing in props.
8598
+
8599
+ You can add components to the image builder by calling ``imageBuilder.addComponent()``.
8600
+
8601
+ The default OS is Ubuntu running on x64 architecture.
8877
8602
 
8878
8603
  Included components:
8879
8604
 
@@ -8926,7 +8651,7 @@ class FargateRunnerProvider(
8926
8651
  vpc=vpc,
8927
8652
  )
8928
8653
 
8929
- return typing.cast(RunnerImageBuilder, jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
8654
+ return typing.cast("IConfigurableRunnerImageBuilder", jsii.sinvoke(cls, "imageBuilder", [scope, id, props]))
8930
8655
 
8931
8656
  @jsii.member(jsii_name="getStepFunctionTask")
8932
8657
  def get_step_function_task(
@@ -9526,6 +9251,99 @@ class FargateRunnerProviderProps(RunnerProviderProps):
9526
9251
  )
9527
9252
 
9528
9253
 
9254
+ @jsii.interface(
9255
+ jsii_type="@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder"
9256
+ )
9257
+ class IConfigurableRunnerImageBuilder(
9258
+ IRunnerImageBuilder,
9259
+ _aws_cdk_aws_ec2_ceddda9d.IConnectable,
9260
+ _aws_cdk_aws_iam_ceddda9d.IGrantable,
9261
+ typing_extensions.Protocol,
9262
+ ):
9263
+ '''(experimental) Interface for constructs that build an image that can be used in {@link IRunnerProvider }.
9264
+
9265
+ The image can be configured by adding or removing components. The image builder can be configured by adding grants or allowing connections.
9266
+
9267
+ An image can be a Docker image or AMI.
9268
+
9269
+ :stability: experimental
9270
+ '''
9271
+
9272
+ @jsii.member(jsii_name="addComponent")
9273
+ def add_component(self, component: RunnerImageComponent) -> None:
9274
+ '''(experimental) Add a component to the image builder.
9275
+
9276
+ The component will be added to the end of the list of components.
9277
+
9278
+ :param component: component to add.
9279
+
9280
+ :stability: experimental
9281
+ '''
9282
+ ...
9283
+
9284
+ @jsii.member(jsii_name="removeComponent")
9285
+ def remove_component(self, component: RunnerImageComponent) -> None:
9286
+ '''(experimental) Remove a component from the image builder.
9287
+
9288
+ Removal is done by component name. Multiple components with the same name will all be removed.
9289
+
9290
+ :param component: component to remove.
9291
+
9292
+ :stability: experimental
9293
+ '''
9294
+ ...
9295
+
9296
+
9297
+ class _IConfigurableRunnerImageBuilderProxy(
9298
+ jsii.proxy_for(IRunnerImageBuilder), # type: ignore[misc]
9299
+ jsii.proxy_for(_aws_cdk_aws_ec2_ceddda9d.IConnectable), # type: ignore[misc]
9300
+ jsii.proxy_for(_aws_cdk_aws_iam_ceddda9d.IGrantable), # type: ignore[misc]
9301
+ ):
9302
+ '''(experimental) Interface for constructs that build an image that can be used in {@link IRunnerProvider }.
9303
+
9304
+ The image can be configured by adding or removing components. The image builder can be configured by adding grants or allowing connections.
9305
+
9306
+ An image can be a Docker image or AMI.
9307
+
9308
+ :stability: experimental
9309
+ '''
9310
+
9311
+ __jsii_type__: typing.ClassVar[str] = "@cloudsnorkel/cdk-github-runners.IConfigurableRunnerImageBuilder"
9312
+
9313
+ @jsii.member(jsii_name="addComponent")
9314
+ def add_component(self, component: RunnerImageComponent) -> None:
9315
+ '''(experimental) Add a component to the image builder.
9316
+
9317
+ The component will be added to the end of the list of components.
9318
+
9319
+ :param component: component to add.
9320
+
9321
+ :stability: experimental
9322
+ '''
9323
+ if __debug__:
9324
+ type_hints = typing.get_type_hints(_typecheckingstub__dc4625ad41fc3631b6e9812ae4ab86d19fc28eb849f5a5bf3a3ed7c4ebbeb066)
9325
+ check_type(argname="argument component", value=component, expected_type=type_hints["component"])
9326
+ return typing.cast(None, jsii.invoke(self, "addComponent", [component]))
9327
+
9328
+ @jsii.member(jsii_name="removeComponent")
9329
+ def remove_component(self, component: RunnerImageComponent) -> None:
9330
+ '''(experimental) Remove a component from the image builder.
9331
+
9332
+ Removal is done by component name. Multiple components with the same name will all be removed.
9333
+
9334
+ :param component: component to remove.
9335
+
9336
+ :stability: experimental
9337
+ '''
9338
+ if __debug__:
9339
+ type_hints = typing.get_type_hints(_typecheckingstub__3aa11e0e95269ba6ec5fded5dd768fb588157de9643a5fce8b09fc9b4e2a18c0)
9340
+ check_type(argname="argument component", value=component, expected_type=type_hints["component"])
9341
+ return typing.cast(None, jsii.invoke(self, "removeComponent", [component]))
9342
+
9343
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
9344
+ typing.cast(typing.Any, IConfigurableRunnerImageBuilder).__jsii_proxy_class__ = lambda : _IConfigurableRunnerImageBuilderProxy
9345
+
9346
+
9529
9347
  class LambdaRunner(
9530
9348
  LambdaRunnerProvider,
9531
9349
  metaclass=jsii.JSIIMeta,
@@ -9768,100 +9586,395 @@ class LambdaRunnerProviderProps(RunnerProviderProps):
9768
9586
 
9769
9587
  :stability: experimental
9770
9588
  '''
9771
- result = self._values.get("labels")
9772
- return typing.cast(typing.Optional[typing.List[builtins.str]], result)
9589
+ result = self._values.get("labels")
9590
+ return typing.cast(typing.Optional[typing.List[builtins.str]], result)
9591
+
9592
+ @builtins.property
9593
+ def memory_size(self) -> typing.Optional[jsii.Number]:
9594
+ '''(experimental) The amount of memory, in MB, that is allocated to your Lambda function.
9595
+
9596
+ Lambda uses this value to proportionally allocate the amount of CPU
9597
+ power. For more information, see Resource Model in the AWS Lambda
9598
+ Developer Guide.
9599
+
9600
+ :default: 2048
9601
+
9602
+ :stability: experimental
9603
+ '''
9604
+ result = self._values.get("memory_size")
9605
+ return typing.cast(typing.Optional[jsii.Number], result)
9606
+
9607
+ @builtins.property
9608
+ def security_group(
9609
+ self,
9610
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]:
9611
+ '''(deprecated) Security group to assign to this instance.
9612
+
9613
+ :default: public lambda with no security group
9614
+
9615
+ :deprecated: use {@link securityGroups }
9616
+
9617
+ :stability: deprecated
9618
+ '''
9619
+ result = self._values.get("security_group")
9620
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup], result)
9621
+
9622
+ @builtins.property
9623
+ def security_groups(
9624
+ self,
9625
+ ) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
9626
+ '''(experimental) Security groups to assign to this instance.
9627
+
9628
+ :default: public lambda with no security group
9629
+
9630
+ :stability: experimental
9631
+ '''
9632
+ result = self._values.get("security_groups")
9633
+ return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]], result)
9634
+
9635
+ @builtins.property
9636
+ def subnet_selection(
9637
+ self,
9638
+ ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]:
9639
+ '''(experimental) Where to place the network interfaces within the VPC.
9640
+
9641
+ :default: no subnet
9642
+
9643
+ :stability: experimental
9644
+ '''
9645
+ result = self._values.get("subnet_selection")
9646
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection], result)
9647
+
9648
+ @builtins.property
9649
+ def timeout(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
9650
+ '''(experimental) The function execution time (in seconds) after which Lambda terminates the function.
9651
+
9652
+ Because the execution time affects cost, set this value
9653
+ based on the function's expected execution time.
9654
+
9655
+ :default: Duration.minutes(15)
9656
+
9657
+ :stability: experimental
9658
+ '''
9659
+ result = self._values.get("timeout")
9660
+ return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
9661
+
9662
+ @builtins.property
9663
+ def vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
9664
+ '''(experimental) VPC to launch the runners in.
9665
+
9666
+ :default: no VPC
9667
+
9668
+ :stability: experimental
9669
+ '''
9670
+ result = self._values.get("vpc")
9671
+ return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
9672
+
9673
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
9674
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
9675
+
9676
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
9677
+ return not (rhs == self)
9678
+
9679
+ def __repr__(self) -> str:
9680
+ return "LambdaRunnerProviderProps(%s)" % ", ".join(
9681
+ k + "=" + repr(v) for k, v in self._values.items()
9682
+ )
9683
+
9684
+
9685
+ @jsii.implements(IConfigurableRunnerImageBuilder)
9686
+ class RunnerImageBuilder(
9687
+ _constructs_77d1e7e8.Construct,
9688
+ metaclass=jsii.JSIIAbstractClass,
9689
+ jsii_type="@cloudsnorkel/cdk-github-runners.RunnerImageBuilder",
9690
+ ):
9691
+ '''(experimental) GitHub Runner image builder. Builds a Docker image or AMI with GitHub Runner and other requirements installed.
9692
+
9693
+ Images can be customized before passed into the provider by adding or removing components to be installed.
9694
+
9695
+ Images are rebuilt every week by default to ensure that the latest security patches are applied.
9696
+
9697
+ :stability: experimental
9698
+ '''
9699
+
9700
+ def __init__(
9701
+ self,
9702
+ scope: _constructs_77d1e7e8.Construct,
9703
+ id: builtins.str,
9704
+ *,
9705
+ architecture: typing.Optional[Architecture] = None,
9706
+ aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
9707
+ base_ami: typing.Optional[builtins.str] = None,
9708
+ base_docker_image: typing.Optional[builtins.str] = None,
9709
+ builder_type: typing.Optional[RunnerImageBuilderType] = None,
9710
+ code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
9711
+ components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
9712
+ log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
9713
+ log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
9714
+ os: typing.Optional[Os] = None,
9715
+ rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
9716
+ runner_version: typing.Optional[RunnerVersion] = None,
9717
+ security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
9718
+ subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
9719
+ vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
9720
+ ) -> None:
9721
+ '''
9722
+ :param scope: -
9723
+ :param id: -
9724
+ :param architecture: (experimental) Image architecture. Default: Architecture.X86_64
9725
+ :param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
9726
+ :param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
9727
+ :param base_docker_image: (experimental) Base image from which Docker runner images will be built. Default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
9728
+ :param builder_type: Default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
9729
+ :param code_build_options: (experimental) Options specific to CodeBuild image builder. Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
9730
+ :param components: (experimental) Components to install on the image. Default: none
9731
+ :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
9732
+ :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
9733
+ :param os: (experimental) Image OS. Default: OS.LINUX_UBUNTU
9734
+ :param rebuild_interval: (experimental) Schedule the image to be rebuilt every given interval. Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates. Set to zero to disable. Default: Duration.days(7)
9735
+ :param runner_version: (experimental) Version of GitHub Runners to install. Default: latest version available
9736
+ :param security_groups: (experimental) Security Groups to assign to this instance.
9737
+ :param subnet_selection: (experimental) Where to place the network interfaces within the VPC. Default: no subnet
9738
+ :param vpc: (experimental) VPC to build the image in. Default: no VPC
9739
+
9740
+ :stability: experimental
9741
+ '''
9742
+ if __debug__:
9743
+ type_hints = typing.get_type_hints(_typecheckingstub__963c9a4884bb9d7400672391dfb47486f969a1b8fe5616bba9cd493e8a71484b)
9744
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
9745
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
9746
+ props = RunnerImageBuilderProps(
9747
+ architecture=architecture,
9748
+ aws_image_builder_options=aws_image_builder_options,
9749
+ base_ami=base_ami,
9750
+ base_docker_image=base_docker_image,
9751
+ builder_type=builder_type,
9752
+ code_build_options=code_build_options,
9753
+ components=components,
9754
+ log_removal_policy=log_removal_policy,
9755
+ log_retention=log_retention,
9756
+ os=os,
9757
+ rebuild_interval=rebuild_interval,
9758
+ runner_version=runner_version,
9759
+ security_groups=security_groups,
9760
+ subnet_selection=subnet_selection,
9761
+ vpc=vpc,
9762
+ )
9763
+
9764
+ jsii.create(self.__class__, self, [scope, id, props])
9765
+
9766
+ @jsii.member(jsii_name="new")
9767
+ @builtins.classmethod
9768
+ def new(
9769
+ cls,
9770
+ scope: _constructs_77d1e7e8.Construct,
9771
+ id: builtins.str,
9772
+ *,
9773
+ architecture: typing.Optional[Architecture] = None,
9774
+ aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
9775
+ base_ami: typing.Optional[builtins.str] = None,
9776
+ base_docker_image: typing.Optional[builtins.str] = None,
9777
+ builder_type: typing.Optional[RunnerImageBuilderType] = None,
9778
+ code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
9779
+ components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
9780
+ log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
9781
+ log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
9782
+ os: typing.Optional[Os] = None,
9783
+ rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
9784
+ runner_version: typing.Optional[RunnerVersion] = None,
9785
+ security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
9786
+ subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
9787
+ vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
9788
+ ) -> IConfigurableRunnerImageBuilder:
9789
+ '''(experimental) Create a new image builder based on the provided properties.
9790
+
9791
+ The implementation will differ based on the OS, architecture, and requested builder type.
9792
+
9793
+ :param scope: -
9794
+ :param id: -
9795
+ :param architecture: (experimental) Image architecture. Default: Architecture.X86_64
9796
+ :param aws_image_builder_options: (experimental) Options specific to AWS Image Builder. Only used when builderType is RunnerImageBuilderType.AWS_IMAGE_BUILDER.
9797
+ :param base_ami: (experimental) Base AMI from which runner AMIs will be built. This can be an actual AMI or an AWS Image Builder ARN that points to the latest AMI. For example ``arn:aws:imagebuilder:us-east-1:aws:image/ubuntu-server-22-lts-x86/x.x.x`` would always use the latest version of Ubuntu 22.04 in each build. If you want a specific version, you can replace ``x.x.x`` with that version. Default: latest Ubuntu 22.04 AMI for Os.LINUX_UBUNTU, latest Amazon Linux 2 AMI for Os.LINUX_AMAZON_2, latest Windows Server 2022 AMI for Os.WINDOWS
9798
+ :param base_docker_image: (experimental) Base image from which Docker runner images will be built. Default: public.ecr.aws/lts/ubuntu:22.04 for Os.LINUX_UBUNTU, public.ecr.aws/amazonlinux/amazonlinux:2 for Os.LINUX_AMAZON_2, mcr.microsoft.com/windows/servercore:ltsc2019-amd64 for Os.WINDOWS
9799
+ :param builder_type: Default: CodeBuild for Linux Docker image, AWS Image Builder for Windows Docker image and any AMI
9800
+ :param code_build_options: (experimental) Options specific to CodeBuild image builder. Only used when builderType is RunnerImageBuilderType.CODE_BUILD.
9801
+ :param components: (experimental) Components to install on the image. Default: none
9802
+ :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
9803
+ :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
9804
+ :param os: (experimental) Image OS. Default: OS.LINUX_UBUNTU
9805
+ :param rebuild_interval: (experimental) Schedule the image to be rebuilt every given interval. Useful for keeping the image up-do-date with the latest GitHub runner version and latest OS updates. Set to zero to disable. Default: Duration.days(7)
9806
+ :param runner_version: (experimental) Version of GitHub Runners to install. Default: latest version available
9807
+ :param security_groups: (experimental) Security Groups to assign to this instance.
9808
+ :param subnet_selection: (experimental) Where to place the network interfaces within the VPC. Default: no subnet
9809
+ :param vpc: (experimental) VPC to build the image in. Default: no VPC
9810
+
9811
+ :stability: experimental
9812
+ '''
9813
+ if __debug__:
9814
+ type_hints = typing.get_type_hints(_typecheckingstub__c44d5704c54d7fdcf24ad39567c0e9f53f9837163bf8bf3b1b4e652e27c9ec75)
9815
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
9816
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
9817
+ props = RunnerImageBuilderProps(
9818
+ architecture=architecture,
9819
+ aws_image_builder_options=aws_image_builder_options,
9820
+ base_ami=base_ami,
9821
+ base_docker_image=base_docker_image,
9822
+ builder_type=builder_type,
9823
+ code_build_options=code_build_options,
9824
+ components=components,
9825
+ log_removal_policy=log_removal_policy,
9826
+ log_retention=log_retention,
9827
+ os=os,
9828
+ rebuild_interval=rebuild_interval,
9829
+ runner_version=runner_version,
9830
+ security_groups=security_groups,
9831
+ subnet_selection=subnet_selection,
9832
+ vpc=vpc,
9833
+ )
9834
+
9835
+ return typing.cast(IConfigurableRunnerImageBuilder, jsii.sinvoke(cls, "new", [scope, id, props]))
9836
+
9837
+ @jsii.member(jsii_name="addComponent")
9838
+ def add_component(self, component: RunnerImageComponent) -> None:
9839
+ '''(experimental) Add a component to the image builder.
9840
+
9841
+ The component will be added to the end of the list of components.
9842
+
9843
+ :param component: -
9844
+
9845
+ :stability: experimental
9846
+ '''
9847
+ if __debug__:
9848
+ type_hints = typing.get_type_hints(_typecheckingstub__9dec4d5fbab87fa223a0eb0a144ad5bd91f9cdd54d3337c971ce6435c76dc049)
9849
+ check_type(argname="argument component", value=component, expected_type=type_hints["component"])
9850
+ return typing.cast(None, jsii.invoke(self, "addComponent", [component]))
9851
+
9852
+ @jsii.member(jsii_name="bindAmi")
9853
+ @abc.abstractmethod
9854
+ def bind_ami(self) -> RunnerAmi:
9855
+ '''(experimental) Build and return an AMI with GitHub Runner installed in it.
9856
+
9857
+ Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else.
9858
+
9859
+ The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template.
9860
+
9861
+ :stability: experimental
9862
+ '''
9863
+ ...
9864
+
9865
+ @jsii.member(jsii_name="bindDockerImage")
9866
+ @abc.abstractmethod
9867
+ def bind_docker_image(self) -> RunnerImage:
9868
+ '''(experimental) Build and return a Docker image with GitHub Runner installed in it.
9869
+
9870
+ Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else.
9871
+
9872
+ It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not.
9873
+
9874
+ The image can be further updated over time manually or using a schedule as long as it is always written to the same tag.
9875
+
9876
+ :stability: experimental
9877
+ '''
9878
+ ...
9879
+
9880
+ @jsii.member(jsii_name="removeComponent")
9881
+ def remove_component(self, component: RunnerImageComponent) -> None:
9882
+ '''(experimental) Remove a component from the image builder.
9883
+
9884
+ Removal is done by component name. Multiple components with the same name will all be removed.
9885
+
9886
+ :param component: -
9887
+
9888
+ :stability: experimental
9889
+ '''
9890
+ if __debug__:
9891
+ type_hints = typing.get_type_hints(_typecheckingstub__1c4318b2834e7865918b5308b85c0fd80f22d29a067d68d4ee8537a6c0c88b3b)
9892
+ check_type(argname="argument component", value=component, expected_type=type_hints["component"])
9893
+ return typing.cast(None, jsii.invoke(self, "removeComponent", [component]))
9894
+
9895
+ @builtins.property
9896
+ @jsii.member(jsii_name="connections")
9897
+ @abc.abstractmethod
9898
+ def connections(self) -> _aws_cdk_aws_ec2_ceddda9d.Connections:
9899
+ '''(experimental) The network connections associated with this resource.
9900
+
9901
+ :stability: experimental
9902
+ '''
9903
+ ...
9773
9904
 
9774
9905
  @builtins.property
9775
- def memory_size(self) -> typing.Optional[jsii.Number]:
9776
- '''(experimental) The amount of memory, in MB, that is allocated to your Lambda function.
9777
-
9778
- Lambda uses this value to proportionally allocate the amount of CPU
9779
- power. For more information, see Resource Model in the AWS Lambda
9780
- Developer Guide.
9781
-
9782
- :default: 2048
9906
+ @jsii.member(jsii_name="grantPrincipal")
9907
+ @abc.abstractmethod
9908
+ def grant_principal(self) -> _aws_cdk_aws_iam_ceddda9d.IPrincipal:
9909
+ '''(experimental) The principal to grant permissions to.
9783
9910
 
9784
9911
  :stability: experimental
9785
9912
  '''
9786
- result = self._values.get("memory_size")
9787
- return typing.cast(typing.Optional[jsii.Number], result)
9913
+ ...
9788
9914
 
9789
9915
  @builtins.property
9790
- def security_group(
9791
- self,
9792
- ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]:
9793
- '''(deprecated) Security group to assign to this instance.
9916
+ @jsii.member(jsii_name="components")
9917
+ def _components(self) -> typing.List[RunnerImageComponent]:
9918
+ '''
9919
+ :stability: experimental
9920
+ '''
9921
+ return typing.cast(typing.List[RunnerImageComponent], jsii.get(self, "components"))
9794
9922
 
9795
- :default: public lambda with no security group
9923
+ @_components.setter
9924
+ def _components(self, value: typing.List[RunnerImageComponent]) -> None:
9925
+ if __debug__:
9926
+ type_hints = typing.get_type_hints(_typecheckingstub__705c18a1eedaa490aebad511aac32a801519a57162e30be4673a8ab87ca434dc)
9927
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
9928
+ jsii.set(self, "components", value)
9796
9929
 
9797
- :deprecated: use {@link securityGroups }
9798
9930
 
9799
- :stability: deprecated
9800
- '''
9801
- result = self._values.get("security_group")
9802
- return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup], result)
9931
+ class _RunnerImageBuilderProxy(RunnerImageBuilder):
9932
+ @jsii.member(jsii_name="bindAmi")
9933
+ def bind_ami(self) -> RunnerAmi:
9934
+ '''(experimental) Build and return an AMI with GitHub Runner installed in it.
9803
9935
 
9804
- @builtins.property
9805
- def security_groups(
9806
- self,
9807
- ) -> typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]]:
9808
- '''(experimental) Security groups to assign to this instance.
9936
+ Anything that ends up with a launch template pointing to an AMI that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing AMI and nothing else.
9809
9937
 
9810
- :default: public lambda with no security group
9938
+ The AMI can be further updated over time manually or using a schedule as long as it is always written to the same launch template.
9811
9939
 
9812
9940
  :stability: experimental
9813
9941
  '''
9814
- result = self._values.get("security_groups")
9815
- return typing.cast(typing.Optional[typing.List[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]], result)
9942
+ return typing.cast(RunnerAmi, jsii.invoke(self, "bindAmi", []))
9816
9943
 
9817
- @builtins.property
9818
- def subnet_selection(
9819
- self,
9820
- ) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection]:
9821
- '''(experimental) Where to place the network interfaces within the VPC.
9944
+ @jsii.member(jsii_name="bindDockerImage")
9945
+ def bind_docker_image(self) -> RunnerImage:
9946
+ '''(experimental) Build and return a Docker image with GitHub Runner installed in it.
9822
9947
 
9823
- :default: no subnet
9948
+ Anything that ends up with an ECR repository containing a Docker image that runs GitHub self-hosted runners can be used. A simple implementation could even point to an existing image and nothing else.
9949
+
9950
+ It's important that the specified image tag be available at the time the repository is available. Providers usually assume the image is ready and will fail if it's not.
9951
+
9952
+ The image can be further updated over time manually or using a schedule as long as it is always written to the same tag.
9824
9953
 
9825
9954
  :stability: experimental
9826
9955
  '''
9827
- result = self._values.get("subnet_selection")
9828
- return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection], result)
9956
+ return typing.cast(RunnerImage, jsii.invoke(self, "bindDockerImage", []))
9829
9957
 
9830
9958
  @builtins.property
9831
- def timeout(self) -> typing.Optional[_aws_cdk_ceddda9d.Duration]:
9832
- '''(experimental) The function execution time (in seconds) after which Lambda terminates the function.
9833
-
9834
- Because the execution time affects cost, set this value
9835
- based on the function's expected execution time.
9836
-
9837
- :default: Duration.minutes(15)
9959
+ @jsii.member(jsii_name="connections")
9960
+ def connections(self) -> _aws_cdk_aws_ec2_ceddda9d.Connections:
9961
+ '''(experimental) The network connections associated with this resource.
9838
9962
 
9839
9963
  :stability: experimental
9840
9964
  '''
9841
- result = self._values.get("timeout")
9842
- return typing.cast(typing.Optional[_aws_cdk_ceddda9d.Duration], result)
9965
+ return typing.cast(_aws_cdk_aws_ec2_ceddda9d.Connections, jsii.get(self, "connections"))
9843
9966
 
9844
9967
  @builtins.property
9845
- def vpc(self) -> typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc]:
9846
- '''(experimental) VPC to launch the runners in.
9847
-
9848
- :default: no VPC
9968
+ @jsii.member(jsii_name="grantPrincipal")
9969
+ def grant_principal(self) -> _aws_cdk_aws_iam_ceddda9d.IPrincipal:
9970
+ '''(experimental) The principal to grant permissions to.
9849
9971
 
9850
9972
  :stability: experimental
9851
9973
  '''
9852
- result = self._values.get("vpc")
9853
- return typing.cast(typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc], result)
9854
-
9855
- def __eq__(self, rhs: typing.Any) -> builtins.bool:
9856
- return isinstance(rhs, self.__class__) and rhs._values == self._values
9857
-
9858
- def __ne__(self, rhs: typing.Any) -> builtins.bool:
9859
- return not (rhs == self)
9974
+ return typing.cast(_aws_cdk_aws_iam_ceddda9d.IPrincipal, jsii.get(self, "grantPrincipal"))
9860
9975
 
9861
- def __repr__(self) -> str:
9862
- return "LambdaRunnerProviderProps(%s)" % ", ".join(
9863
- k + "=" + repr(v) for k, v in self._values.items()
9864
- )
9976
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
9977
+ typing.cast(typing.Any, RunnerImageBuilder).__jsii_proxy_class__ = lambda : _RunnerImageBuilderProxy
9865
9978
 
9866
9979
 
9867
9980
  class CodeBuildRunner(
@@ -10110,6 +10223,7 @@ __all__ = [
10110
10223
  "FargateRunnerProviderProps",
10111
10224
  "GitHubRunners",
10112
10225
  "GitHubRunnersProps",
10226
+ "IConfigurableRunnerImageBuilder",
10113
10227
  "IRunnerAmiStatus",
10114
10228
  "IRunnerImageBuilder",
10115
10229
  "IRunnerImageStatus",
@@ -10319,6 +10433,14 @@ def _typecheckingstub__363ebaab8a0bcbaea3d32a9c7e3cb241f08cf49d6eea02ba40eaaef9a
10319
10433
  """Type checking stubs"""
10320
10434
  pass
10321
10435
 
10436
+ def _typecheckingstub__abecb3decfe8eebf190daa2e93a508111cc10650e6b9fbf65b3a34f3ed07ca24(
10437
+ type: builtins.str,
10438
+ name: builtins.str,
10439
+ data: typing.Any,
10440
+ ) -> None:
10441
+ """Type checking stubs"""
10442
+ pass
10443
+
10322
10444
  def _typecheckingstub__a450535474a302df6d17ac0b627edd05f72f54c900f36380517d39fc0a3b15e4(
10323
10445
  grantee: _aws_cdk_aws_iam_ceddda9d.IGrantable,
10324
10446
  ) -> None:
@@ -10332,14 +10454,6 @@ def _typecheckingstub__bae848cd8ee55808c4c98a6e69173dc05ae5472e3b1443ee6fbc64e32
10332
10454
  """Type checking stubs"""
10333
10455
  pass
10334
10456
 
10335
- def _typecheckingstub__e11323aa6f18ef1898e18067dba5908fdeabd333bfc1604f92c4c244adb28f7f(
10336
- type: builtins.str,
10337
- name: builtins.str,
10338
- data: typing.Any,
10339
- ) -> None:
10340
- """Type checking stubs"""
10341
- pass
10342
-
10343
10457
  def _typecheckingstub__b86439e194b36e470271c572c251444f98c4b86a68fa7e63cf41ae1fa9628d4a(
10344
10458
  *,
10345
10459
  commands: typing.Sequence[builtins.str],
@@ -10551,70 +10665,6 @@ def _typecheckingstub__21bedad36e17a5840ddb719458c9e0eb15a89e493efa80af28f6031d1
10551
10665
  """Type checking stubs"""
10552
10666
  pass
10553
10667
 
10554
- def _typecheckingstub__963c9a4884bb9d7400672391dfb47486f969a1b8fe5616bba9cd493e8a71484b(
10555
- scope: _constructs_77d1e7e8.Construct,
10556
- id: builtins.str,
10557
- *,
10558
- architecture: typing.Optional[Architecture] = None,
10559
- aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
10560
- base_ami: typing.Optional[builtins.str] = None,
10561
- base_docker_image: typing.Optional[builtins.str] = None,
10562
- builder_type: typing.Optional[RunnerImageBuilderType] = None,
10563
- code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
10564
- components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
10565
- log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
10566
- log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
10567
- os: typing.Optional[Os] = None,
10568
- rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
10569
- runner_version: typing.Optional[RunnerVersion] = None,
10570
- security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
10571
- subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
10572
- vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
10573
- ) -> None:
10574
- """Type checking stubs"""
10575
- pass
10576
-
10577
- def _typecheckingstub__c44d5704c54d7fdcf24ad39567c0e9f53f9837163bf8bf3b1b4e652e27c9ec75(
10578
- scope: _constructs_77d1e7e8.Construct,
10579
- id: builtins.str,
10580
- *,
10581
- architecture: typing.Optional[Architecture] = None,
10582
- aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
10583
- base_ami: typing.Optional[builtins.str] = None,
10584
- base_docker_image: typing.Optional[builtins.str] = None,
10585
- builder_type: typing.Optional[RunnerImageBuilderType] = None,
10586
- code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
10587
- components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
10588
- log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
10589
- log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
10590
- os: typing.Optional[Os] = None,
10591
- rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
10592
- runner_version: typing.Optional[RunnerVersion] = None,
10593
- security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
10594
- subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
10595
- vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
10596
- ) -> None:
10597
- """Type checking stubs"""
10598
- pass
10599
-
10600
- def _typecheckingstub__9dec4d5fbab87fa223a0eb0a144ad5bd91f9cdd54d3337c971ce6435c76dc049(
10601
- component: RunnerImageComponent,
10602
- ) -> None:
10603
- """Type checking stubs"""
10604
- pass
10605
-
10606
- def _typecheckingstub__1c4318b2834e7865918b5308b85c0fd80f22d29a067d68d4ee8537a6c0c88b3b(
10607
- component: RunnerImageComponent,
10608
- ) -> None:
10609
- """Type checking stubs"""
10610
- pass
10611
-
10612
- def _typecheckingstub__705c18a1eedaa490aebad511aac32a801519a57162e30be4673a8ab87ca434dc(
10613
- value: typing.List[RunnerImageComponent],
10614
- ) -> None:
10615
- """Type checking stubs"""
10616
- pass
10617
-
10618
10668
  def _typecheckingstub__ab96b7f3871624e8430668114e7f5748ba5d253168db5b8f9a13955d0a82e43d(
10619
10669
  *,
10620
10670
  architecture: typing.Optional[Architecture] = None,
@@ -11363,6 +11413,18 @@ def _typecheckingstub__26cdeb87df1adf5c49e0f9c1c061c7138af674da9af221212e1505fc1
11363
11413
  """Type checking stubs"""
11364
11414
  pass
11365
11415
 
11416
+ def _typecheckingstub__dc4625ad41fc3631b6e9812ae4ab86d19fc28eb849f5a5bf3a3ed7c4ebbeb066(
11417
+ component: RunnerImageComponent,
11418
+ ) -> None:
11419
+ """Type checking stubs"""
11420
+ pass
11421
+
11422
+ def _typecheckingstub__3aa11e0e95269ba6ec5fded5dd768fb588157de9643a5fce8b09fc9b4e2a18c0(
11423
+ component: RunnerImageComponent,
11424
+ ) -> None:
11425
+ """Type checking stubs"""
11426
+ pass
11427
+
11366
11428
  def _typecheckingstub__80e9b84ecba02bdef856d3ee3f48a5e0a5e58ad813554fd529c0abe3af88217d(
11367
11429
  scope: _constructs_77d1e7e8.Construct,
11368
11430
  id: builtins.str,
@@ -11401,6 +11463,70 @@ def _typecheckingstub__45a4a92b817689da2d55675d278ad5c96699269cc41f3406b7fca6d7a
11401
11463
  """Type checking stubs"""
11402
11464
  pass
11403
11465
 
11466
+ def _typecheckingstub__963c9a4884bb9d7400672391dfb47486f969a1b8fe5616bba9cd493e8a71484b(
11467
+ scope: _constructs_77d1e7e8.Construct,
11468
+ id: builtins.str,
11469
+ *,
11470
+ architecture: typing.Optional[Architecture] = None,
11471
+ aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
11472
+ base_ami: typing.Optional[builtins.str] = None,
11473
+ base_docker_image: typing.Optional[builtins.str] = None,
11474
+ builder_type: typing.Optional[RunnerImageBuilderType] = None,
11475
+ code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
11476
+ components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
11477
+ log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
11478
+ log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
11479
+ os: typing.Optional[Os] = None,
11480
+ rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
11481
+ runner_version: typing.Optional[RunnerVersion] = None,
11482
+ security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
11483
+ subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
11484
+ vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
11485
+ ) -> None:
11486
+ """Type checking stubs"""
11487
+ pass
11488
+
11489
+ def _typecheckingstub__c44d5704c54d7fdcf24ad39567c0e9f53f9837163bf8bf3b1b4e652e27c9ec75(
11490
+ scope: _constructs_77d1e7e8.Construct,
11491
+ id: builtins.str,
11492
+ *,
11493
+ architecture: typing.Optional[Architecture] = None,
11494
+ aws_image_builder_options: typing.Optional[typing.Union[AwsImageBuilderRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
11495
+ base_ami: typing.Optional[builtins.str] = None,
11496
+ base_docker_image: typing.Optional[builtins.str] = None,
11497
+ builder_type: typing.Optional[RunnerImageBuilderType] = None,
11498
+ code_build_options: typing.Optional[typing.Union[CodeBuildRunnerImageBuilderProps, typing.Dict[builtins.str, typing.Any]]] = None,
11499
+ components: typing.Optional[typing.Sequence[RunnerImageComponent]] = None,
11500
+ log_removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
11501
+ log_retention: typing.Optional[_aws_cdk_aws_logs_ceddda9d.RetentionDays] = None,
11502
+ os: typing.Optional[Os] = None,
11503
+ rebuild_interval: typing.Optional[_aws_cdk_ceddda9d.Duration] = None,
11504
+ runner_version: typing.Optional[RunnerVersion] = None,
11505
+ security_groups: typing.Optional[typing.Sequence[_aws_cdk_aws_ec2_ceddda9d.ISecurityGroup]] = None,
11506
+ subnet_selection: typing.Optional[typing.Union[_aws_cdk_aws_ec2_ceddda9d.SubnetSelection, typing.Dict[builtins.str, typing.Any]]] = None,
11507
+ vpc: typing.Optional[_aws_cdk_aws_ec2_ceddda9d.IVpc] = None,
11508
+ ) -> None:
11509
+ """Type checking stubs"""
11510
+ pass
11511
+
11512
+ def _typecheckingstub__9dec4d5fbab87fa223a0eb0a144ad5bd91f9cdd54d3337c971ce6435c76dc049(
11513
+ component: RunnerImageComponent,
11514
+ ) -> None:
11515
+ """Type checking stubs"""
11516
+ pass
11517
+
11518
+ def _typecheckingstub__1c4318b2834e7865918b5308b85c0fd80f22d29a067d68d4ee8537a6c0c88b3b(
11519
+ component: RunnerImageComponent,
11520
+ ) -> None:
11521
+ """Type checking stubs"""
11522
+ pass
11523
+
11524
+ def _typecheckingstub__705c18a1eedaa490aebad511aac32a801519a57162e30be4673a8ab87ca434dc(
11525
+ value: typing.List[RunnerImageComponent],
11526
+ ) -> None:
11527
+ """Type checking stubs"""
11528
+ pass
11529
+
11404
11530
  def _typecheckingstub__1ab9454b0ecfcd12fc0ab07c0f0f4d7ce646a5a928f5e14092b0a6c42a4c3b79(
11405
11531
  scope: _constructs_77d1e7e8.Construct,
11406
11532
  id: builtins.str,