Esempio n. 1
0
        public void DeviceFarmCreateRemoteAccessSession()
        {
            #region to-create-a-remote-access-session-1470970668274

            var response = client.CreateRemoteAccessSession(new CreateRemoteAccessSessionRequest
            {
                Name          = "MySession",
                Configuration = new CreateRemoteAccessSessionConfiguration {
                    BillingMethod = "METERED"
                },
                DeviceArn  = "arn:aws:devicefarm:us-west-2::device:123EXAMPLE",                       // You can get the device ARN by using the list-devices CLI command.
                ProjectArn = "arn:aws:devicefarm:us-west-2:123456789101:project:EXAMPLE-GUID-123-456" // You can get the project ARN by using the list-projects CLI command.
            });

            RemoteAccessSession remoteAccessSession = response.RemoteAccessSession;

            #endregion
        }
Esempio n. 2
0
 private Amazon.DeviceFarm.Model.CreateRemoteAccessSessionResponse CallAWSServiceOperation(IAmazonDeviceFarm client, Amazon.DeviceFarm.Model.CreateRemoteAccessSessionRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "AWS Device Farm", "CreateRemoteAccessSession");
     try
     {
         #if DESKTOP
         return(client.CreateRemoteAccessSession(request));
         #elif CORECLR
         return(client.CreateRemoteAccessSessionAsync(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;
     }
 }