AWS v6.74.0 published on Wednesday, Mar 26, 2025 by Pulumi
aws.dynamodb.getTable
Explore with Pulumi AI
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",
});
import pulumi
import pulumi_aws as aws
table_name = aws.dynamodb.get_table(name="tableName")
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
	})
}
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",
    });
});
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());
    }
}
variables:
  tableName:
    fn::invoke:
      function: aws:dynamodb:getTable
      arguments:
        name: tableName
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>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]func LookupTable(ctx *Context, args *LookupTableArgs, opts ...InvokeOption) (*LookupTableResult, error)
func LookupTableOutput(ctx *Context, args *LookupTableOutputArgs, opts ...InvokeOption) LookupTableResultOutput> 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)
}public static CompletableFuture<GetTableResult> getTable(GetTableArgs args, InvokeOptions options)
public static Output<GetTableResult> getTable(GetTableArgs args, InvokeOptions options)
fn::invoke:
  function: aws:dynamodb/getTable:getTable
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- Name of the DynamoDB table.
- ServerSide GetEncryption Table Server Side Encryption 
- Dictionary<string, string>
- Name string
- Name of the DynamoDB table.
- ServerSide GetEncryption Table Server Side Encryption 
- map[string]string
- name String
- Name of the DynamoDB table.
- serverSide GetEncryption Table Server Side Encryption 
- Map<String,String>
- name string
- Name of the DynamoDB table.
- serverSide GetEncryption Table Server Side Encryption 
- {[key: string]: string}
- name str
- Name of the DynamoDB table.
- server_side_ Getencryption Table Server Side Encryption 
- Mapping[str, str]
- name String
- Name of the DynamoDB table.
- serverSide Property MapEncryption 
- Map<String>
getTable Result
The following output properties are available:
- Arn string
- Attributes
List<GetTable Attribute> 
- BillingMode string
- DeletionProtection boolEnabled 
- GlobalSecondary List<GetIndexes Table Global Secondary Index> 
- HashKey string
- Id string
- The provider-assigned unique ID for this managed resource.
- LocalSecondary List<GetIndexes Table Local Secondary Index> 
- Name string
- OnDemand List<GetThroughputs Table On Demand Throughput> 
- PointIn GetTime Recovery Table Point In Time Recovery 
- RangeKey string
- ReadCapacity int
- Replicas
List<GetTable Replica> 
- ServerSide GetEncryption Table Server Side Encryption 
- StreamArn string
- StreamEnabled bool
- StreamLabel string
- StreamView stringType 
- TableClass string
- Dictionary<string, string>
- Ttl
GetTable Ttl 
- WriteCapacity int
- Arn string
- Attributes
[]GetTable Attribute 
- BillingMode string
- DeletionProtection boolEnabled 
- GlobalSecondary []GetIndexes Table Global Secondary Index 
- HashKey string
- Id string
- The provider-assigned unique ID for this managed resource.
- LocalSecondary []GetIndexes Table Local Secondary Index 
- Name string
- OnDemand []GetThroughputs Table On Demand Throughput 
- PointIn GetTime Recovery Table Point In Time Recovery 
- RangeKey string
- ReadCapacity int
- Replicas
[]GetTable Replica Type 
- ServerSide GetEncryption Table Server Side Encryption 
- StreamArn string
- StreamEnabled bool
- StreamLabel string
- StreamView stringType 
- TableClass string
- map[string]string
- Ttl
GetTable Ttl 
- WriteCapacity int
- arn String
- attributes
List<GetTable Attribute> 
- billingMode String
- deletionProtection BooleanEnabled 
- globalSecondary List<GetIndexes Table Global Secondary Index> 
- hashKey String
- id String
- The provider-assigned unique ID for this managed resource.
- localSecondary List<GetIndexes Table Local Secondary Index> 
- name String
- onDemand List<GetThroughputs Table On Demand Throughput> 
- pointIn GetTime Recovery Table Point In Time Recovery 
- rangeKey String
- readCapacity Integer
- replicas
List<GetTable Replica> 
- serverSide GetEncryption Table Server Side Encryption 
- streamArn String
- streamEnabled Boolean
- streamLabel String
- streamView StringType 
- tableClass String
- Map<String,String>
- ttl
GetTable Ttl 
- writeCapacity Integer
- arn string
- attributes
GetTable Attribute[] 
- billingMode string
- deletionProtection booleanEnabled 
- globalSecondary GetIndexes Table Global Secondary Index[] 
- hashKey string
- id string
- The provider-assigned unique ID for this managed resource.
- localSecondary GetIndexes Table Local Secondary Index[] 
- name string
- onDemand GetThroughputs Table On Demand Throughput[] 
- pointIn GetTime Recovery Table Point In Time Recovery 
- rangeKey string
- readCapacity number
- replicas
GetTable Replica[] 
- serverSide GetEncryption Table Server Side Encryption 
- streamArn string
- streamEnabled boolean
- streamLabel string
- streamView stringType 
- tableClass string
- {[key: string]: string}
- ttl
GetTable Ttl 
- writeCapacity number
- arn str
- attributes
Sequence[GetTable Attribute] 
- billing_mode str
- deletion_protection_ boolenabled 
- global_secondary_ Sequence[Getindexes Table Global Secondary Index] 
- hash_key str
- id str
- The provider-assigned unique ID for this managed resource.
- local_secondary_ Sequence[Getindexes Table Local Secondary Index] 
- name str
- on_demand_ Sequence[Getthroughputs Table On Demand Throughput] 
- point_in_ Gettime_ recovery Table Point In Time Recovery 
- range_key str
- read_capacity int
- replicas
Sequence[GetTable Replica] 
- server_side_ Getencryption Table Server Side Encryption 
- stream_arn str
- stream_enabled bool
- stream_label str
- stream_view_ strtype 
- table_class str
- Mapping[str, str]
- ttl
GetTable Ttl 
- write_capacity int
- arn String
- attributes List<Property Map>
- billingMode String
- deletionProtection BooleanEnabled 
- globalSecondary List<Property Map>Indexes 
- hashKey String
- id String
- The provider-assigned unique ID for this managed resource.
- localSecondary List<Property Map>Indexes 
- name String
- onDemand List<Property Map>Throughputs 
- pointIn Property MapTime Recovery 
- rangeKey String
- readCapacity Number
- replicas List<Property Map>
- serverSide Property MapEncryption 
- streamArn String
- streamEnabled Boolean
- streamLabel String
- streamView StringType 
- tableClass String
- Map<String>
- ttl Property Map
- writeCapacity Number
Supporting Types
GetTableAttribute  
GetTableGlobalSecondaryIndex    
- HashKey string
- Name string
- Name of the DynamoDB table.
- NonKey List<string>Attributes 
- OnDemand List<GetThroughputs Table Global Secondary Index On Demand Throughput> 
- ProjectionType string
- RangeKey string
- ReadCapacity int
- WriteCapacity int
- HashKey string
- Name string
- Name of the DynamoDB table.
- NonKey []stringAttributes 
- OnDemand []GetThroughputs Table Global Secondary Index On Demand Throughput 
- ProjectionType string
- RangeKey string
- ReadCapacity int
- WriteCapacity int
- hashKey String
- name String
- Name of the DynamoDB table.
- nonKey List<String>Attributes 
- onDemand List<GetThroughputs Table Global Secondary Index On Demand Throughput> 
- projectionType String
- rangeKey String
- readCapacity Integer
- writeCapacity Integer
- hashKey string
- name string
- Name of the DynamoDB table.
- nonKey string[]Attributes 
- onDemand GetThroughputs Table Global Secondary Index On Demand Throughput[] 
- projectionType string
- rangeKey string
- readCapacity number
- writeCapacity number
- hash_key str
- name str
- Name of the DynamoDB table.
- non_key_ Sequence[str]attributes 
- on_demand_ Sequence[Getthroughputs Table Global Secondary Index On Demand Throughput] 
- projection_type str
- range_key str
- read_capacity int
- write_capacity int
- hashKey String
- name String
- Name of the DynamoDB table.
- nonKey List<String>Attributes 
- onDemand List<Property Map>Throughputs 
- projectionType String
- rangeKey String
- readCapacity Number
- writeCapacity Number
GetTableGlobalSecondaryIndexOnDemandThroughput       
- maxRead IntegerRequest Units 
- maxWrite IntegerRequest Units 
- maxRead numberRequest Units 
- maxWrite numberRequest Units 
- maxRead NumberRequest Units 
- maxWrite NumberRequest Units 
GetTableLocalSecondaryIndex    
- Name string
- Name of the DynamoDB table.
- NonKey List<string>Attributes 
- ProjectionType string
- RangeKey string
- Name string
- Name of the DynamoDB table.
- NonKey []stringAttributes 
- ProjectionType string
- RangeKey string
- name String
- Name of the DynamoDB table.
- nonKey List<String>Attributes 
- projectionType String
- rangeKey String
- name string
- Name of the DynamoDB table.
- nonKey string[]Attributes 
- projectionType string
- rangeKey string
- name str
- Name of the DynamoDB table.
- non_key_ Sequence[str]attributes 
- projection_type str
- range_key str
- name String
- Name of the DynamoDB table.
- nonKey List<String>Attributes 
- projectionType String
- rangeKey String
GetTableOnDemandThroughput    
- maxRead IntegerRequest Units 
- maxWrite IntegerRequest Units 
- maxRead numberRequest Units 
- maxWrite numberRequest Units 
- maxRead NumberRequest Units 
- maxWrite NumberRequest Units 
GetTablePointInTimeRecovery     
- Enabled bool
- Enabled bool
- enabled Boolean
- enabled boolean
- enabled bool
- enabled Boolean
GetTableReplica  
- KmsKey stringArn 
- RegionName string
- KmsKey stringArn 
- RegionName string
- kmsKey StringArn 
- regionName String
- kmsKey stringArn 
- regionName string
- kms_key_ strarn 
- region_name str
- kmsKey StringArn 
- regionName String
GetTableServerSideEncryption    
- enabled bool
- kms_key_ strarn 
GetTableTtl  
- AttributeName string
- Enabled bool
- AttributeName string
- Enabled bool
- attributeName String
- enabled Boolean
- attributeName string
- enabled boolean
- attribute_name str
- enabled bool
- attributeName String
- enabled Boolean
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.