Skip to content

delete_table

Operation

delete_table

delete_table(request: DeleteTableInput | DeleteTableInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteTableInputDict]) -> DeleteTableOutput

The DeleteTable operation deletes a table and all of its items. After a DeleteTable request, the specified table is in the DELETING state until DynamoDB completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException. If the specified table does not exist, DynamoDB returns a ResourceNotFoundException. If table is already in the DELETING state, no error is returned.

Note

DynamoDB might continue to accept data read and write operations, such as GetItem and PutItem, on a table in the DELETING state until the table deletion is complete. For the full list of table states, see TableStatus.

When you delete a table, any indexes on that table are also deleted.

If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes into the DISABLED state, and the stream is automatically deleted after 24 hours.

Use the DescribeTable action to check the status of the table.

Parameters:

Name Type Description Default
request DeleteTableInput | DeleteTableInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DeleteTableInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteTableOutput

An instance of DeleteTableOutput.

delete_table async

delete_table(request: DeleteTableInput | DeleteTableInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[DeleteTableInputDict]) -> DeleteTableOutput

The DeleteTable operation deletes a table and all of its items. After a DeleteTable request, the specified table is in the DELETING state until DynamoDB completes the deletion. If the table is in the ACTIVE state, you can delete it. If a table is in CREATING or UPDATING states, then DynamoDB returns a ResourceInUseException. If the specified table does not exist, DynamoDB returns a ResourceNotFoundException. If table is already in the DELETING state, no error is returned.

Note

DynamoDB might continue to accept data read and write operations, such as GetItem and PutItem, on a table in the DELETING state until the table deletion is complete. For the full list of table states, see TableStatus.

When you delete a table, any indexes on that table are also deleted.

If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes into the DISABLED state, and the stream is automatically deleted after 24 hours.

Use the DescribeTable action to check the status of the table.

Parameters:

Name Type Description Default
request DeleteTableInput | DeleteTableInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[DeleteTableInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
DeleteTableOutput

An instance of DeleteTableOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

DeleteTableInputDict

Bases: TypedDict

Dictionary form of DeleteTableInput.

Attributes

table_name instance-attribute
table_name: Required[str]

The name of the table to delete. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

DeleteTableInput dataclass

Bases: _SerdeShape

Represents the input of a DeleteTable operation.

Attributes

table_name class-attribute instance-attribute
table_name: str | None = ...

The name of the table to delete. You can also provide the Amazon Resource Name (ARN) of the table in this parameter.

Output

DeleteTableOutput dataclass

Bases: _SerdeShape

Represents the output of a DeleteTable operation.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

table_description class-attribute instance-attribute
table_description: TableDescription | None = ...

Represents the properties of a table.