GetTable
Returns the metadata for the specified table and table properties. This includes the list of columns in the table schema, their data types, and column descriptions.
Request Syntax
{
"TableName": "string
",
"TableProperties": {
"string
" : "string
"
}
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- TableName
-
The name of the table.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 1024.
Pattern:
^[\S\s]*$
Required: Yes
- TableProperties
-
TableProperties are additional configurations you can provide to change the data and schema of a table. Each table can have different TableProperties. Tables are not required to have any TableProperties. Each table property has a default value that it assumes if not specified.
Type: String to string map
Key Length Constraints: Minimum length of 0. Maximum length of 1024.
Key Pattern:
^[\S\s]*$
Value Length Constraints: Minimum length of 0. Maximum length of 1024.
Value Pattern:
^[\S\s]*$
Required: No
Response Syntax
{
"Description": "string",
"Schema": [
{
"Description": "string",
"Name": "string",
"Type": "string"
}
],
"TableName": "string",
"TableProperties": {
"string" : "string"
}
}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
- Description
-
The table description.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 1024.
Pattern:
^[\S\s]*$
- Schema
-
The schema of the table.
Type: Array of Column objects
- TableName
-
The name of the table.
Type: String
Length Constraints: Minimum length of 0. Maximum length of 1024.
Pattern:
^[\S\s]*$
- TableProperties
-
TableProperties are additional configurations you can provide to change the data and schema of a table. Each table can have different TableProperties. Tables are not required to have any TableProperties. Each table property has a default value that it assumes if not specified.
Type: String to string map
Key Length Constraints: Minimum length of 0. Maximum length of 1024.
Key Pattern:
^[\S\s]*$
Value Length Constraints: Minimum length of 0. Maximum length of 1024.
Value Pattern:
^[\S\s]*$
Errors
For information about the errors that are common to all actions, see Common Errors.
- InternalServerException
-
An error on the server occurred during the processing of your request. Try again later.
HTTP Status Code: 500
- ThrottlingException
-
The request was denied due to request throttling.
HTTP Status Code: 400
- ValidationException
-
The input fails to satisfy the constraints specified by an AWS service.
HTTP Status Code: 400
Examples
The following is a sample request of the GetTable operation.
This example illustrates one usage of GetTable.
Sample Request
{
"TableName": "COST_AND_USAGE_REPORT",
"TableProperties": {
}
}
The following is a sample response of the GetTable operation.
This example illustrates one usage of GetTable.
Sample Response
{
"Description": "Cost and Usage Report",
"Schema": [
{
"Description": "This field is generated for each line item and is unique in a given partition. This does not guarantee that the field will be unique across an entire delivery (that is, all partitions in an update) of the AWS CUR. The line item ID isn't consistent between different Cost and Usage Reports and can't be used to identify the same line item across different reports.",
"Name": "identity_line_item_id",
"Type": "String"
},
{
"Description": "The time interval that this line item applies to, in the following format: YYYY-MM-DDTHH:mm:ssZ/YYYY-MM-DDTHH:mm:ssZ. The time interval is in UTC and can be either daily or hourly, depending on the granularity of the report.",
"Name": "identity_time_interval",
"Type": "String"
},
{
"Description": "The ID associated with a specific line item. Until the report is final, the InvoiceId is blank.",
"Name": "bill_invoice_id",
"Type": "String"
}
],
"TableName": "COST_AND_USAGE_REPORT",
"TableProperties": {
"INCLUDE_MANUAL_DISCOUNT_COMPATIBILITY": "FALSE",
"INCLUDE_RESOURCES": "FALSE",
"INCLUDE_SPLIT_COST_ALLOCATION_DATA": "FALSE",
"TIME_GRANULARITY": "HOURLY"
}
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: