create_table
¶
create_table(
table_bucket_arn: TableBucketARN,
namespace: NamespaceName,
name: TableName,
format: OpenTableFormat,
*,
config_overrides: Optional[S3TablesClientConfig] = None,
metadata: Optional[TableMetadata] = None,
encryption_configuration: Optional[EncryptionConfiguration] = None,
storage_class_configuration: Optional[StorageClassConfiguration] = None,
tags: Optional[Tags] = None,
) -> CreateTableResponse
Creates a new table associated with the given namespace in a table bucket. For more information, see Creating an Amazon S3 table in the Amazon Simple Storage Service User Guide.
- Permissions
-
-
You must have the
s3tables:CreateTablepermission to use this operation. -
If you use this operation with the optional
metadatarequest parameter you must have thes3tables:PutTableDatapermission. -
If you use this operation with the optional
encryptionConfigurationrequest parameter you must have thes3tables:PutTableEncryptionpermission. -
If you use this operation with the
storageClassConfigurationrequest parameter, you must have thes3tables:PutTableStorageClasspermission. -
To create a table with tags, you must have the
s3tables:TagResourcepermission in addition tos3tables:CreateTablepermission.
Additionally, If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see Permissions requirements for S3 Tables SSE-KMS encryption.
-
Parameters:
-
table_bucket_arn(TableBucketARN) –The Amazon Resource Name (ARN) of the table bucket to create the table in.
-
namespace(NamespaceName) –The namespace to associated with the table.
-
name(TableName) –The name for the table.
-
format(OpenTableFormat) –The format for the table.
-
metadata(Optional[TableMetadata], default:None) –The metadata for the table.
-
encryption_configuration(Optional[EncryptionConfiguration], default:None) –The encryption configuration to use for the table. This configuration specifies the encryption algorithm and, if using SSE-KMS, the KMS key to use for encrypting the table.
If you choose SSE-KMS encryption you must grant the S3 Tables maintenance principal access to your KMS key. For more information, see Permissions requirements for S3 Tables SSE-KMS encryption.
-
storage_class_configuration(Optional[StorageClassConfiguration], default:None) –The storage class configuration for the table. If not specified, the table inherits the storage class configuration from its table bucket. Specify this parameter to override the bucket's default storage class for this table.
-
tags(Optional[Tags], default:None) –A map of user-defined tags that you would like to apply to the table that you are creating. A tag is a key-value pair that you apply to your resources. Tags can help you organize, track costs for, and control access to resources. For more information, see Tagging for cost allocation or attribute-based access control (ABAC).
You must have the
s3tables:TagResourcepermission in addition tos3tables:CreateTablepermission to create a table with tags.
Raises:
-
BadRequestException–The request is invalid or malformed.
-
ConflictException–The request conflicts with the resource's current state, such as a previous write, an existing table, or a migration that's in progress or already in the requested state. If the conflict is with a concurrent write, you can retry the request.
-
ForbiddenException–The caller isn't authorized to make the request.
-
InternalServerErrorException–The request failed due to an internal server error.
-
NotFoundException–The request was rejected because the specified resource could not be found.
-
TooManyRequestsException–The limit on the number of requests per second was exceeded.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_s3tables/_services/s3_tables.py
2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 | |