Checks if the specified CNAME is available.
Parameters:
-
cname_prefix
(DNSCnamePrefix)
–
The prefix used when this CNAME is reserved.
Raises:
Examples:
To check the availability of a CNAME
The following operation checks the availability of the subdomain my-cname:
>>> client.check_dns_availability(cname_prefix='my-cname')
Source code in docs_src/capo_elastic_beanstalk/_services/elastic_beanstalk.py
| def check_dns_availability(
self,
cname_prefix: "capo_elastic_beanstalk.types.dns_cname_prefix.DNSCnamePrefix",
*,
config_overrides: Optional[ElasticBeanstalkClientConfig] = None,
) -> "capo_elastic_beanstalk.types.check_dns_availability_result_message.CheckDNSAvailabilityResultMessage":
"""<p>Checks if the specified CNAME is available.</p>
Args:
cname_prefix: <p>The prefix used when this CNAME is reserved.</p>
Raises:
capo_elastic_beanstalk.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To check the availability of a CNAME
The following operation checks the availability of the subdomain my-cname:
>>> client.check_dns_availability(cname_prefix='my-cname')
"""
def _handler(
req: "OperationRequest[capo_elastic_beanstalk.types.check_dns_availability_message.CheckDNSAvailabilityMessage]",
) -> OperationResponse[
"capo_elastic_beanstalk.types.check_dns_availability_result_message.CheckDNSAvailabilityResultMessage"
]:
import capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.check_dns_availability
output, http_response = (
capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.check_dns_availability.check_dns_availability(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CheckDNSAvailability")
)
input_: capo_elastic_beanstalk.types.check_dns_availability_message.CheckDNSAvailabilityMessage = {
"cname_prefix": cname_prefix
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|