Exemplo n.º 1
0
        private void HandleOutput(UpdateVmClusterRequest request)
        {
            var waiterConfig = new WaiterConfiguration
            {
                MaxAttempts           = MaxWaitAttempts,
                GetNextDelayInSeconds = (_) => WaitIntervalSeconds
            };

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

            case Default:
                response = client.UpdateVmCluster(request).GetAwaiter().GetResult();
                break;
            }
            WriteOutput(response, response.VmCluster);
        }
Exemplo n.º 2
0
        protected override void ProcessRecord()
        {
            base.ProcessRecord();
            UpdateVmClusterRequest request;

            try
            {
                request = new UpdateVmClusterRequest
                {
                    VmClusterId            = VmClusterId,
                    UpdateVmClusterDetails = UpdateVmClusterDetails,
                    IfMatch      = IfMatch,
                    OpcRequestId = OpcRequestId
                };

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