Exemple #1
0
        private Runbook UpdateRunbookHelper(
            string automationAccountName,
            AutomationManagement.Models.Runbook runbook,
            string description,
            string[] tags,
            bool?logDebug,
            bool?logProgress,
            bool?logVerbose)
        {
            if (description != null)
            {
                runbook.Description = description;
            }

            if (tags != null)
            {
                runbook.Tags = string.Join(Constants.RunbookTagsSeparatorString, tags);
            }

            if (logDebug.HasValue)
            {
                runbook.LogDebug = logDebug.Value;
            }

            if (logProgress.HasValue)
            {
                runbook.LogProgress = logProgress.Value;
            }

            if (logVerbose.HasValue)
            {
                runbook.LogVerbose = logVerbose.Value;
            }

            var runbookUpdateParameters = new AutomationManagement.Models.RunbookUpdateParameters
            {
                Runbook = runbook
            };

            this.automationManagementClient.Runbooks.Update(automationAccountName, runbookUpdateParameters);

            var runbookId = new Guid(runbook.Id);

            return(this.GetRunbook(automationAccountName, runbookId));
        }
        private Runbook UpdateRunbookHelper(
            string automationAccountName,
            AutomationManagement.Models.Runbook runbook,
            string description,
            string[] tags,
            bool? logDebug,
            bool? logProgress,
            bool? logVerbose)
        {
            if (description != null)
            {
                runbook.Description = description;
            }

            if (tags != null)
            {
                runbook.Tags = string.Join(Constants.RunbookTagsSeparatorString, tags);
            }

            if (logDebug.HasValue)
            {
                runbook.LogDebug = logDebug.Value;
            }

            if (logProgress.HasValue)
            {
                runbook.LogProgress = logProgress.Value;
            }

            if (logVerbose.HasValue)
            {
                runbook.LogVerbose = logVerbose.Value;
            }

            var runbookUpdateParameters = new AutomationManagement.Models.RunbookUpdateParameters
            {
                Runbook = runbook
            };

            this.automationManagementClient.Runbooks.Update(automationAccountName, runbookUpdateParameters);

            var runbookId = new Guid(runbook.Id);
            return this.GetRunbook(automationAccountName, runbookId);
        }