private void HandleOutput(UpdateAutonomousContainerDatabaseDataguardAssociationRequest request) { var waiterConfig = new WaiterConfiguration { MaxAttempts = MaxWaitAttempts, GetNextDelayInSeconds = (_) => WaitIntervalSeconds }; switch (ParameterSetName) { case StatusParamSet: response = client.Waiters.ForUpdateAutonomousContainerDatabaseDataguardAssociation(request, waiterConfig, WaitForStatus).Execute(); break; case Default: response = client.UpdateAutonomousContainerDatabaseDataguardAssociation(request).GetAwaiter().GetResult(); break; } WriteOutput(response, response.AutonomousContainerDatabaseDataguardAssociation); }
protected override void ProcessRecord() { base.ProcessRecord(); UpdateAutonomousContainerDatabaseDataguardAssociationRequest request; try { request = new UpdateAutonomousContainerDatabaseDataguardAssociationRequest { AutonomousContainerDatabaseId = AutonomousContainerDatabaseId, AutonomousContainerDatabaseDataguardAssociationId = AutonomousContainerDatabaseDataguardAssociationId, UpdateAutonomousContainerDatabaseDataGuardAssociationDetails = UpdateAutonomousContainerDatabaseDataGuardAssociationDetails, IfMatch = IfMatch, OpcRequestId = OpcRequestId }; HandleOutput(request); FinishProcessing(response); } catch (Exception ex) { TerminatingErrorDuringExecution(ex); } }