Exemple #1
0
        private void HandleOutput(DisableExternalContainerDatabaseDatabaseManagementRequest request)
        {
            var waiterConfig = new WaiterConfiguration
            {
                MaxAttempts           = MaxWaitAttempts,
                GetNextDelayInSeconds = (_) => WaitIntervalSeconds
            };

            switch (ParameterSetName)
            {
            case StatusParamSet:
                response = client.Waiters.ForDisableExternalContainerDatabaseDatabaseManagement(request, waiterConfig, WaitForStatus).Execute();
                break;

            case Default:
                response = client.DisableExternalContainerDatabaseDatabaseManagement(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, CreateWorkRequestObject(response.OpcWorkRequestId));
        }
Exemple #2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            DisableExternalContainerDatabaseDatabaseManagementRequest request;

            try
            {
                request = new DisableExternalContainerDatabaseDatabaseManagementRequest
                {
                    ExternalContainerDatabaseId = ExternalContainerDatabaseId,
                    OpcRetryToken = OpcRetryToken,
                    OpcRequestId  = OpcRequestId,
                    IfMatch       = IfMatch
                };

                HandleOutput(request);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }