aws-cdk-lib 2.130.0__py3-none-any.whl → 2.131.0__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (72) hide show
  1. aws_cdk/__init__.py +41 -21
  2. aws_cdk/_jsii/__init__.py +1 -1
  3. aws_cdk/_jsii/{aws-cdk-lib@2.130.0.jsii.tgz → aws-cdk-lib@2.131.0.jsii.tgz} +0 -0
  4. aws_cdk/aws_apigatewayv2/__init__.py +52 -11
  5. aws_cdk/aws_apigatewayv2_integrations/__init__.py +286 -0
  6. aws_cdk/aws_appconfig/__init__.py +36 -5
  7. aws_cdk/aws_applicationautoscaling/__init__.py +80 -123
  8. aws_cdk/aws_applicationinsights/__init__.py +48 -0
  9. aws_cdk/aws_apprunner/__init__.py +8 -1
  10. aws_cdk/aws_appstream/__init__.py +8 -1
  11. aws_cdk/aws_appsync/__init__.py +324 -103
  12. aws_cdk/aws_athena/__init__.py +8 -1
  13. aws_cdk/aws_b2bi/__init__.py +30 -4
  14. aws_cdk/aws_backup/__init__.py +77 -53
  15. aws_cdk/aws_cleanrooms/__init__.py +37 -5
  16. aws_cdk/aws_cloudtrail/__init__.py +23 -1
  17. aws_cdk/aws_codebuild/__init__.py +8 -1
  18. aws_cdk/aws_codestarconnections/__init__.py +8 -1
  19. aws_cdk/aws_cognito/__init__.py +21 -21
  20. aws_cdk/aws_comprehend/__init__.py +8 -1
  21. aws_cdk/aws_connect/__init__.py +57 -8
  22. aws_cdk/aws_controltower/__init__.py +27 -7
  23. aws_cdk/aws_customerprofiles/__init__.py +136 -123
  24. aws_cdk/aws_datapipeline/__init__.py +19 -11
  25. aws_cdk/aws_datasync/__init__.py +8 -1
  26. aws_cdk/aws_datazone/__init__.py +9 -1
  27. aws_cdk/aws_dms/__init__.py +29 -4
  28. aws_cdk/aws_docdb/__init__.py +131 -5
  29. aws_cdk/aws_ec2/__init__.py +178 -65
  30. aws_cdk/aws_ecs/__init__.py +43 -51
  31. aws_cdk/aws_ecs_patterns/__init__.py +214 -0
  32. aws_cdk/aws_eks/__init__.py +43 -2
  33. aws_cdk/aws_elasticache/__init__.py +8 -1
  34. aws_cdk/aws_elasticloadbalancingv2/__init__.py +8 -1
  35. aws_cdk/aws_emr/__init__.py +8 -1
  36. aws_cdk/aws_entityresolution/__init__.py +23 -3
  37. aws_cdk/aws_events/__init__.py +12 -1
  38. aws_cdk/aws_fms/__init__.py +8 -1
  39. aws_cdk/aws_glue/__init__.py +18 -4
  40. aws_cdk/aws_healthimaging/__init__.py +9 -1
  41. aws_cdk/aws_inspectorv2/__init__.py +9 -1
  42. aws_cdk/aws_iot/__init__.py +29 -4
  43. aws_cdk/aws_ivs/__init__.py +8 -1
  44. aws_cdk/aws_kms/__init__.py +1 -1
  45. aws_cdk/aws_lambda/__init__.py +3 -5
  46. aws_cdk/aws_location/__init__.py +44 -6
  47. aws_cdk/aws_logs/__init__.py +22 -3
  48. aws_cdk/aws_macie/__init__.py +15 -2
  49. aws_cdk/aws_medialive/__init__.py +8 -1
  50. aws_cdk/aws_mediapackagev2/__init__.py +23 -3
  51. aws_cdk/aws_mediatailor/__init__.py +29 -4
  52. aws_cdk/aws_msk/__init__.py +8 -1
  53. aws_cdk/aws_neptunegraph/__init__.py +9 -1
  54. aws_cdk/aws_networkfirewall/__init__.py +8 -1
  55. aws_cdk/aws_pcaconnectorad/__init__.py +23 -3
  56. aws_cdk/aws_pinpointemail/__init__.py +23 -3
  57. aws_cdk/aws_quicksight/__init__.py +37 -0
  58. aws_cdk/aws_rds/__init__.py +47 -4
  59. aws_cdk/aws_route53resolver/__init__.py +8 -1
  60. aws_cdk/aws_s3/__init__.py +29 -4
  61. aws_cdk/aws_sagemaker/__init__.py +19 -8
  62. aws_cdk/aws_securityhub/__init__.py +8 -1
  63. aws_cdk/aws_shield/__init__.py +16 -2
  64. aws_cdk/aws_workspacesthinclient/__init__.py +9 -1
  65. aws_cdk/aws_workspacesweb/__init__.py +51 -7
  66. aws_cdk/aws_xray/__init__.py +16 -2
  67. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/METADATA +1 -1
  68. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/RECORD +72 -72
  69. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/LICENSE +0 -0
  70. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/NOTICE +0 -0
  71. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/WHEEL +0 -0
  72. {aws_cdk_lib-2.130.0.dist-info → aws_cdk_lib-2.131.0.dist-info}/top_level.txt +0 -0
