private async Task <CreateUsagePlanKeyResponse> CreateUsagePlanKey(string keyId, string usagePlanId)
 {
     return(await _amazonApiGatewayClient.CreateUsagePlanKeyAsync(new CreateUsagePlanKeyRequest
     {
         KeyId = keyId,
         KeyType = "API_KEY",
         UsagePlanId = usagePlanId
     }));
 }
 private Amazon.APIGateway.Model.CreateUsagePlanKeyResponse CallAWSServiceOperation(IAmazonAPIGateway client, Amazon.APIGateway.Model.CreateUsagePlanKeyRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon API Gateway", "CreateUsagePlanKey");
     try
     {
         #if DESKTOP
         return(client.CreateUsagePlanKey(request));
         #elif CORECLR
         return(client.CreateUsagePlanKeyAsync(request).GetAwaiter().GetResult());
         #else
                 #error "Unknown build edition"
         #endif
     }
     catch (AmazonServiceException exc)
     {
         var webException = exc.InnerException as System.Net.WebException;
         if (webException != null)
         {
             throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException);
         }
         throw;
     }
 }