有没有办法检查 SWF 中是否存在域名,而不是迭代整个域 list ?
最佳答案
如果您无论如何都要注册该域名,您可以尝试调用 registerDomain()并捕获 DomainAlreadyExistsException :
Returned if the specified domain already exists. You will get this fault even if the existing domain is in deprecated status.
显然,如果域尚不存在,这会对实际注册域产生副作用;)
否则 describeDomain()应该允许类似的方法,只要它会抛出 UnknownResourceException如果域不存在:
Returned when the named resource cannot be found with in the scope of this operation (region or domain). This could happen if the named resource was never created or is no longer available for this operation. [emphasis mine]
关于amazon-web-services - 如何检查 SWF 中是否已存在域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10009638/