aws-cdk-lib 2.139.1__py3-none-any.whl → 2.141.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/__init__.py +8 -0
- aws_cdk/_jsii/__init__.py +1 -1
- aws_cdk/_jsii/{aws-cdk-lib@2.139.1.jsii.tgz → aws-cdk-lib@2.141.0.jsii.tgz} +0 -0
- aws_cdk/aws_acmpca/__init__.py +70 -56
- aws_cdk/aws_apigateway/__init__.py +126 -53
- aws_cdk/aws_applicationautoscaling/__init__.py +1 -4
- aws_cdk/aws_arczonalshift/__init__.py +49 -44
- aws_cdk/aws_bedrock/__init__.py +2829 -147
- aws_cdk/aws_cloudfront/__init__.py +51 -9
- aws_cdk/aws_cloudtrail/__init__.py +13 -4
- aws_cdk/aws_codecommit/__init__.py +72 -46
- aws_cdk/aws_connectcampaigns/__init__.py +34 -4
- aws_cdk/aws_datasync/__init__.py +96 -75
- aws_cdk/aws_dms/__init__.py +0 -269
- aws_cdk/aws_dynamodb/__init__.py +410 -0
- aws_cdk/aws_ec2/__init__.py +239 -84
- aws_cdk/aws_ecr/__init__.py +32 -7
- aws_cdk/aws_ecs/__init__.py +2 -4
- aws_cdk/aws_efs/__init__.py +16 -2
- aws_cdk/aws_eks/__init__.py +57 -0
- aws_cdk/aws_entityresolution/__init__.py +6 -2
- aws_cdk/aws_events/__init__.py +115 -0
- aws_cdk/aws_events_targets/__init__.py +15 -0
- aws_cdk/aws_fis/__init__.py +2 -1
- aws_cdk/aws_fms/__init__.py +7 -7
- aws_cdk/aws_gamelift/__init__.py +1984 -107
- aws_cdk/aws_globalaccelerator/__init__.py +20 -16
- aws_cdk/aws_iam/__init__.py +2 -2
- aws_cdk/aws_ivs/__init__.py +1 -3
- aws_cdk/aws_kinesis/__init__.py +21 -0
- aws_cdk/aws_kinesisvideo/__init__.py +6 -4
- aws_cdk/aws_kms/__init__.py +33 -6
- aws_cdk/aws_lambda/__init__.py +0 -9
- aws_cdk/aws_location/__init__.py +8 -4
- aws_cdk/aws_medialive/__init__.py +444 -3
- aws_cdk/aws_oam/__init__.py +45 -11
- aws_cdk/aws_omics/__init__.py +4 -4
- aws_cdk/aws_paymentcryptography/__init__.py +1155 -0
- aws_cdk/aws_personalize/__init__.py +8 -2
- aws_cdk/aws_pinpoint/__init__.py +7 -5
- aws_cdk/aws_qbusiness/__init__.py +5583 -0
- aws_cdk/aws_quicksight/__init__.py +10063 -1450
- aws_cdk/aws_rds/__init__.py +77 -5
- aws_cdk/aws_redshiftserverless/__init__.py +13 -9
- aws_cdk/aws_route53/__init__.py +350 -0
- aws_cdk/aws_route53profiles/__init__.py +1048 -0
- aws_cdk/aws_s3/__init__.py +1 -1
- aws_cdk/aws_sagemaker/__init__.py +30 -30
- aws_cdk/aws_ses/__init__.py +9 -9
- aws_cdk/aws_transfer/__init__.py +102 -37
- aws_cdk/aws_voiceid/__init__.py +2 -2
- aws_cdk/aws_workspacesweb/__init__.py +92 -6
- aws_cdk/custom_resources/__init__.py +23 -2
- aws_cdk/cx_api/__init__.py +16 -0
- {aws_cdk_lib-2.139.1.dist-info → aws_cdk_lib-2.141.0.dist-info}/METADATA +2 -2
- {aws_cdk_lib-2.139.1.dist-info → aws_cdk_lib-2.141.0.dist-info}/RECORD +60 -57
- {aws_cdk_lib-2.139.1.dist-info → aws_cdk_lib-2.141.0.dist-info}/LICENSE +0 -0
- {aws_cdk_lib-2.139.1.dist-info → aws_cdk_lib-2.141.0.dist-info}/NOTICE +0 -0
- {aws_cdk_lib-2.139.1.dist-info → aws_cdk_lib-2.141.0.dist-info}/WHEEL +0 -0
- {aws_cdk_lib-2.139.1.dist-info → aws_cdk_lib-2.141.0.dist-info}/top_level.txt +0 -0
|
@@ -390,7 +390,7 @@ RootStack(App())
|
|
|
390
390
|
> **Warning:** In the code above, an API Gateway deployment is created during the initial CDK deployment.
|
|
391
391
|
> However, if there are changes to the resources in subsequent CDK deployments, a new API Gateway deployment is not
|
|
392
392
|
> automatically created. As a result, the latest state of the resources is not reflected. To ensure the latest state
|
|
393
|
-
> of the resources is reflected, a manual deployment of the API Gateway is required after the CDK deployment.
|
|
393
|
+
> of the resources is reflected, a manual deployment of the API Gateway is required after the CDK deployment. See [Controlled triggering of deployments](#controlled-triggering-of-deployments) for more info.
|
|
394
394
|
|
|
395
395
|
## Integration Targets
|
|
396
396
|
|
|
@@ -1117,7 +1117,7 @@ Instructions for configuring your trust store can be found [here](https://aws.am
|
|
|
1117
1117
|
By default, the `RestApi` construct will automatically create an API Gateway
|
|
1118
1118
|
[Deployment](https://docs.aws.amazon.com/apigateway/api-reference/resource/deployment/) and a "prod" [Stage](https://docs.aws.amazon.com/apigateway/api-reference/resource/stage/) which represent the API configuration you
|
|
1119
1119
|
defined in your CDK app. This means that when you deploy your app, your API will
|
|
1120
|
-
|
|
1120
|
+
have open access from the internet via the stage URL.
|
|
1121
1121
|
|
|
1122
1122
|
The URL of your API can be obtained from the attribute `restApi.url`, and is
|
|
1123
1123
|
also exported as an `Output` from your stack, so it's printed when you `cdk deploy` your app:
|
|
@@ -1177,6 +1177,71 @@ api = apigateway.RestApi(self, "books",
|
|
|
1177
1177
|
)
|
|
1178
1178
|
```
|
|
1179
1179
|
|
|
1180
|
+
### Deploying to an existing stage
|
|
1181
|
+
|
|
1182
|
+
#### Using RestApi
|
|
1183
|
+
|
|
1184
|
+
If you want to use an existing stage to deploy your `RestApi`, first set `{ deploy: false }` so the construct doesn't automatically create new `Deployment` and `Stage` resources. Then you can manually define a `apigateway.Deployment` resource and specify the stage name for your existing stage using the `stageName` property.
|
|
1185
|
+
|
|
1186
|
+
Note that as long as the deployment's logical ID doesn't change, it will represent the snapshot in time when the resource was created. To ensure your deployment reflects changes to the `RestApi` model, see [Controlled triggering of deployments](#controlled-triggering-of-deployments).
|
|
1187
|
+
|
|
1188
|
+
```python
|
|
1189
|
+
rest_api = apigateway.RestApi(self, "my-rest-api",
|
|
1190
|
+
deploy=False
|
|
1191
|
+
)
|
|
1192
|
+
|
|
1193
|
+
# Use `stageName` to deploy to an existing stage
|
|
1194
|
+
deployment = apigateway.Deployment(self, "my-deployment",
|
|
1195
|
+
api=rest_api,
|
|
1196
|
+
stage_name="dev",
|
|
1197
|
+
retain_deployments=True
|
|
1198
|
+
)
|
|
1199
|
+
```
|
|
1200
|
+
|
|
1201
|
+
#### Using SpecRestApi
|
|
1202
|
+
|
|
1203
|
+
If you want to use an existing stage to deploy your `SpecRestApi`, first set `{ deploy: false }` so the construct doesn't automatically create new `Deployment` and `Stage` resources. Then you can manually define a `apigateway.Deployment` resource and specify the stage name for your existing stage using the `stageName` property.
|
|
1204
|
+
|
|
1205
|
+
To automatically create a new deployment that reflects the latest API changes, you can use the `addToLogicalId()` method and pass in your OpenAPI definition.
|
|
1206
|
+
|
|
1207
|
+
```python
|
|
1208
|
+
my_api_definition = apigateway.ApiDefinition.from_asset("path-to-file.json")
|
|
1209
|
+
spec_rest_api = apigateway.SpecRestApi(self, "my-specrest-api",
|
|
1210
|
+
deploy=False,
|
|
1211
|
+
api_definition=my_api_definition
|
|
1212
|
+
)
|
|
1213
|
+
|
|
1214
|
+
# Use `stageName` to deploy to an existing stage
|
|
1215
|
+
deployment = apigateway.Deployment(self, "my-deployment",
|
|
1216
|
+
api=spec_rest_api,
|
|
1217
|
+
stage_name="dev",
|
|
1218
|
+
retain_deployments=True
|
|
1219
|
+
)
|
|
1220
|
+
|
|
1221
|
+
# Trigger a new deployment on OpenAPI definition updates
|
|
1222
|
+
deployment.add_to_logical_id(my_api_definition)
|
|
1223
|
+
```
|
|
1224
|
+
|
|
1225
|
+
> Note: If the `stageName` property is set but a stage with the corresponding name does not exist, a new stage resource will be created with the provided stage name.
|
|
1226
|
+
|
|
1227
|
+
> Note: If you update the `stageName` property, you should be triggering a new deployment (i.e. with an updated logical ID and API changes). Otherwise, an error will occur during deployment.
|
|
1228
|
+
|
|
1229
|
+
### Controlled triggering of deployments
|
|
1230
|
+
|
|
1231
|
+
By default, the `RestApi` construct deploys changes immediately. If you want to
|
|
1232
|
+
control when deployments happen, set `{ deploy: false }` and create a `Deployment` construct yourself. Add a revision counter to the construct ID, and update it in your source code whenever you want to trigger a new deployment:
|
|
1233
|
+
|
|
1234
|
+
```python
|
|
1235
|
+
rest_api = apigateway.RestApi(self, "my-api",
|
|
1236
|
+
deploy=False
|
|
1237
|
+
)
|
|
1238
|
+
|
|
1239
|
+
deployment_revision = 5 # Bump this counter to trigger a new deployment
|
|
1240
|
+
apigateway.Deployment(self, f"Deployment{deploymentRevision}",
|
|
1241
|
+
api=rest_api
|
|
1242
|
+
)
|
|
1243
|
+
```
|
|
1244
|
+
|
|
1180
1245
|
### Deep dive: Invalidation of deployments
|
|
1181
1246
|
|
|
1182
1247
|
API Gateway deployments are an immutable snapshot of the API. This means that we
|
|
@@ -2704,15 +2769,21 @@ class ApiDefinition(
|
|
|
2704
2769
|
|
|
2705
2770
|
Example::
|
|
2706
2771
|
|
|
2707
|
-
|
|
2708
|
-
|
|
2772
|
+
my_api_definition = apigateway.ApiDefinition.from_asset("path-to-file.json")
|
|
2773
|
+
spec_rest_api = apigateway.SpecRestApi(self, "my-specrest-api",
|
|
2774
|
+
deploy=False,
|
|
2775
|
+
api_definition=my_api_definition
|
|
2776
|
+
)
|
|
2709
2777
|
|
|
2710
|
-
|
|
2711
|
-
|
|
2778
|
+
# Use `stageName` to deploy to an existing stage
|
|
2779
|
+
deployment = apigateway.Deployment(self, "my-deployment",
|
|
2780
|
+
api=spec_rest_api,
|
|
2781
|
+
stage_name="dev",
|
|
2782
|
+
retain_deployments=True
|
|
2712
2783
|
)
|
|
2713
2784
|
|
|
2714
|
-
|
|
2715
|
-
|
|
2785
|
+
# Trigger a new deployment on OpenAPI definition updates
|
|
2786
|
+
deployment.add_to_logical_id(my_api_definition)
|
|
2716
2787
|
'''
|
|
2717
2788
|
|
|
2718
2789
|
def __init__(self) -> None:
|
|
@@ -3128,55 +3199,25 @@ class AssetApiDefinition(
|
|
|
3128
3199
|
):
|
|
3129
3200
|
'''OpenAPI specification from a local file.
|
|
3130
3201
|
|
|
3131
|
-
:exampleMetadata:
|
|
3202
|
+
:exampleMetadata: infused
|
|
3132
3203
|
|
|
3133
3204
|
Example::
|
|
3134
3205
|
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
# docker_image: cdk.DockerImage
|
|
3142
|
-
# grantable: iam.IGrantable
|
|
3143
|
-
# local_bundling: cdk.ILocalBundling
|
|
3144
|
-
|
|
3145
|
-
asset_api_definition = apigateway.AssetApiDefinition("path",
|
|
3146
|
-
asset_hash="assetHash",
|
|
3147
|
-
asset_hash_type=cdk.AssetHashType.SOURCE,
|
|
3148
|
-
bundling=cdk.BundlingOptions(
|
|
3149
|
-
image=docker_image,
|
|
3150
|
-
|
|
3151
|
-
# the properties below are optional
|
|
3152
|
-
bundling_file_access=cdk.BundlingFileAccess.VOLUME_COPY,
|
|
3153
|
-
command=["command"],
|
|
3154
|
-
entrypoint=["entrypoint"],
|
|
3155
|
-
environment={
|
|
3156
|
-
"environment_key": "environment"
|
|
3157
|
-
},
|
|
3158
|
-
local=local_bundling,
|
|
3159
|
-
network="network",
|
|
3160
|
-
output_type=cdk.BundlingOutput.ARCHIVED,
|
|
3161
|
-
platform="platform",
|
|
3162
|
-
security_opt="securityOpt",
|
|
3163
|
-
user="user",
|
|
3164
|
-
volumes=[cdk.DockerVolume(
|
|
3165
|
-
container_path="containerPath",
|
|
3166
|
-
host_path="hostPath",
|
|
3206
|
+
my_api_definition = apigateway.ApiDefinition.from_asset("path-to-file.json")
|
|
3207
|
+
spec_rest_api = apigateway.SpecRestApi(self, "my-specrest-api",
|
|
3208
|
+
deploy=False,
|
|
3209
|
+
api_definition=my_api_definition
|
|
3210
|
+
)
|
|
3167
3211
|
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
),
|
|
3174
|
-
deploy_time=False,
|
|
3175
|
-
exclude=["exclude"],
|
|
3176
|
-
follow_symlinks=cdk.SymlinkFollowMode.NEVER,
|
|
3177
|
-
ignore_mode=cdk.IgnoreMode.GLOB,
|
|
3178
|
-
readers=[grantable]
|
|
3212
|
+
# Use `stageName` to deploy to an existing stage
|
|
3213
|
+
deployment = apigateway.Deployment(self, "my-deployment",
|
|
3214
|
+
api=spec_rest_api,
|
|
3215
|
+
stage_name="dev",
|
|
3216
|
+
retain_deployments=True
|
|
3179
3217
|
)
|
|
3218
|
+
|
|
3219
|
+
# Trigger a new deployment on OpenAPI definition updates
|
|
3220
|
+
deployment.add_to_logical_id(my_api_definition)
|
|
3180
3221
|
'''
|
|
3181
3222
|
|
|
3182
3223
|
def __init__(
|
|
@@ -14015,6 +14056,7 @@ class Deployment(
|
|
|
14015
14056
|
api: "IRestApi",
|
|
14016
14057
|
description: typing.Optional[builtins.str] = None,
|
|
14017
14058
|
retain_deployments: typing.Optional[builtins.bool] = None,
|
|
14059
|
+
stage_name: typing.Optional[builtins.str] = None,
|
|
14018
14060
|
) -> None:
|
|
14019
14061
|
'''
|
|
14020
14062
|
:param scope: -
|
|
@@ -14022,13 +14064,17 @@ class Deployment(
|
|
|
14022
14064
|
:param api: The Rest API to deploy.
|
|
14023
14065
|
:param description: A description of the purpose of the API Gateway deployment. Default: - No description.
|
|
14024
14066
|
:param retain_deployments: When an API Gateway model is updated, a new deployment will automatically be created. If this is true, the old API Gateway Deployment resource will not be deleted. This will allow manually reverting back to a previous deployment in case for example Default: false
|
|
14067
|
+
:param stage_name: The name of the stage the API Gateway deployment deploys to. Default: - No stage name. If the ``stageName`` property is set but a stage with the corresponding name does not exist, a new stage resource will be created with the provided stage name.
|
|
14025
14068
|
'''
|
|
14026
14069
|
if __debug__:
|
|
14027
14070
|
type_hints = typing.get_type_hints(_typecheckingstub__60052a26fedba9d01bde406c7bb3c749dd3ea02f314d0f61d824f756c590721b)
|
|
14028
14071
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
14029
14072
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
14030
14073
|
props = DeploymentProps(
|
|
14031
|
-
api=api,
|
|
14074
|
+
api=api,
|
|
14075
|
+
description=description,
|
|
14076
|
+
retain_deployments=retain_deployments,
|
|
14077
|
+
stage_name=stage_name,
|
|
14032
14078
|
)
|
|
14033
14079
|
|
|
14034
14080
|
jsii.create(self.__class__, self, [scope, id, props])
|
|
@@ -14061,6 +14107,12 @@ class Deployment(
|
|
|
14061
14107
|
'''
|
|
14062
14108
|
return typing.cast(builtins.str, jsii.get(self, "deploymentId"))
|
|
14063
14109
|
|
|
14110
|
+
@builtins.property
|
|
14111
|
+
@jsii.member(jsii_name="stageName")
|
|
14112
|
+
def stage_name(self) -> typing.Optional[builtins.str]:
|
|
14113
|
+
'''The stage of the API gateway deployment.'''
|
|
14114
|
+
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "stageName"))
|
|
14115
|
+
|
|
14064
14116
|
|
|
14065
14117
|
@jsii.data_type(
|
|
14066
14118
|
jsii_type="aws-cdk-lib.aws_apigateway.DeploymentProps",
|
|
@@ -14069,6 +14121,7 @@ class Deployment(
|
|
|
14069
14121
|
"api": "api",
|
|
14070
14122
|
"description": "description",
|
|
14071
14123
|
"retain_deployments": "retainDeployments",
|
|
14124
|
+
"stage_name": "stageName",
|
|
14072
14125
|
},
|
|
14073
14126
|
)
|
|
14074
14127
|
class DeploymentProps:
|
|
@@ -14078,11 +14131,13 @@ class DeploymentProps:
|
|
|
14078
14131
|
api: "IRestApi",
|
|
14079
14132
|
description: typing.Optional[builtins.str] = None,
|
|
14080
14133
|
retain_deployments: typing.Optional[builtins.bool] = None,
|
|
14134
|
+
stage_name: typing.Optional[builtins.str] = None,
|
|
14081
14135
|
) -> None:
|
|
14082
14136
|
'''
|
|
14083
14137
|
:param api: The Rest API to deploy.
|
|
14084
14138
|
:param description: A description of the purpose of the API Gateway deployment. Default: - No description.
|
|
14085
14139
|
:param retain_deployments: When an API Gateway model is updated, a new deployment will automatically be created. If this is true, the old API Gateway Deployment resource will not be deleted. This will allow manually reverting back to a previous deployment in case for example Default: false
|
|
14140
|
+
:param stage_name: The name of the stage the API Gateway deployment deploys to. Default: - No stage name. If the ``stageName`` property is set but a stage with the corresponding name does not exist, a new stage resource will be created with the provided stage name.
|
|
14086
14141
|
|
|
14087
14142
|
:exampleMetadata: infused
|
|
14088
14143
|
|
|
@@ -14121,6 +14176,7 @@ class DeploymentProps:
|
|
|
14121
14176
|
check_type(argname="argument api", value=api, expected_type=type_hints["api"])
|
|
14122
14177
|
check_type(argname="argument description", value=description, expected_type=type_hints["description"])
|
|
14123
14178
|
check_type(argname="argument retain_deployments", value=retain_deployments, expected_type=type_hints["retain_deployments"])
|
|
14179
|
+
check_type(argname="argument stage_name", value=stage_name, expected_type=type_hints["stage_name"])
|
|
14124
14180
|
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
14125
14181
|
"api": api,
|
|
14126
14182
|
}
|
|
@@ -14128,6 +14184,8 @@ class DeploymentProps:
|
|
|
14128
14184
|
self._values["description"] = description
|
|
14129
14185
|
if retain_deployments is not None:
|
|
14130
14186
|
self._values["retain_deployments"] = retain_deployments
|
|
14187
|
+
if stage_name is not None:
|
|
14188
|
+
self._values["stage_name"] = stage_name
|
|
14131
14189
|
|
|
14132
14190
|
@builtins.property
|
|
14133
14191
|
def api(self) -> "IRestApi":
|
|
@@ -14157,6 +14215,19 @@ class DeploymentProps:
|
|
|
14157
14215
|
result = self._values.get("retain_deployments")
|
|
14158
14216
|
return typing.cast(typing.Optional[builtins.bool], result)
|
|
14159
14217
|
|
|
14218
|
+
@builtins.property
|
|
14219
|
+
def stage_name(self) -> typing.Optional[builtins.str]:
|
|
14220
|
+
'''The name of the stage the API Gateway deployment deploys to.
|
|
14221
|
+
|
|
14222
|
+
:default:
|
|
14223
|
+
|
|
14224
|
+
- No stage name. If the ``stageName`` property is set but a stage with the
|
|
14225
|
+
corresponding name does not exist, a new stage resource will be created with the
|
|
14226
|
+
provided stage name.
|
|
14227
|
+
'''
|
|
14228
|
+
result = self._values.get("stage_name")
|
|
14229
|
+
return typing.cast(typing.Optional[builtins.str], result)
|
|
14230
|
+
|
|
14160
14231
|
def __eq__(self, rhs: typing.Any) -> builtins.bool:
|
|
14161
14232
|
return isinstance(rhs, self.__class__) and rhs._values == self._values
|
|
14162
14233
|
|
|
@@ -33678,6 +33749,7 @@ def _typecheckingstub__60052a26fedba9d01bde406c7bb3c749dd3ea02f314d0f61d824f756c
|
|
|
33678
33749
|
api: IRestApi,
|
|
33679
33750
|
description: typing.Optional[builtins.str] = None,
|
|
33680
33751
|
retain_deployments: typing.Optional[builtins.bool] = None,
|
|
33752
|
+
stage_name: typing.Optional[builtins.str] = None,
|
|
33681
33753
|
) -> None:
|
|
33682
33754
|
"""Type checking stubs"""
|
|
33683
33755
|
pass
|
|
@@ -33693,6 +33765,7 @@ def _typecheckingstub__689289fb9a086819dc2bb6611b99cf777d39e89a4f67f62a4fb0ee0ba
|
|
|
33693
33765
|
api: IRestApi,
|
|
33694
33766
|
description: typing.Optional[builtins.str] = None,
|
|
33695
33767
|
retain_deployments: typing.Optional[builtins.bool] = None,
|
|
33768
|
+
stage_name: typing.Optional[builtins.str] = None,
|
|
33696
33769
|
) -> None:
|
|
33697
33770
|
"""Type checking stubs"""
|
|
33698
33771
|
pass
|
|
@@ -1269,10 +1269,7 @@ class CfnScalableTarget(
|
|
|
1269
1269
|
@builtins.property
|
|
1270
1270
|
@jsii.member(jsii_name="attrId")
|
|
1271
1271
|
def attr_id(self) -> builtins.str:
|
|
1272
|
-
'''
|
|
1273
|
-
|
|
1274
|
-
Ref returns the Cloudformation generated ID of the resource in format - ResourceId|ScalableDimension|ServiceNamespace
|
|
1275
|
-
|
|
1272
|
+
'''
|
|
1276
1273
|
:cloudformationAttribute: Id
|
|
1277
1274
|
'''
|
|
1278
1275
|
return typing.cast(builtins.str, jsii.get(self, "attrId"))
|
|
@@ -84,6 +84,9 @@ class CfnZonalAutoshiftConfiguration(
|
|
|
84
84
|
from aws_cdk import aws_arczonalshift as arczonalshift
|
|
85
85
|
|
|
86
86
|
cfn_zonal_autoshift_configuration = arczonalshift.CfnZonalAutoshiftConfiguration(self, "MyCfnZonalAutoshiftConfiguration",
|
|
87
|
+
resource_identifier="resourceIdentifier",
|
|
88
|
+
|
|
89
|
+
# the properties below are optional
|
|
87
90
|
practice_run_configuration=arczonalshift.CfnZonalAutoshiftConfiguration.PracticeRunConfigurationProperty(
|
|
88
91
|
outcome_alarms=[arczonalshift.CfnZonalAutoshiftConfiguration.ControlConditionProperty(
|
|
89
92
|
alarm_identifier="alarmIdentifier",
|
|
@@ -98,7 +101,6 @@ class CfnZonalAutoshiftConfiguration(
|
|
|
98
101
|
type="type"
|
|
99
102
|
)]
|
|
100
103
|
),
|
|
101
|
-
resource_identifier="resourceIdentifier",
|
|
102
104
|
zonal_autoshift_status="zonalAutoshiftStatus"
|
|
103
105
|
)
|
|
104
106
|
'''
|
|
@@ -108,15 +110,15 @@ class CfnZonalAutoshiftConfiguration(
|
|
|
108
110
|
scope: _constructs_77d1e7e8.Construct,
|
|
109
111
|
id: builtins.str,
|
|
110
112
|
*,
|
|
113
|
+
resource_identifier: builtins.str,
|
|
111
114
|
practice_run_configuration: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union["CfnZonalAutoshiftConfiguration.PracticeRunConfigurationProperty", typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
112
|
-
resource_identifier: typing.Optional[builtins.str] = None,
|
|
113
115
|
zonal_autoshift_status: typing.Optional[builtins.str] = None,
|
|
114
116
|
) -> None:
|
|
115
117
|
'''
|
|
116
118
|
:param scope: Scope in which this resource is defined.
|
|
117
119
|
:param id: Construct identifier for this resource (unique in its scope).
|
|
118
|
-
:param practice_run_configuration: A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice run, as well as any blocked dates or blocked windows for the practice run. When a resource has a practice run configuration, Route 53 ARC shifts traffic for the resource weekly for practice runs. Practice runs are required for zonal autoshift. The zonal shifts that Route 53 ARC starts for practice runs help you to ensure that shifting away traffic from an Availability Zone during an autoshift is safe for your application. You can update or delete a practice run configuration. Before you delete a practice run configuration, you must disable zonal autoshift for the resource. A practice run configuration is required when zonal autoshift is enabled.
|
|
119
120
|
:param resource_identifier: The identifier for the resource that AWS shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource. At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.
|
|
121
|
+
:param practice_run_configuration: A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice run, as well as any blocked dates or blocked windows for the practice run. When a resource has a practice run configuration, Route 53 ARC shifts traffic for the resource weekly for practice runs. Practice runs are required for zonal autoshift. The zonal shifts that Route 53 ARC starts for practice runs help you to ensure that shifting away traffic from an Availability Zone during an autoshift is safe for your application. You can update or delete a practice run configuration. Before you delete a practice run configuration, you must disable zonal autoshift for the resource. A practice run configuration is required when zonal autoshift is enabled.
|
|
120
122
|
:param zonal_autoshift_status: When zonal autoshift is ``ENABLED`` , you authorize AWS to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery. Traffic is also shifted away for the required weekly practice runs.
|
|
121
123
|
'''
|
|
122
124
|
if __debug__:
|
|
@@ -124,8 +126,8 @@ class CfnZonalAutoshiftConfiguration(
|
|
|
124
126
|
check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
|
|
125
127
|
check_type(argname="argument id", value=id, expected_type=type_hints["id"])
|
|
126
128
|
props = CfnZonalAutoshiftConfigurationProps(
|
|
127
|
-
practice_run_configuration=practice_run_configuration,
|
|
128
129
|
resource_identifier=resource_identifier,
|
|
130
|
+
practice_run_configuration=practice_run_configuration,
|
|
129
131
|
zonal_autoshift_status=zonal_autoshift_status,
|
|
130
132
|
)
|
|
131
133
|
|
|
@@ -166,6 +168,19 @@ class CfnZonalAutoshiftConfiguration(
|
|
|
166
168
|
def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]:
|
|
167
169
|
return typing.cast(typing.Mapping[builtins.str, typing.Any], jsii.get(self, "cfnProperties"))
|
|
168
170
|
|
|
171
|
+
@builtins.property
|
|
172
|
+
@jsii.member(jsii_name="resourceIdentifier")
|
|
173
|
+
def resource_identifier(self) -> builtins.str:
|
|
174
|
+
'''The identifier for the resource that AWS shifts traffic for.'''
|
|
175
|
+
return typing.cast(builtins.str, jsii.get(self, "resourceIdentifier"))
|
|
176
|
+
|
|
177
|
+
@resource_identifier.setter
|
|
178
|
+
def resource_identifier(self, value: builtins.str) -> None:
|
|
179
|
+
if __debug__:
|
|
180
|
+
type_hints = typing.get_type_hints(_typecheckingstub__0172f855e8c8e45fb028b84c5b6c061a5bab422e24d02655056a950949eb68fa)
|
|
181
|
+
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
182
|
+
jsii.set(self, "resourceIdentifier", value)
|
|
183
|
+
|
|
169
184
|
@builtins.property
|
|
170
185
|
@jsii.member(jsii_name="practiceRunConfiguration")
|
|
171
186
|
def practice_run_configuration(
|
|
@@ -184,19 +199,6 @@ class CfnZonalAutoshiftConfiguration(
|
|
|
184
199
|
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
185
200
|
jsii.set(self, "practiceRunConfiguration", value)
|
|
186
201
|
|
|
187
|
-
@builtins.property
|
|
188
|
-
@jsii.member(jsii_name="resourceIdentifier")
|
|
189
|
-
def resource_identifier(self) -> typing.Optional[builtins.str]:
|
|
190
|
-
'''The identifier for the resource that AWS shifts traffic for.'''
|
|
191
|
-
return typing.cast(typing.Optional[builtins.str], jsii.get(self, "resourceIdentifier"))
|
|
192
|
-
|
|
193
|
-
@resource_identifier.setter
|
|
194
|
-
def resource_identifier(self, value: typing.Optional[builtins.str]) -> None:
|
|
195
|
-
if __debug__:
|
|
196
|
-
type_hints = typing.get_type_hints(_typecheckingstub__0172f855e8c8e45fb028b84c5b6c061a5bab422e24d02655056a950949eb68fa)
|
|
197
|
-
check_type(argname="argument value", value=value, expected_type=type_hints["value"])
|
|
198
|
-
jsii.set(self, "resourceIdentifier", value)
|
|
199
|
-
|
|
200
202
|
@builtins.property
|
|
201
203
|
@jsii.member(jsii_name="zonalAutoshiftStatus")
|
|
202
204
|
def zonal_autoshift_status(self) -> typing.Optional[builtins.str]:
|
|
@@ -428,8 +430,8 @@ class CfnZonalAutoshiftConfiguration(
|
|
|
428
430
|
jsii_type="aws-cdk-lib.aws_arczonalshift.CfnZonalAutoshiftConfigurationProps",
|
|
429
431
|
jsii_struct_bases=[],
|
|
430
432
|
name_mapping={
|
|
431
|
-
"practice_run_configuration": "practiceRunConfiguration",
|
|
432
433
|
"resource_identifier": "resourceIdentifier",
|
|
434
|
+
"practice_run_configuration": "practiceRunConfiguration",
|
|
433
435
|
"zonal_autoshift_status": "zonalAutoshiftStatus",
|
|
434
436
|
},
|
|
435
437
|
)
|
|
@@ -437,14 +439,14 @@ class CfnZonalAutoshiftConfigurationProps:
|
|
|
437
439
|
def __init__(
|
|
438
440
|
self,
|
|
439
441
|
*,
|
|
442
|
+
resource_identifier: builtins.str,
|
|
440
443
|
practice_run_configuration: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnZonalAutoshiftConfiguration.PracticeRunConfigurationProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
441
|
-
resource_identifier: typing.Optional[builtins.str] = None,
|
|
442
444
|
zonal_autoshift_status: typing.Optional[builtins.str] = None,
|
|
443
445
|
) -> None:
|
|
444
446
|
'''Properties for defining a ``CfnZonalAutoshiftConfiguration``.
|
|
445
447
|
|
|
446
|
-
:param practice_run_configuration: A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice run, as well as any blocked dates or blocked windows for the practice run. When a resource has a practice run configuration, Route 53 ARC shifts traffic for the resource weekly for practice runs. Practice runs are required for zonal autoshift. The zonal shifts that Route 53 ARC starts for practice runs help you to ensure that shifting away traffic from an Availability Zone during an autoshift is safe for your application. You can update or delete a practice run configuration. Before you delete a practice run configuration, you must disable zonal autoshift for the resource. A practice run configuration is required when zonal autoshift is enabled.
|
|
447
448
|
:param resource_identifier: The identifier for the resource that AWS shifts traffic for. The identifier is the Amazon Resource Name (ARN) for the resource. At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.
|
|
449
|
+
:param practice_run_configuration: A practice run configuration for a resource includes the Amazon CloudWatch alarms that you've specified for a practice run, as well as any blocked dates or blocked windows for the practice run. When a resource has a practice run configuration, Route 53 ARC shifts traffic for the resource weekly for practice runs. Practice runs are required for zonal autoshift. The zonal shifts that Route 53 ARC starts for practice runs help you to ensure that shifting away traffic from an Availability Zone during an autoshift is safe for your application. You can update or delete a practice run configuration. Before you delete a practice run configuration, you must disable zonal autoshift for the resource. A practice run configuration is required when zonal autoshift is enabled.
|
|
448
450
|
:param zonal_autoshift_status: When zonal autoshift is ``ENABLED`` , you authorize AWS to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery. Traffic is also shifted away for the required weekly practice runs.
|
|
449
451
|
|
|
450
452
|
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-arczonalshift-zonalautoshiftconfiguration.html
|
|
@@ -457,6 +459,9 @@ class CfnZonalAutoshiftConfigurationProps:
|
|
|
457
459
|
from aws_cdk import aws_arczonalshift as arczonalshift
|
|
458
460
|
|
|
459
461
|
cfn_zonal_autoshift_configuration_props = arczonalshift.CfnZonalAutoshiftConfigurationProps(
|
|
462
|
+
resource_identifier="resourceIdentifier",
|
|
463
|
+
|
|
464
|
+
# the properties below are optional
|
|
460
465
|
practice_run_configuration=arczonalshift.CfnZonalAutoshiftConfiguration.PracticeRunConfigurationProperty(
|
|
461
466
|
outcome_alarms=[arczonalshift.CfnZonalAutoshiftConfiguration.ControlConditionProperty(
|
|
462
467
|
alarm_identifier="alarmIdentifier",
|
|
@@ -471,23 +476,36 @@ class CfnZonalAutoshiftConfigurationProps:
|
|
|
471
476
|
type="type"
|
|
472
477
|
)]
|
|
473
478
|
),
|
|
474
|
-
resource_identifier="resourceIdentifier",
|
|
475
479
|
zonal_autoshift_status="zonalAutoshiftStatus"
|
|
476
480
|
)
|
|
477
481
|
'''
|
|
478
482
|
if __debug__:
|
|
479
483
|
type_hints = typing.get_type_hints(_typecheckingstub__df846ffeb392d27b90c69c753d2f5defce1421dd94b678654bb7fe32434590d0)
|
|
480
|
-
check_type(argname="argument practice_run_configuration", value=practice_run_configuration, expected_type=type_hints["practice_run_configuration"])
|
|
481
484
|
check_type(argname="argument resource_identifier", value=resource_identifier, expected_type=type_hints["resource_identifier"])
|
|
485
|
+
check_type(argname="argument practice_run_configuration", value=practice_run_configuration, expected_type=type_hints["practice_run_configuration"])
|
|
482
486
|
check_type(argname="argument zonal_autoshift_status", value=zonal_autoshift_status, expected_type=type_hints["zonal_autoshift_status"])
|
|
483
|
-
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
487
|
+
self._values: typing.Dict[builtins.str, typing.Any] = {
|
|
488
|
+
"resource_identifier": resource_identifier,
|
|
489
|
+
}
|
|
484
490
|
if practice_run_configuration is not None:
|
|
485
491
|
self._values["practice_run_configuration"] = practice_run_configuration
|
|
486
|
-
if resource_identifier is not None:
|
|
487
|
-
self._values["resource_identifier"] = resource_identifier
|
|
488
492
|
if zonal_autoshift_status is not None:
|
|
489
493
|
self._values["zonal_autoshift_status"] = zonal_autoshift_status
|
|
490
494
|
|
|
495
|
+
@builtins.property
|
|
496
|
+
def resource_identifier(self) -> builtins.str:
|
|
497
|
+
'''The identifier for the resource that AWS shifts traffic for.
|
|
498
|
+
|
|
499
|
+
The identifier is the Amazon Resource Name (ARN) for the resource.
|
|
500
|
+
|
|
501
|
+
At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.
|
|
502
|
+
|
|
503
|
+
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-arczonalshift-zonalautoshiftconfiguration.html#cfn-arczonalshift-zonalautoshiftconfiguration-resourceidentifier
|
|
504
|
+
'''
|
|
505
|
+
result = self._values.get("resource_identifier")
|
|
506
|
+
assert result is not None, "Required property 'resource_identifier' is missing"
|
|
507
|
+
return typing.cast(builtins.str, result)
|
|
508
|
+
|
|
491
509
|
@builtins.property
|
|
492
510
|
def practice_run_configuration(
|
|
493
511
|
self,
|
|
@@ -505,19 +523,6 @@ class CfnZonalAutoshiftConfigurationProps:
|
|
|
505
523
|
result = self._values.get("practice_run_configuration")
|
|
506
524
|
return typing.cast(typing.Optional[typing.Union[_IResolvable_da3f097b, CfnZonalAutoshiftConfiguration.PracticeRunConfigurationProperty]], result)
|
|
507
525
|
|
|
508
|
-
@builtins.property
|
|
509
|
-
def resource_identifier(self) -> typing.Optional[builtins.str]:
|
|
510
|
-
'''The identifier for the resource that AWS shifts traffic for.
|
|
511
|
-
|
|
512
|
-
The identifier is the Amazon Resource Name (ARN) for the resource.
|
|
513
|
-
|
|
514
|
-
At this time, supported resources are Network Load Balancers and Application Load Balancers with cross-zone load balancing turned off.
|
|
515
|
-
|
|
516
|
-
:see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-arczonalshift-zonalautoshiftconfiguration.html#cfn-arczonalshift-zonalautoshiftconfiguration-resourceidentifier
|
|
517
|
-
'''
|
|
518
|
-
result = self._values.get("resource_identifier")
|
|
519
|
-
return typing.cast(typing.Optional[builtins.str], result)
|
|
520
|
-
|
|
521
526
|
@builtins.property
|
|
522
527
|
def zonal_autoshift_status(self) -> typing.Optional[builtins.str]:
|
|
523
528
|
'''When zonal autoshift is ``ENABLED`` , you authorize AWS to shift away resource traffic for an application from an Availability Zone during events, on your behalf, to help reduce time to recovery.
|
|
@@ -552,8 +557,8 @@ def _typecheckingstub__8c7357d3884cea81f1166de2f6ac59cb16a8663a471270d73a743eb77
|
|
|
552
557
|
scope: _constructs_77d1e7e8.Construct,
|
|
553
558
|
id: builtins.str,
|
|
554
559
|
*,
|
|
560
|
+
resource_identifier: builtins.str,
|
|
555
561
|
practice_run_configuration: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnZonalAutoshiftConfiguration.PracticeRunConfigurationProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
556
|
-
resource_identifier: typing.Optional[builtins.str] = None,
|
|
557
562
|
zonal_autoshift_status: typing.Optional[builtins.str] = None,
|
|
558
563
|
) -> None:
|
|
559
564
|
"""Type checking stubs"""
|
|
@@ -571,14 +576,14 @@ def _typecheckingstub__d6cd5c905f39dc6d9cfcdb3f49d58c5ca237eb10b38e48744425b3c2c
|
|
|
571
576
|
"""Type checking stubs"""
|
|
572
577
|
pass
|
|
573
578
|
|
|
574
|
-
def
|
|
575
|
-
value:
|
|
579
|
+
def _typecheckingstub__0172f855e8c8e45fb028b84c5b6c061a5bab422e24d02655056a950949eb68fa(
|
|
580
|
+
value: builtins.str,
|
|
576
581
|
) -> None:
|
|
577
582
|
"""Type checking stubs"""
|
|
578
583
|
pass
|
|
579
584
|
|
|
580
|
-
def
|
|
581
|
-
value: typing.Optional[
|
|
585
|
+
def _typecheckingstub__deabf71a3e0015b91f35f23b96354f1d2feeb19a3f783edd9e6c4be281a4d00a(
|
|
586
|
+
value: typing.Optional[typing.Union[_IResolvable_da3f097b, CfnZonalAutoshiftConfiguration.PracticeRunConfigurationProperty]],
|
|
582
587
|
) -> None:
|
|
583
588
|
"""Type checking stubs"""
|
|
584
589
|
pass
|
|
@@ -609,8 +614,8 @@ def _typecheckingstub__09d714a4c978f7c2d70e24869d7ce300d549509a8b35174736a9571be
|
|
|
609
614
|
|
|
610
615
|
def _typecheckingstub__df846ffeb392d27b90c69c753d2f5defce1421dd94b678654bb7fe32434590d0(
|
|
611
616
|
*,
|
|
617
|
+
resource_identifier: builtins.str,
|
|
612
618
|
practice_run_configuration: typing.Optional[typing.Union[_IResolvable_da3f097b, typing.Union[CfnZonalAutoshiftConfiguration.PracticeRunConfigurationProperty, typing.Dict[builtins.str, typing.Any]]]] = None,
|
|
613
|
-
resource_identifier: typing.Optional[builtins.str] = None,
|
|
614
619
|
zonal_autoshift_status: typing.Optional[builtins.str] = None,
|
|
615
620
|
) -> None:
|
|
616
621
|
"""Type checking stubs"""
|