Enables system tables for the current account. System tables are enabled or disabled for the entire account: creating this configuration enables them. If a configuration already exists, use UpdateSystemTableConfiguration to update it.
Parameters:
-
client_request_token
(Optional[IdempotencyToken], default:
None
)
–
A unique case-sensitive string used to ensure the request to create the system table configuration is idempotent (executes only once). If another CreateSystemTableConfiguration request is received with the same client token but different parameters, the request fails with an InvalidRequestException.
-
table_name
(SystemTableName)
–
The system table configuration to create. The only accepted value is ALL, the reserved keyword that enables all system tables for the account.
-
kms_key_arn
(Optional[KmsKeyArn], default:
None
)
–
The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to use for encrypting the system table data.
-
tags
(Optional[TagList], default:
None
)
–
The tags to add to the system table configuration.
Raises:
Source code in docs_src/capo_athena/_services/athena.py
| def create_system_table_configuration(
self,
table_name: "capo_athena.types.system_table_name.SystemTableName",
*,
config_overrides: Optional[AthenaClientConfig] = None,
client_request_token: Optional[
"capo_athena.types.idempotency_token.IdempotencyToken"
] = None,
kms_key_arn: Optional["capo_athena.types.kms_key_arn.KmsKeyArn"] = None,
tags: Optional["capo_athena.types.tag_list.TagList"] = None,
) -> "capo_athena.types.create_system_table_configuration_output.CreateSystemTableConfigurationOutput":
"""<p>Enables system tables for the current account. System tables are enabled or disabled for the entire account: creating this configuration enables them. If a configuration already exists, use <a>UpdateSystemTableConfiguration</a> to update it.</p>
Args:
client_request_token: <p>A unique case-sensitive string used to ensure the request to create the system table configuration is idempotent (executes only once). If another <code>CreateSystemTableConfiguration</code> request is received with the same client token but different parameters, the request fails with an <code>InvalidRequestException</code>.</p>
table_name: <p>The system table configuration to create. The only accepted value is <code>ALL</code>, the reserved keyword that enables all system tables for the account.</p>
kms_key_arn: <p>The Amazon Resource Name (ARN) of the Key Management Service (KMS) key to use for encrypting the system table data.</p>
tags: <p>The tags to add to the system table configuration.</p>
Raises:
capo_athena.errors.internal_server_exception.InternalServerException: <p>Indicates a platform issue, which may be due to a transient condition or outage.</p>
capo_athena.errors.invalid_request_exception.InvalidRequestException: <p>Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.</p>
capo_athena.errors.too_many_requests_exception.TooManyRequestsException: <p>Indicates that the request was throttled.</p>
capo_athena.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_athena.types.create_system_table_configuration_input.CreateSystemTableConfigurationInput]",
) -> OperationResponse[
"capo_athena.types.create_system_table_configuration_output.CreateSystemTableConfigurationOutput"
]:
import capo_athena._operations.amazon_athena.create_system_table_configuration
output, http_response = (
capo_athena._operations.amazon_athena.create_system_table_configuration.create_system_table_configuration(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateSystemTableConfiguration")
)
input_: capo_athena.types.create_system_table_configuration_input.CreateSystemTableConfigurationInput = {
"table_name": table_name
}
if client_request_token is None:
client_request_token = str(uuid.uuid4())
input_["client_request_token"] = client_request_token
if kms_key_arn is not None:
input_["kms_key_arn"] = kms_key_arn
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|