コード例 #1
0
        private void HandleOutput(AddVcnCidrRequest request)
        {
            var waiterConfig = new WaiterConfiguration
            {
                MaxAttempts           = MaxWaitAttempts,
                GetNextDelayInSeconds = (_) => WaitIntervalSeconds
            };

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

            case Default:
                response = client.AddVcnCidr(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, CreateWorkRequestObject(response.OpcWorkRequestId));
        }
コード例 #2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            AddVcnCidrRequest request;

            try
            {
                request = new AddVcnCidrRequest
                {
                    VcnId             = VcnId,
                    AddVcnCidrDetails = AddVcnCidrDetails,
                    OpcRequestId      = OpcRequestId,
                    OpcRetryToken     = OpcRetryToken,
                    IfMatch           = IfMatch
                };

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