Amazon.DynamoDBv2.AmazonDynamoDBClient.DescribeTable C# (CSharp) Méthode

DescribeTable() public méthode

Returns information about the table, including the current status of the table, when it was created, the primary key schema, and any indexes on the table.

If you issue a DescribeTable request immediately after a CreateTable request, DynamoDB might return a ResourceNotFoundException. This is because DescribeTable uses an eventually consistent query, and the metadata for your table might not be available at that moment. Wait for a few seconds, and then try the DescribeTable request again.

/// An error occurred on the server side. /// /// The operation tried to access a nonexistent table or index. The resource might not /// be specified correctly, or its status might not be ACTIVE. ///
public DescribeTable ( DescribeTableRequest request ) : DescribeTableResponse
request Amazon.DynamoDBv2.Model.DescribeTableRequest Container for the necessary parameters to execute the DescribeTable service method.
Résultat Amazon.DynamoDBv2.Model.DescribeTableResponse
        public DescribeTableResponse DescribeTable(DescribeTableRequest request)
        {
            var marshaller = new DescribeTableRequestMarshaller();
            var unmarshaller = DescribeTableResponseUnmarshaller.Instance;

            return Invoke<DescribeTableRequest,DescribeTableResponse>(request, marshaller, unmarshaller);
        }

Same methods

AmazonDynamoDBClient::DescribeTable ( string tableName ) : DescribeTableResponse

Usage Example

        private void WaitTillTableDeleted(AmazonDynamoDBClient client, string tableName) {
            Console.Write("Deleting the table: ");
            string status;
            try {
                do {
                    System.Threading.Thread.Sleep(50);

                    var res = client.DescribeTable(new DescribeTableRequest
                    {
                        TableName = tableName
                    });
                    if (res.Table.TableStatus == "DELETING") {
                        Console.Write(".");
                    }
                    else {
                        Console.Write("[{0}]", res.Table.TableStatus);
                    }
                    status = res.Table.TableStatus;
                }
                while (status == "DELETING");
            }
            catch (ResourceNotFoundException) {
                Console.WriteLine(" Done.");
            }
        }
All Usage Examples Of Amazon.DynamoDBv2.AmazonDynamoDBClient::DescribeTable