terraconstructs 0.2.1 → 0.2.3

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.
Files changed (284) hide show
  1. package/.jsii +1464 -315
  2. package/lib/asset-staging.js +1 -1
  3. package/lib/aws/arn.js +1 -1
  4. package/lib/aws/aws-asset-manager.js +1 -1
  5. package/lib/aws/aws-construct.js +1 -1
  6. package/lib/aws/aws-stack.js +1 -1
  7. package/lib/aws/aws-tags.js +2 -2
  8. package/lib/aws/cloudwatch/actions/appscaling.js +1 -1
  9. package/lib/aws/cloudwatch/actions/ec2.js +1 -1
  10. package/lib/aws/cloudwatch/actions/lambda.js +1 -1
  11. package/lib/aws/cloudwatch/actions/sns.js +1 -1
  12. package/lib/aws/cloudwatch/actions/ssm.js +2 -2
  13. package/lib/aws/cloudwatch/alarm-base.js +1 -1
  14. package/lib/aws/cloudwatch/alarm-rule.js +1 -1
  15. package/lib/aws/cloudwatch/alarm-status-widget.js +1 -1
  16. package/lib/aws/cloudwatch/alarm.js +1 -1
  17. package/lib/aws/cloudwatch/composite-alarm.js +1 -1
  18. package/lib/aws/cloudwatch/dashboard.js +1 -1
  19. package/lib/aws/cloudwatch/data-protection-policy.js +3 -3
  20. package/lib/aws/cloudwatch/graph.js +8 -8
  21. package/lib/aws/cloudwatch/layout.js +3 -3
  22. package/lib/aws/cloudwatch/log-destinations/kinesis.js +1 -1
  23. package/lib/aws/cloudwatch/log-destinations/lambda.js +1 -1
  24. package/lib/aws/cloudwatch/log-group.js +1 -1
  25. package/lib/aws/cloudwatch/log-query.js +1 -1
  26. package/lib/aws/cloudwatch/log-stream.js +1 -1
  27. package/lib/aws/cloudwatch/metric-filter.js +1 -1
  28. package/lib/aws/cloudwatch/metric.js +2 -2
  29. package/lib/aws/cloudwatch/pattern.js +3 -3
  30. package/lib/aws/cloudwatch/policy.js +1 -1
  31. package/lib/aws/cloudwatch/query-definition.js +2 -2
  32. package/lib/aws/cloudwatch/stats.js +1 -1
  33. package/lib/aws/cloudwatch/subscription-filter.js +1 -1
  34. package/lib/aws/cloudwatch/text.js +1 -1
  35. package/lib/aws/cloudwatch/variable.js +3 -3
  36. package/lib/aws/cloudwatch/widget.js +1 -1
  37. package/lib/aws/compute/access-log.js +4 -4
  38. package/lib/aws/compute/activity.js +1 -1
  39. package/lib/aws/compute/alb/application-listener-action.js +1 -1
  40. package/lib/aws/compute/alb/application-listener-certificate.js +1 -1
  41. package/lib/aws/compute/alb/application-listener-rule.js +1 -1
  42. package/lib/aws/compute/alb/application-listener.js +1 -1
  43. package/lib/aws/compute/alb/application-load-balancer.js +1 -1
  44. package/lib/aws/compute/alb/application-target-group.js +1 -1
  45. package/lib/aws/compute/alb/conditions.js +1 -1
  46. package/lib/aws/compute/alb/trust-store-revocation.js +1 -1
  47. package/lib/aws/compute/alb/trust-store.js +1 -1
  48. package/lib/aws/compute/api-definition.js +3 -3
  49. package/lib/aws/compute/api-key.js +2 -2
  50. package/lib/aws/compute/architecture.js +1 -1
  51. package/lib/aws/compute/aspects/require-imdsv2-aspect.js +2 -2
  52. package/lib/aws/compute/authorizer.js +1 -1
  53. package/lib/aws/compute/authorizers/identity-source.js +1 -1
  54. package/lib/aws/compute/authorizers/lambda.js +2 -2
  55. package/lib/aws/compute/base-path-mapping.js +1 -1
  56. package/lib/aws/compute/base-scalable-attribute.js +1 -1
  57. package/lib/aws/compute/bastion-host.js +1 -1
  58. package/lib/aws/compute/chain.js +1 -1
  59. package/lib/aws/compute/client-vpn-authorization-rule.js +1 -1
  60. package/lib/aws/compute/client-vpn-endpoint.js +2 -2
  61. package/lib/aws/compute/client-vpn-route.js +2 -2
  62. package/lib/aws/compute/code.js +8 -8
  63. package/lib/aws/compute/condition.js +1 -1
  64. package/lib/aws/compute/connections.js +1 -1
  65. package/lib/aws/compute/cors.js +1 -1
  66. package/lib/aws/compute/deployment.js +1 -1
  67. package/lib/aws/compute/domain-name.js +1 -1
  68. package/lib/aws/compute/event-invoke-config.js +1 -1
  69. package/lib/aws/compute/event-source-filter.js +2 -2
  70. package/lib/aws/compute/event-source-mapping.js +1 -1
  71. package/lib/aws/compute/event-sources/s3-onfailure-destination.js +1 -1
  72. package/lib/aws/compute/event-sources/s3.js +1 -1
  73. package/lib/aws/compute/event-sources/sqs-dlq.js +1 -1
  74. package/lib/aws/compute/event-sources/sqs.js +1 -1
  75. package/lib/aws/compute/fields.js +4 -4
  76. package/lib/aws/compute/function-alias.js +1 -1
  77. package/lib/aws/compute/function-base.js +2 -2
  78. package/lib/aws/compute/function-destinations/event-bridge.js +1 -1
  79. package/lib/aws/compute/function-destinations/function.js +1 -1
  80. package/lib/aws/compute/function-destinations/sqs.js +1 -1
  81. package/lib/aws/compute/function-nodejs/function.js +1 -1
  82. package/lib/aws/compute/function-url.js +1 -1
  83. package/lib/aws/compute/function.js +1 -1
  84. package/lib/aws/compute/gateway-response.js +2 -2
  85. package/lib/aws/compute/handler.js +1 -1
  86. package/lib/aws/compute/instance-types.js +1 -1
  87. package/lib/aws/compute/instance.js +1 -1
  88. package/lib/aws/compute/integration.js +1 -1
  89. package/lib/aws/compute/integrations/aws.js +1 -1
  90. package/lib/aws/compute/integrations/http.js +1 -1
  91. package/lib/aws/compute/integrations/lambda.js +1 -1
  92. package/lib/aws/compute/integrations/mock.js +1 -1
  93. package/lib/aws/compute/integrations/stepfunctions.js +1 -1
  94. package/lib/aws/compute/ip-addresses.js +2 -2
  95. package/lib/aws/compute/ipam.js +1 -1
  96. package/lib/aws/compute/key-pair.js +1 -1
  97. package/lib/aws/compute/lambda-api.js +1 -1
  98. package/lib/aws/compute/launch-template.js +2 -2
  99. package/lib/aws/compute/lb-shared/base-listener.js +1 -1
  100. package/lib/aws/compute/lb-shared/base-load-balancer.js +2 -2
  101. package/lib/aws/compute/lb-shared/base-target-group.js +1 -1
  102. package/lib/aws/compute/lb-shared/listener-certificate.js +1 -1
  103. package/lib/aws/compute/lb-shared/load-balancer-targets.js +2 -2
  104. package/lib/aws/compute/lb-targets/alb-target.js +3 -3
  105. package/lib/aws/compute/lb-targets/instance-target.js +2 -2
  106. package/lib/aws/compute/lb-targets/ip-target.js +1 -1
  107. package/lib/aws/compute/lb-targets/lambda-target.js +1 -1
  108. package/lib/aws/compute/load-balancer.js +3 -3
  109. package/lib/aws/compute/machine-image/amazon-linux-2022.js +2 -2
  110. package/lib/aws/compute/machine-image/amazon-linux-2023.js +2 -2
  111. package/lib/aws/compute/machine-image/amazon-linux2.js +2 -2
  112. package/lib/aws/compute/machine-image/common.js +1 -1
  113. package/lib/aws/compute/machine-image/machine-image.js +8 -8
  114. package/lib/aws/compute/method.js +1 -1
  115. package/lib/aws/compute/model.js +3 -3
  116. package/lib/aws/compute/nat.js +5 -5
  117. package/lib/aws/compute/network-acl-types.js +2 -2
  118. package/lib/aws/compute/network-acl.js +3 -3
  119. package/lib/aws/compute/nlb/network-listener-action.js +1 -1
  120. package/lib/aws/compute/nlb/network-listener.js +1 -1
  121. package/lib/aws/compute/nlb/network-load-balancer.js +1 -1
  122. package/lib/aws/compute/nlb/network-target-group.js +1 -1
  123. package/lib/aws/compute/peer.js +1 -1
  124. package/lib/aws/compute/placement-group.js +1 -1
  125. package/lib/aws/compute/port.js +1 -1
  126. package/lib/aws/compute/prefix-list.js +1 -1
  127. package/lib/aws/compute/requestvalidator.js +1 -1
  128. package/lib/aws/compute/resource.js +3 -3
  129. package/lib/aws/compute/restapi.js +3 -3
  130. package/lib/aws/compute/route.js +8 -8
  131. package/lib/aws/compute/runtime.js +1 -1
  132. package/lib/aws/compute/scalable-target.js +1 -1
  133. package/lib/aws/compute/schedule.js +1 -1
  134. package/lib/aws/compute/security-group.js +1 -1
  135. package/lib/aws/compute/stage.js +2 -2
  136. package/lib/aws/compute/state-graph.js +1 -1
  137. package/lib/aws/compute/state-machine-fragment.js +1 -1
  138. package/lib/aws/compute/state-machine.js +4 -4
  139. package/lib/aws/compute/states/choice.js +1 -1
  140. package/lib/aws/compute/states/custom-state.js +1 -1
  141. package/lib/aws/compute/states/distributed-map/item-batcher.js +1 -1
  142. package/lib/aws/compute/states/distributed-map/item-reader.js +5 -5
  143. package/lib/aws/compute/states/distributed-map/result-writer.js +1 -1
  144. package/lib/aws/compute/states/distributed-map.js +1 -1
  145. package/lib/aws/compute/states/fail.js +1 -1
  146. package/lib/aws/compute/states/map-base.js +1 -1
  147. package/lib/aws/compute/states/map.js +1 -1
  148. package/lib/aws/compute/states/parallel.js +1 -1
  149. package/lib/aws/compute/states/pass.js +2 -2
  150. package/lib/aws/compute/states/state.js +1 -1
  151. package/lib/aws/compute/states/succeed.js +1 -1
  152. package/lib/aws/compute/states/task-base.js +2 -2
  153. package/lib/aws/compute/states/task.js +1 -1
  154. package/lib/aws/compute/states/wait.js +2 -2
  155. package/lib/aws/compute/step-scaling-action.js +1 -1
  156. package/lib/aws/compute/step-scaling-policy.js +1 -1
  157. package/lib/aws/compute/stepfunctions-api.js +1 -1
  158. package/lib/aws/compute/subnet-v2.js +2 -2
  159. package/lib/aws/compute/subnet.js +1 -1
  160. package/lib/aws/compute/target-tracking-scaling-policy.js +1 -1
  161. package/lib/aws/compute/task-credentials.js +1 -1
  162. package/lib/aws/compute/task-input.js +1 -1
  163. package/lib/aws/compute/tasks/aws-sdk/call-aws-service.js +1 -1
  164. package/lib/aws/compute/tasks/eventbridge/put-events.js +1 -1
  165. package/lib/aws/compute/tasks/http/invoke.js +1 -1
  166. package/lib/aws/compute/tasks/lambda/invoke.js +1 -1
  167. package/lib/aws/compute/tasks/sqs/send-message.js +1 -1
  168. package/lib/aws/compute/tasks/stepfunctions/invoke-activity.js +1 -1
  169. package/lib/aws/compute/tasks/stepfunctions/start-execution.js +1 -1
  170. package/lib/aws/compute/types.js +1 -1
  171. package/lib/aws/compute/usage-plan.js +1 -1
  172. package/lib/aws/compute/user-data.js +3 -3
  173. package/lib/aws/compute/volume.js +2 -2
  174. package/lib/aws/compute/vpc-endpoint-service.js +1 -1
  175. package/lib/aws/compute/vpc-endpoint.js +6 -6
  176. package/lib/aws/compute/vpc-flow-logs.js +4 -4
  177. package/lib/aws/compute/vpc-link.js +1 -1
  178. package/lib/aws/compute/vpc-v2-base.js +1 -1
  179. package/lib/aws/compute/vpc-v2.js +2 -2
  180. package/lib/aws/compute/vpc.js +4 -4
  181. package/lib/aws/compute/vpn.js +3 -3
  182. package/lib/aws/edge/certificate.js +1 -1
  183. package/lib/aws/edge/distribution.js +3 -3
  184. package/lib/aws/edge/dns-alias-record-targets.js +6 -6
  185. package/lib/aws/edge/dns-record.js +13 -13
  186. package/lib/aws/edge/dns-zone.js +1 -1
  187. package/lib/aws/edge/function.js +2 -2
  188. package/lib/aws/edge/key-value-store.js +4 -4
  189. package/lib/aws/edge/origin.js +3 -3
  190. package/lib/aws/edge/response-headers-policy.js +1 -1
  191. package/lib/aws/encryption/alias.js +1 -1
  192. package/lib/aws/encryption/key.js +1 -1
  193. package/lib/aws/encryption/via-service-principal.js +1 -1
  194. package/lib/aws/iam/grant.js +3 -3
  195. package/lib/aws/iam/group.js +1 -1
  196. package/lib/aws/iam/instance-profile.js +1 -1
  197. package/lib/aws/iam/managed-policy.js +1 -1
  198. package/lib/aws/iam/oidc-provider.js +1 -1
  199. package/lib/aws/iam/policy-document.js +1 -1
  200. package/lib/aws/iam/policy-statement.js +1 -1
  201. package/lib/aws/iam/policy.js +1 -1
  202. package/lib/aws/iam/principals.js +20 -20
  203. package/lib/aws/iam/role.js +14 -5
  204. package/lib/aws/iam/saml-provider.js +2 -2
  205. package/lib/aws/iam/unknown-principal.js +1 -1
  206. package/lib/aws/iam/user.js +1 -1
  207. package/lib/aws/network/simple-ipv4-vpc.js +1 -1
  208. package/lib/aws/network/subnet-group.js +3 -3
  209. package/lib/aws/network/subnet.js +4 -4
  210. package/lib/aws/notify/archive.js +1 -1
  211. package/lib/aws/notify/connection.js +3 -3
  212. package/lib/aws/notify/event-bus.js +3 -3
  213. package/lib/aws/notify/event-pattern.js +1 -1
  214. package/lib/aws/notify/index.d.ts +1 -0
  215. package/lib/aws/notify/index.js +3 -1
  216. package/lib/aws/notify/input.js +2 -2
  217. package/lib/aws/notify/kinesis-stream.js +1 -1
  218. package/lib/aws/notify/notification-rule.js +1 -1
  219. package/lib/aws/notify/policy.js +1 -1
  220. package/lib/aws/notify/queue-base.js +1 -1
  221. package/lib/aws/notify/queue-policy.js +1 -1
  222. package/lib/aws/notify/queue.js +1 -1
  223. package/lib/aws/notify/resource-policy.js +1 -1
  224. package/lib/aws/notify/rule.js +1 -1
  225. package/lib/aws/notify/schedule.js +1 -1
  226. package/lib/aws/notify/sns-grants.generated.d.ts +39 -0
  227. package/lib/aws/notify/sns-grants.generated.js +77 -0
  228. package/lib/aws/notify/sqs-grants.generated.js +1 -1
  229. package/lib/aws/notify/subscription-filter.js +1 -1
  230. package/lib/aws/notify/subscription.d.ts +8 -2
  231. package/lib/aws/notify/subscription.js +6 -7
  232. package/lib/aws/notify/subscriptions/email.js +1 -1
  233. package/lib/aws/notify/subscriptions/lambda.js +1 -1
  234. package/lib/aws/notify/subscriptions/sms.js +1 -1
  235. package/lib/aws/notify/subscriptions/sqs.js +1 -1
  236. package/lib/aws/notify/subscriptions/url.js +1 -1
  237. package/lib/aws/notify/targets/event-bus.js +1 -1
  238. package/lib/aws/notify/targets/function.js +1 -1
  239. package/lib/aws/notify/targets/log-group.js +2 -2
  240. package/lib/aws/notify/targets/sqs.js +1 -1
  241. package/lib/aws/notify/targets/state-machine.js +1 -1
  242. package/lib/aws/notify/topic-base.d.ts +6 -0
  243. package/lib/aws/notify/topic-base.js +16 -19
  244. package/lib/aws/notify/topic.d.ts +29 -6
  245. package/lib/aws/notify/topic.js +50 -47
  246. package/lib/aws/storage/assets/image-asset.js +3 -3
  247. package/lib/aws/storage/assets/s3.js +1 -1
  248. package/lib/aws/storage/auth-token.js +2 -2
  249. package/lib/aws/storage/billing.js +1 -1
  250. package/lib/aws/storage/bucket-notifications.js +1 -1
  251. package/lib/aws/storage/bucket-policy.js +1 -1
  252. package/lib/aws/storage/bucket-source.js +1 -1
  253. package/lib/aws/storage/bucket.js +2 -2
  254. package/lib/aws/storage/capacity.js +1 -1
  255. package/lib/aws/storage/dynamodb-perms.d.ts +2 -2
  256. package/lib/aws/storage/dynamodb-perms.js +9 -16
  257. package/lib/aws/storage/ecr-repository.js +3 -3
  258. package/lib/aws/storage/encryption.js +1 -1
  259. package/lib/aws/storage/index.d.ts +2 -0
  260. package/lib/aws/storage/index.js +3 -1
  261. package/lib/aws/storage/notification-targets/function.js +1 -1
  262. package/lib/aws/storage/notification-targets/queue.js +1 -1
  263. package/lib/aws/storage/origin-access-identity.js +1 -1
  264. package/lib/aws/storage/parameter.js +2 -2
  265. package/lib/aws/storage/shared.d.ts +31 -2
  266. package/lib/aws/storage/shared.js +29 -2
  267. package/lib/aws/storage/stream-grants.d.ts +61 -0
  268. package/lib/aws/storage/stream-grants.js +72 -0
  269. package/lib/aws/storage/table-grants.d.ts +98 -0
  270. package/lib/aws/storage/table-grants.js +137 -0
  271. package/lib/aws/storage/table.d.ts +280 -8
  272. package/lib/aws/storage/table.js +350 -148
  273. package/lib/bundling.js +3 -3
  274. package/lib/construct-base.js +2 -2
  275. package/lib/duration.js +1 -1
  276. package/lib/errors.js +1 -1
  277. package/lib/expiration.js +1 -1
  278. package/lib/fs/ignore.js +4 -4
  279. package/lib/fs/index.js +1 -1
  280. package/lib/size.js +1 -1
  281. package/lib/stack-base.js +1 -1
  282. package/lib/terra-func.js +1 -1
  283. package/lib/time-zone.js +1 -1
  284. package/package.json +1 -1
