aws-cdk-lib 2.142.1__py3-none-any.whl → 2.143.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of aws-cdk-lib might be problematic. Click here for more details.
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.142.1.jsii.tgz → aws-cdk-lib@2.143.0.jsii.tgz} +0 -0
- aws_cdk/aws_amplify/__init__.py +12 -5
- aws_cdk/aws_backup/__init__.py +3 -3
- aws_cdk/aws_batch/__init__.py +237 -0
- aws_cdk/aws_bedrock/__init__.py +700 -16
- aws_cdk/aws_budgets/__init__.py +282 -3
- aws_cdk/aws_cloudtrail/__init__.py +12 -2
- aws_cdk/aws_codebuild/__init__.py +44 -0
- aws_cdk/aws_codepipeline/__init__.py +91 -4
- aws_cdk/aws_cognito/__init__.py +75 -0
- aws_cdk/aws_datazone/__init__.py +1743 -448
- aws_cdk/aws_dynamodb/__init__.py +60 -25
- aws_cdk/aws_ec2/__init__.py +112 -39
- aws_cdk/aws_ecs/__init__.py +3 -3
- aws_cdk/aws_ecs_patterns/__init__.py +106 -0
- aws_cdk/aws_eks/__init__.py +13 -10
- aws_cdk/aws_elasticache/__init__.py +9 -0
- aws_cdk/aws_events/__init__.py +219 -14
- aws_cdk/aws_events_targets/__init__.py +140 -3
- aws_cdk/aws_fms/__init__.py +42 -43
- aws_cdk/aws_fsx/__init__.py +3 -3
- aws_cdk/aws_identitystore/__init__.py +11 -11
- aws_cdk/aws_lambda/__init__.py +45 -0
- aws_cdk/aws_lambda_nodejs/__init__.py +16 -6
- aws_cdk/aws_lightsail/__init__.py +9 -0
- aws_cdk/aws_location/__init__.py +8 -4
- aws_cdk/aws_mediaconnect/__init__.py +1789 -39
- aws_cdk/aws_mediatailor/__init__.py +21 -1
- aws_cdk/aws_mwaa/__init__.py +82 -0
- aws_cdk/aws_neptune/__init__.py +374 -0
- aws_cdk/aws_personalize/__init__.py +9 -3
- aws_cdk/aws_pipes/__init__.py +7 -7
- aws_cdk/aws_quicksight/__init__.py +684 -156
- aws_cdk/aws_rds/__init__.py +88 -24
- aws_cdk/aws_redshift/__init__.py +0 -46
- aws_cdk/aws_route53resolver/__init__.py +23 -0
- aws_cdk/aws_s3/__init__.py +4 -4
- aws_cdk/aws_sagemaker/__init__.py +185 -4
- aws_cdk/aws_securityhub/__init__.py +387 -1
- aws_cdk/aws_ssm/__init__.py +14 -6
- aws_cdk/aws_sso/__init__.py +1243 -34
- aws_cdk/cx_api/__init__.py +16 -0
- {aws_cdk_lib-2.142.1.dist-info → aws_cdk_lib-2.143.0.dist-info}/METADATA +1 -1
- {aws_cdk_lib-2.142.1.dist-info → aws_cdk_lib-2.143.0.dist-info}/RECORD +49 -49
- {aws_cdk_lib-2.142.1.dist-info → aws_cdk_lib-2.143.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.142.1.dist-info → aws_cdk_lib-2.143.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.142.1.dist-info → aws_cdk_lib-2.143.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.142.1.dist-info → aws_cdk_lib-2.143.0.dist-info}/top_level.txt +0 -0
aws_cdk/_jsii/__init__.py
CHANGED
|
@@ -19,7 +19,7 @@ import aws_cdk.asset_node_proxy_agent_v6._jsii
|
|
|
19
19
|
import constructs._jsii
|
|
20
20
|
|
|
21
21
|
__jsii_assembly__ = jsii.JSIIAssembly.load(
|
|
22
|
-
"aws-cdk-lib", "2.
|
|
22
|
+
"aws-cdk-lib", "2.143.0", __name__[0:-6], "aws-cdk-lib@2.143.0.jsii.tgz"
|
|
23
23
|
)
|
|
24
24
|
|
|
25
25
|
__all__ = [
|
|
Binary file
|
aws_cdk/aws_amplify/__init__.py
CHANGED
|
@@ -1457,7 +1457,7 @@ class CfnBranch(
|
|
|
1457
1457
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
1458
1458
|
:param app_id: The unique ID for an Amplify app.
|
|
1459
1459
|
:param branch_name: The name for the branch.
|
|
1460
|
-
:param backend:
|
|
1460
|
+
:param backend: The backend for a ``Branch`` of an Amplify app. Use for a backend created from an AWS CloudFormation stack. This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
|
|
1461
1461
|
:param basic_auth_config: The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format ``user:password`` .
|
|
1462
1462
|
:param build_spec: The build specification (build spec) for the branch.
|
|
1463
1463
|
:param description: The description for the branch that is part of an Amplify app.
|
|
@@ -1583,7 +1583,10 @@ class CfnBranch(
|
|
|
1583
1583
|
def backend(
|
|
1584
1584
|
self,
|
|
1585
1585
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnBranch.BackendProperty"]]:
|
|
1586
|
-
'''
|
|
1586
|
+
'''The backend for a ``Branch`` of an Amplify app.
|
|
1587
|
+
|
|
1588
|
+
Use for a backend created from an AWS CloudFormation stack.
|
|
1589
|
+
'''
|
|
1587
1590
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, "CfnBranch.BackendProperty"]], jsii.get(self, "backend"))
|
|
1588
1591
|
|
|
1589
1592
|
@backend.setter
|
|
@@ -1774,7 +1777,9 @@ class CfnBranch(
|
|
|
1774
1777
|
)
|
|
1775
1778
|
class BackendProperty:
|
|
1776
1779
|
def __init__(self, *, stack_arn: typing.Optional[builtins.str] = None) -> None:
|
|
1777
|
-
'''Describes the backend
|
|
1780
|
+
'''Describes the backend associated with an Amplify ``Branch`` .
|
|
1781
|
+
|
|
1782
|
+
This property is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
|
|
1778
1783
|
|
|
1779
1784
|
:param stack_arn: The Amazon Resource Name (ARN) for the AWS CloudFormation stack.
|
|
1780
1785
|
|
|
@@ -2023,7 +2028,7 @@ class CfnBranchProps:
|
|
|
2023
2028
|
|
|
2024
2029
|
:param app_id: The unique ID for an Amplify app.
|
|
2025
2030
|
:param branch_name: The name for the branch.
|
|
2026
|
-
:param backend:
|
|
2031
|
+
:param backend: The backend for a ``Branch`` of an Amplify app. Use for a backend created from an AWS CloudFormation stack. This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
|
|
2027
2032
|
:param basic_auth_config: The basic authorization credentials for a branch of an Amplify app. You must base64-encode the authorization credentials and provide them in the format ``user:password`` .
|
|
2028
2033
|
:param build_spec: The build specification (build spec) for the branch.
|
|
2029
2034
|
:param description: The description for the branch that is part of an Amplify app.
|
|
@@ -2147,7 +2152,9 @@ class CfnBranchProps:
|
|
|
2147
2152
|
def backend(
|
|
2148
2153
|
self,
|
|
2149
2154
|
) -> typing.Optional[typing.Union[_IResolvable_da3f097b, CfnBranch.BackendProperty]]:
|
|
2150
|
-
'''
|
|
2155
|
+
'''The backend for a ``Branch`` of an Amplify app. Use for a backend created from an AWS CloudFormation stack.
|
|
2156
|
+
|
|
2157
|
+
This field is available to Amplify Gen 2 apps only. When you deploy an application with Amplify Gen 2, you provision the app's backend infrastructure using Typescript code.
|
|
2151
2158
|
|
|
2152
2159
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amplify-branch.html#cfn-amplify-branch-backend
|
|
2153
2160
|
'''
|
aws_cdk/aws_backup/__init__.py
CHANGED
|
@@ -3451,7 +3451,7 @@ class CfnBackupVault(
|
|
|
3451
3451
|
'''
|
|
3452
3452
|
:param scope: Scope in which this resource is defined.
|
|
3453
3453
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
3454
|
-
:param backup_vault_name: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created.
|
|
3454
|
+
:param backup_vault_name: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created.
|
|
3455
3455
|
:param access_policy: A resource-based policy that is used to manage access permissions on the target backup vault.
|
|
3456
3456
|
:param backup_vault_tags: The tags to assign to the backup vault.
|
|
3457
3457
|
:param encryption_key_arn: A server-side encryption key you can specify to encrypt your backups from services that support full AWS Backup management; for example, ``arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`` . If you specify a key, you must specify its ARN, not its alias. If you do not specify a key, AWS Backup creates a KMS key for you by default. To learn which AWS Backup services support full AWS Backup management and how AWS Backup handles encryption for backups from services that do not yet support full AWS Backup , see `Encryption for backups in AWS Backup <https://docs.aws.amazon.com/aws-backup/latest/devguide/encryption.html>`_
|
|
@@ -3845,7 +3845,7 @@ class CfnBackupVaultProps:
|
|
|
3845
3845
|
) -> None:
|
|
3846
3846
|
'''Properties for defining a ``CfnBackupVault``.
|
|
3847
3847
|
|
|
3848
|
-
:param backup_vault_name: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created.
|
|
3848
|
+
:param backup_vault_name: The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created.
|
|
3849
3849
|
:param access_policy: A resource-based policy that is used to manage access permissions on the target backup vault.
|
|
3850
3850
|
:param backup_vault_tags: The tags to assign to the backup vault.
|
|
3851
3851
|
:param encryption_key_arn: A server-side encryption key you can specify to encrypt your backups from services that support full AWS Backup management; for example, ``arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab`` . If you specify a key, you must specify its ARN, not its alias. If you do not specify a key, AWS Backup creates a KMS key for you by default. To learn which AWS Backup services support full AWS Backup management and how AWS Backup handles encryption for backups from services that do not yet support full AWS Backup , see `Encryption for backups in AWS Backup <https://docs.aws.amazon.com/aws-backup/latest/devguide/encryption.html>`_
|
|
@@ -3911,7 +3911,7 @@ class CfnBackupVaultProps:
|
|
|
3911
3911
|
def backup_vault_name(self) -> builtins.str:
|
|
3912
3912
|
'''The name of a logical container where backups are stored.
|
|
3913
3913
|
|
|
3914
|
-
Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created.
|
|
3914
|
+
Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created.
|
|
3915
3915
|
|
|
3916
3916
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-backup-backupvault.html#cfn-backup-backupvault-backupvaultname
|
|
3917
3917
|
'''
|
aws_cdk/aws_batch/__init__.py
CHANGED
|
@@ -240,6 +240,24 @@ low_priority_queue.add_compute_environment(shared_compute_env, 1)
|
|
|
240
240
|
high_priority_queue.add_compute_environment(shared_compute_env, 1)
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
+
### React to jobs stuck in RUNNABLE state
|
|
244
|
+
|
|
245
|
+
You can react to jobs stuck in RUNNABLE state by setting a `jobStateTimeLimitActions` in `JobQueue`.
|
|
246
|
+
Specifies actions that AWS Batch will take after the job has remained at the head of the queue in the
|
|
247
|
+
specified state for longer than the specified time.
|
|
248
|
+
|
|
249
|
+
```python
|
|
250
|
+
batch.JobQueue(self, "JobQueue",
|
|
251
|
+
job_state_time_limit_actions=[batch.JobStateTimeLimitAction(
|
|
252
|
+
action=batch.JobStateTimeLimitActionsAction.CANCEL,
|
|
253
|
+
max_time=cdk.Duration.minutes(10),
|
|
254
|
+
reason=batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY,
|
|
255
|
+
state=batch.JobStateTimeLimitActionsState.RUNNABLE
|
|
256
|
+
)
|
|
257
|
+
]
|
|
258
|
+
)
|
|
259
|
+
```
|
|
260
|
+
|
|
243
261
|
### Fairshare Scheduling
|
|
244
262
|
|
|
245
263
|
Batch `JobQueue`s execute Jobs submitted to them in FIFO order unless you specify a `SchedulingPolicy`.
|
|
@@ -15667,6 +15685,7 @@ class JobQueue(
|
|
|
15667
15685
|
compute_environments: typing.Optional[typing.Sequence[typing.Union["OrderedComputeEnvironment", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
15668
15686
|
enabled: typing.Optional[builtins.bool] = None,
|
|
15669
15687
|
job_queue_name: typing.Optional[builtins.str] = None,
|
|
15688
|
+
job_state_time_limit_actions: typing.Optional[typing.Sequence[typing.Union["JobStateTimeLimitAction", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
15670
15689
|
priority: typing.Optional[jsii.Number] = None,
|
|
15671
15690
|
scheduling_policy: typing.Optional[ISchedulingPolicy] = None,
|
|
15672
15691
|
) -> None:
|
|
@@ -15676,6 +15695,7 @@ class JobQueue(
|
|
|
15676
15695
|
:param compute_environments: The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT); EC2 and Fargate compute environments can't be mixed. *Note*: All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue. Default: none
|
|
15677
15696
|
:param enabled: If the job queue is enabled, it is able to accept jobs. Otherwise, new jobs can't be added to the queue, but jobs already in the queue can finish. Default: true
|
|
15678
15697
|
:param job_queue_name: The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_) Default: - no name
|
|
15698
|
+
:param job_state_time_limit_actions: The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. Default: - no actions
|
|
15679
15699
|
:param priority: The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority of 10 is given scheduling preference over a job queue with a priority of 1. Default: 1
|
|
15680
15700
|
:param scheduling_policy: The SchedulingPolicy for this JobQueue. Instructs the Scheduler how to schedule different jobs. Default: - no scheduling policy
|
|
15681
15701
|
'''
|
|
@@ -15687,6 +15707,7 @@ class JobQueue(
|
|
|
15687
15707
|
compute_environments=compute_environments,
|
|
15688
15708
|
enabled=enabled,
|
|
15689
15709
|
job_queue_name=job_queue_name,
|
|
15710
|
+
job_state_time_limit_actions=job_state_time_limit_actions,
|
|
15690
15711
|
priority=priority,
|
|
15691
15712
|
scheduling_policy=scheduling_policy,
|
|
15692
15713
|
)
|
|
@@ -15802,6 +15823,7 @@ class JobQueue(
|
|
|
15802
15823
|
"compute_environments": "computeEnvironments",
|
|
15803
15824
|
"enabled": "enabled",
|
|
15804
15825
|
"job_queue_name": "jobQueueName",
|
|
15826
|
+
"job_state_time_limit_actions": "jobStateTimeLimitActions",
|
|
15805
15827
|
"priority": "priority",
|
|
15806
15828
|
"scheduling_policy": "schedulingPolicy",
|
|
15807
15829
|
},
|
|
@@ -15813,6 +15835,7 @@ class JobQueueProps:
|
|
|
15813
15835
|
compute_environments: typing.Optional[typing.Sequence[typing.Union["OrderedComputeEnvironment", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
15814
15836
|
enabled: typing.Optional[builtins.bool] = None,
|
|
15815
15837
|
job_queue_name: typing.Optional[builtins.str] = None,
|
|
15838
|
+
job_state_time_limit_actions: typing.Optional[typing.Sequence[typing.Union["JobStateTimeLimitAction", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
15816
15839
|
priority: typing.Optional[jsii.Number] = None,
|
|
15817
15840
|
scheduling_policy: typing.Optional[ISchedulingPolicy] = None,
|
|
15818
15841
|
) -> None:
|
|
@@ -15821,6 +15844,7 @@ class JobQueueProps:
|
|
|
15821
15844
|
:param compute_environments: The set of compute environments mapped to a job queue and their order relative to each other. The job scheduler uses this parameter to determine which compute environment runs a specific job. Compute environments must be in the VALID state before you can associate them with a job queue. You can associate up to three compute environments with a job queue. All of the compute environments must be either EC2 (EC2 or SPOT) or Fargate (FARGATE or FARGATE_SPOT); EC2 and Fargate compute environments can't be mixed. *Note*: All compute environments that are associated with a job queue must share the same architecture. AWS Batch doesn't support mixing compute environment architecture types in a single job queue. Default: none
|
|
15822
15845
|
:param enabled: If the job queue is enabled, it is able to accept jobs. Otherwise, new jobs can't be added to the queue, but jobs already in the queue can finish. Default: true
|
|
15823
15846
|
:param job_queue_name: The name of the job queue. It can be up to 128 letters long. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_) Default: - no name
|
|
15847
|
+
:param job_state_time_limit_actions: The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times. Default: - no actions
|
|
15824
15848
|
:param priority: The priority of the job queue. Job queues with a higher priority are evaluated first when associated with the same compute environment. Priority is determined in descending order. For example, a job queue with a priority of 10 is given scheduling preference over a job queue with a priority of 1. Default: 1
|
|
15825
15849
|
:param scheduling_policy: The SchedulingPolicy for this JobQueue. Instructs the Scheduler how to schedule different jobs. Default: - no scheduling policy
|
|
15826
15850
|
|
|
@@ -15857,6 +15881,7 @@ class JobQueueProps:
|
|
|
15857
15881
|
check_type(argname="argument compute_environments", value=compute_environments, expected_type=type_hints["compute_environments"])
|
|
15858
15882
|
check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
|
|
15859
15883
|
check_type(argname="argument job_queue_name", value=job_queue_name, expected_type=type_hints["job_queue_name"])
|
|
15884
|
+
check_type(argname="argument job_state_time_limit_actions", value=job_state_time_limit_actions, expected_type=type_hints["job_state_time_limit_actions"])
|
|
15860
15885
|
check_type(argname="argument priority", value=priority, expected_type=type_hints["priority"])
|
|
15861
15886
|
check_type(argname="argument scheduling_policy", value=scheduling_policy, expected_type=type_hints["scheduling_policy"])
|
|
15862
15887
|
self._values: typing.Dict[builtins.str, typing.Any] = {}
|
|
@@ -15866,6 +15891,8 @@ class JobQueueProps:
|
|
|
15866
15891
|
self._values["enabled"] = enabled
|
|
15867
15892
|
if job_queue_name is not None:
|
|
15868
15893
|
self._values["job_queue_name"] = job_queue_name
|
|
15894
|
+
if job_state_time_limit_actions is not None:
|
|
15895
|
+
self._values["job_state_time_limit_actions"] = job_state_time_limit_actions
|
|
15869
15896
|
if priority is not None:
|
|
15870
15897
|
self._values["priority"] = priority
|
|
15871
15898
|
if scheduling_policy is not None:
|
|
@@ -15914,6 +15941,17 @@ class JobQueueProps:
|
|
|
15914
15941
|
result = self._values.get("job_queue_name")
|
|
15915
15942
|
return typing.cast(typing.Optional[builtins.str], result)
|
|
15916
15943
|
|
|
15944
|
+
@builtins.property
|
|
15945
|
+
def job_state_time_limit_actions(
|
|
15946
|
+
self,
|
|
15947
|
+
) -> typing.Optional[typing.List["JobStateTimeLimitAction"]]:
|
|
15948
|
+
'''The set of actions that AWS Batch perform on jobs that remain at the head of the job queue in the specified state longer than specified times.
|
|
15949
|
+
|
|
15950
|
+
:default: - no actions
|
|
15951
|
+
'''
|
|
15952
|
+
result = self._values.get("job_state_time_limit_actions")
|
|
15953
|
+
return typing.cast(typing.Optional[typing.List["JobStateTimeLimitAction"]], result)
|
|
15954
|
+
|
|
15917
15955
|
@builtins.property
|
|
15918
15956
|
def priority(self) -> typing.Optional[jsii.Number]:
|
|
15919
15957
|
'''The priority of the job queue.
|
|
@@ -15950,6 +15988,189 @@ class JobQueueProps:
|
|
|
15950
15988
|
)
|
|
15951
15989
|
|
|
15952
15990
|
|
|
15991
|
+
@jsii.data_type(
|
|
15992
|
+
jsii_type="aws-cdk-lib.aws_batch.JobStateTimeLimitAction",
|
|
15993
|
+
jsii_struct_bases=[],
|
|
15994
|
+
name_mapping={
|
|
15995
|
+
"max_time": "maxTime",
|
|
15996
|
+
"reason": "reason",
|
|
15997
|
+
"action": "action",
|
|
15998
|
+
"state": "state",
|
|
15999
|
+
},
|
|
16000
|
+
)
|
|
16001
|
+
class JobStateTimeLimitAction:
|
|
16002
|
+
def __init__(
|
|
16003
|
+
self,
|
|
16004
|
+
*,
|
|
16005
|
+
max_time: _Duration_4839e8c3,
|
|
16006
|
+
reason: "JobStateTimeLimitActionsReason",
|
|
16007
|
+
action: typing.Optional["JobStateTimeLimitActionsAction"] = None,
|
|
16008
|
+
state: typing.Optional["JobStateTimeLimitActionsState"] = None,
|
|
16009
|
+
) -> None:
|
|
16010
|
+
'''Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
|
|
16011
|
+
|
|
16012
|
+
:param max_time: The approximate amount of time, that must pass with the job in the specified state before the action is taken. The minimum value is 10 minutes and the maximum value is 24 hours.
|
|
16013
|
+
:param reason: The reason to log for the action being taken.
|
|
16014
|
+
:param action: The action to take when a job is at the head of the job queue in the specified state for the specified period of time. Default: JobStateTimeLimitActionsAction.CANCEL
|
|
16015
|
+
:param state: The state of the job needed to trigger the action. Default: JobStateTimeLimitActionsState.RUNNABLE
|
|
16016
|
+
|
|
16017
|
+
:exampleMetadata: fixture=_generated
|
|
16018
|
+
|
|
16019
|
+
Example::
|
|
16020
|
+
|
|
16021
|
+
# The code below shows an example of how to instantiate this type.
|
|
16022
|
+
# The values are placeholders you should change.
|
|
16023
|
+
import aws_cdk as cdk
|
|
16024
|
+
from aws_cdk import aws_batch as batch
|
|
16025
|
+
|
|
16026
|
+
job_state_time_limit_action = batch.JobStateTimeLimitAction(
|
|
16027
|
+
max_time=cdk.Duration.minutes(30),
|
|
16028
|
+
reason=batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY,
|
|
16029
|
+
|
|
16030
|
+
# the properties below are optional
|
|
16031
|
+
action=batch.JobStateTimeLimitActionsAction.CANCEL,
|
|
16032
|
+
state=batch.JobStateTimeLimitActionsState.RUNNABLE
|
|
16033
|
+
)
|
|
16034
|
+
'''
|
|
16035
|
+
if __debug__:
|
|
16036
|
+
type_hints = typing.get_type_hints(_typecheckingstub__102d588e6b9eae374ea9f17cea9773cdd2ef08c27b954765883382aa5e86599b)
|
|
16037
|
+
check_type(argname="argument max_time", value=max_time, expected_type=type_hints["max_time"])
|
|
16038
|
+
check_type(argname="argument reason", value=reason, expected_type=type_hints["reason"])
|
|
16039
|
+
check_type(argname="argument action", value=action, expected_type=type_hints["action"])
|
|
16040
|
+
check_type(argname="argument state", value=state, expected_type=type_hints["state"])
|
|
16041
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
16042
|
+
"max_time": max_time,
|
|
16043
|
+
"reason": reason,
|
|
16044
|
+
}
|
|
16045
|
+
if action is not None:
|
|
16046
|
+
self._values["action"] = action
|
|
16047
|
+
if state is not None:
|
|
16048
|
+
self._values["state"] = state
|
|
16049
|
+
|
|
16050
|
+
@builtins.property
|
|
16051
|
+
def max_time(self) -> _Duration_4839e8c3:
|
|
16052
|
+
'''The approximate amount of time, that must pass with the job in the specified state before the action is taken.
|
|
16053
|
+
|
|
16054
|
+
The minimum value is 10 minutes and the maximum value is 24 hours.
|
|
16055
|
+
'''
|
|
16056
|
+
result = self._values.get("max_time")
|
|
16057
|
+
assert result is not None, "Required property 'max_time' is missing"
|
|
16058
|
+
return typing.cast(_Duration_4839e8c3, result)
|
|
16059
|
+
|
|
16060
|
+
@builtins.property
|
|
16061
|
+
def reason(self) -> "JobStateTimeLimitActionsReason":
|
|
16062
|
+
'''The reason to log for the action being taken.
|
|
16063
|
+
|
|
16064
|
+
:see: https://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#job_stuck_in_runnable
|
|
16065
|
+
'''
|
|
16066
|
+
result = self._values.get("reason")
|
|
16067
|
+
assert result is not None, "Required property 'reason' is missing"
|
|
16068
|
+
return typing.cast("JobStateTimeLimitActionsReason", result)
|
|
16069
|
+
|
|
16070
|
+
@builtins.property
|
|
16071
|
+
def action(self) -> typing.Optional["JobStateTimeLimitActionsAction"]:
|
|
16072
|
+
'''The action to take when a job is at the head of the job queue in the specified state for the specified period of time.
|
|
16073
|
+
|
|
16074
|
+
:default: JobStateTimeLimitActionsAction.CANCEL
|
|
16075
|
+
'''
|
|
16076
|
+
result = self._values.get("action")
|
|
16077
|
+
return typing.cast(typing.Optional["JobStateTimeLimitActionsAction"], result)
|
|
16078
|
+
|
|
16079
|
+
@builtins.property
|
|
16080
|
+
def state(self) -> typing.Optional["JobStateTimeLimitActionsState"]:
|
|
16081
|
+
'''The state of the job needed to trigger the action.
|
|
16082
|
+
|
|
16083
|
+
:default: JobStateTimeLimitActionsState.RUNNABLE
|
|
16084
|
+
'''
|
|
16085
|
+
result = self._values.get("state")
|
|
16086
|
+
return typing.cast(typing.Optional["JobStateTimeLimitActionsState"], result)
|
|
16087
|
+
|
|
16088
|
+
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
16089
|
+
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
16090
|
+
|
|
16091
|
+
def __ne__(self, rhs: typing.Any) -> builtins.bool:
|
|
16092
|
+
return not (rhs == self)
|
|
16093
|
+
|
|
16094
|
+
def __repr__(self) -> str:
|
|
16095
|
+
return "JobStateTimeLimitAction(%s)" % ", ".join(
|
|
16096
|
+
k + "=" + repr(v) for k, v in self._values.items()
|
|
16097
|
+
)
|
|
16098
|
+
|
|
16099
|
+
|
|
16100
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_batch.JobStateTimeLimitActionsAction")
|
|
16101
|
+
class JobStateTimeLimitActionsAction(enum.Enum):
|
|
16102
|
+
'''The action to take when a job is at the head of the job queue in the specified state for the specified period of time.
|
|
16103
|
+
|
|
16104
|
+
:exampleMetadata: infused
|
|
16105
|
+
|
|
16106
|
+
Example::
|
|
16107
|
+
|
|
16108
|
+
batch.JobQueue(self, "JobQueue",
|
|
16109
|
+
job_state_time_limit_actions=[batch.JobStateTimeLimitAction(
|
|
16110
|
+
action=batch.JobStateTimeLimitActionsAction.CANCEL,
|
|
16111
|
+
max_time=cdk.Duration.minutes(10),
|
|
16112
|
+
reason=batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY,
|
|
16113
|
+
state=batch.JobStateTimeLimitActionsState.RUNNABLE
|
|
16114
|
+
)
|
|
16115
|
+
]
|
|
16116
|
+
)
|
|
16117
|
+
'''
|
|
16118
|
+
|
|
16119
|
+
CANCEL = "CANCEL"
|
|
16120
|
+
'''Cancel the job.'''
|
|
16121
|
+
|
|
16122
|
+
|
|
16123
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_batch.JobStateTimeLimitActionsReason")
|
|
16124
|
+
class JobStateTimeLimitActionsReason(enum.Enum):
|
|
16125
|
+
'''The reason to log for the action being taken.
|
|
16126
|
+
|
|
16127
|
+
:see: https://docs.aws.amazon.com/batch/latest/userguide/troubleshooting.html#job_stuck_in_runnable
|
|
16128
|
+
:exampleMetadata: infused
|
|
16129
|
+
|
|
16130
|
+
Example::
|
|
16131
|
+
|
|
16132
|
+
batch.JobQueue(self, "JobQueue",
|
|
16133
|
+
job_state_time_limit_actions=[batch.JobStateTimeLimitAction(
|
|
16134
|
+
action=batch.JobStateTimeLimitActionsAction.CANCEL,
|
|
16135
|
+
max_time=cdk.Duration.minutes(10),
|
|
16136
|
+
reason=batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY,
|
|
16137
|
+
state=batch.JobStateTimeLimitActionsState.RUNNABLE
|
|
16138
|
+
)
|
|
16139
|
+
]
|
|
16140
|
+
)
|
|
16141
|
+
'''
|
|
16142
|
+
|
|
16143
|
+
INSUFFICIENT_INSTANCE_CAPACITY = "INSUFFICIENT_INSTANCE_CAPACITY"
|
|
16144
|
+
'''All connected compute environments have insufficient capacity errors.'''
|
|
16145
|
+
COMPUTE_ENVIRONMENT_MAX_RESOURCE = "COMPUTE_ENVIRONMENT_MAX_RESOURCE"
|
|
16146
|
+
'''All compute environments have a maxvCpus parameter that is smaller than the job requirements.'''
|
|
16147
|
+
JOB_RESOURCE_REQUIREMENT = "JOB_RESOURCE_REQUIREMENT"
|
|
16148
|
+
'''None of the compute environments have instances that meet the job requirements.'''
|
|
16149
|
+
|
|
16150
|
+
|
|
16151
|
+
@jsii.enum(jsii_type="aws-cdk-lib.aws_batch.JobStateTimeLimitActionsState")
|
|
16152
|
+
class JobStateTimeLimitActionsState(enum.Enum):
|
|
16153
|
+
'''The state of the job needed to trigger the action.
|
|
16154
|
+
|
|
16155
|
+
:exampleMetadata: infused
|
|
16156
|
+
|
|
16157
|
+
Example::
|
|
16158
|
+
|
|
16159
|
+
batch.JobQueue(self, "JobQueue",
|
|
16160
|
+
job_state_time_limit_actions=[batch.JobStateTimeLimitAction(
|
|
16161
|
+
action=batch.JobStateTimeLimitActionsAction.CANCEL,
|
|
16162
|
+
max_time=cdk.Duration.minutes(10),
|
|
16163
|
+
reason=batch.JobStateTimeLimitActionsReason.INSUFFICIENT_INSTANCE_CAPACITY,
|
|
16164
|
+
state=batch.JobStateTimeLimitActionsState.RUNNABLE
|
|
16165
|
+
)
|
|
16166
|
+
]
|
|
16167
|
+
)
|
|
16168
|
+
'''
|
|
16169
|
+
|
|
16170
|
+
RUNNABLE = "RUNNABLE"
|
|
16171
|
+
'''RUNNABLE state triggers the action.'''
|
|
16172
|
+
|
|
16173
|
+
|
|
15953
16174
|
class LinuxParameters(
|
|
15954
16175
|
_constructs_77d1e7e8.Construct,
|
|
15955
16176
|
metaclass=jsii.JSIIMeta,
|
|
@@ -22730,6 +22951,10 @@ __all__ = [
|
|
|
22730
22951
|
"JobDefinitionProps",
|
|
22731
22952
|
"JobQueue",
|
|
22732
22953
|
"JobQueueProps",
|
|
22954
|
+
"JobStateTimeLimitAction",
|
|
22955
|
+
"JobStateTimeLimitActionsAction",
|
|
22956
|
+
"JobStateTimeLimitActionsReason",
|
|
22957
|
+
"JobStateTimeLimitActionsState",
|
|
22733
22958
|
"LinuxParameters",
|
|
22734
22959
|
"LinuxParametersProps",
|
|
22735
22960
|
"ManagedComputeEnvironmentProps",
|
|
@@ -23905,6 +24130,7 @@ def _typecheckingstub__723df267b7e9bb5d5c528ba5a1aa218be0ca4022c78c16074c5d4f007
|
|
|
23905
24130
|
compute_environments: typing.Optional[typing.Sequence[typing.Union[OrderedComputeEnvironment, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
23906
24131
|
enabled: typing.Optional[builtins.bool] = None,
|
|
23907
24132
|
job_queue_name: typing.Optional[builtins.str] = None,
|
|
24133
|
+
job_state_time_limit_actions: typing.Optional[typing.Sequence[typing.Union[JobStateTimeLimitAction, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
23908
24134
|
priority: typing.Optional[jsii.Number] = None,
|
|
23909
24135
|
scheduling_policy: typing.Optional[ISchedulingPolicy] = None,
|
|
23910
24136
|
) -> None:
|
|
@@ -23931,12 +24157,23 @@ def _typecheckingstub__5b59bccb0036592bc6b4a24ae3e42d2a7f256b983fea46bc1dd442b04
|
|
|
23931
24157
|
compute_environments: typing.Optional[typing.Sequence[typing.Union[OrderedComputeEnvironment, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
23932
24158
|
enabled: typing.Optional[builtins.bool] = None,
|
|
23933
24159
|
job_queue_name: typing.Optional[builtins.str] = None,
|
|
24160
|
+
job_state_time_limit_actions: typing.Optional[typing.Sequence[typing.Union[JobStateTimeLimitAction, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
23934
24161
|
priority: typing.Optional[jsii.Number] = None,
|
|
23935
24162
|
scheduling_policy: typing.Optional[ISchedulingPolicy] = None,
|
|
23936
24163
|
) -> None:
|
|
23937
24164
|
"""Type checking stubs"""
|
|
23938
24165
|
pass
|
|
23939
24166
|
|
|
24167
|
+
def _typecheckingstub__102d588e6b9eae374ea9f17cea9773cdd2ef08c27b954765883382aa5e86599b(
|
|
24168
|
+
*,
|
|
24169
|
+
max_time: _Duration_4839e8c3,
|
|
24170
|
+
reason: JobStateTimeLimitActionsReason,
|
|
24171
|
+
action: typing.Optional[JobStateTimeLimitActionsAction] = None,
|
|
24172
|
+
state: typing.Optional[JobStateTimeLimitActionsState] = None,
|
|
24173
|
+
) -> None:
|
|
24174
|
+
"""Type checking stubs"""
|
|
24175
|
+
pass
|
|
24176
|
+
|
|
23940
24177
|
def _typecheckingstub__f63cfeab73132e19eb12435bd180a64083f02789874bc4729fcf306dcaaf1bb2(
|
|
23941
24178
|
scope: _constructs_77d1e7e8.Construct,
|
|
23942
24179
|
id: builtins.str,
|