404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.136.11.217: ~ $
**Example 1: To create a table with tags**

The following ``create-table`` example uses the specified attributes and key schema to create a table named ``MusicCollection``. This table uses provisioned throughput and is encrypted at rest using the default AWS owned CMK. The command also applies a tag to the table, with a key of ``Owner`` and a value of ``blueTeam``. ::

    aws dynamodb create-table \
        --table-name MusicCollection \
        --attribute-definitions AttributeName=Artist,AttributeType=S AttributeName=SongTitle,AttributeType=S \
        --key-schema AttributeName=Artist,KeyType=HASH AttributeName=SongTitle,KeyType=RANGE \
        --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
        --tags Key=Owner,Value=blueTeam

Output::

    {
        "TableDescription": {
            "AttributeDefinitions": [
                {
                    "AttributeName": "Artist", 
                    "AttributeType": "S"
                }, 
                {
                    "AttributeName": "SongTitle", 
                    "AttributeType": "S"
                }
            ], 
            "ProvisionedThroughput": {
                "NumberOfDecreasesToday": 0, 
                "WriteCapacityUnits": 5, 
                "ReadCapacityUnits": 5
            }, 
            "TableSizeBytes": 0, 
            "TableName": "MusicCollection", 
            "TableStatus": "CREATING", 
            "KeySchema": [
                {
                    "KeyType": "HASH", 
                    "AttributeName": "Artist"
                }, 
                {
                    "KeyType": "RANGE", 
                    "AttributeName": "SongTitle"
                }
            ], 
            "ItemCount": 0, 
            "CreationDateTime": "2020-05-26T16:04:41.627000-07:00",
            "TableArn": "arn:aws:dynamodb:us-west-2:123456789012:table/MusicCollection",
            "TableId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
        }
    }

For more information, see `Basic Operations for Tables <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html>`__ in the *Amazon DynamoDB Developer Guide*.

**Example 2: To create a table in On-Demand Mode**

The following example creates a table called ``MusicCollection`` using on-demand mode, rather than provisioned throughput mode. This is useful for tables with unpredictable workloads. ::

    aws dynamodb create-table \
        --table-name MusicCollection \
        --attribute-definitions AttributeName=Artist,AttributeType=S AttributeName=SongTitle,AttributeType=S \
        --key-schema AttributeName=Artist,KeyType=HASH AttributeName=SongTitle,KeyType=RANGE \
        --billing-mode PAY_PER_REQUEST

Output::

    {
        "TableDescription": {
            "AttributeDefinitions": [
                {
                    "AttributeName": "Artist",
                    "AttributeType": "S"
                },
                {
                    "AttributeName": "SongTitle",
                    "AttributeType": "S"
                }
            ],
            "TableName": "MusicCollection",
            "KeySchema": [
                {
                    "AttributeName": "Artist",
                    "KeyType": "HASH"
                },
                {
                    "AttributeName": "SongTitle",
                    "KeyType": "RANGE"
                }
            ],
            "TableStatus": "CREATING",
            "CreationDateTime": "2020-05-27T11:44:10.807000-07:00",
            "ProvisionedThroughput": {
                "NumberOfDecreasesToday": 0,
                "ReadCapacityUnits": 0,
                "WriteCapacityUnits": 0
            },
            "TableSizeBytes": 0,
            "ItemCount": 0,
            "TableArn": "arn:aws:dynamodb:us-west-2:123456789012:table/MusicCollection",
            "TableId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "BillingModeSummary": {
                "BillingMode": "PAY_PER_REQUEST"
            }
        }
    }

For more information, see `Basic Operations for Tables <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html>`__ in the *Amazon DynamoDB Developer Guide*.

**Example 3: To create a table and encrypt it with a Customer Managed CMK**

The following example creates a table named ``MusicCollection`` and encrypts it using a customer managed CMK. ::

    aws dynamodb create-table \
        --table-name MusicCollection \
        --attribute-definitions AttributeName=Artist,AttributeType=S AttributeName=SongTitle,AttributeType=S \
        --key-schema AttributeName=Artist,KeyType=HASH AttributeName=SongTitle,KeyType=RANGE \
        --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
        --sse-specification Enabled=true,SSEType=KMS,KMSMasterKeyId=abcd1234-abcd-1234-a123-ab1234a1b234