@@ -3,7 +3,9 @@ import { Construct } from "constructs";
3
3
  import * as storage from ".";
4
4
  import { AwsConstructBase, AwsConstructProps } from "..";
5
5
  import { EnableScalingProps, IScalableTableAttribute } from "./scalable-attribute-api";
6
- import { OperationsMetricOptions, SystemErrorsForOperationsMetricOptions, Attribute, BillingMode, ITable, SecondaryIndexProps, TableClass, LocalSecondaryIndexProps, TableEncryption, StreamViewType, PointInTimeRecoverySpecification } from "./shared";
6
+ import { OperationsMetricOptions, SystemErrorsForOperationsMetricOptions, Attribute, BillingMode, ITable, SecondaryIndexProps, TableClass, LocalSecondaryIndexProps, TableEncryption, StreamViewType, PointInTimeRecoverySpecification, WarmThroughput, ContributorInsightsSpecification } from "./shared";
7
+ import { StreamGrants } from "./stream-grants";
8
+ import { TableGrants } from "./table-grants";
7
9
  import * as cloudwatch from "../cloudwatch";
8
10
  import * as kms from "../encryption";
9
11
  import * as iam from "../iam";
@@ -84,9 +86,16 @@ export declare abstract class InputFormat {
84
86
  * CSV format.
85
87
  */
86
88
  static csv(options?: CsvOptions): InputFormat;
89
+ /**
90
+ * Valid CSV delimiters.
91
+ *
92
+ * @see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-csv.html#cfn-dynamodb-table-csv-delimiter
93
+ */
87
94
  private static validCsvDelimiters;
88
95
  private static readableValidCsvDelimiters;
89
96
  /**
97
+ * Render the input format and options.
98
+ *
90
99
  * @internal
91
100
  */
92
101
  abstract _render(): Pick<dynamodbTable.DynamodbTableImportTable, "inputFormat" | "inputFormatOptions">;
@@ -195,6 +204,13 @@ export interface TableOptions extends SchemaOptions {
195
204
  * @default PROVISIONED if `replicationRegions` is not specified, PAY_PER_REQUEST otherwise
196
205
  */
197
206
  readonly billingMode?: BillingMode;
207
+ /**
208
+ * Specify values to pre-warm you DynamoDB Table
209
+ * Warm Throughput feature is not available for Global Table replicas using the `Table` construct. To enable Warm Throughput, use the `TableV2` construct instead.
210
+ * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html#cfn-dynamodb-table-warmthroughput
211
+ * @default - warm throughput is not configured
212
+ */
213
+ readonly warmThroughput?: WarmThroughput;
198
214
  /**
199
215
  * Whether point-in-time recovery is enabled.
200
216
  * @deprecated use `pointInTimeRecoverySpecification` instead
@@ -202,7 +218,8 @@ export interface TableOptions extends SchemaOptions {
202
218
  */
203
219
  readonly pointInTimeRecovery?: boolean;
204
220
  /**
205
- * Whether point-in-time recovery is enabled.
221
+ * Whether point-in-time recovery is enabled
222
+ * and recoveryPeriodInDays is set.
206
223
  *
207
224
  * @default - point in time recovery is not enabled.
208
225
  */
@@ -267,10 +284,15 @@ export interface TableOptions extends SchemaOptions {
267
284
  readonly replicaSpecification?: DynamodbTableReplica[];
268
285
  /**
269
286
  * Whether CloudWatch contributor insights is enabled.
270
- *
287
+ * @deprecated use `contributorInsightsSpecification instead
271
288
  * @default false
272
289
  */
273
290
  readonly contributorInsightsEnabled?: boolean;
291
+ /**
292
+ * Whether CloudWatch contributor insights is enabled and what mode is selected
293
+ * @default - contributor insights is not enabled
294
+ */
295
+ readonly contributorInsightsSpecification?: ContributorInsightsSpecification;
274
296
  /**
275
297
  * Enables deletion protection for the table.
276
298
  *
@@ -350,11 +372,16 @@ export interface GlobalSecondaryIndexProps extends SecondaryIndexProps, SchemaOp
350
372
  */
351
373
  readonly maxWriteRequestUnits?: number;
352
374
  /**
353
- * Whether CloudWatch contributor insights is enabled for the specified global secondary index.
375
+ * The warm throughput configuration for the global secondary index.
354
376
  *
355
- * @default false
377
+ * @default - no warm throughput is configured
356
378
  */
357
- readonly contributorInsightsEnabled?: boolean;
379
+ readonly warmThroughput?: WarmThroughput;
380
+ /**
381
+ * Whether CloudWatch contributor insights is enabled and what mode is selected
382
+ * @default - contributor insights is not enabled
383
+ */
384
+ readonly contributorInsightsSpecification?: ContributorInsightsSpecification;
358
385
  }
359
386
  /**
360
387
  * Reference to a dynamodb table.
@@ -419,36 +446,202 @@ export declare abstract class TableBase extends AwsConstructBase implements ITab
419
446
  abstract readonly tableArn: string;
420
447
  abstract readonly tableName: string;
421
448
  abstract readonly tableStreamArn?: string;
449
+ /**
450
+ * KMS encryption key, if this table uses a customer-managed encryption key.
451
+ */
422
452
  abstract readonly encryptionKey?: kms.IKey;
453
+ /**
454
+ * Resource policy to assign to table.
455
+ */
423
456
  abstract resourcePolicy?: iam.PolicyDocument;
457
+ /**
458
+ * Additional regions other than the main one that this table is replicated to
459
+ *
460
+ */
461
+ abstract readonly regions?: string[];
462
+ /**
463
+ * @deprecated This member is still filled but it is not read
464
+ */
424
465
  protected readonly regionalArns: string[];
466
+ grantOnKey(grantee: iam.IGrantable, ...actions: string[]): iam.GrantOnKeyResult;
425
467
  get outputs(): Record<string, any>;
468
+ /**
469
+ * Grant a predefined set of permissions on this Table.
470
+ */
471
+ get grants(): TableGrants;
472
+ /**
473
+ * Grant a predefined set of permissions on this Table's Stream, if present.
474
+ *
475
+ * Will throw if the Table has not been configured for streaming.
476
+ */
477
+ get streamGrants(): StreamGrants;
478
+ /**
479
+ * Adds a statement to the resource policy associated with this table.
480
+ */
481
+ abstract addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult;
482
+ /**
483
+ * Adds an IAM policy statement associated with this table to an IAM
484
+ * principal's policy.
485
+ *
486
+ * If `encryptionKey` is present, appropriate grants to the key needs to be added
487
+ * separately using the `table.encryptionKey.grant*` methods.
488
+ *
489
+ * @param grantee The principal (no-op if undefined)
490
+ * @param actions The set of actions to allow (i.e. "dynamodb:PutItem", "dynamodb:GetItem", ...)
491
+ */
426
492
  grant(grantee: iam.IGrantable, ...actions: string[]): iam.Grant;
493
+ /**
494
+ * Adds an IAM policy statement associated with this table's stream to an
495
+ * IAM principal's policy.
496
+ *
497
+ * If `encryptionKey` is present, appropriate grants to the key needs to be added
498
+ * separately using the `table.encryptionKey.grant*` methods.
499
+ *
500
+ * @param grantee The principal (no-op if undefined)
501
+ * @param actions The set of actions to allow (i.e. "dynamodb:DescribeStream", "dynamodb:GetRecords", ...)
502
+ */
427
503
  grantStream(grantee: iam.IGrantable, ...actions: string[]): iam.Grant;
504
+ /**
505
+ * Permits an IAM principal all data read operations from this table:
506
+ * BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.
507
+ *
508
+ * Appropriate grants will also be added to the customer-managed KMS key
509
+ * if one was configured.
510
+ *
511
+ * @param grantee The principal to grant access to
512
+ */
428
513
  grantReadData(grantee: iam.IGrantable): iam.Grant;
514
+ /**
515
+ * Permits an IAM Principal to list streams attached to current dynamodb table.
516
+ *
517
+ * @param grantee The principal (no-op if undefined)
518
+ */
429
519
  grantTableListStreams(grantee: iam.IGrantable): iam.Grant;
520
+ /**
521
+ * Permits an IAM principal all stream data read operations for this
522
+ * table's stream:
523
+ * DescribeStream, GetRecords, GetShardIterator, ListStreams.
524
+ *
525
+ * Appropriate grants will also be added to the customer-managed KMS key
526
+ * if one was configured.
527
+ *
528
+ * @param grantee The principal to grant access to
529
+ */
430
530
  grantStreamRead(grantee: iam.IGrantable): iam.Grant;
531
+ /**
532
+ * Permits an IAM principal all data write operations to this table:
533
+ * BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.
534
+ *
535
+ * Appropriate grants will also be added to the customer-managed KMS key
536
+ * if one was configured.
537
+ *
538
+ * @param grantee The principal to grant access to
539
+ */
431
540
  grantWriteData(grantee: iam.IGrantable): iam.Grant;
541
+ /**
542
+ * Permits an IAM principal to all data read/write operations to this table.
543
+ * BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan,
544
+ * BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable
545
+ *
546
+ * Appropriate grants will also be added to the customer-managed KMS key
547
+ * if one was configured.
548
+ *
549
+ * @param grantee The principal to grant access to
550
+ */
432
551
  grantReadWriteData(grantee: iam.IGrantable): iam.Grant;
552
+ /**
553
+ * Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.
554
+ *
555
+ * Appropriate grants will also be added to the customer-managed KMS key
556
+ * if one was configured.
557
+ *
558
+ * @param grantee The principal to grant access to
559
+ */
433
560
  grantFullAccess(grantee: iam.IGrantable): iam.Grant;
434
- addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult;
435
561
  metric(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
562
+ /**
563
+ * Metric for the consumed read capacity units this table
564
+ *
565
+ * By default, the metric will be calculated as a sum over a period of 5 minutes.
566
+ * You can customize this by using the `statistic` and `period` properties.
567
+ */
436
568
  metricConsumedReadCapacityUnits(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
569
+ /**
570
+ * Metric for the consumed write capacity units this table
571
+ *
572
+ * By default, the metric will be calculated as a sum over a period of 5 minutes.
573
+ * You can customize this by using the `statistic` and `period` properties.
574
+ */
437
575
  metricConsumedWriteCapacityUnits(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
438
576
  /** @deprecated use `metricSystemErrorsForOperations`. */
439
577
  metricSystemErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
578
+ /**
579
+ * Metric for the user errors. Note that this metric reports user errors across all
580
+ * the tables in the account and region the table resides in.
581
+ *
582
+ * By default, the metric will be calculated as a sum over a period of 5 minutes.
583
+ * You can customize this by using the `statistic` and `period` properties.
584
+ */
440
585
  metricUserErrors(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
586
+ /**
587
+ * Metric for the conditional check failed requests this table
588
+ *
589
+ * By default, the metric will be calculated as a sum over a period of 5 minutes.
590
+ * You can customize this by using the `statistic` and `period` properties.
591
+ */
441
592
  metricConditionalCheckFailedRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
442
593
  /** @deprecated Do not use this function. It returns an invalid metric. Use `metricThrottledRequestsForOperation` instead. */
443
594
  metricThrottledRequests(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
595
+ /**
596
+ * Metric for the successful request latency this table.
597
+ *
598
+ * By default, the metric will be calculated as an average over a period of 5 minutes.
599
+ * You can customize this by using the `statistic` and `period` properties.
600
+ */
444
601
  metricSuccessfulRequestLatency(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
602
+ /**
603
+ * How many requests are throttled on this table, for the given operation
604
+ *
605
+ * Default: sum over 5 minutes
606
+ */
445
607
  metricThrottledRequestsForOperation(operation: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
608
+ /**
609
+ * How many requests are throttled on this table.
610
+ *
611
+ * This will sum errors across all possible operations.
612
+ * Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes.
613
+ * You can customize this by using the `statistic` and `period` properties.
614
+ */
446
615
  metricThrottledRequestsForOperations(props?: OperationsMetricOptions): cloudwatch.IMetric;
616
+ /**
617
+ * Metric for the system errors this table.
618
+ *
619
+ * This will sum errors across all possible operations.
620
+ * Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes.
621
+ * You can customize this by using the `statistic` and `period` properties.
622
+ */
447
623
  metricSystemErrorsForOperations(props?: SystemErrorsForOperationsMetricOptions): cloudwatch.IMetric;
624
+ /**
625
+ * Create a math expression for operations.
626
+ *
627
+ * @param metricName The metric name.
628
+ * @param expressionLabel Label for expression
629
+ * @param props operation list
630
+ */
448
631
  private sumMetricsForOperations;
632
+ /**
633
+ * Create a map of metrics that can be used in a math expression.
634
+ *
635
+ * Using the return value of this function as the `usingMetrics` property in `cloudwatch.MathExpression` allows you to
636
+ * use the keys of this map as metric names inside you expression.
637
+ *
638
+ * @param metricName The metric name.
639
+ * @param operations The list of operations to create metrics for.
640
+ * @param props Properties for the individual metrics.
641
+ * @param metricNameMapper Mapper function to allow controlling the individual metric name per operation.
642
+ */
449
643
  private createMetricsForOperations;
450
644
  protected abstract get hasIndex(): boolean;
451
- private combinedGrant;
452
645
  private cannedMetric;
453
646
  }
454
647
  /**
@@ -507,22 +700,88 @@ export declare class Table extends TableBase {
507
700
  private readonly indexScaling;
508
701
  private readonly _resource;
509
702
  private readonly _replicas;
703
+ readonly regions?: string[] | undefined;
510
704
  constructor(scope: Construct, id: string, props: TableProps);
705
+ /**
706
+ * Adds a statement to the resource policy associated with this table.
707
+ * A resource policy will be automatically created upon the first call to `addToResourcePolicy`.
708
+ *
709
+ * Note that this does not work with imported tables.
710
+ *
711
+ * @param statement The policy statement to add
712
+ */
713
+ addToResourcePolicy(statement: iam.PolicyStatement): iam.AddToResourcePolicyResult;
511
714
  addGlobalSecondaryIndex(props: GlobalSecondaryIndexProps): void;
715
+ /**
716
+ * Add a local secondary index of table.
717
+ *
718
+ * @param props the property of local secondary index
719
+ */
512
720
  addLocalSecondaryIndex(props: LocalSecondaryIndexProps): void;
721
+ /**
722
+ * Enable read capacity scaling for this table
723
+ *
724
+ * @returns An object to configure additional AutoScaling settings
725
+ */
513
726
  autoScaleReadCapacity(props: EnableScalingProps): IScalableTableAttribute;
727
+ /**
728
+ * Enable write capacity scaling for this table
729
+ *
730
+ * @returns An object to configure additional AutoScaling settings for this attribute
731
+ */
514
732
  autoScaleWriteCapacity(props: EnableScalingProps): IScalableTableAttribute;
733
+ /**
734
+ * Enable read capacity scaling for the given GSI
735
+ *
736
+ * @returns An object to configure additional AutoScaling settings for this attribute
737
+ */
515
738
  autoScaleGlobalSecondaryIndexReadCapacity(indexName: string, props: EnableScalingProps): IScalableTableAttribute;
739
+ /**
740
+ * Enable write capacity scaling for the given GSI
741
+ *
742
+ * @returns An object to configure additional AutoScaling settings for this attribute
743
+ */
516
744
  autoScaleGlobalSecondaryIndexWriteCapacity(indexName: string, props: EnableScalingProps): IScalableTableAttribute;
745
+ /**
746
+ * Get schema attributes of table or index.
747
+ *
748
+ * @returns Schema of table or index.
749
+ */
517
750
  schema(indexName?: string): SchemaOptions;
751
+ /**
752
+ * Validate the table construct.
753
+ *
754
+ * @returns an array of validation error message
755
+ */
518
756
  private validateTable;
757
+ /**
758
+ * Validate read and write capacity are not specified for on-demand tables (billing mode PAY_PER_REQUEST).
759
+ *
760
+ * @param props read and write capacity properties
761
+ */
519
762
  private validateProvisioning;
520
763
  private validateProvisioningGSI;
764
+ /**
765
+ * Validate index name to check if a duplicate name already exists.
766
+ *
767
+ * @param indexName a name of global or local secondary index
768
+ */
521
769
  private validateIndexName;
770
+ /**
771
+ * Validate non-key attributes by checking limits within secondary index, which may vary in future.
772
+ *
773
+ * @param nonKeyAttributes a list of non-key attribute names
774
+ */
522
775
  private validateNonKeyAttributes;
523
776
  private renderPointInTimeRecovery;
777
+ private renderContributorInsights;
524
778
  private buildIndexProjection;
525
779
  private addKey;
780
+ /**
781
+ * Register the key attribute of table or secondary index to assemble attribute definitions of TableResourceProps.
782
+ *
783
+ * @param attribute the key attribute of table or secondary index
784
+ */
526
785
  private registerAttribute;
527
786
  /**
528
787
  * Creates replica tables
@@ -530,7 +789,20 @@ export declare class Table extends TableBase {
530
789
  * @param regions regions where to create tables
531
790
  */
532
791
  private renderReplicas;
792
+ /**
793
+ * Whether this table has indexes
794
+ */
533
795
  protected get hasIndex(): boolean;
796
+ /**
797
+ * Set up key properties and return the Table encryption property from the
798
+ * user's configuration.
799
+ */
534
800
  private parseEncryption;
535
801
  private renderImportSourceSpecification;
802
+ /**
803
+ * Adds resource to the Terraform JSON output at Synth time.
804
+ *
805
+ * called by TerraformStack.prepareStack()
806
+ */
807
+ toTerraform(): any;
536
808
  }