Download server/providers/aws/dynamodb_api.md from Vishvam10/cloudenv: direct link, hf CLI and curl.
- Browser
- Download file 10.5 kB
-
https://huggingface.co/spaces/Vishvam10/cloudenv/resolve/main/server/providers/aws/dynamodb_api.md
- Command line
-
hf download hf://spaces/Vishvam10/cloudenv/server/providers/aws/dynamodb_api.md
-
curl -L -o dynamodb_api.md https://huggingface.co/spaces/Vishvam10/cloudenv/resolve/main/server/providers/aws/dynamodb_api.md
DynamoDB Service API
Requests use CloudEnvAction: service, operation, and payload (boto3 parameters for the operation).
Operations are enforced by IAM as dynamodb:<OperationName> (see adapter).
Operations
CreateTable
Boto3 client method: create_table
Other boto3 parameters (optional): AttributeDefinitions, BillingMode, DeletionProtectionEnabled, GlobalSecondaryIndexes, GlobalTableSettingsReplicationMode, GlobalTableSourceArn, KeySchema, LocalSecondaryIndexes, OnDemandThroughput, ProvisionedThroughput, ResourcePolicy, SSESpecification, StreamSpecification, TableClass, Tags, WarmThroughput
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "CreateTable",
"payload": {
"TableName": "example-tablearn"
}
}
UpdateTable
Boto3 client method: update_table
Other boto3 parameters (optional): AttributeDefinitions, BillingMode, DeletionProtectionEnabled, GlobalSecondaryIndexUpdates, GlobalTableSettingsReplicationMode, GlobalTableWitnessUpdates, MultiRegionConsistency, OnDemandThroughput, ProvisionedThroughput, ReplicaUpdates, SSESpecification, StreamSpecification, TableClass, WarmThroughput
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "UpdateTable",
"payload": {
"TableName": "example-tablearn"
}
}
DeleteTable
Boto3 client method: delete_table
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "DeleteTable",
"payload": {
"TableName": "example-tablearn"
}
}
DescribeTable
Boto3 client method: describe_table
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "DescribeTable",
"payload": {
"TableName": "example-tablearn"
}
}
ListTables
Boto3 client method: list_tables
Other boto3 parameters (optional): ExclusiveStartTableName, Limit
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "ListTables",
"payload": {}
}
PutItem
Boto3 client method: put_item
Other boto3 parameters (optional): ConditionExpression, ConditionalOperator, Expected, ExpressionAttributeNames, ExpressionAttributeValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ReturnValues, ReturnValuesOnConditionCheckFailure
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "PutItem",
"payload": {
"TableName": "example-tablearn",
"Item": {
"exampleKey": {}
}
}
}
GetItem
Boto3 client method: get_item
Other boto3 parameters (optional): AttributesToGet, ConsistentRead, ExpressionAttributeNames, ProjectionExpression, ReturnConsumedCapacity
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "GetItem",
"payload": {
"TableName": "example-tablearn",
"Key": {
"exampleKey": {}
}
}
}
DeleteItem
Boto3 client method: delete_item
Other boto3 parameters (optional): ConditionExpression, ConditionalOperator, Expected, ExpressionAttributeNames, ExpressionAttributeValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ReturnValues, ReturnValuesOnConditionCheckFailure
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "DeleteItem",
"payload": {
"TableName": "example-tablearn",
"Key": {
"exampleKey": {}
}
}
}
UpdateItem
Boto3 client method: update_item
Other boto3 parameters (optional): AttributeUpdates, ConditionExpression, ConditionalOperator, Expected, ExpressionAttributeNames, ExpressionAttributeValues, ReturnConsumedCapacity, ReturnItemCollectionMetrics, ReturnValues, ReturnValuesOnConditionCheckFailure, UpdateExpression
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "UpdateItem",
"payload": {
"TableName": "example-tablearn",
"Key": {
"exampleKey": {}
}
}
}
Query
Boto3 client method: query
Other boto3 parameters (optional): AttributesToGet, ConditionalOperator, ConsistentRead, ExclusiveStartKey, ExpressionAttributeNames, ExpressionAttributeValues, FilterExpression, IndexName, KeyConditionExpression, KeyConditions, Limit, ProjectionExpression, QueryFilter, ReturnConsumedCapacity, ScanIndexForward, Select
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "Query",
"payload": {
"TableName": "example-tablearn"
}
}
Scan
Boto3 client method: scan
Other boto3 parameters (optional): AttributesToGet, ConditionalOperator, ConsistentRead, ExclusiveStartKey, ExpressionAttributeNames, ExpressionAttributeValues, FilterExpression, IndexName, Limit, ProjectionExpression, ReturnConsumedCapacity, ScanFilter, Segment, Select, TotalSegments
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "Scan",
"payload": {
"TableName": "example-tablearn"
}
}
BatchWriteItem
Boto3 client method: batch_write_item
Other boto3 parameters (optional): ReturnConsumedCapacity, ReturnItemCollectionMetrics
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "BatchWriteItem",
"payload": {
"RequestItems": {
"exampleKey": [
{}
]
}
}
}
BatchGetItem
Boto3 client method: batch_get_item
Other boto3 parameters (optional): ReturnConsumedCapacity
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "BatchGetItem",
"payload": {
"RequestItems": {
"exampleKey": {
"Keys": [
{
"exampleKey": {}
}
]
}
}
}
}
TransactWriteItems
Boto3 client method: transact_write_items
Other boto3 parameters (optional): ClientRequestToken, ReturnConsumedCapacity, ReturnItemCollectionMetrics
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "TransactWriteItems",
"payload": {
"TransactItems": [
{}
]
}
}
TransactGetItems
Boto3 client method: transact_get_items
Other boto3 parameters (optional): ReturnConsumedCapacity
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "TransactGetItems",
"payload": {
"TransactItems": [
{
"Get": {
"Key": {
"exampleKey": {}
},
"TableName": "example-tablearn"
}
}
]
}
}
DescribeTimeToLive
Boto3 client method: describe_time_to_live
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "DescribeTimeToLive",
"payload": {
"TableName": "example-tablearn"
}
}
UpdateTimeToLive
Boto3 client method: update_time_to_live
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "UpdateTimeToLive",
"payload": {
"TableName": "example-tablearn",
"TimeToLiveSpecification": {
"Enabled": false,
"AttributeName": "example-timetoliveattributename"
}
}
}
DescribeContinuousBackups
Boto3 client method: describe_continuous_backups
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "DescribeContinuousBackups",
"payload": {
"TableName": "example-tablearn"
}
}
UpdateContinuousBackups
Boto3 client method: update_continuous_backups
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "UpdateContinuousBackups",
"payload": {
"TableName": "example-tablearn",
"PointInTimeRecoverySpecification": {
"PointInTimeRecoveryEnabled": false
}
}
}
DescribeEndpoints
Boto3 client method: describe_endpoints
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "DescribeEndpoints",
"payload": {}
}
TagResource
Boto3 client method: tag_resource
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "TagResource",
"payload": {
"ResourceArn": "example-resourcearnstring",
"Tags": [
{
"Key": "example-tagkeystring",
"Value": "example-tagvaluestring"
}
]
}
}
UntagResource
Boto3 client method: untag_resource
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "UntagResource",
"payload": {
"ResourceArn": "example-resourcearnstring",
"TagKeys": [
"example-tagkeystring"
]
}
}
ListTagsOfResource
Boto3 client method: list_tags_of_resource
Other boto3 parameters (optional): NextToken
curl -X POST http://localhost:8000/step \
-H "Content-Type: application/json" \
-d @- <<'EOF'
{
"service": "dynamodb",
"operation": "ListTagsOfResource",
"payload": {
"ResourceArn": "example-resourcearnstring"
}
}