Output::

    {
        "TableDescription": {
            "AttributeDefinitions": [
                {
                    "AttributeName": "Artist",
                    "AttributeType": "S"
                },
                {
                    "AttributeName": "SongTitle",
                    "AttributeType": "S"
                }
            ],
            "TableName": "MusicCollection",
            "KeySchema": [
                {
                    "AttributeName": "Artist",
                    "KeyType": "HASH"
                },
                {
                    "AttributeName": "SongTitle",
                    "KeyType": "RANGE"
                }
            ],
            "TableStatus": "CREATING",
            "CreationDateTime": "2020-05-27T11:12:16.431000-07:00",
            "ProvisionedThroughput": {
                "NumberOfDecreasesToday": 0,
                "ReadCapacityUnits": 5,
                "WriteCapacityUnits": 5
            },
            "TableSizeBytes": 0,
            "ItemCount": 0,
            "TableArn": "arn:aws:dynamodb:us-west-2:123456789012:table/MusicCollection",
            "TableId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "SSEDescription": {
                "Status": "ENABLED",
                "SSEType": "KMS",
                "KMSMasterKeyArn": "arn:aws:kms:us-west-2:123456789012:key/abcd1234-abcd-1234-a123-ab1234a1b234"
            }
        }
    }

For more information, see `Basic Operations for Tables <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html>`__ in the *Amazon DynamoDB Developer Guide*.

**Example 4: To create a table with a Local Secondary Index**

The following example uses the specified attributes and key schema to create a table named ``MusicCollection`` with a Local Secondary Index named ``AlbumTitleIndex``. ::

    aws dynamodb create-table \
        --table-name MusicCollection \
        --attribute-definitions AttributeName=Artist,AttributeType=S AttributeName=SongTitle,AttributeType=S AttributeName=AlbumTitle,AttributeType=S \
        --key-schema AttributeName=Artist,KeyType=HASH AttributeName=SongTitle,KeyType=RANGE \
        --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5 \
        --local-secondary-indexes \
            "[
                {
                    \"IndexName\": \"AlbumTitleIndex\",
                    \"KeySchema\": [
                        {\"AttributeName\": \"Artist\",\"KeyType\":\"HASH\"},
                        {\"AttributeName\": \"AlbumTitle\",\"KeyType\":\"RANGE\"}
                    ],
                    \"Projection\": {
                        \"ProjectionType\": \"INCLUDE\",
                        \"NonKeyAttributes\": [\"Genre\", \"Year\"]
                    }
                }
            ]" 

Output::

    {
        "TableDescription": {
            "AttributeDefinitions": [
                {
                    "AttributeName": "AlbumTitle",
                    "AttributeType": "S"
                },
                {
                    "AttributeName": "Artist",
                    "AttributeType": "S"
                },
                {
                    "AttributeName": "SongTitle",
                    "AttributeType": "S"
                }
            ],
            "TableName": "MusicCollection",
            "KeySchema": [
                {
                    "AttributeName": "Artist",
                    "KeyType": "HASH"
                },
                {
                    "AttributeName": "SongTitle",
                    "KeyType": "RANGE"
                }
            ],
            "TableStatus": "CREATING",
            "CreationDateTime": "2020-05-26T15:59:49.473000-07:00",
            "ProvisionedThroughput": {
                "NumberOfDecreasesToday": 0,
                "ReadCapacityUnits": 10,
                "WriteCapacityUnits": 5
            },
            "TableSizeBytes": 0,
            "ItemCount": 0,
            "TableArn": "arn:aws:dynamodb:us-west-2:123456789012:table/MusicCollection",
            "TableId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "LocalSecondaryIndexes": [
                {
                    "IndexName": "AlbumTitleIndex",
                    "KeySchema": [
                        {
                            "AttributeName": "Artist",
                            "KeyType": "HASH"
                        },
                        {
                            "AttributeName": "AlbumTitle",
                            "KeyType": "RANGE"
                        }
                    ],
                    "Projection": {
                        "ProjectionType": "INCLUDE",
                        "NonKeyAttributes": [
                            "Genre",
                            "Year"
                        ]
                    },
                    "IndexSizeBytes": 0,
                    "ItemCount": 0,
                    "IndexArn": "arn:aws:dynamodb:us-west-2:123456789012:table/MusicCollection/index/AlbumTitleIndex"
                }
            ]
        }
    }

