protected override void ProcessRecord() { base.ProcessRecord(); Client = CreateClient(_CurrentCredentials, _RegionEndpoint); }
private Amazon.KinesisVideoMedia.Model.GetMediaResponse CallAWSServiceOperation(IAmazonKinesisVideoMedia client, Amazon.KinesisVideoMedia.Model.GetMediaRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Kinesis Video Streams Media", "GetMedia"); try { #if DESKTOP return(client.GetMedia(request)); #elif CORECLR return(client.GetMediaAsync(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; } }