Interface ITable

All Superinterfaces:
software.constructs.IConstruct, software.constructs.IDependable, IResource, software.amazon.jsii.JsiiSerializable
All Known Subinterfaces:
ITable.Jsii$Default, ITableV2, ITableV2.Jsii$Default
All Known Implementing Classes:
ITable.Jsii$Proxy, ITableV2.Jsii$Proxy, Table, TableBase, TableBaseV2, TableV2

@Generated(value="jsii-pacmak/1.104.0 (build e79254c)", date="2024-11-22T02:24:00.037Z") @Stability(Stable) public interface ITable extends software.amazon.jsii.JsiiSerializable, IResource
An interface that represents a DynamoDB Table - either created with the CDK, or an existing one.
  • Method Details

    • getTableArn

      @Stability(Stable) @NotNull String getTableArn()
      Arn of the dynamodb table.
    • getTableName

      @Stability(Stable) @NotNull String getTableName()
      Table name of the dynamodb table.
    • getEncryptionKey

      @Stability(Stable) @Nullable default IKey getEncryptionKey()
      Optional KMS encryption key associated with this table.
    • getTableStreamArn

      @Stability(Stable) @Nullable default String getTableStreamArn()
      ARN of the table's stream, if there is one.
    • grant

      @Stability(Stable) @NotNull Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions)
      Adds an IAM policy statement associated with this table to an IAM principal's policy.

      If encryptionKey is present, appropriate grants to the key needs to be added separately using the table.encryptionKey.grant* methods.

      Parameters:
      grantee - The principal (no-op if undefined). This parameter is required.
      actions - The set of actions to allow (i.e. "dynamodb:PutItem", "dynamodb:GetItem", ...). This parameter is required.
    • grantFullAccess

      @Stability(Stable) @NotNull Grant grantFullAccess(@NotNull IGrantable grantee)
      Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.

      Appropriate grants will also be added to the customer-managed KMS key if one was configured.

      Parameters:
      grantee - The principal to grant access to. This parameter is required.
    • grantReadData

      @Stability(Stable) @NotNull Grant grantReadData(@NotNull IGrantable grantee)
      Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan.

      Appropriate grants will also be added to the customer-managed KMS key if one was configured.

      Parameters:
      grantee - The principal to grant access to. This parameter is required.
    • grantReadWriteData

      @Stability(Stable) @NotNull Grant grantReadWriteData(@NotNull IGrantable grantee)
      Permits an IAM principal to all data read/write operations to this table.

      BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, BatchWriteItem, PutItem, UpdateItem, DeleteItem

      Appropriate grants will also be added to the customer-managed KMS key if one was configured.

      Parameters:
      grantee - The principal to grant access to. This parameter is required.
    • grantStream

      @Stability(Stable) @NotNull Grant grantStream(@NotNull IGrantable grantee, @NotNull @NotNull String... actions)
      Adds an IAM policy statement associated with this table's stream to an IAM principal's policy.

      If encryptionKey is present, appropriate grants to the key needs to be added separately using the table.encryptionKey.grant* methods.

      Parameters:
      grantee - The principal (no-op if undefined). This parameter is required.
      actions - The set of actions to allow (i.e. "dynamodb:DescribeStream", "dynamodb:GetRecords", ...). This parameter is required.
    • grantStreamRead

      @Stability(Stable) @NotNull Grant grantStreamRead(@NotNull IGrantable grantee)
      Permits an IAM principal all stream data read operations for this table's stream: DescribeStream, GetRecords, GetShardIterator, ListStreams.

      Appropriate grants will also be added to the customer-managed KMS key if one was configured.

      Parameters:
      grantee - The principal to grant access to. This parameter is required.
    • grantTableListStreams

      @Stability(Stable) @NotNull Grant grantTableListStreams(@NotNull IGrantable grantee)
      Permits an IAM Principal to list streams attached to current dynamodb table.

      Parameters:
      grantee - The principal (no-op if undefined). This parameter is required.
    • grantWriteData

      @Stability(Stable) @NotNull Grant grantWriteData(@NotNull IGrantable grantee)
      Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem.

      Appropriate grants will also be added to the customer-managed KMS key if one was configured.

      Parameters:
      grantee - The principal to grant access to. This parameter is required.
    • metric

      @Stability(Stable) @NotNull Metric metric(@NotNull String metricName, @Nullable MetricOptions props)
      Metric for the number of Errors executing all Lambdas.

      Parameters:
      metricName - This parameter is required.
      props -
    • metric

      @Stability(Stable) @NotNull Metric metric(@NotNull String metricName)
      Metric for the number of Errors executing all Lambdas.

      Parameters:
      metricName - This parameter is required.
    • metricConditionalCheckFailedRequests

      @Stability(Stable) @NotNull Metric metricConditionalCheckFailedRequests(@Nullable MetricOptions props)
      Metric for the conditional check failed requests.

      Parameters:
      props - properties of a metric.
    • metricConditionalCheckFailedRequests

      @Stability(Stable) @NotNull Metric metricConditionalCheckFailedRequests()
      Metric for the conditional check failed requests.
    • metricConsumedReadCapacityUnits

      @Stability(Stable) @NotNull Metric metricConsumedReadCapacityUnits(@Nullable MetricOptions props)
      Metric for the consumed read capacity units.

      Parameters:
      props - properties of a metric.
    • metricConsumedReadCapacityUnits

      @Stability(Stable) @NotNull Metric metricConsumedReadCapacityUnits()
      Metric for the consumed read capacity units.
    • metricConsumedWriteCapacityUnits

      @Stability(Stable) @NotNull Metric metricConsumedWriteCapacityUnits(@Nullable MetricOptions props)
      Metric for the consumed write capacity units.

      Parameters:
      props - properties of a metric.
    • metricConsumedWriteCapacityUnits

      @Stability(Stable) @NotNull Metric metricConsumedWriteCapacityUnits()
      Metric for the consumed write capacity units.
    • metricSuccessfulRequestLatency

      @Stability(Stable) @NotNull Metric metricSuccessfulRequestLatency(@Nullable MetricOptions props)
      Metric for the successful request latency.

      Parameters:
      props - properties of a metric.
    • metricSuccessfulRequestLatency

      @Stability(Stable) @NotNull Metric metricSuccessfulRequestLatency()
      Metric for the successful request latency.
    • metricSystemErrorsForOperations

      @Stability(Stable) @NotNull IMetric metricSystemErrorsForOperations(@Nullable SystemErrorsForOperationsMetricOptions props)
      Metric for the system errors this table.

      Parameters:
      props - properties of a metric.
    • metricSystemErrorsForOperations

      @Stability(Stable) @NotNull IMetric metricSystemErrorsForOperations()
      Metric for the system errors this table.
    • metricThrottledRequests

      @Stability(Deprecated) @Deprecated @NotNull Metric metricThrottledRequests(@Nullable MetricOptions props)
      Deprecated.
      use metricThrottledRequestsForOperations
      (deprecated) Metric for throttled requests.

      Parameters:
      props - properties of a metric.
    • metricThrottledRequests

      @Stability(Deprecated) @Deprecated @NotNull Metric metricThrottledRequests()
      Deprecated.
      use metricThrottledRequestsForOperations
      (deprecated) Metric for throttled requests.

    • metricThrottledRequestsForOperations

      @Stability(Stable) @NotNull IMetric metricThrottledRequestsForOperations(@Nullable OperationsMetricOptions props)
      Metric for throttled requests.

      Parameters:
      props - properties of a metric.
    • metricThrottledRequestsForOperations

      @Stability(Stable) @NotNull IMetric metricThrottledRequestsForOperations()
      Metric for throttled requests.
    • metricUserErrors

      @Stability(Stable) @NotNull Metric metricUserErrors(@Nullable MetricOptions props)
      Metric for the user errors.

      Parameters:
      props - properties of a metric.
    • metricUserErrors

      @Stability(Stable) @NotNull Metric metricUserErrors()
      Metric for the user errors.