Whatever message this page gives is out now! Go check it out!

UpdateTable

Last update:
May 18, 2026

Description

This function updates the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a specified table.
For more information, see UpdateTable.

Category

History

ColdFusion (2021 release): Added this function.

Syntax

serviceHandle.updateTable(requestParameters)

Parameters

See the request parameters of UpdateTable.

Example

<cfscript> 
    cred = { 
        "credentialAlias" : "myalias", 
        "vendorName" : "AWS", 
        "region" : "us-east-2", 
        "secretAccessKey" : "xxxxx", 
        "accessKeyId" : "xxxx" 
    } 
    config = { 
        "serviceName" = "DYNAMODB" 
    } 
    dynamo = getCloudService(cred, config) 
 
    tableName="NewProductCatalog" 
 
    oldReadCapacityUnits=50 
    oldWriteCapacityUnits=50 
    newReadCapacityUnits=100 
    newWriteCapacityUnits=100 
 
    updateTableStruct={ 
        "TableName": "#tableName#", 
        "ProvisionedThroughput": { 
            "ReadCapacityUnits": "#newReadCapacityUnits#", 
            "WriteCapacityUnits": "#newWriteCapacityUnits#" 
        } 
    } 
 
    try{ 
        updateTableResponse=dynamo.updateTable(updateTableStruct) 
        if( 
            (updateTableResponse.HttpResponse.StatusCode==200) and 
            (updateTableResponse.TableDescription.ProvisionedThroughput.ReadCapacityUnits==oldReadCapacityUnits) and 
            (updateTableResponse.TableDescription.ProvisionedThroughput.WriteCapacityUnits==oldWriteCapacityUnits) and 
            (updateTableResponse.TableDescription.TableStatus=="UPDATING") 
        ) 
        { 
            writeOutput("Old read and write values correct.") 
        } 
        else { 
            writeOutput("Old read and write values incorrect.") 
        } 
    } 
    catch(any e){ 
        writeDump(e) 
    } 
</cfscript>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page