Class TableGrants.Builder

java.lang.Object
software.amazon.awscdk.services.dynamodb.TableGrants.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<TableGrants>
Enclosing class:
TableGrants

@Stability(Stable) public static final class TableGrants.Builder extends Object implements software.amazon.jsii.Builder<TableGrants>
A fluent builder for TableGrants.
  • Method Details

    • create

      @Stability(Stable) public static TableGrants.Builder create()
      Returns:
      a new instance of TableGrants.Builder.
    • table

      @Stability(Stable) public TableGrants.Builder table(ITableRef table)
      The table to grant permissions on.

      Parameters:
      table - The table to grant permissions on. This parameter is required.
      Returns:
      this
    • encryptedResource

      @Stability(Stable) public TableGrants.Builder encryptedResource(IEncryptedResource encryptedResource)
      The encrypted resource on which actions will be allowed.

      Default: - No permission is added to the KMS key, even if it exists

      Parameters:
      encryptedResource - The encrypted resource on which actions will be allowed. This parameter is required.
      Returns:
      this
    • hasIndex

      @Stability(Stable) public TableGrants.Builder hasIndex(Boolean hasIndex)
      Whether this table has indexes.

      If so, permissions are granted on all table indexes as well.

      Default: false

      Parameters:
      hasIndex - Whether this table has indexes. This parameter is required.
      Returns:
      this
    • policyResource

      @Stability(Stable) public TableGrants.Builder policyResource(IResourceWithPolicyV2 policyResource)
      The resource with policy on which actions will be allowed.

      Default: - No resource policy is created

      Parameters:
      policyResource - The resource with policy on which actions will be allowed. This parameter is required.
      Returns:
      this
    • regions

      @Stability(Stable) public TableGrants.Builder regions(List<String> regions)
      Additional regions other than the main one that this table is replicated to.

      Default: - No regions

      Parameters:
      regions - Additional regions other than the main one that this table is replicated to. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public TableGrants build()
      Specified by:
      build in interface software.amazon.jsii.Builder<TableGrants>
      Returns:
      a newly built instance of TableGrants.