예제 #1
0
        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);
        }
예제 #2
0
        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);
            }
        }