update_private_dns_namespace
async
¶
update_private_dns_namespace(
id: Arn,
namespace: PrivateDnsNamespaceChange,
*,
config_overrides: Optional[AsyncServiceDiscoveryClientConfig] = None,
updater_request_id: Optional[ResourceId] = None,
) -> UpdatePrivateDnsNamespaceResponse
Updates a private DNS 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
UpdatePrivateDnsNamespacerequests to be retried without the risk of running the operation twice.UpdaterRequestIdcan be any unique string (for example, a date/timestamp). -
namespace(PrivateDnsNamespaceChange) –Updated properties for the private 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 private DNS namespace The following example updates the description of a private DNS namespace.
>>> await client.update_private_dns_namespace(id='ns-bk3aEXAMPLE', updater_request_id='', namespace={'Description': 'The updated namespace description.'})
Update private DNS namespace using namespace ARN for shared namespace
This example updates a private DNS namespace using a namespace ARN instead of namespace ID.
>>> await client.update_private_dns_namespace(id='arn:aws:servicediscovery:us-west-2:123456789012:namespace/ns-bk3aexample', namespace={'Description': 'Updated description for shared private DNS namespace.'})
Source code in docs_src/capo_servicediscovery/_services/async_service_discovery.py
2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 | |