For more information, see `Basic Operations for Tables <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html>`__ in the *Amazon DynamoDB Developer Guide*.

**Example 5: To create a table with a Global Secondary Index**

The following example creates a table named ``GameScores`` with a Global Secondary Index called ``GameTitleIndex``. The base table has a partition key of ``UserId`` and a sort key of ``GameTitle``, allowing you to find an individual user's best score for a specific game efficiently, whereas the GSI has a partition key of ``GameTitle`` and a sort key of ``TopScore``, allowing you to quickly find the overall highest score for a particular game. ::

    aws dynamodb create-table \
        --table-name GameScores \
        --attribute-definitions AttributeName=UserId,AttributeType=S AttributeName=GameTitle,AttributeType=S AttributeName=TopScore,AttributeType=N \
        --key-schema AttributeName=UserId,KeyType=HASH \
                    AttributeName=GameTitle,KeyType=RANGE \
        --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5 \
        --global-secondary-indexes \
            "[
                {
                    \"IndexName\": \"GameTitleIndex\",
                    \"KeySchema\": [
                        {\"AttributeName\":\"GameTitle\",\"KeyType\":\"HASH\"},
                        {\"AttributeName\":\"TopScore\",\"KeyType\":\"RANGE\"}
                    ],
                    \"Projection\": {
                        \"ProjectionType\":\"INCLUDE\",
                        \"NonKeyAttributes\":[\"UserId\"]
                    },
                    \"ProvisionedThroughput\": {
                        \"ReadCapacityUnits\": 10,
                        \"WriteCapacityUnits\": 5
                    }
                }
            ]"

Output::

    {
        "TableDescription": {
            "AttributeDefinitions": [
                {
                    "AttributeName": "GameTitle",
                    "AttributeType": "S"
                },
                {
                    "AttributeName": "TopScore",
                    "AttributeType": "N"
                },
                {
                    "AttributeName": "UserId",
                    "AttributeType": "S"
                }
            ],
            "TableName": "GameScores",
            "KeySchema": [
                {
                    "AttributeName": "UserId",
                    "KeyType": "HASH"
                },
                {
                    "AttributeName": "GameTitle",
                    "KeyType": "RANGE"
                }
            ],
            "TableStatus": "CREATING",
            "CreationDateTime": "2020-05-26T17:28:15.602000-07:00",
            "ProvisionedThroughput": {
                "NumberOfDecreasesToday": 0,
                "ReadCapacityUnits": 10,
                "WriteCapacityUnits": 5
            },
            "TableSizeBytes": 0,
            "ItemCount": 0,
            "TableArn": "arn:aws:dynamodb:us-west-2:123456789012:table/GameScores",
            "TableId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "GlobalSecondaryIndexes": [
                {
                    "IndexName": "GameTitleIndex",
                    "KeySchema": [
                        {
                            "AttributeName": "GameTitle",
                            "KeyType": "HASH"
                        },
                        {
                            "AttributeName": "TopScore",
                            "KeyType": "RANGE"
                        }
                    ],
                    "Projection": {
                        "ProjectionType": "INCLUDE",
                        "NonKeyAttributes": [
                            "UserId"
                        ]
                    },
                    "IndexStatus": "CREATING",
                    "ProvisionedThroughput": {
                        "NumberOfDecreasesToday": 0,
                        "ReadCapacityUnits": 10,
                        "WriteCapacityUnits": 5
                    },
                    "IndexSizeBytes": 0,
                    "ItemCount": 0,
                    "IndexArn": "arn:aws:dynamodb:us-west-2:123456789012:table/GameScores/index/GameTitleIndex"
                }
            ]
        }
    }

For more information, see `Basic Operations for Tables <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html>`__ in the *Amazon DynamoDB Developer Guide*.

**Example 6: To create a table with multiple Global Secondary Indexes at once**

The following example creates a table named ``GameScores`` with two Global Secondary Indexes. The GSI schemas are passed via a file, rather than on the command line. ::

    aws dynamodb create-table \
        --table-name GameScores \
        --attribute-definitions AttributeName=UserId,AttributeType=S AttributeName=GameTitle,AttributeType=S AttributeName=TopScore,AttributeType=N AttributeName=Date,AttributeType=S \
        --key-schema AttributeName=UserId,KeyType=HASH AttributeName=GameTitle,KeyType=RANGE \
        --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5 \
        --global-secondary-indexes file://gsi.json

