update_api_key
¶
update_api_key(
api_id: String,
id: String,
*,
config_overrides: Optional[AppSyncClientConfig] = 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.