update_public_dns_namespace
async
¶
update_public_dns_namespace(
id: Arn,
namespace: PublicDnsNamespaceChange,
*,
config_overrides: Optional[AsyncServiceDiscoveryClientConfig] = None,
updater_request_id: Optional[ResourceId] = None,
) -> UpdatePublicDnsNamespaceResponse
Updates a public DNS namespace.
Parameters:
-
id(Arn) –The ID or Amazon Resource Name (ARN) of the namespace being updated.
-
updater_request_id(Optional[ResourceId], default:None) –A unique string that identifies the request and that allows failed
UpdatePublicDnsNamespacerequests to be retried without the risk of running the operation twice.UpdaterRequestIdcan be any unique string (for example, a date/timestamp). -
namespace(PublicDnsNamespaceChange) –Updated properties for the public DNS namespace.
Raises:
-
DuplicateRequest–The operation is already in progress.
-
InvalidInput–One or more specified values aren't valid. For example, a required value might be missing, a numeric value might be outside the allowed range, or a string value might exceed length constraints.
-
NamespaceNotFound–No namespace exists with the specified ID.
-
ResourceInUse–The specified resource can't be deleted because it contains other resources. For example, you can't delete a service that contains any instances.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update a public DNS namespace The following example updates the description of a public DNS namespace.
>>> await client.update_public_dns_namespace(id='ns-bk3aEXAMPLE', updater_request_id='', namespace={'Description': 'The updated namespace description.'})
Update public DNS namespace using namespace ARN for shared namespace
This example updates a public DNS namespace using a namespace ARN instead of namespace ID.
>>> await client.update_public_dns_namespace(id='arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-bk3aexample', namespace={'Description': 'Updated description for shared public DNS namespace.'})
Source code in docs_src/capo_servicediscovery/_services/async_service_discovery.py
2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 | |