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:
>>> await client.check_dns_availability(cname_prefix='my-cname')
Source code in docs_src/capo_elastic_beanstalk/_services/async_elastic_beanstalk.py
| async def check_dns_availability(
self,
cname_prefix: "capo_elastic_beanstalk.types.dns_cname_prefix.DNSCnamePrefix",
*,
config_overrides: Optional[AsyncElasticBeanstalkClientConfig] = 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:
>>> await client.check_dns_availability(cname_prefix='my-cname')
"""
async def _handler(
req: "AsyncOperationRequest[capo_elastic_beanstalk.types.check_dns_availability_message.CheckDNSAvailabilityMessage]",
) -> AsyncOperationResponse[
"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,
) = await capo_elastic_beanstalk._operations.aws_elastic_beanstalk_service.check_dns_availability.async_check_dns_availability(
req.options, req.input
)
return AsyncOperationResponse(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 = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|