terraconstructs 0.2.1 → 0.2.2
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.
- package/.jsii +1081 -229
- package/lib/asset-staging.js +1 -1
- package/lib/aws/arn.js +1 -1
- package/lib/aws/aws-asset-manager.js +1 -1
- package/lib/aws/aws-construct.js +1 -1
- package/lib/aws/aws-stack.js +1 -1
- package/lib/aws/aws-tags.js +2 -2
- package/lib/aws/cloudwatch/actions/appscaling.js +1 -1
- package/lib/aws/cloudwatch/actions/ec2.js +1 -1
- package/lib/aws/cloudwatch/actions/lambda.js +1 -1
- package/lib/aws/cloudwatch/actions/sns.js +1 -1
- package/lib/aws/cloudwatch/actions/ssm.js +2 -2
- package/lib/aws/cloudwatch/alarm-base.js +1 -1
- package/lib/aws/cloudwatch/alarm-rule.js +1 -1
- package/lib/aws/cloudwatch/alarm-status-widget.js +1 -1
- package/lib/aws/cloudwatch/alarm.js +1 -1
- package/lib/aws/cloudwatch/composite-alarm.js +1 -1
- package/lib/aws/cloudwatch/dashboard.js +1 -1
- package/lib/aws/cloudwatch/data-protection-policy.js +3 -3
- package/lib/aws/cloudwatch/graph.js +8 -8
- package/lib/aws/cloudwatch/layout.js +3 -3
- package/lib/aws/cloudwatch/log-destinations/kinesis.js +1 -1
- package/lib/aws/cloudwatch/log-destinations/lambda.js +1 -1
- package/lib/aws/cloudwatch/log-group.js +1 -1
- package/lib/aws/cloudwatch/log-query.js +1 -1
- package/lib/aws/cloudwatch/log-stream.js +1 -1
- package/lib/aws/cloudwatch/metric-filter.js +1 -1
- package/lib/aws/cloudwatch/metric.js +2 -2
- package/lib/aws/cloudwatch/pattern.js +3 -3
- package/lib/aws/cloudwatch/policy.js +1 -1
- package/lib/aws/cloudwatch/query-definition.js +2 -2
- package/lib/aws/cloudwatch/stats.js +1 -1
- package/lib/aws/cloudwatch/subscription-filter.js +1 -1
- package/lib/aws/cloudwatch/text.js +1 -1
- package/lib/aws/cloudwatch/variable.js +3 -3
- package/lib/aws/cloudwatch/widget.js +1 -1
- package/lib/aws/compute/access-log.js +4 -4
- package/lib/aws/compute/activity.js +1 -1
- package/lib/aws/compute/alb/application-listener-action.js +1 -1
- package/lib/aws/compute/alb/application-listener-certificate.js +1 -1
- package/lib/aws/compute/alb/application-listener-rule.js +1 -1
- package/lib/aws/compute/alb/application-listener.js +1 -1
- package/lib/aws/compute/alb/application-load-balancer.js +1 -1
- package/lib/aws/compute/alb/application-target-group.js +1 -1
- package/lib/aws/compute/alb/conditions.js +1 -1
- package/lib/aws/compute/alb/trust-store-revocation.js +1 -1
- package/lib/aws/compute/alb/trust-store.js +1 -1
- package/lib/aws/compute/api-definition.js +3 -3
- package/lib/aws/compute/api-key.js +2 -2
- package/lib/aws/compute/architecture.js +1 -1
- package/lib/aws/compute/aspects/require-imdsv2-aspect.js +2 -2
- package/lib/aws/compute/authorizer.js +1 -1
- package/lib/aws/compute/authorizers/identity-source.js +1 -1
- package/lib/aws/compute/authorizers/lambda.js +2 -2
- package/lib/aws/compute/base-path-mapping.js +1 -1
- package/lib/aws/compute/base-scalable-attribute.js +1 -1
- package/lib/aws/compute/bastion-host.js +1 -1
- package/lib/aws/compute/chain.js +1 -1
- package/lib/aws/compute/client-vpn-authorization-rule.js +1 -1
- package/lib/aws/compute/client-vpn-endpoint.js +2 -2
- package/lib/aws/compute/client-vpn-route.js +2 -2
- package/lib/aws/compute/code.js +8 -8
- package/lib/aws/compute/condition.js +1 -1
- package/lib/aws/compute/connections.js +1 -1
- package/lib/aws/compute/cors.js +1 -1
- package/lib/aws/compute/deployment.js +1 -1
- package/lib/aws/compute/domain-name.js +1 -1
- package/lib/aws/compute/event-invoke-config.js +1 -1
- package/lib/aws/compute/event-source-filter.js +2 -2
- package/lib/aws/compute/event-source-mapping.js +1 -1
- package/lib/aws/compute/event-sources/s3-onfailure-destination.js +1 -1
- package/lib/aws/compute/event-sources/s3.js +1 -1
- package/lib/aws/compute/event-sources/sqs-dlq.js +1 -1
- package/lib/aws/compute/event-sources/sqs.js +1 -1
- package/lib/aws/compute/fields.js +4 -4
- package/lib/aws/compute/function-alias.js +1 -1
- package/lib/aws/compute/function-base.js +2 -2
- package/lib/aws/compute/function-destinations/event-bridge.js +1 -1
- package/lib/aws/compute/function-destinations/function.js +1 -1
- package/lib/aws/compute/function-destinations/sqs.js +1 -1
- package/lib/aws/compute/function-nodejs/function.js +1 -1
- package/lib/aws/compute/function-url.js +1 -1
- package/lib/aws/compute/function.js +1 -1
- package/lib/aws/compute/gateway-response.js +2 -2
- package/lib/aws/compute/handler.js +1 -1
- package/lib/aws/compute/instance-types.js +1 -1
- package/lib/aws/compute/instance.js +1 -1
- package/lib/aws/compute/integration.js +1 -1
- package/lib/aws/compute/integrations/aws.js +1 -1
- package/lib/aws/compute/integrations/http.js +1 -1
- package/lib/aws/compute/integrations/lambda.js +1 -1
- package/lib/aws/compute/integrations/mock.js +1 -1
- package/lib/aws/compute/integrations/stepfunctions.js +1 -1
- package/lib/aws/compute/ip-addresses.js +2 -2
- package/lib/aws/compute/ipam.js +1 -1
- package/lib/aws/compute/key-pair.js +1 -1
- package/lib/aws/compute/lambda-api.js +1 -1
- package/lib/aws/compute/launch-template.js +2 -2
- package/lib/aws/compute/lb-shared/base-listener.js +1 -1
- package/lib/aws/compute/lb-shared/base-load-balancer.js +2 -2
- package/lib/aws/compute/lb-shared/base-target-group.js +1 -1
- package/lib/aws/compute/lb-shared/listener-certificate.js +1 -1
- package/lib/aws/compute/lb-shared/load-balancer-targets.js +2 -2
- package/lib/aws/compute/lb-targets/alb-target.js +3 -3
- package/lib/aws/compute/lb-targets/instance-target.js +2 -2
- package/lib/aws/compute/lb-targets/ip-target.js +1 -1
- package/lib/aws/compute/lb-targets/lambda-target.js +1 -1
- package/lib/aws/compute/load-balancer.js +3 -3
- package/lib/aws/compute/machine-image/amazon-linux-2022.js +2 -2
- package/lib/aws/compute/machine-image/amazon-linux-2023.js +2 -2
- package/lib/aws/compute/machine-image/amazon-linux2.js +2 -2
- package/lib/aws/compute/machine-image/common.js +1 -1
- package/lib/aws/compute/machine-image/machine-image.js +8 -8
- package/lib/aws/compute/method.js +1 -1
- package/lib/aws/compute/model.js +3 -3
- package/lib/aws/compute/nat.js +5 -5
- package/lib/aws/compute/network-acl-types.js +2 -2
- package/lib/aws/compute/network-acl.js +3 -3
- package/lib/aws/compute/nlb/network-listener-action.js +1 -1
- package/lib/aws/compute/nlb/network-listener.js +1 -1
- package/lib/aws/compute/nlb/network-load-balancer.js +1 -1
- package/lib/aws/compute/nlb/network-target-group.js +1 -1
- package/lib/aws/compute/peer.js +1 -1
- package/lib/aws/compute/placement-group.js +1 -1
- package/lib/aws/compute/port.js +1 -1
- package/lib/aws/compute/prefix-list.js +1 -1
- package/lib/aws/compute/requestvalidator.js +1 -1
- package/lib/aws/compute/resource.js +3 -3
- package/lib/aws/compute/restapi.js +3 -3
- package/lib/aws/compute/route.js +8 -8
- package/lib/aws/compute/runtime.js +1 -1
- package/lib/aws/compute/scalable-target.js +1 -1
- package/lib/aws/compute/schedule.js +1 -1
- package/lib/aws/compute/security-group.js +1 -1
- package/lib/aws/compute/stage.js +2 -2
- package/lib/aws/compute/state-graph.js +1 -1
- package/lib/aws/compute/state-machine-fragment.js +1 -1
- package/lib/aws/compute/state-machine.js +4 -4
- package/lib/aws/compute/states/choice.js +1 -1
- package/lib/aws/compute/states/custom-state.js +1 -1
- package/lib/aws/compute/states/distributed-map/item-batcher.js +1 -1
- package/lib/aws/compute/states/distributed-map/item-reader.js +5 -5
- package/lib/aws/compute/states/distributed-map/result-writer.js +1 -1
- package/lib/aws/compute/states/distributed-map.js +1 -1
- package/lib/aws/compute/states/fail.js +1 -1
- package/lib/aws/compute/states/map-base.js +1 -1
- package/lib/aws/compute/states/map.js +1 -1
- package/lib/aws/compute/states/parallel.js +1 -1
- package/lib/aws/compute/states/pass.js +2 -2
- package/lib/aws/compute/states/state.js +1 -1
- package/lib/aws/compute/states/succeed.js +1 -1
- package/lib/aws/compute/states/task-base.js +2 -2
- package/lib/aws/compute/states/task.js +1 -1
- package/lib/aws/compute/states/wait.js +2 -2
- package/lib/aws/compute/step-scaling-action.js +1 -1
- package/lib/aws/compute/step-scaling-policy.js +1 -1
- package/lib/aws/compute/stepfunctions-api.js +1 -1
- package/lib/aws/compute/subnet-v2.js +2 -2
- package/lib/aws/compute/subnet.js +1 -1
- package/lib/aws/compute/target-tracking-scaling-policy.js +1 -1
- package/lib/aws/compute/task-credentials.js +1 -1
- package/lib/aws/compute/task-input.js +1 -1
- package/lib/aws/compute/tasks/aws-sdk/call-aws-service.js +1 -1
- package/lib/aws/compute/tasks/eventbridge/put-events.js +1 -1
- package/lib/aws/compute/tasks/http/invoke.js +1 -1
- package/lib/aws/compute/tasks/lambda/invoke.js +1 -1
- package/lib/aws/compute/tasks/sqs/send-message.js +1 -1
- package/lib/aws/compute/tasks/stepfunctions/invoke-activity.js +1 -1
- package/lib/aws/compute/tasks/stepfunctions/start-execution.js +1 -1
- package/lib/aws/compute/types.js +1 -1
- package/lib/aws/compute/usage-plan.js +1 -1
- package/lib/aws/compute/user-data.js +3 -3
- package/lib/aws/compute/volume.js +2 -2
- package/lib/aws/compute/vpc-endpoint-service.js +1 -1
- package/lib/aws/compute/vpc-endpoint.js +6 -6
- package/lib/aws/compute/vpc-flow-logs.js +4 -4
- package/lib/aws/compute/vpc-link.js +1 -1
- package/lib/aws/compute/vpc-v2-base.js +1 -1
- package/lib/aws/compute/vpc-v2.js +2 -2
- package/lib/aws/compute/vpc.js +4 -4
- package/lib/aws/compute/vpn.js +3 -3
- package/lib/aws/edge/certificate.js +1 -1
- package/lib/aws/edge/distribution.js +3 -3
- package/lib/aws/edge/dns-alias-record-targets.js +6 -6
- package/lib/aws/edge/dns-record.js +13 -13
- package/lib/aws/edge/dns-zone.js +1 -1
- package/lib/aws/edge/function.js +2 -2
- package/lib/aws/edge/key-value-store.js +4 -4
- package/lib/aws/edge/origin.js +3 -3
- package/lib/aws/edge/response-headers-policy.js +1 -1
- package/lib/aws/encryption/alias.js +1 -1
- package/lib/aws/encryption/key.js +1 -1
- package/lib/aws/encryption/via-service-principal.js +1 -1
- package/lib/aws/iam/grant.js +3 -3
- package/lib/aws/iam/group.js +1 -1
- package/lib/aws/iam/instance-profile.js +1 -1
- package/lib/aws/iam/managed-policy.js +1 -1
- package/lib/aws/iam/oidc-provider.js +1 -1
- package/lib/aws/iam/policy-document.js +1 -1
- package/lib/aws/iam/policy-statement.js +1 -1
- package/lib/aws/iam/policy.js +1 -1
- package/lib/aws/iam/principals.js +20 -20
- package/lib/aws/iam/role.js +14 -5
- package/lib/aws/iam/saml-provider.js +2 -2
- package/lib/aws/iam/unknown-principal.js +1 -1
- package/lib/aws/iam/user.js +1 -1
- package/lib/aws/network/simple-ipv4-vpc.js +1 -1
- package/lib/aws/network/subnet-group.js +3 -3
- package/lib/aws/network/subnet.js +4 -4
- package/lib/aws/notify/archive.js +1 -1
- package/lib/aws/notify/connection.js +3 -3
- package/lib/aws/notify/event-bus.js +3 -3
- package/lib/aws/notify/event-pattern.js +1 -1
- package/lib/aws/notify/input.js +2 -2
- package/lib/aws/notify/kinesis-stream.js +1 -1
- package/lib/aws/notify/notification-rule.js +1 -1
- package/lib/aws/notify/policy.js +1 -1
- package/lib/aws/notify/queue-base.js +1 -1
- package/lib/aws/notify/queue-policy.js +1 -1
- package/lib/aws/notify/queue.js +1 -1
- package/lib/aws/notify/resource-policy.js +1 -1
- package/lib/aws/notify/rule.js +1 -1
- package/lib/aws/notify/schedule.js +1 -1
- package/lib/aws/notify/sqs-grants.generated.js +1 -1
- package/lib/aws/notify/subscription-filter.js +1 -1
- package/lib/aws/notify/subscription.js +4 -4
- package/lib/aws/notify/subscriptions/email.js +1 -1
- package/lib/aws/notify/subscriptions/lambda.js +1 -1
- package/lib/aws/notify/subscriptions/sms.js +1 -1
- package/lib/aws/notify/subscriptions/sqs.js +1 -1
- package/lib/aws/notify/subscriptions/url.js +1 -1
- package/lib/aws/notify/targets/event-bus.js +1 -1
- package/lib/aws/notify/targets/function.js +1 -1
- package/lib/aws/notify/targets/log-group.js +2 -2
- package/lib/aws/notify/targets/sqs.js +1 -1
- package/lib/aws/notify/targets/state-machine.js +1 -1
- package/lib/aws/notify/topic-base.js +1 -1
- package/lib/aws/notify/topic.js +1 -1
- package/lib/aws/storage/assets/image-asset.js +3 -3
- package/lib/aws/storage/assets/s3.js +1 -1
- package/lib/aws/storage/auth-token.js +2 -2
- package/lib/aws/storage/billing.js +1 -1
- package/lib/aws/storage/bucket-notifications.js +1 -1
- package/lib/aws/storage/bucket-policy.js +1 -1
- package/lib/aws/storage/bucket-source.js +1 -1
- package/lib/aws/storage/bucket.js +2 -2
- package/lib/aws/storage/capacity.js +1 -1
- package/lib/aws/storage/dynamodb-perms.d.ts +2 -2
- package/lib/aws/storage/dynamodb-perms.js +9 -16
- package/lib/aws/storage/ecr-repository.js +3 -3
- package/lib/aws/storage/encryption.js +1 -1
- package/lib/aws/storage/index.d.ts +2 -0
- package/lib/aws/storage/index.js +3 -1
- package/lib/aws/storage/notification-targets/function.js +1 -1
- package/lib/aws/storage/notification-targets/queue.js +1 -1
- package/lib/aws/storage/origin-access-identity.js +1 -1
- package/lib/aws/storage/parameter.js +2 -2
- package/lib/aws/storage/shared.d.ts +31 -2
- package/lib/aws/storage/shared.js +29 -2
- package/lib/aws/storage/stream-grants.d.ts +61 -0
- package/lib/aws/storage/stream-grants.js +72 -0
- package/lib/aws/storage/table-grants.d.ts +98 -0
- package/lib/aws/storage/table-grants.js +137 -0
- package/lib/aws/storage/table.d.ts +280 -8
- package/lib/aws/storage/table.js +350 -148
- package/lib/bundling.js +3 -3
- package/lib/construct-base.js +2 -2
- package/lib/duration.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/expiration.js +1 -1
- package/lib/fs/ignore.js +4 -4
- package/lib/fs/index.js +1 -1
- package/lib/size.js +1 -1
- package/lib/stack-base.js +1 -1
- package/lib/terra-func.js +1 -1
- package/lib/time-zone.js +1 -1
- 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
|
-
*
|
|
375
|
+
* The warm throughput configuration for the global secondary index.
|
|
354
376
|
*
|
|
355
|
-
* @default
|
|
377
|
+
* @default - no warm throughput is configured
|
|
356
378
|
*/
|
|
357
|
-
readonly
|
|
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
|
}
|