protected override void ProcessRecord()
 {
     base.ProcessRecord();
     client?.Dispose();
     client = new CloudGuardClient(AuthProvider, new Oci.Common.ClientConfiguration
     {
         RetryConfiguration = retryConfig,
         TimeoutMillis      = TimeOutInMillis,
         ClientUserAgent    = PSUserAgent
     });
     try
     {
         string region = GetPreferredRegion();
         if (region != null)
         {
             WriteDebug("Choosing Region:" + region);
             client.SetRegion(region);
         }
         if (Endpoint != null)
         {
             WriteDebug("Choosing Endpoint:" + Endpoint);
             client.SetEndpoint(Endpoint);
         }
     }
     catch (Exception ex)
     {
         TerminatingErrorDuringExecution(ex);
     }
 }
示例#2
0
 public CloudGuardWaiters(CloudGuardClient client)
 {
     this.client = client;
 }