update_http_namespace
async
¶
update_http_namespace(
id: Arn,
namespace: HttpNamespaceChange,
*,
config_overrides: Optional[AsyncServiceDiscoveryClientConfig] = None,
updater_request_id: Optional[ResourceId] = None,
) -> UpdateHttpNamespaceResponse
Updates an HTTP namespace.
Parameters:
-
id(Arn) –The ID or Amazon Resource Name (ARN) of the namespace that you want to update.
-
updater_request_id(Optional[ResourceId], default:None) –A unique string that identifies the request and that allows failed
UpdateHttpNamespacerequests to be retried without the risk of running the operation twice.UpdaterRequestIdcan be any unique string (for example, a date/timestamp). -
namespace(HttpNamespaceChange) –Updated properties for the the HTTP 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 HTTP namespace The following example updates the description of a HTTP namespace.
>>> await client.update_http_namespace(id='ns-vh4nbmEXAMPLE', namespace={'Description': 'The updated namespace description.'})
Update HTTP namespace using namespace ARN for shared namespace
This example updates an HTTP namespace using a namespace ARN instead of namespace ID.
>>> await client.update_http_namespace(id='arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-vh4nbmexample', namespace={'Description': 'Updated description for shared HTTP namespace.'})
Source code in docs_src/capo_servicediscovery/_services/async_service_discovery.py
2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 | |