1. Packages
  2. AWS Classic
  3. API Docs
  4. dynamodb
  5. getTable

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi

aws.dynamodb.getTable

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 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",
    });
    
    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)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aws:dynamodb/getTable:getTable
      arguments:
        # arguments dictionary

    The following arguments are supported:

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

    getTable Result

    The following output properties are available:

    Arn string
    Attributes List<Pulumi.Aws.DynamoDB.Outputs.GetTableAttribute>
    BillingMode string
    DeletionProtectionEnabled bool
    GlobalSecondaryIndexes List<Pulumi.Aws.DynamoDB.Outputs.GetTableGlobalSecondaryIndex>
    HashKey string
    Id string
    The provider-assigned unique ID for this managed resource.
    LocalSecondaryIndexes List<Pulumi.Aws.DynamoDB.Outputs.GetTableLocalSecondaryIndex>
    Name string
    PointInTimeRecovery Pulumi.Aws.DynamoDB.Outputs.GetTablePointInTimeRecovery
    RangeKey string
    ReadCapacity int
    Replicas List<Pulumi.Aws.DynamoDB.Outputs.GetTableReplica>
    ServerSideEncryption Pulumi.Aws.DynamoDB.Outputs.GetTableServerSideEncryption
    StreamArn string
    StreamEnabled bool
    StreamLabel string
    StreamViewType string
    TableClass string
    Tags Dictionary<string, string>
    Ttl Pulumi.Aws.DynamoDB.Outputs.GetTableTtl
    WriteCapacity int

    Supporting Types

    GetTableAttribute

    Name string
    Name of the DynamoDB table.
    Type string
    Name string
    Name of the DynamoDB table.
    Type string
    name String
    Name of the DynamoDB table.
    type String
    name string
    Name of the DynamoDB table.
    type string
    name str
    Name of the DynamoDB table.
    type str
    name String
    Name of the DynamoDB table.
    type String

    GetTableGlobalSecondaryIndex

    HashKey string
    Name string
    Name of the DynamoDB table.
    NonKeyAttributes List<string>
    ProjectionType string
    RangeKey string
    ReadCapacity int
    WriteCapacity int
    HashKey string
    Name string
    Name of the DynamoDB table.
    NonKeyAttributes []string
    ProjectionType string
    RangeKey string
    ReadCapacity int
    WriteCapacity int
    hashKey String
    name String
    Name of the DynamoDB table.
    nonKeyAttributes List<String>
    projectionType String
    rangeKey String
    readCapacity Integer
    writeCapacity Integer
    hashKey string
    name string
    Name of the DynamoDB table.
    nonKeyAttributes string[]
    projectionType string
    rangeKey string
    readCapacity number
    writeCapacity number
    hash_key str
    name str
    Name of the DynamoDB table.
    non_key_attributes Sequence[str]
    projection_type str
    range_key str
    read_capacity int
    write_capacity int
    hashKey String
    name String
    Name of the DynamoDB table.
    nonKeyAttributes List<String>
    projectionType String
    rangeKey String
    readCapacity Number
    writeCapacity Number

    GetTableLocalSecondaryIndex

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

    GetTablePointInTimeRecovery

    Enabled bool
    Enabled bool
    enabled Boolean
    enabled boolean
    enabled bool
    enabled Boolean

    GetTableReplica

    KmsKeyArn string
    RegionName string
    KmsKeyArn string
    RegionName string
    kmsKeyArn String
    regionName String
    kmsKeyArn string
    regionName string
    kmsKeyArn String
    regionName String

    GetTableServerSideEncryption

    Enabled bool
    KmsKeyArn string
    Enabled bool
    KmsKeyArn string
    enabled Boolean
    kmsKeyArn String
    enabled boolean
    kmsKeyArn string
    enabled Boolean
    kmsKeyArn String

    GetTableTtl

    attributeName String
    enabled Boolean
    attributeName string
    enabled boolean
    attributeName String
    enabled 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 logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.42.0 published on Wednesday, Jun 26, 2024 by Pulumi