Azure Automation-Bibliotheken für .NETAzure Automation libraries for .NET
ÜbersichtOverview
Microsoft Azure Automation ermöglicht Benutzern, Aufgaben zu automatisieren, die in einer Cloud- und Unternehmensumgebung normalerweise ausgeführt werden.Microsoft Azure Automation provides a way for users to automate the tasks that are commonly performed in a cloud and enterprise environment.
Um mehr zu erfahren, lesen Sie Azure Automation – Übersicht.Learn more by reading the Azure Automation Overview.
VerwaltungsbibliothekManagement library
Verwalten Sie mit der Verwaltungsbibliothek Runbooks und Aufträge sowie Desired State Configuration-Einstellungen.Using the management library to manage runbooks and jobs and manage Desired State Configuration settings.
Installieren Sie das NuGet-Paket direkt über die Paket-Manager-Konsole in Visual Studio oder mit der .NET Core CLI.Install the NuGet package directly from the Visual Studio Package Manager console or with the .NET Core CLI.
Visual Studio-Paket-ManagerVisual Studio Package Manager
Install-Package Microsoft.Azure.Management.Automation
dotnet add package Microsoft.Azure.Management.Automation
CodebeispielCode Example
Das folgende Beispiel veranschaulicht, wie Sie einen neuen Auftrag anhand eines vorhandenen Runbooks starten.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;
BeispieleSamples
- AzureBot verwendet die Automatisierungsbibliothek mit Bot Framework und Cognitive Services, um die Entwicklerproduktivität in Azure zu verbessern.AzureBot uses the automation library with the Bot Framework and Cognitive Services to improve developer productivity on Azure
Untersuchen Sie weiteren .NET-Beispielcode, den Sie in Ihren Apps verwenden können.Explore more sample .NET code you can use in your apps.