Permalink
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (58 sloc) 2.53 KB
title description keywords author ms.author manager ms.date ms.topic ms.prod ms.technology ms.devlang ms.service
Azure Automation libraries for .NET
Reference for Azure Automation libraries for .NET
Azure, .NET, SDK, API, Automation
camsoper
casoper
douge
07/21/2017
reference
azure
azure
dotnet
multiple

Azure Automation libraries for .NET

Overview

Microsoft Azure Automation provides a way for users to automate the tasks that are commonly performed in a cloud and enterprise environment.

Learn more by reading the Azure Automation Overview.

Management library

Using the management library to manage runbooks and jobs and manage Desired State Configuration settings.

Install the NuGet package directly from the Visual Studio Package Manager console or with the .NET Core CLI.

Visual Studio Package Manager

Install-Package Microsoft.Azure.Management.Automation
dotnet add package Microsoft.Azure.Management.Automation

Code Example

The following example illustrates how to start a new job based on an existing runbook.

/*
  using Microsoft.Azure.Management.Automation;
*/
AutomationManagementClient client =
    new AutomationManagementClient(new CertificateCloudCredentials(subscriptionId, cert));

// Create job create parameters
JobCreateParameters jcParam = new JobCreateParameters
{
    Properties = new JobCreateProperties
    {
        Runbook = new RunbookAssociationProperty
        {
            Name = runbookName
        },
        Parameters = null // optional parameters here
    }
};

// create runbook job. This gives back the Job
Job job = automationManagementClient.Jobs.Create(automationAccountName, jcParam).Job;

[!div class="nextstepaction"] Explore the management APIs

Samples

Explore more sample .NET code you can use in your apps.