private void HandleOutput(UpdateDataGuardAssociationRequest request) { var waiterConfig = new WaiterConfiguration { MaxAttempts = MaxWaitAttempts, GetNextDelayInSeconds = (_) => WaitIntervalSeconds }; switch (ParameterSetName) { case StatusParamSet: response = client.Waiters.ForUpdateDataGuardAssociation(request, waiterConfig, WaitForStatus).Execute(); break; case Default: response = client.UpdateDataGuardAssociation(request).GetAwaiter().GetResult(); break; } WriteOutput(response, response.DataGuardAssociation); }
protected override void ProcessRecord() { base.ProcessRecord(); UpdateDataGuardAssociationRequest request; try { request = new UpdateDataGuardAssociationRequest { DatabaseId = DatabaseId, DataGuardAssociationId = DataGuardAssociationId, UpdateDataGuardAssociationDetails = UpdateDataGuardAssociationDetails, IfMatch = IfMatch, OpcRequestId = OpcRequestId }; HandleOutput(request); FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }