Esempio n. 1
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();

            if (!ConfirmDelete("OCIDatabaseExternalPluggableDatabase", "Remove"))
            {
                return;
            }

            DeleteExternalPluggableDatabaseRequest request;

            try
            {
                request = new DeleteExternalPluggableDatabaseRequest
                {
                    ExternalPluggableDatabaseId = ExternalPluggableDatabaseId,
                    OpcRequestId = OpcRequestId,
                    IfMatch      = IfMatch
                };

                HandleOutput(request);
                FinishProcessing(response);
            }
            catch (Exception ex)
            {
                TerminatingErrorDuringExecution(ex);
            }
        }
Esempio n. 2
0
        private void HandleOutput(DeleteExternalPluggableDatabaseRequest request)
        {
            var waiterConfig = new WaiterConfiguration
            {
                MaxAttempts           = MaxWaitAttempts,
                GetNextDelayInSeconds = (_) => WaitIntervalSeconds
            };

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

            case Default:
                response = client.DeleteExternalPluggableDatabase(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, CreateWorkRequestObject(response.OpcWorkRequestId));
        }