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 dictionary
The following arguments are supported:
- Name
This property is required. string - Name of the DynamoDB table.
- Server
Side GetEncryption Table Server Side Encryption - Dictionary<string, string>
- Name
This property is required. string - Name of the DynamoDB table.
- Server
Side GetEncryption Table Server Side Encryption - map[string]string
- name
This property is required. String - Name of the DynamoDB table.
- server
Side GetEncryption Table Server Side Encryption - Map<String,String>
- name
This property is required. string - Name of the DynamoDB table.
- server
Side GetEncryption Table Server Side Encryption - {[key: string]: string}
- name
This property is required. str - Name of the DynamoDB table.
- server_
side_ Getencryption Table Server Side Encryption - Mapping[str, str]
- name
This property is required. String - Name of the DynamoDB table.
- server
Side Property MapEncryption - Map<String>
getTable Result
The following output properties are available:
- Arn string
- Attributes
List<Get
Table Attribute> - Billing
Mode string - Deletion
Protection boolEnabled - Global
Secondary List<GetIndexes Table Global Secondary Index> - Hash
Key string - Id string
- The provider-assigned unique ID for this managed resource.
- Local
Secondary List<GetIndexes Table Local Secondary Index> - Name string
- On
Demand List<GetThroughputs Table On Demand Throughput> - Point
In GetTime Recovery Table Point In Time Recovery - Range
Key string - Read
Capacity int - Replicas
List<Get
Table Replica> - Server
Side GetEncryption Table Server Side Encryption - Stream
Arn string - Stream
Enabled bool - Stream
Label string - Stream
View stringType - Table
Class string - Dictionary<string, string>
- Ttl
Get
Table Ttl - Write
Capacity int
- Arn string
- Attributes
[]Get
Table Attribute - Billing
Mode string - Deletion
Protection boolEnabled - Global
Secondary []GetIndexes Table Global Secondary Index - Hash
Key string - Id string
- The provider-assigned unique ID for this managed resource.
- Local
Secondary []GetIndexes Table Local Secondary Index - Name string
- On
Demand []GetThroughputs Table On Demand Throughput - Point
In GetTime Recovery Table Point In Time Recovery - Range
Key string - Read
Capacity int - Replicas
[]Get
Table Replica Type - Server
Side GetEncryption Table Server Side Encryption - Stream
Arn string - Stream
Enabled bool - Stream
Label string - Stream
View stringType - Table
Class string - map[string]string
- Ttl
Get
Table Ttl - Write
Capacity int
- arn String
- attributes
List<Get
Table Attribute> - billing
Mode String - deletion
Protection BooleanEnabled - global
Secondary List<GetIndexes Table Global Secondary Index> - hash
Key String - id String
- The provider-assigned unique ID for this managed resource.
- local
Secondary List<GetIndexes Table Local Secondary Index> - name String
- on
Demand List<GetThroughputs Table On Demand Throughput> - point
In GetTime Recovery Table Point In Time Recovery - range
Key String - read
Capacity Integer - replicas
List<Get
Table Replica> - server
Side GetEncryption Table Server Side Encryption - stream
Arn String - stream
Enabled Boolean - stream
Label String - stream
View StringType - table
Class String - Map<String,String>
- ttl
Get
Table Ttl - write
Capacity Integer
- arn string
- attributes
Get
Table Attribute[] - billing
Mode string - deletion
Protection booleanEnabled - global
Secondary GetIndexes Table Global Secondary Index[] - hash
Key string - id string
- The provider-assigned unique ID for this managed resource.
- local
Secondary GetIndexes Table Local Secondary Index[] - name string
- on
Demand GetThroughputs Table On Demand Throughput[] - point
In GetTime Recovery Table Point In Time Recovery - range
Key string - read
Capacity number - replicas
Get
Table Replica[] - server
Side GetEncryption Table Server Side Encryption - stream
Arn string - stream
Enabled boolean - stream
Label string - stream
View stringType - table
Class string - {[key: string]: string}
- ttl
Get
Table Ttl - write
Capacity number
- arn str
- attributes
Sequence[Get
Table 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[Get
Table 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
Get
Table Ttl - write_
capacity int
- arn String
- attributes List<Property Map>
- billing
Mode String - deletion
Protection BooleanEnabled - global
Secondary List<Property Map>Indexes - hash
Key String - id String
- The provider-assigned unique ID for this managed resource.
- local
Secondary List<Property Map>Indexes - name String
- on
Demand List<Property Map>Throughputs - point
In Property MapTime Recovery - range
Key String - read
Capacity Number - replicas List<Property Map>
- server
Side Property MapEncryption - stream
Arn String - stream
Enabled Boolean - stream
Label String - stream
View StringType - table
Class String - Map<String>
- ttl Property Map
- write
Capacity Number
Supporting Types
GetTableAttribute
GetTableGlobalSecondaryIndex
- Hash
Key This property is required. string - Name
This property is required. string - Name of the DynamoDB table.
- Non
Key Attributes This property is required. List<string> - On
Demand Throughputs This property is required. List<GetTable Global Secondary Index On Demand Throughput> - Projection
Type This property is required. string - Range
Key This property is required. string - Read
Capacity This property is required. int - Write
Capacity This property is required. int
- Hash
Key This property is required. string - Name
This property is required. string - Name of the DynamoDB table.
- Non
Key Attributes This property is required. []string - On
Demand Throughputs This property is required. []GetTable Global Secondary Index On Demand Throughput - Projection
Type This property is required. string - Range
Key This property is required. string - Read
Capacity This property is required. int - Write
Capacity This property is required. int
- hash
Key This property is required. String - name
This property is required. String - Name of the DynamoDB table.
- non
Key Attributes This property is required. List<String> - on
Demand Throughputs This property is required. List<GetTable Global Secondary Index On Demand Throughput> - projection
Type This property is required. String - range
Key This property is required. String - read
Capacity This property is required. Integer - write
Capacity This property is required. Integer
- hash
Key This property is required. string - name
This property is required. string - Name of the DynamoDB table.
- non
Key Attributes This property is required. string[] - on
Demand Throughputs This property is required. GetTable Global Secondary Index On Demand Throughput[] - projection
Type This property is required. string - range
Key This property is required. string - read
Capacity This property is required. number - write
Capacity 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[GetTable Global Secondary Index On Demand Throughput] - 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
- hash
Key This property is required. String - name
This property is required. String - Name of the DynamoDB table.
- non
Key Attributes This property is required. List<String> - on
Demand Throughputs This property is required. List<Property Map> - projection
Type This property is required. String - range
Key This property is required. String - read
Capacity This property is required. Number - write
Capacity This property is required. Number
GetTableGlobalSecondaryIndexOnDemandThroughput
- Max
Read Request Units This property is required. int - Max
Write Request Units This property is required. int
- Max
Read Request Units This property is required. int - Max
Write Request Units This property is required. int
- max
Read Request Units This property is required. Integer - max
Write Request Units This property is required. Integer
- max
Read Request Units This property is required. number - max
Write Request Units This property is required. number
- max_
read_ request_ units This property is required. int - max_
write_ request_ units This property is required. int
- max
Read Request Units This property is required. Number - max
Write Request Units This property is required. Number
GetTableLocalSecondaryIndex
- Name
This property is required. string - Name of the DynamoDB table.
- Non
Key Attributes This property is required. List<string> - Projection
Type This property is required. string - Range
Key This property is required. string
- Name
This property is required. string - Name of the DynamoDB table.
- Non
Key Attributes This property is required. []string - Projection
Type This property is required. string - Range
Key This property is required. string
- name
This property is required. String - Name of the DynamoDB table.
- non
Key Attributes This property is required. List<String> - projection
Type This property is required. String - range
Key This property is required. String
- name
This property is required. string - Name of the DynamoDB table.
- non
Key Attributes This property is required. string[] - projection
Type This property is required. string - range
Key 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.
- non
Key Attributes This property is required. List<String> - projection
Type This property is required. String - range
Key This property is required. String
GetTableOnDemandThroughput
- Max
Read Request Units This property is required. int - Max
Write Request Units This property is required. int
- Max
Read Request Units This property is required. int - Max
Write Request Units This property is required. int
- max
Read Request Units This property is required. Integer - max
Write Request Units This property is required. Integer
- max
Read Request Units This property is required. number - max
Write Request Units This property is required. number
- max_
read_ request_ units This property is required. int - max_
write_ request_ units This property is required. int
- max
Read Request Units This property is required. Number - max
Write Request Units 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
- Kms
Key Arn This property is required. string - Region
Name This property is required. string
- Kms
Key Arn This property is required. string - Region
Name This property is required. string
- kms
Key Arn This property is required. String - region
Name This property is required. String
- kms
Key Arn This property is required. string - region
Name This property is required. string
- kms_
key_ arn This property is required. str - region_
name This property is required. str
- kms
Key Arn This property is required. String - region
Name This property is required. String
GetTableServerSideEncryption
- enabled
This property is required. bool - kms_
key_ arn This property is required. str
GetTableTtl
- Attribute
Name This property is required. string - Enabled
This property is required. bool
- Attribute
Name This property is required. string - Enabled
This property is required. bool
- attribute
Name This property is required. String - enabled
This property is required. Boolean
- attribute
Name This property is required. string - enabled
This property is required. boolean
- attribute_
name This property is required. str - enabled
This property is required. bool
- attribute
Name 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.