Contents of ``gsi.json``::

    [
        {
            "IndexName": "GameTitleIndex",
            "KeySchema": [
                {
                    "AttributeName": "GameTitle",
                    "KeyType": "HASH"
                },
                {
                    "AttributeName": "TopScore",
                    "KeyType": "RANGE"
                }
            ],
            "Projection": {
                "ProjectionType": "ALL"
            },
            "ProvisionedThroughput": {
                "ReadCapacityUnits": 10,
                "WriteCapacityUnits": 5
            }
        },
        {
            "IndexName": "GameDateIndex",
            "KeySchema": [
                {
                    "AttributeName": "GameTitle",
                    "KeyType": "HASH"
                },
                {
                    "AttributeName": "Date",
                    "KeyType": "RANGE"
                }
            ],
            "Projection": {
                "ProjectionType": "ALL"
            },
            "ProvisionedThroughput": {
                "ReadCapacityUnits": 5,
                "WriteCapacityUnits": 5
            }
        }
    ]

Output::

    {
        "TableDescription": {
            "AttributeDefinitions": [
                {
                    "AttributeName": "Date",
                    "AttributeType": "S"
                },
                {
                    "AttributeName": "GameTitle",
                    "AttributeType": "S"
                },
                {
                    "AttributeName": "TopScore",
                    "AttributeType": "N"
                },
                {
                    "AttributeName": "UserId",
                    "AttributeType": "S"
                }
            ],
            "TableName": "GameScores",
            "KeySchema": [
                {
                    "AttributeName": "UserId",
                    "KeyType": "HASH"
                },
                {
                    "AttributeName": "GameTitle",
                    "KeyType": "RANGE"
                }
            ],
            "TableStatus": "CREATING",
            "CreationDateTime": "2020-08-04T16:40:55.524000-07:00",
            "ProvisionedThroughput": {
                "NumberOfDecreasesToday": 0,
                "ReadCapacityUnits": 10,
                "WriteCapacityUnits": 5
            },
            "TableSizeBytes": 0,
            "ItemCount": 0,
            "TableArn": "arn:aws:dynamodb:us-west-2:123456789012:table/GameScores",
            "TableId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "GlobalSecondaryIndexes": [
                {
                    "IndexName": "GameTitleIndex",
                    "KeySchema": [
                        {
                            "AttributeName": "GameTitle",
                            "KeyType": "HASH"
                        },
                        {
                            "AttributeName": "TopScore",
                            "KeyType": "RANGE"
                        }
                    ],
                    "Projection": {
                        "ProjectionType": "ALL"
                    },
                    "IndexStatus": "CREATING",
                    "ProvisionedThroughput": {
                        "NumberOfDecreasesToday": 0,
                        "ReadCapacityUnits": 10,
                        "WriteCapacityUnits": 5
                    },
                    "IndexSizeBytes": 0,
                    "ItemCount": 0,
                    "IndexArn": "arn:aws:dynamodb:us-west-2:123456789012:table/GameScores/index/GameTitleIndex"
                },
                {
                    "IndexName": "GameDateIndex",
                    "KeySchema": [
                        {
                            "AttributeName": "GameTitle",
                            "KeyType": "HASH"
                        },
                        {
                            "AttributeName": "Date",
                            "KeyType": "RANGE"
                        }
                    ],
                    "Projection": {
                        "ProjectionType": "ALL"
                    },
                    "IndexStatus": "CREATING",
                    "ProvisionedThroughput": {
                        "NumberOfDecreasesToday": 0,
                        "ReadCapacityUnits": 5,
                        "WriteCapacityUnits": 5
                    },
                    "IndexSizeBytes": 0,
                    "ItemCount": 0,
                    "IndexArn": "arn:aws:dynamodb:us-west-2:123456789012:table/GameScores/index/GameDateIndex"
                }
            ]
        }
    }

For more information, see `Basic Operations for Tables <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html>`__ in the *Amazon DynamoDB Developer Guide*.

**Example 7: To create a table with Streams enabled**

