private void HandleOutput(ChangeBackupDestinationCompartmentRequest request) { var waiterConfig = new WaiterConfiguration { MaxAttempts = MaxWaitAttempts, GetNextDelayInSeconds = (_) => WaitIntervalSeconds }; switch (ParameterSetName) { case StatusParamSet: response = client.Waiters.ForChangeBackupDestinationCompartment(request, waiterConfig, WaitForStatus).Execute(); break; case Default: response = client.ChangeBackupDestinationCompartment(request).GetAwaiter().GetResult(); break; } WriteOutput(response, CreateWorkRequestObject(response.OpcWorkRequestId)); }
protected override void ProcessRecord() { base.ProcessRecord(); ChangeBackupDestinationCompartmentRequest request; try { request = new ChangeBackupDestinationCompartmentRequest { ChangeCompartmentDetails = ChangeCompartmentDetails, BackupDestinationId = BackupDestinationId, OpcRetryToken = OpcRetryToken, OpcRequestId = OpcRequestId, IfMatch = IfMatch }; HandleOutput(request); FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }