private void HandleOutput(UpdateAutonomousDatabaseRequest request) { var waiterConfig = new WaiterConfiguration { MaxAttempts = MaxWaitAttempts, GetNextDelayInSeconds = (_) => WaitIntervalSeconds }; switch (ParameterSetName) { case StatusParamSet: response = client.Waiters.ForUpdateAutonomousDatabase(request, waiterConfig, WaitForStatus).Execute(); break; case Default: response = client.UpdateAutonomousDatabase(request).GetAwaiter().GetResult(); break; } WriteOutput(response, response.AutonomousDatabase); }
protected override void ProcessRecord() { base.ProcessRecord(); UpdateAutonomousDatabaseRequest request; try { request = new UpdateAutonomousDatabaseRequest { AutonomousDatabaseId = AutonomousDatabaseId, UpdateAutonomousDatabaseDetails = UpdateAutonomousDatabaseDetails, IfMatch = IfMatch, OpcRequestId = OpcRequestId }; HandleOutput(request); FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }