create_table
async
¶
create_table(
table_bucket_arn: TableBucketARN,
namespace: NamespaceName,
name: TableName,
format: OpenTableFormat,
*,
config_overrides: Optional[AsyncS3TablesClientConfig] = 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 failed because there is a conflict with a previous 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/async_s3_tables.py
2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 | |