The following example creates a table called ``GameScores`` with DynamoDB Streams enabled. Both new and old images of each item will be written to the stream. ::

    aws dynamodb create-table \
        --table-name GameScores \
        --attribute-definitions AttributeName=UserId,AttributeType=S AttributeName=GameTitle,AttributeType=S \
        --key-schema AttributeName=UserId,KeyType=HASH AttributeName=GameTitle,KeyType=RANGE \
        --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5 \
        --stream-specification StreamEnabled=TRUE,StreamViewType=NEW_AND_OLD_IMAGES

Output::

    {
        "TableDescription": {
            "AttributeDefinitions": [
                {
                    "AttributeName": "GameTitle",
                    "AttributeType": "S"
                },
                {
                    "AttributeName": "UserId",
                    "AttributeType": "S"
                }
            ],
            "TableName": "GameScores",
            "KeySchema": [
                {
                    "AttributeName": "UserId",
                    "KeyType": "HASH"
                },
                {
                    "AttributeName": "GameTitle",
                    "KeyType": "RANGE"
                }
            ],
            "TableStatus": "CREATING",
            "CreationDateTime": "2020-05-27T10:49:34.056000-07:00",
            "ProvisionedThroughput": {
                "NumberOfDecreasesToday": 0,
                "ReadCapacityUnits": 10,
                "WriteCapacityUnits": 5
            },
            "TableSizeBytes": 0,
            "ItemCount": 0,
            "TableArn": "arn:aws:dynamodb:us-west-2:123456789012:table/GameScores",
            "TableId": "a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
            "StreamSpecification": {
                "StreamEnabled": true,
                "StreamViewType": "NEW_AND_OLD_IMAGES"
            },
            "LatestStreamLabel": "2020-05-27T17:49:34.056",
            "LatestStreamArn": "arn:aws:dynamodb:us-west-2:123456789012:table/GameScores/stream/2020-05-27T17:49:34.056"
        }
    }

For more information, see `Basic Operations for Tables <https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/WorkingWithTables.Basics.html>`__ in the *Amazon DynamoDB Developer Guide*.

Filemanager

Name Type Size Permission Actions
wait Folder 0755
batch-get-item.rst File 1.95 KB 0644
batch-write-item.rst File 2.92 KB 0644
create-backup.rst File 860 B 0755
create-global-table.rst File 1.03 KB 0755
create-table.rst File 22.02 KB 0644
delete-backup.rst File 1.85 KB 0755
delete-item.rst File 2.8 KB 0644
delete-table.rst File 789 B 0644
describe-backup.rst File 1.89 KB 0755
describe-continuous-backups.rst File 745 B 0755
describe-contributor-insights.rst File 1.14 KB 0644
describe-endpoints.rst File 542 B 0755
describe-global-table-settings.rst File 1.55 KB 0755
describe-global-table.rst File 952 B 0755
describe-limits.rst File 576 B 0755
describe-table-replica-auto-scaling.rst File 4.11 KB 0755
describe-table.rst File 1.41 KB 0644
describe-time-to-live.rst File 551 B 0755
get-item.rst File 3.17 KB 0644
list-backups.rst File 7.38 KB 0644
list-contributor-insights.rst File 3.33 KB 0644
list-global-tables.rst File 739 B 0755
list-tables.rst File 2.79 KB 0644
list-tags-of-resource.rst File 2.34 KB 0644
put-item.rst File 2.68 KB 0644
query.rst File 6.88 KB 0644
restore-table-from-backup.rst File 2.17 KB 0755
restore-table-to-point-in-time.rst File 2.05 KB 0755
scan.rst File 1.48 KB 0644
tag-resource.rst File 510 B 0755
transact-get-items.rst File 2.02 KB 0644
transact-write-items.rst File 3.98 KB 0644
untag-resource.rst File 521 B 0755
update-continuous-backups.rst File 908 B 0755
update-contributor-insights.rst File 780 B 0644
update-global-table-settings.rst File 2.15 KB 0755
update-global-table.rst File 1.06 KB 0755
update-item.rst File 3.39 KB 0644
update-table-replica-auto-scaling.rst File 6.29 KB 0755
update-table.rst File 14.27 KB 0644
update-time-to-live.rst File 585 B 0755