@@ -627,7 +627,7 @@ To make this easier, CDK provides `grant` API.
627
627
  Use the `grant` function for more granular authorization.
628
628
 
629
629
  ```python
630
- # api: appsync.GraphqlApi
630
+ # api: appsync.IGraphqlApi
631
631
  role = iam.Role(self, "Role",
632
632
  assumed_by=iam.ServicePrincipal("lambda.amazonaws.com")
633
633
  )
@@ -654,7 +654,7 @@ These include:
654
654
  * grantSubscription (use to grant access to Subscription fields)
655
655
 
656
656
  ```python
657
- # api: appsync.GraphqlApi
657
+ # api: appsync.IGraphqlApi
658
658
  # role: iam.Role
659
659
 
660
660
 
@@ -756,6 +756,23 @@ api = appsync.GraphqlApi(self, "api",
756
756
  introspection_config=appsync.IntrospectionConfig.DISABLED
757
757
  )
758
758
  ```
759
+
760
+ ## Environment Variables
761
+
762
+ To use environment variables in resolvers, you can use the `environmentVariables` property and
763
+ the `addEnvironmentVariable` method.
764
+
765
+ ```python
766
+ api = appsync.GraphqlApi(self, "api",
767
+ name="api",
768
+ definition=appsync.Definition.from_file(path.join(__dirname, "appsync.schema.graphql")),
769
+ environment_variables={
770
+ "EnvKey1": "non-empty-1"
771
+ }
772
+ )
773
+
774
+ api.add_environment_variable("EnvKey2", "non-empty-2")
775
+ ```
759
776
  '''
760
777
  import abc
761
778
  import builtins
@@ -10655,6 +10672,7 @@ class GraphqlApiAttributes:
10655
10672
  "authorization_config": "authorizationConfig",
10656
10673
  "definition": "definition",
10657
10674
  "domain_name": "domainName",
10675
+ "environment_variables": "environmentVariables",
10658
10676
  "introspection_config": "introspectionConfig",
10659
10677
  "log_config": "logConfig",
10660
10678
  "schema": "schema",
@@ -10670,6 +10688,7 @@ class GraphqlApiProps:
10670
10688
  authorization_config: typing.Optional[typing.Union[AuthorizationConfig, typing.Dict[builtins.str, typing.Any]]] = None,
10671
10689
  definition: typing.Optional[Definition] = None,
10672
10690
  domain_name: typing.Optional[typing.Union[DomainOptions, typing.Dict[builtins.str, typing.Any]]] = None,
10691
+ environment_variables: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
10673
10692
  introspection_config: typing.Optional["IntrospectionConfig"] = None,
10674
10693
  log_config: typing.Optional[typing.Union["LogConfig", typing.Dict[builtins.str, typing.Any]]] = None,
10675
10694
  schema: typing.Optional["ISchema"] = None,
@@ -10682,6 +10701,7 @@ class GraphqlApiProps:
10682
10701
  :param authorization_config: Optional authorization configuration. Default: - API Key authorization
10683
10702
  :param definition: Definition (schema file or source APIs) for this GraphQL Api.
10684
10703
  :param domain_name: The domain name configuration for the GraphQL API. The Route 53 hosted zone and CName DNS record must be configured in addition to this setting to enable custom domain URL Default: - no domain name
10704
+ :param environment_variables: A map containing the list of resources with their properties and environment variables. There are a few rules you must follow when creating keys and values: - Keys must begin with a letter. - Keys must be between 2 and 64 characters long. - Keys can only contain letters, numbers, and the underscore character (_). - Values can be up to 512 characters long. - You can configure up to 50 key-value pairs in a GraphQL API. Default: - No environment variables.
10685
10705
  :param introspection_config: A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection. Default: IntrospectionConfig.ENABLED
10686
10706
  :param log_config: Logging configuration for this api. Default: - None
10687
10707
  :param schema: (deprecated) GraphQL schema definition. Specify how you want to define your schema. SchemaFile.fromAsset(filePath: string) allows schema definition through schema.graphql file Default: - schema will be generated code-first (i.e. addType, addObjectType, etc.)
@@ -10722,6 +10742,7 @@ class GraphqlApiProps:
10722
10742
  check_type(argname="argument authorization_config", value=authorization_config, expected_type=type_hints["authorization_config"])
10723
10743
  check_type(argname="argument definition", value=definition, expected_type=type_hints["definition"])
10724
10744
  check_type(argname="argument domain_name", value=domain_name, expected_type=type_hints["domain_name"])
10745
+ check_type(argname="argument environment_variables", value=environment_variables, expected_type=type_hints["environment_variables"])
10725
10746
  check_type(argname="argument introspection_config", value=introspection_config, expected_type=type_hints["introspection_config"])
10726
10747
  check_type(argname="argument log_config", value=log_config, expected_type=type_hints["log_config"])
10727
10748
  check_type(argname="argument schema", value=schema, expected_type=type_hints["schema"])
@@ -10736,6 +10757,8 @@ class GraphqlApiProps:
10736
10757
  self._values["definition"] = definition
10737
10758
  if domain_name is not None:
10738
10759
  self._values["domain_name"] = domain_name
10760
+ if environment_variables is not None:
10761
+ self._values["environment_variables"] = environment_variables
10739
10762
  if introspection_config is not None:
10740
10763
  self._values["introspection_config"] = introspection_config
10741
10764
  if log_config is not None:
@@ -10781,6 +10804,25 @@ class GraphqlApiProps:
10781
10804
  result = self._values.get("domain_name")
10782
10805
  return typing.cast(typing.Optional[DomainOptions], result)
10783
10806
 
10807
+ @builtins.property
10808
+ def environment_variables(
10809
+ self,
10810
+ ) -> typing.Optional[typing.Mapping[builtins.str, builtins.str]]:
10811
+ '''A map containing the list of resources with their properties and environment variables.
10812
+
10813
+ There are a few rules you must follow when creating keys and values:
10814
+
10815
+ - Keys must begin with a letter.
10816
+ - Keys must be between 2 and 64 characters long.
10817
+ - Keys can only contain letters, numbers, and the underscore character (_).
10818
+ - Values can be up to 512 characters long.
10819
+ - You can configure up to 50 key-value pairs in a GraphQL API.
10820
+
10821
+ :default: - No environment variables.
10822
+ '''
10823
+ result = self._values.get("environment_variables")
10824
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, builtins.str]], result)
10825
+
10784
10826
  @builtins.property
10785
10827
  def introspection_config(self) -> typing.Optional["IntrospectionConfig"]:
10786
10828
  '''A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection.
@@ -11340,6 +11382,60 @@ class IGraphqlApi(_IResource_c80c4260, typing_extensions.Protocol):
11340
11382
  '''
11341
11383
  ...
11342
11384
 
11385
+ @jsii.member(jsii_name="grant")
11386
+ def grant(
11387
+ self,
11388
+ grantee: _IGrantable_71c4f5de,
11389
+ resources: "IamResource",
11390
+ *actions: builtins.str,
11391
+ ) -> _Grant_a7ae64f8:
11392
+ '''Adds an IAM policy statement associated with this GraphQLApi to an IAM principal's policy.
11393
+
11394
+ :param grantee: The principal.
11395
+ :param resources: The set of resources to allow (i.e. ...:[region]:[accountId]:apis/GraphQLId/...).
11396
+ :param actions: The actions that should be granted to the principal (i.e. appsync:graphql ).
11397
+ '''
11398
+ ...
11399
+
11400
+ @jsii.member(jsii_name="grantMutation")
11401
+ def grant_mutation(
11402
+ self,
11403
+ grantee: _IGrantable_71c4f5de,
11404
+ *fields: builtins.str,
11405
+ ) -> _Grant_a7ae64f8:
11406
+ '''Adds an IAM policy statement for Mutation access to this GraphQLApi to an IAM principal's policy.
11407
+
11408
+ :param grantee: The principal.
11409
+ :param fields: The fields to grant access to that are Mutations (leave blank for all).
11410
+ '''
11411
+ ...
11412
+
11413
+ @jsii.member(jsii_name="grantQuery")
11414
+ def grant_query(
11415
+ self,
11416
+ grantee: _IGrantable_71c4f5de,
11417
+ *fields: builtins.str,
11418
+ ) -> _Grant_a7ae64f8:
11419
+ '''Adds an IAM policy statement for Query access to this GraphQLApi to an IAM principal's policy.
11420
+
11421
+ :param grantee: The principal.
11422
+ :param fields: The fields to grant access to that are Queries (leave blank for all).
11423
+ '''
11424
+ ...
11425
+
11426
+ @jsii.member(jsii_name="grantSubscription")
11427
+ def grant_subscription(
11428
+ self,
11429
+ grantee: _IGrantable_71c4f5de,
11430
+ *fields: builtins.str,
11431
+ ) -> _Grant_a7ae64f8:
11432
+ '''Adds an IAM policy statement for Subscription access to this GraphQLApi to an IAM principal's policy.
11433
+
11434
+ :param grantee: The principal.
11435
+ :param fields: The fields to grant access to that are Subscriptions (leave blank for all).
11436
+ '''
11437
+ ...
11438
+
11343
11439
 
11344
11440
  class _IGraphqlApiProxy(
11345
11441
  jsii.proxy_for(_IResource_c80c4260), # type: ignore[misc]
@@ -11633,6 +11729,77 @@ class _IGraphqlApiProxy(
11633
11729
 
11634
11730
  return typing.cast("Resolver", jsii.invoke(self, "createResolver", [id, props]))
11635
11731
 
11732
+ @jsii.member(jsii_name="grant")
11733
+ def grant(
11734
+ self,
11735
+ grantee: _IGrantable_71c4f5de,
11736
+ resources: "IamResource",
11737
+ *actions: builtins.str,
11738
+ ) -> _Grant_a7ae64f8:
11739
+ '''Adds an IAM policy statement associated with this GraphQLApi to an IAM principal's policy.
11740
+
11741
+ :param grantee: The principal.
11742
+ :param resources: The set of resources to allow (i.e. ...:[region]:[accountId]:apis/GraphQLId/...).
11743
+ :param actions: The actions that should be granted to the principal (i.e. appsync:graphql ).
11744
+ '''
11745
+ if __debug__:
11746
+ type_hints = typing.get_type_hints(_typecheckingstub__8447febca968460a74248223e752c1a1365da89df57a21509e03242b14f54227)
11747
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
11748
+ check_type(argname="argument resources", value=resources, expected_type=type_hints["resources"])
11749
+ check_type(argname="argument actions", value=actions, expected_type=typing.Tuple[type_hints["actions"], ...]) # pyright: ignore [reportGeneralTypeIssues]
11750
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grant", [grantee, resources, *actions]))
11751
+
11752
+ @jsii.member(jsii_name="grantMutation")
11753
+ def grant_mutation(
11754
+ self,
11755
+ grantee: _IGrantable_71c4f5de,
11756
+ *fields: builtins.str,
11757
+ ) -> _Grant_a7ae64f8:
11758
+ '''Adds an IAM policy statement for Mutation access to this GraphQLApi to an IAM principal's policy.
11759
+
11760
+ :param grantee: The principal.
11761
+ :param fields: The fields to grant access to that are Mutations (leave blank for all).
11762
+ '''
11763
+ if __debug__:
11764
+ type_hints = typing.get_type_hints(_typecheckingstub__ea1dc6784e906c65ae30d2b32bc3d957909cc40823fa550036fceb8669830f15)
11765
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
11766
+ check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
11767
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantMutation", [grantee, *fields]))
11768
+
11769
+ @jsii.member(jsii_name="grantQuery")
11770
+ def grant_query(
11771
+ self,
11772
+ grantee: _IGrantable_71c4f5de,
11773
+ *fields: builtins.str,
11774
+ ) -> _Grant_a7ae64f8:
11775
+ '''Adds an IAM policy statement for Query access to this GraphQLApi to an IAM principal's policy.
11776
+
11777
+ :param grantee: The principal.
11778
+ :param fields: The fields to grant access to that are Queries (leave blank for all).
11779
+ '''
11780
+ if __debug__:
11781
+ type_hints = typing.get_type_hints(_typecheckingstub__663a0e0f33a2e7bf60cd281e18635c3120648a78c22ab54138585fff02631eec)
11782
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
11783
+ check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
11784
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantQuery", [grantee, *fields]))
11785
+
11786
+ @jsii.member(jsii_name="grantSubscription")
11787
+ def grant_subscription(
11788
+ self,
11789
+ grantee: _IGrantable_71c4f5de,
11790
+ *fields: builtins.str,
11791
+ ) -> _Grant_a7ae64f8:
11792
+ '''Adds an IAM policy statement for Subscription access to this GraphQLApi to an IAM principal's policy.
11793
+
11794
+ :param grantee: The principal.
11795
+ :param fields: The fields to grant access to that are Subscriptions (leave blank for all).
11796
+ '''
11797
+ if __debug__:
11798
+ type_hints = typing.get_type_hints(_typecheckingstub__35a5b1f1ae7dddd4441d16a68e0ce83640393f0cbda788440c0282fefa838996)
11799
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
11800
+ check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
11801
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantSubscription", [grantee, *fields]))
11802
+
11636
11803
  # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
11637
11804
  typing.cast(typing.Any, IGraphqlApi).__jsii_proxy_class__ = lambda : _IGraphqlApiProxy
11638
11805
 
@@ -11822,7 +11989,7 @@ class IamResource(
11822
11989
 
11823
11990
  Example::
11824
11991
 
11825
- # api: appsync.GraphqlApi
11992
+ # api: appsync.IGraphqlApi
11826
11993
  role = iam.Role(self, "Role",
11827
11994
  assumed_by=iam.ServicePrincipal("lambda.amazonaws.com")
11828
11995
  )
@@ -11863,7 +12030,7 @@ class IamResource(
11863
12030
  return typing.cast("IamResource", jsii.sinvoke(cls, "ofType", [type, *fields]))
11864
12031
 
11865
12032
  @jsii.member(jsii_name="resourceArns")
11866
- def resource_arns(self, api: "GraphqlApi") -> typing.List[builtins.str]:
12033
+ def resource_arns(self, api: "GraphqlApiBase") -> typing.List[builtins.str]:
11867
12034
  '''Return the Resource ARN.
11868
12035
 
11869
12036
  :param api: The GraphQL API to give permissions.
@@ -15826,6 +15993,77 @@ class GraphqlApiBase(
15826
15993
 
15827
15994
  return typing.cast(Resolver, jsii.invoke(self, "createResolver", [id, props]))
15828
15995
 
15996
+ @jsii.member(jsii_name="grant")
15997
+ def grant(
15998
+ self,
15999
+ grantee: _IGrantable_71c4f5de,
16000
+ resources: IamResource,
16001
+ *actions: builtins.str,
16002
+ ) -> _Grant_a7ae64f8:
16003
+ '''Adds an IAM policy statement associated with this GraphQLApi to an IAM principal's policy.
16004
+
16005
+ :param grantee: The principal.
16006
+ :param resources: The set of resources to allow (i.e. ...:[region]:[accountId]:apis/GraphQLId/...).
16007
+ :param actions: The actions that should be granted to the principal (i.e. appsync:graphql ).
16008
+ '''
16009
+ if __debug__:
16010
+ type_hints = typing.get_type_hints(_typecheckingstub__a0d68bcaa213c2b0a0945755d9ebf5521ee066b424b037a3c3d320a3f6bd73b8)
16011
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
16012
+ check_type(argname="argument resources", value=resources, expected_type=type_hints["resources"])
16013
+ check_type(argname="argument actions", value=actions, expected_type=typing.Tuple[type_hints["actions"], ...]) # pyright: ignore [reportGeneralTypeIssues]
16014
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grant", [grantee, resources, *actions]))
16015
+
16016
+ @jsii.member(jsii_name="grantMutation")
16017
+ def grant_mutation(
16018
+ self,
16019
+ grantee: _IGrantable_71c4f5de,
16020
+ *fields: builtins.str,
16021
+ ) -> _Grant_a7ae64f8:
16022
+ '''Adds an IAM policy statement for Mutation access to this GraphQLApi to an IAM principal's policy.
16023
+
16024
+ :param grantee: The principal.
16025
+ :param fields: The fields to grant access to that are Mutations (leave blank for all).
16026
+ '''
16027
+ if __debug__:
16028
+ type_hints = typing.get_type_hints(_typecheckingstub__2ef3af2ee92bbe732ce3665a196043366db220efd4931d60c1caffb172992f48)
16029
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
16030
+ check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
16031
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantMutation", [grantee, *fields]))
16032
+
16033
+ @jsii.member(jsii_name="grantQuery")
16034
+ def grant_query(
16035
+ self,
16036
+ grantee: _IGrantable_71c4f5de,
16037
+ *fields: builtins.str,
16038
+ ) -> _Grant_a7ae64f8:
16039
+ '''Adds an IAM policy statement for Query access to this GraphQLApi to an IAM principal's policy.
16040
+
16041
+ :param grantee: The principal.
16042
+ :param fields: The fields to grant access to that are Queries (leave blank for all).
16043
+ '''
16044
+ if __debug__:
16045
+ type_hints = typing.get_type_hints(_typecheckingstub__c9fe1730c86caa2f932312de2ab1972f23f1faecf2962d173f9e2697a70010ad)
16046
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
16047
+ check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
16048
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantQuery", [grantee, *fields]))
16049
+
16050
+ @jsii.member(jsii_name="grantSubscription")
16051
+ def grant_subscription(
16052
+ self,
16053
+ grantee: _IGrantable_71c4f5de,
16054
+ *fields: builtins.str,
16055
+ ) -> _Grant_a7ae64f8:
16056
+ '''Adds an IAM policy statement for Subscription access to this GraphQLApi to an IAM principal's policy.
16057
+
16058
+ :param grantee: The principal.
16059
+ :param fields: The fields to grant access to that are Subscriptions (leave blank for all).
16060
+ '''
16061
+ if __debug__:
16062
+ type_hints = typing.get_type_hints(_typecheckingstub__16383441288592393f1f757c025e34d1be3ac188b761eaf02a202f2f59a8bd32)
16063
+ check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
16064
+ check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
16065
+ return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantSubscription", [grantee, *fields]))
16066
+
15829
16067
  @builtins.property
15830
16068
  @jsii.member(jsii_name="apiId")
15831
16069
  @abc.abstractmethod
@@ -16680,6 +16918,7 @@ class GraphqlApi(
16680
16918
  authorization_config: typing.Optional[typing.Union[AuthorizationConfig, typing.Dict[builtins.str, typing.Any]]] = None,
16681
16919
  definition: typing.Optional[Definition] = None,
16682
16920
  domain_name: typing.Optional[typing.Union[DomainOptions, typing.Dict[builtins.str, typing.Any]]] = None,
16921
+ environment_variables: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
16683
16922
  introspection_config: typing.Optional[IntrospectionConfig] = None,
16684
16923
  log_config: typing.Optional[typing.Union[LogConfig, typing.Dict[builtins.str, typing.Any]]] = None,
16685
16924
  schema: typing.Optional[ISchema] = None,
@@ -16693,6 +16932,7 @@ class GraphqlApi(
16693
16932
  :param authorization_config: Optional authorization configuration. Default: - API Key authorization
16694
16933
  :param definition: Definition (schema file or source APIs) for this GraphQL Api.
16695
16934
  :param domain_name: The domain name configuration for the GraphQL API. The Route 53 hosted zone and CName DNS record must be configured in addition to this setting to enable custom domain URL Default: - no domain name
16935
+ :param environment_variables: A map containing the list of resources with their properties and environment variables. There are a few rules you must follow when creating keys and values: - Keys must begin with a letter. - Keys must be between 2 and 64 characters long. - Keys can only contain letters, numbers, and the underscore character (_). - Values can be up to 512 characters long. - You can configure up to 50 key-value pairs in a GraphQL API. Default: - No environment variables.
16696
16936
  :param introspection_config: A value indicating whether the API to enable (ENABLED) or disable (DISABLED) introspection. Default: IntrospectionConfig.ENABLED
16697
16937
  :param log_config: Logging configuration for this api. Default: - None
16698
16938
  :param schema: (deprecated) GraphQL schema definition. Specify how you want to define your schema. SchemaFile.fromAsset(filePath: string) allows schema definition through schema.graphql file Default: - schema will be generated code-first (i.e. addType, addObjectType, etc.)
@@ -16708,6 +16948,7 @@ class GraphqlApi(
16708
16948
  authorization_config=authorization_config,
16709
16949
  definition=definition,
16710
16950
  domain_name=domain_name,
16951
+ environment_variables=environment_variables,
16711
16952
  introspection_config=introspection_config,
16712
16953
  log_config=log_config,
16713
16954
  schema=schema,
@@ -16744,6 +16985,19 @@ class GraphqlApi(
16744
16985
 
16745
16986
  return typing.cast(IGraphqlApi, jsii.sinvoke(cls, "fromGraphqlApiAttributes", [scope, id, attrs]))
16746
16987
 
16988
+ @jsii.member(jsii_name="addEnvironmentVariable")
16989
+ def add_environment_variable(self, key: builtins.str, value: builtins.str) -> None:
16990
+ '''Add an environment variable to the construct.
16991
+
16992
+ :param key: -
16993
+ :param value: -
16994
+ '''
16995
+ if __debug__:
16996
+ type_hints = typing.get_type_hints(_typecheckingstub__ac59e42f5f67bedffe527d24a8c341e864579b7d2b76910fbd8df5f5030356f2)
16997
+ check_type(argname="argument key", value=key, expected_type=type_hints["key"])
16998
+ check_type(argname="argument value", value=value, expected_type=type_hints["value"])
16999
+ return typing.cast(None, jsii.invoke(self, "addEnvironmentVariable", [key, value]))
17000
+
16747
17001
  @jsii.member(jsii_name="addSchemaDependency")
16748
17002
  def add_schema_dependency(self, construct: _CfnResource_9df397a6) -> builtins.bool:
16749
17003
  '''Add schema dependency to a given construct.
@@ -16755,77 +17009,6 @@ class GraphqlApi(
16755
17009
  check_type(argname="argument construct", value=construct, expected_type=type_hints["construct"])
16756
17010
  return typing.cast(builtins.bool, jsii.invoke(self, "addSchemaDependency", [construct]))
16757
17011
 
16758
- @jsii.member(jsii_name="grant")
16759
- def grant(
16760
- self,
16761
- grantee: _IGrantable_71c4f5de,
16762
- resources: IamResource,
16763
- *actions: builtins.str,
16764
- ) -> _Grant_a7ae64f8:
16765
- '''Adds an IAM policy statement associated with this GraphQLApi to an IAM principal's policy.
16766
-
16767
- :param grantee: The principal.
16768
- :param resources: The set of resources to allow (i.e. ...:[region]:[accountId]:apis/GraphQLId/...).
16769
- :param actions: The actions that should be granted to the principal (i.e. appsync:graphql ).
16770
- '''
16771
- if __debug__:
16772
- type_hints = typing.get_type_hints(_typecheckingstub__104e94b5f084bee63e12022802003206eb0917369d9714c4bd16b6175830d883)
16773
- check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
16774
- check_type(argname="argument resources", value=resources, expected_type=type_hints["resources"])
16775
- check_type(argname="argument actions", value=actions, expected_type=typing.Tuple[type_hints["actions"], ...]) # pyright: ignore [reportGeneralTypeIssues]
16776
- return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grant", [grantee, resources, *actions]))
16777
-
16778
- @jsii.member(jsii_name="grantMutation")
16779
- def grant_mutation(
16780
- self,
16781
- grantee: _IGrantable_71c4f5de,
16782
- *fields: builtins.str,
16783
- ) -> _Grant_a7ae64f8:
16784
- '''Adds an IAM policy statement for Mutation access to this GraphQLApi to an IAM principal's policy.
16785
-
16786
- :param grantee: The principal.
16787
- :param fields: The fields to grant access to that are Mutations (leave blank for all).
16788
- '''
16789
- if __debug__:
16790
- type_hints = typing.get_type_hints(_typecheckingstub__19a4ce004c83ea63a70a24d83e7decd2ca533063652cd621858a247a616ce82c)
16791
- check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
16792
- check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
16793
- return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantMutation", [grantee, *fields]))
16794
-
16795
- @jsii.member(jsii_name="grantQuery")
16796
- def grant_query(
16797
- self,
16798
- grantee: _IGrantable_71c4f5de,
16799
- *fields: builtins.str,
16800
- ) -> _Grant_a7ae64f8:
16801
- '''Adds an IAM policy statement for Query access to this GraphQLApi to an IAM principal's policy.
16802
-
16803
- :param grantee: The principal.
16804
- :param fields: The fields to grant access to that are Queries (leave blank for all).
16805
- '''
16806
- if __debug__:
16807
- type_hints = typing.get_type_hints(_typecheckingstub__425954c633cc79cdb87065e43764a32551571cca0bdaf65a67a4170d25a651ff)
16808
- check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
16809
- check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
16810
- return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantQuery", [grantee, *fields]))
16811
-
16812
- @jsii.member(jsii_name="grantSubscription")
16813
- def grant_subscription(
16814
- self,
16815
- grantee: _IGrantable_71c4f5de,
16816
- *fields: builtins.str,
16817
- ) -> _Grant_a7ae64f8:
16818
- '''Adds an IAM policy statement for Subscription access to this GraphQLApi to an IAM principal's policy.
16819
-
16820
- :param grantee: The principal.
16821
- :param fields: The fields to grant access to that are Subscriptions (leave blank for all).
16822
- '''
16823
- if __debug__:
16824
- type_hints = typing.get_type_hints(_typecheckingstub__980d951a731ee0c5da0e5b32e9e2870ea1adf06571f857a693decc31a0e959e5)
16825
- check_type(argname="argument grantee", value=grantee, expected_type=type_hints["grantee"])
16826
- check_type(argname="argument fields", value=fields, expected_type=typing.Tuple[type_hints["fields"], ...]) # pyright: ignore [reportGeneralTypeIssues]
16827
- return typing.cast(_Grant_a7ae64f8, jsii.invoke(self, "grantSubscription", [grantee, *fields]))
16828
-
16829
17012
  @builtins.property
16830
17013
  @jsii.member(jsii_name="apiId")
16831
17014
  def api_id(self) -> builtins.str:
@@ -18455,6 +18638,7 @@ def _typecheckingstub__99ac2113ba86b3a60344e56ee0c5bb6cdf1bc20cd0d5aa52f9a94709f
18455
18638
  authorization_config: typing.Optional[typing.Union[AuthorizationConfig, typing.Dict[builtins.str, typing.Any]]] = None,
18456
18639
  definition: typing.Optional[Definition] = None,
18457
18640
  domain_name: typing.Optional[typing.Union[DomainOptions, typing.Dict[builtins.str, typing.Any]]] = None,
18641
+ environment_variables: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
18458
18642
  introspection_config: typing.Optional[IntrospectionConfig] = None,
18459
18643
  log_config: typing.Optional[typing.Union[LogConfig, typing.Dict[builtins.str, typing.Any]]] = None,
18460
18644
  schema: typing.Optional[ISchema] = None,
@@ -18589,6 +18773,35 @@ def _typecheckingstub__da1231d659a3d5f86849b39ea5e3924e5d6867178b9b48617ec806865
18589
18773
  """Type checking stubs"""
18590
18774
  pass
18591
18775
 
18776
+ def _typecheckingstub__8447febca968460a74248223e752c1a1365da89df57a21509e03242b14f54227(
18777
+ grantee: _IGrantable_71c4f5de,
18778
+ resources: IamResource,
18779
+ *actions: builtins.str,
18780
+ ) -> None:
18781
+ """Type checking stubs"""
18782
+ pass
18783
+
18784
+ def _typecheckingstub__ea1dc6784e906c65ae30d2b32bc3d957909cc40823fa550036fceb8669830f15(
18785
+ grantee: _IGrantable_71c4f5de,
18786
+ *fields: builtins.str,
18787
+ ) -> None:
18788
+ """Type checking stubs"""
18789
+ pass
18790
+
18791
+ def _typecheckingstub__663a0e0f33a2e7bf60cd281e18635c3120648a78c22ab54138585fff02631eec(
18792
+ grantee: _IGrantable_71c4f5de,
18793
+ *fields: builtins.str,
18794
+ ) -> None:
18795
+ """Type checking stubs"""
18796
+ pass
18797
+
18798
+ def _typecheckingstub__35a5b1f1ae7dddd4441d16a68e0ce83640393f0cbda788440c0282fefa838996(
18799
+ grantee: _IGrantable_71c4f5de,
18800
+ *fields: builtins.str,
18801
+ ) -> None:
18802
+ """Type checking stubs"""
18803
+ pass
18804
+
18592
18805
  def _typecheckingstub__3ab7bd2a4f271f294370de26c1f7a13edd4a7e586c474d1ce0d7c4b532ad79a5(
18593
18806
  api: IGraphqlApi,
18594
18807
  ) -> None:
@@ -18621,7 +18834,7 @@ def _typecheckingstub__76ef3ffd4a7e1a514f99330034c53323b9d1884fe72b84846ee2c9b3b
18621
18834
  pass
18622
18835
 
18623
18836
  def _typecheckingstub__bd39c5d442ee7ade433a10992f6a94e24818b16e448af33f399f02d21d4532a6(
18624
- api: GraphqlApi,
18837
+ api: GraphqlApiBase,
18625
18838
  ) -> None:
18626
18839
  """Type checking stubs"""
18627
18840
  pass
@@ -19267,6 +19480,35 @@ def _typecheckingstub__d8efe28cf6861260ad6e47a65b8be5e006016a7c27a4ee3f2cac0e898
19267
19480
  """Type checking stubs"""
19268
19481
  pass
19269
19482
 
19483
+ def _typecheckingstub__a0d68bcaa213c2b0a0945755d9ebf5521ee066b424b037a3c3d320a3f6bd73b8(
19484
+ grantee: _IGrantable_71c4f5de,
19485
+ resources: IamResource,
19486
+ *actions: builtins.str,
19487
+ ) -> None:
19488
+ """Type checking stubs"""
19489
+ pass
19490
+
19491
+ def _typecheckingstub__2ef3af2ee92bbe732ce3665a196043366db220efd4931d60c1caffb172992f48(
19492
+ grantee: _IGrantable_71c4f5de,
19493
+ *fields: builtins.str,
19494
+ ) -> None:
19495
+ """Type checking stubs"""
19496
+ pass
19497
+
19498
+ def _typecheckingstub__c9fe1730c86caa2f932312de2ab1972f23f1faecf2962d173f9e2697a70010ad(
19499
+ grantee: _IGrantable_71c4f5de,
19500
+ *fields: builtins.str,
19501
+ ) -> None:
19502
+ """Type checking stubs"""
19503
+ pass
19504
+
19505
+ def _typecheckingstub__16383441288592393f1f757c025e34d1be3ac188b761eaf02a202f2f59a8bd32(
19506
+ grantee: _IGrantable_71c4f5de,
19507
+ *fields: builtins.str,
19508
+ ) -> None:
19509
+ """Type checking stubs"""
19510
+ pass
19511
+
19270
19512
  def _typecheckingstub__08c251fa7555c0770f24a577dcd59d2f51898cf46299807eda335998d735f187(
19271
19513
  scope: _constructs_77d1e7e8.Construct,
19272
19514
  id: builtins.str,
@@ -19376,6 +19618,7 @@ def _typecheckingstub__cdc21261f45618890d843fff7978e6e8e4f4cfe7884c4fffbff6b8dad
19376
19618
  authorization_config: typing.Optional[typing.Union[AuthorizationConfig, typing.Dict[builtins.str, typing.Any]]] = None,
19377
19619
  definition: typing.Optional[Definition] = None,
19378
19620
  domain_name: typing.Optional[typing.Union[DomainOptions, typing.Dict[builtins.str, typing.Any]]] = None,
19621
+ environment_variables: typing.Optional[typing.Mapping[builtins.str, builtins.str]] = None,
19379
19622
  introspection_config: typing.Optional[IntrospectionConfig] = None,
19380
19623
  log_config: typing.Optional[typing.Union[LogConfig, typing.Dict[builtins.str, typing.Any]]] = None,
19381
19624
  schema: typing.Optional[ISchema] = None,
@@ -19395,37 +19638,15 @@ def _typecheckingstub__5cefbac91e5bf4b599b8cb612f2e49280f0cab47fab8b476b11f991f6
19395
19638
  """Type checking stubs"""
19396
19639
  pass
19397
19640
 
19398
- def _typecheckingstub__fca5d6afc67603703e938a4f127d82a052b1172c6c07cab72c6e3bded9ccd8e9(
19399
- construct: _CfnResource_9df397a6,
19400
- ) -> None:
19401
- """Type checking stubs"""
19402
- pass
19403
-
19404
- def _typecheckingstub__104e94b5f084bee63e12022802003206eb0917369d9714c4bd16b6175830d883(
19405
- grantee: _IGrantable_71c4f5de,
19406
- resources: IamResource,
19407
- *actions: builtins.str,
19408
- ) -> None:
19409
- """Type checking stubs"""
19410
- pass
19411
-
19412
- def _typecheckingstub__19a4ce004c83ea63a70a24d83e7decd2ca533063652cd621858a247a616ce82c(
19413
- grantee: _IGrantable_71c4f5de,
19414
- *fields: builtins.str,
19415
- ) -> None:
19416
- """Type checking stubs"""
19417
- pass
19418
-
19419
- def _typecheckingstub__425954c633cc79cdb87065e43764a32551571cca0bdaf65a67a4170d25a651ff(
19420
- grantee: _IGrantable_71c4f5de,
19421
- *fields: builtins.str,
19641
+ def _typecheckingstub__ac59e42f5f67bedffe527d24a8c341e864579b7d2b76910fbd8df5f5030356f2(
19642
+ key: builtins.str,
19643
+ value: builtins.str,
19422
19644
  ) -> None:
19423
19645
  """Type checking stubs"""
19424
19646
  pass
19425
19647
 
19426
- def _typecheckingstub__980d951a731ee0c5da0e5b32e9e2870ea1adf06571f857a693decc31a0e959e5(
19427
- grantee: _IGrantable_71c4f5de,
19428
- *fields: builtins.str,
19648
+ def _typecheckingstub__fca5d6afc67603703e938a4f127d82a052b1172c6c07cab72c6e3bded9ccd8e9(
19649
+ construct: _CfnResource_9df397a6,
19429
19650
  ) -> None:
19430
19651
  """Type checking stubs"""
19431
19652
  pass
@@ -46,12 +46,13 @@ from .. import (
46
46
  IInspectable as _IInspectable_c2943556,
47
47
  IResolvable as _IResolvable_da3f097b,
48
48
  ITaggable as _ITaggable_36806126,
49
+ ITaggableV2 as _ITaggableV2_4e6798f8,
49
50
  TagManager as _TagManager_0a598cb3,
50
51
  TreeInspector as _TreeInspector_488e0dd5,
51
52
  )
52
53
 
53
54
 
54
- @jsii.implements(_IInspectable_c2943556)
55
+ @jsii.implements(_IInspectable_c2943556, _ITaggableV2_4e6798f8)
55
56
  class CfnCapacityReservation(
56
57
  _CfnResource_9df397a6,
57
58
  metaclass=jsii.JSIIMeta,
@@ -192,6 +193,12 @@ class CfnCapacityReservation(
192
193
  '''
193
194
  return typing.cast(builtins.str, jsii.get(self, "attrStatus"))
194
195
 
196
+ @builtins.property
197
+ @jsii.member(jsii_name="cdkTagManager")
198
+ def cdk_tag_manager(self) -> _TagManager_0a598cb3:
199
+ '''Tag Manager which manages the tags for this resource.'''
200
+ return typing.cast(_TagManager_0a598cb3, jsii.get(self, "cdkTagManager"))
201
+
195
202
  @builtins.property
196
203
  @jsii.member(jsii_name="cfnProperties")
197
204
  def _cfn_properties(self) -> typing.Mapping[builtins.str, typing.Any]: