update_api_key
async
¶
update_api_key(
api_id: String,
id: String,
*,
config_overrides: Optional[AsyncAppSyncClientConfig] = None,
description: Optional[String] = None,
expires: Optional[Long] = None,
) -> UpdateApiKeyResponse
Updates an API key. You can update the key as long as it's not deleted.
Parameters:
-
api_id(String) –The ID for the GraphQL API.
-
id(String) –The API key ID.
-
description(Optional[String], default:None) –A description of the purpose of the API key.
-
expires(Optional[Long], default:None) –From the update time, the time after which the API key expires. The date is represented as seconds since the epoch. For more information, see .
Raises:
-
ApiKeyValidityOutOfBoundsException–The API key expiration must be set to a value between 1 and 365 days from creation (for
CreateApiKey) or from update (forUpdateApiKey). -
BadRequestException–The request is not well formed. For example, a value is invalid or a required field is missing. Check the field values, and then try again.
-
InternalFailureException–An internal AppSync error occurred. Try your request again.
-
LimitExceededException–The request exceeded a limit. Try your request again.
-
NotFoundException–The resource specified in the request was not found. Check the resource, and then try again.
-
UnauthorizedException–You aren't authorized to perform this operation.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_appsync/_services/async_app_sync.py
4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 | |