update_key
¶
update_key(
key_name: ResourceName,
*,
config_overrides: Optional[LocationClientConfig] = None,
description: Optional[ResourceDescription] = None,
expire_time: Optional[Timestamp] = None,
no_expiry: Optional[bool] = None,
force_update: Optional[bool] = None,
restrictions: Optional[ApiKeyRestrictions] = None,
) -> UpdateKeyResponse
Updates the specified properties of a given API key resource.
Parameters:
-
key_name(ResourceName) –The name of the API key resource to update.
-
description(Optional[ResourceDescription], default:None) –Updates the description for the API key resource.
-
expire_time(Optional[Timestamp], default:None) –Updates the timestamp for when the API key resource will expire in ISO 8601 format:
YYYY-MM-DDThh:mm:ss.sssZ. -
no_expiry(Optional[bool], default:None) –Whether the API key should expire. Set to
trueto set the API key to have no expiration time. -
force_update(Optional[bool], default:None) –The boolean flag to be included for updating
ExpireTimeorRestrictionsdetails.Must be set to
trueto update an API key resource that has been used in the past 7 days.Falseif force update is not preferredDefault value:
False -
restrictions(Optional[ApiKeyRestrictions], default:None) –Updates the API key restrictions for the API key resource.
Raises:
-
AccessDeniedException–The request was denied because of insufficient access or permissions. Check with an administrator to verify your permissions.
-
InternalServerException–The request has failed to process because of an unknown server error, exception, or failure.
-
ResourceNotFoundException–The resource that you've entered was not found in your AWS account.
-
ThrottlingException–The request was denied because of request throttling.
-
ValidationException–The input failed to meet the constraints specified by the AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_location/_services/location.py
506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | |