Enables the HTTP endpoint for the DB cluster. By default, the HTTP endpoint isn't enabled.
When enabled, this endpoint provides a connectionless web service API (RDS Data API) for running SQL queries on the Aurora DB cluster. You can also query your database from inside the RDS console with the RDS query editor.
For more information, see Using RDS Data API in the Amazon Aurora User Guide.
This operation applies only to Aurora Serverless v2 and provisioned DB clusters. To enable the HTTP endpoint for Aurora Serverless v1 DB clusters, use the EnableHttpEndpoint parameter of the ModifyDBCluster operation.
Parameters:
-
resource_arn
(Optional[String], default:
None
)
–
The Amazon Resource Name (ARN) of the DB cluster.
Raises:
Source code in docs_src/capo_rds/_services/async_rds.py
| async def enable_http_endpoint(
self,
*,
config_overrides: Optional[AsyncRDSClientConfig] = None,
resource_arn: Optional["capo_rds.types.string.String"] = None,
) -> "capo_rds.types.enable_http_endpoint_response.EnableHttpEndpointResponse":
"""<p>Enables the HTTP endpoint for the DB cluster. By default, the HTTP endpoint isn't enabled.</p> <p>When enabled, this endpoint provides a connectionless web service API (RDS Data API) for running SQL queries on the Aurora DB cluster. You can also query your database from inside the RDS console with the RDS query editor.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using RDS Data API</a> in the <i>Amazon Aurora User Guide</i>.</p> <note> <p>This operation applies only to Aurora Serverless v2 and provisioned DB clusters. To enable the HTTP endpoint for Aurora Serverless v1 DB clusters, use the <code>EnableHttpEndpoint</code> parameter of the <code>ModifyDBCluster</code> operation.</p> </note>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the DB cluster.</p>
Raises:
capo_rds.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The operation can't be performed because another operation is in progress.</p>
capo_rds.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The specified resource ID was not found.</p>
capo_rds.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_rds.types.enable_http_endpoint_request.EnableHttpEndpointRequest]",
) -> AsyncOperationResponse[
"capo_rds.types.enable_http_endpoint_response.EnableHttpEndpointResponse"
]:
import capo_rds._operations.amazon_rd_sv19.enable_http_endpoint
(
output,
http_response,
) = await capo_rds._operations.amazon_rd_sv19.enable_http_endpoint.async_enable_http_endpoint(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("EnableHttpEndpoint")
)
input_: capo_rds.types.enable_http_endpoint_request.EnableHttpEndpointRequest = {}
if resource_arn is not None:
input_["resource_arn"] = resource_arn
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|