Updates the features configuration for a hosted zone. This operation allows you to enable or disable specific features for your hosted zone, such as accelerated recovery.
Accelerated recovery enables you to update DNS records in your public hosted zone even when the us-east-1 region is unavailable.
Parameters:
-
hosted_zone_id
(ResourceId)
–
The ID of the hosted zone for which you want to update features. This is the unique identifier for your hosted zone.
-
enable_accelerated_recovery
(Optional[AcceleratedRecoveryEnabled], default:
None
)
–
Specifies whether to enable accelerated recovery for the hosted zone. Set to true to enable accelerated recovery, or false to disable it.
Raises:
-
InvalidInput
–
-
LimitsExceeded
–
This operation can't be completed because the current account has reached the limit on the resource you are trying to create. To request a higher limit, create a case with the Amazon Web Services Support Center.
-
NoSuchHostedZone
–
No hosted zone exists with the ID that you specified.
-
PriorRequestNotComplete
–
If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an HTTP 400 error (Bad request). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_route_53/_services/route53.py
| def update_hosted_zone_features(
self,
hosted_zone_id: "capo_route_53.types.resource_id.ResourceId",
*,
config_overrides: Optional[Route53ClientConfig] = None,
enable_accelerated_recovery: Optional[
"capo_route_53.types.accelerated_recovery_enabled.AcceleratedRecoveryEnabled"
] = None,
) -> "capo_route_53.types.update_hosted_zone_features_response.UpdateHostedZoneFeaturesResponse":
"""<p>Updates the features configuration for a hosted zone. This operation allows you to enable or disable specific features for your hosted zone, such as accelerated recovery.</p> <p>Accelerated recovery enables you to update DNS records in your public hosted zone even when the us-east-1 region is unavailable.</p>
Args:
hosted_zone_id: <p>The ID of the hosted zone for which you want to update features. This is the unique identifier for your hosted zone.</p>
enable_accelerated_recovery: <p>Specifies whether to enable accelerated recovery for the hosted zone. Set to <code>true</code> to enable accelerated recovery, or <code>false</code> to disable it.</p>
Raises:
capo_route_53.errors.invalid_input.InvalidInput: <p>The input is not valid.</p>
capo_route_53.errors.limits_exceeded.LimitsExceeded: <p>This operation can't be completed because the current account has reached the limit on the resource you are trying to create. To request a higher limit, <a href="http://aws.amazon.com/route53-request">create a case</a> with the Amazon Web Services Support Center.</p>
capo_route_53.errors.no_such_hosted_zone.NoSuchHostedZone: <p>No hosted zone exists with the ID that you specified.</p>
capo_route_53.errors.prior_request_not_complete.PriorRequestNotComplete: <p>If Amazon Route 53 can't process a request before the next request arrives, it will reject subsequent requests for the same hosted zone and return an <code>HTTP 400 error</code> (<code>Bad request</code>). If Route 53 returns this error repeatedly for the same request, we recommend that you wait, in intervals of increasing duration, before you try the request again.</p>
capo_route_53.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_route_53.types.update_hosted_zone_features_request.UpdateHostedZoneFeaturesRequest]",
) -> OperationResponse[
"capo_route_53.types.update_hosted_zone_features_response.UpdateHostedZoneFeaturesResponse"
]:
import capo_route_53._operations.aws_dns_v20130401.update_hosted_zone_features
output, http_response = (
capo_route_53._operations.aws_dns_v20130401.update_hosted_zone_features.update_hosted_zone_features(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateHostedZoneFeatures")
)
input_: capo_route_53.types.update_hosted_zone_features_request.UpdateHostedZoneFeaturesRequest = {
"hosted_zone_id": hosted_zone_id
}
if enable_accelerated_recovery is not None:
input_["enable_accelerated_recovery"] = enable_accelerated_recovery
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|