1. Packages
  2. AWS
  3. API Docs
  4. dynamodb
  5. getTable
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

aws.dynamodb.getTable

Explore with Pulumi AI

AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi

Provides information about a DynamoDB table.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const tableName = aws.dynamodb.getTable({
    name: "tableName",
});
Copy
import pulumi
import pulumi_aws as aws

table_name = aws.dynamodb.get_table(name="tableName")
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/dynamodb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := dynamodb.LookupTable(ctx, &dynamodb.LookupTableArgs{
			Name: "tableName",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var tableName = Aws.DynamoDB.GetTable.Invoke(new()
    {
        Name = "tableName",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.dynamodb.DynamodbFunctions;
import com.pulumi.aws.dynamodb.inputs.GetTableArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var tableName = DynamodbFunctions.getTable(GetTableArgs.builder()
            .name("tableName")
            .build());

    }
}
Copy
variables:
  tableName:
    fn::invoke:
      function: aws:dynamodb:getTable
      arguments:
        name: tableName
Copy

Using getTable

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getTable(args: GetTableArgs, opts?: InvokeOptions): Promise<GetTableResult>
function getTableOutput(args: GetTableOutputArgs, opts?: InvokeOptions): Output<GetTableResult>
Copy
def get_table(name: Optional[str] = None,
              server_side_encryption: Optional[GetTableServerSideEncryption] = None,
              tags: Optional[Mapping[str, str]] = None,
              opts: Optional[InvokeOptions] = None) -> GetTableResult
def get_table_output(name: Optional[pulumi.Input[str]] = None,
              server_side_encryption: Optional[pulumi.Input[GetTableServerSideEncryptionArgs]] = None,
              tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
              opts: Optional[InvokeOptions] = None) -> Output[GetTableResult]
Copy
func LookupTable(ctx *Context, args *LookupTableArgs, opts ...InvokeOption) (*LookupTableResult, error)
func LookupTableOutput(ctx *Context, args *LookupTableOutputArgs, opts ...InvokeOption) LookupTableResultOutput
Copy

> Note: This function is named LookupTable in the Go SDK.

public static class GetTable 
{
    public static Task<GetTableResult> InvokeAsync(GetTableArgs args, InvokeOptions? opts = null)
    public static Output<GetTableResult> Invoke(GetTableInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetTableResult> getTable(GetTableArgs args, InvokeOptions options)
public static Output<GetTableResult> getTable(GetTableArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: aws:dynamodb/getTable:getTable
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
Name of the DynamoDB table.
ServerSideEncryption GetTableServerSideEncryption
Tags Dictionary<string, string>
Name This property is required. string
Name of the DynamoDB table.
ServerSideEncryption GetTableServerSideEncryption
Tags map[string]string
name This property is required. String
Name of the DynamoDB table.
serverSideEncryption GetTableServerSideEncryption
tags Map<String,String>
name This property is required. string
Name of the DynamoDB table.
serverSideEncryption GetTableServerSideEncryption
tags {[key: string]: string}
name This property is required. str
Name of the DynamoDB table.
server_side_encryption GetTableServerSideEncryption
tags Mapping[str, str]
name This property is required. String
Name of the DynamoDB table.
serverSideEncryption Property Map
tags Map<String>

getTable Result

The following output properties are available:

Supporting Types

GetTableAttribute

Name This property is required. string
Name of the DynamoDB table.
Type This property is required. string
Name This property is required. string
Name of the DynamoDB table.
Type This property is required. string
name This property is required. String
Name of the DynamoDB table.
type This property is required. String
name This property is required. string
Name of the DynamoDB table.
type This property is required. string
name This property is required. str
Name of the DynamoDB table.
type This property is required. str
name This property is required. String
Name of the DynamoDB table.
type This property is required. String

GetTableGlobalSecondaryIndex

HashKey This property is required. string
Name This property is required. string
Name of the DynamoDB table.
NonKeyAttributes This property is required. List<string>
OnDemandThroughputs This property is required. List<GetTableGlobalSecondaryIndexOnDemandThroughput>
ProjectionType This property is required. string
RangeKey This property is required. string
ReadCapacity This property is required. int
WriteCapacity This property is required. int
HashKey This property is required. string
Name This property is required. string
Name of the DynamoDB table.
NonKeyAttributes This property is required. []string
OnDemandThroughputs This property is required. []GetTableGlobalSecondaryIndexOnDemandThroughput
ProjectionType This property is required. string
RangeKey This property is required. string
ReadCapacity This property is required. int
WriteCapacity This property is required. int
hashKey This property is required. String
name This property is required. String
Name of the DynamoDB table.
nonKeyAttributes This property is required. List<String>
onDemandThroughputs This property is required. List<GetTableGlobalSecondaryIndexOnDemandThroughput>
projectionType This property is required. String
rangeKey This property is required. String
readCapacity This property is required. Integer
writeCapacity This property is required. Integer
hashKey This property is required. string
name This property is required. string
Name of the DynamoDB table.
nonKeyAttributes This property is required. string[]
onDemandThroughputs This property is required. GetTableGlobalSecondaryIndexOnDemandThroughput[]
projectionType This property is required. string
rangeKey This property is required. string
readCapacity This property is required. number
writeCapacity This property is required. number
hash_key This property is required. str
name This property is required. str
Name of the DynamoDB table.
non_key_attributes This property is required. Sequence[str]
on_demand_throughputs This property is required. Sequence[GetTableGlobalSecondaryIndexOnDemandThroughput]
projection_type This property is required. str
range_key This property is required. str
read_capacity This property is required. int
write_capacity This property is required. int
hashKey This property is required. String
name This property is required. String
Name of the DynamoDB table.
nonKeyAttributes This property is required. List<String>
onDemandThroughputs This property is required. List<Property Map>
projectionType This property is required. String
rangeKey This property is required. String
readCapacity This property is required. Number
writeCapacity This property is required. Number

GetTableGlobalSecondaryIndexOnDemandThroughput

MaxReadRequestUnits This property is required. int
MaxWriteRequestUnits This property is required. int
MaxReadRequestUnits This property is required. int
MaxWriteRequestUnits This property is required. int
maxReadRequestUnits This property is required. Integer
maxWriteRequestUnits This property is required. Integer
maxReadRequestUnits This property is required. number
maxWriteRequestUnits This property is required. number
max_read_request_units This property is required. int
max_write_request_units This property is required. int
maxReadRequestUnits This property is required. Number
maxWriteRequestUnits This property is required. Number

GetTableLocalSecondaryIndex

Name This property is required. string
Name of the DynamoDB table.
NonKeyAttributes This property is required. List<string>
ProjectionType This property is required. string
RangeKey This property is required. string
Name This property is required. string
Name of the DynamoDB table.
NonKeyAttributes This property is required. []string
ProjectionType This property is required. string
RangeKey This property is required. string
name This property is required. String
Name of the DynamoDB table.
nonKeyAttributes This property is required. List<String>
projectionType This property is required. String
rangeKey This property is required. String
name This property is required. string
Name of the DynamoDB table.
nonKeyAttributes This property is required. string[]
projectionType This property is required. string
rangeKey This property is required. string
name This property is required. str
Name of the DynamoDB table.
non_key_attributes This property is required. Sequence[str]
projection_type This property is required. str
range_key This property is required. str
name This property is required. String
Name of the DynamoDB table.
nonKeyAttributes This property is required. List<String>
projectionType This property is required. String
rangeKey This property is required. String

GetTableOnDemandThroughput

MaxReadRequestUnits This property is required. int
MaxWriteRequestUnits This property is required. int
MaxReadRequestUnits This property is required. int
MaxWriteRequestUnits This property is required. int
maxReadRequestUnits This property is required. Integer
maxWriteRequestUnits This property is required. Integer
maxReadRequestUnits This property is required. number
maxWriteRequestUnits This property is required. number
max_read_request_units This property is required. int
max_write_request_units This property is required. int
maxReadRequestUnits This property is required. Number
maxWriteRequestUnits This property is required. Number

GetTablePointInTimeRecovery

Enabled This property is required. bool
Enabled This property is required. bool
enabled This property is required. Boolean
enabled This property is required. boolean
enabled This property is required. bool
enabled This property is required. Boolean

GetTableReplica

KmsKeyArn This property is required. string
RegionName This property is required. string
KmsKeyArn This property is required. string
RegionName This property is required. string
kmsKeyArn This property is required. String
regionName This property is required. String
kmsKeyArn This property is required. string
regionName This property is required. string
kms_key_arn This property is required. str
region_name This property is required. str
kmsKeyArn This property is required. String
regionName This property is required. String

GetTableServerSideEncryption

Enabled This property is required. bool
KmsKeyArn This property is required. string
Enabled This property is required. bool
KmsKeyArn This property is required. string
enabled This property is required. Boolean
kmsKeyArn This property is required. String
enabled This property is required. boolean
kmsKeyArn This property is required. string
enabled This property is required. bool
kms_key_arn This property is required. str
enabled This property is required. Boolean
kmsKeyArn This property is required. String

GetTableTtl

AttributeName This property is required. string
Enabled This property is required. bool
AttributeName This property is required. string
Enabled This property is required. bool
attributeName This property is required. String
enabled This property is required. Boolean
attributeName This property is required. string
enabled This property is required. boolean
attribute_name This property is required. str
enabled This property is required. bool
attributeName This property is required. String
enabled This property is required. Boolean

Package Details

Repository
AWS Classic pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.
AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi