/// <summary>
 /// Retrieve a list of python 2 packages.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <Module> > ListByAutomationAccountNextAsync(this IPython2PackageOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAutomationAccountNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Update the python 2 package identified by package name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='packageName'>
 /// The name of python package.
 /// </param>
 /// <param name='parameters'>
 /// The update parameters for python package.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Module> UpdateAsync(this IPython2PackageOperations operations, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, packageName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #3
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     AutomationAccount = new AutomationAccountOperations(this);
     Operations        = new Operations(this);
     Statistics        = new StatisticsOperations(this);
     Usages            = new UsagesOperations(this);
     Keys                                   = new KeysOperations(this);
     Certificate                            = new CertificateOperations(this);
     Connection                             = new ConnectionOperations(this);
     ConnectionType                         = new ConnectionTypeOperations(this);
     Credential                             = new CredentialOperations(this);
     DscConfiguration                       = new DscConfigurationOperations(this);
     HybridRunbookWorkerGroup               = new HybridRunbookWorkerGroupOperations(this);
     JobSchedule                            = new JobScheduleOperations(this);
     LinkedWorkspace                        = new LinkedWorkspaceOperations(this);
     Activity                               = new ActivityOperations(this);
     Module                                 = new ModuleOperations(this);
     ObjectDataTypes                        = new ObjectDataTypesOperations(this);
     Fields                                 = new FieldsOperations(this);
     Schedule                               = new ScheduleOperations(this);
     Variable                               = new VariableOperations(this);
     Webhook                                = new WebhookOperations(this);
     Watcher                                = new WatcherOperations(this);
     SoftwareUpdateConfigurations           = new SoftwareUpdateConfigurationsOperations(this);
     SoftwareUpdateConfigurationRuns        = new SoftwareUpdateConfigurationRunsOperations(this);
     SoftwareUpdateConfigurationMachineRuns = new SoftwareUpdateConfigurationMachineRunsOperations(this);
     SourceControl                          = new SourceControlOperations(this);
     SourceControlSyncJob                   = new SourceControlSyncJobOperations(this);
     SourceControlSyncJobStreams            = new SourceControlSyncJobStreamsOperations(this);
     Job       = new JobOperations(this);
     JobStream = new JobStreamOperations(this);
     AgentRegistrationInformation = new AgentRegistrationInformationOperations(this);
     DscNode                          = new DscNodeOperations(this);
     NodeReports                      = new NodeReportsOperations(this);
     DscCompilationJob                = new DscCompilationJobOperations(this);
     DscCompilationJobStream          = new DscCompilationJobStreamOperations(this);
     DscNodeConfiguration             = new DscNodeConfigurationOperations(this);
     NodeCountInformation             = new NodeCountInformationOperations(this);
     RunbookDraft                     = new RunbookDraftOperations(this);
     Runbook                          = new RunbookOperations(this);
     TestJobStreams                   = new TestJobStreamsOperations(this);
     TestJob                          = new TestJobOperations(this);
     Python2Package                   = new Python2PackageOperations(this);
     BaseUri                          = new System.Uri("https://management.azure.com");
     AcceptLanguage                   = "en-US";
     LongRunningOperationRetryTimeout = 30;
     GenerateClientRequestId          = true;
     SerializationSettings            = new JsonSerializerSettings
     {
         Formatting            = Newtonsoft.Json.Formatting.Indented,
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     SerializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = Newtonsoft.Json.DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = Newtonsoft.Json.DateTimeZoneHandling.Utc,
         NullValueHandling     = Newtonsoft.Json.NullValueHandling.Ignore,
         ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
     DeserializationSettings.Converters.Add(new TransformationJsonConverter());
     DeserializationSettings.Converters.Add(new CloudErrorJsonConverter());
 }
 /// <summary>
 /// Retrieve the python 2 package identified by package name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='packageName'>
 /// The python package name.
 /// </param>
 public static Module Get(this IPython2PackageOperations operations, string resourceGroupName, string automationAccountName, string packageName)
 {
     return(operations.GetAsync(resourceGroupName, automationAccountName, packageName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the python 2 package by name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='packageName'>
 /// The python package name.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IPython2PackageOperations operations, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, packageName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Delete the python 2 package by name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='packageName'>
 /// The python package name.
 /// </param>
 public static void Delete(this IPython2PackageOperations operations, string resourceGroupName, string automationAccountName, string packageName)
 {
     operations.DeleteAsync(resourceGroupName, automationAccountName, packageName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Retrieve a list of python 2 packages.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <Module> ListByAutomationAccountNext(this IPython2PackageOperations operations, string nextPageLink)
 {
     return(operations.ListByAutomationAccountNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve a list of python 2 packages.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 public static IPage <Module> ListByAutomationAccount(this IPython2PackageOperations operations, string resourceGroupName, string automationAccountName)
 {
     return(operations.ListByAutomationAccountAsync(resourceGroupName, automationAccountName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update the python 2 package identified by package name.
 /// <see href="http://aka.ms/azureautomationsdk/moduleoperations" />
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Name of an Azure Resource group.
 /// </param>
 /// <param name='automationAccountName'>
 /// The name of the automation account.
 /// </param>
 /// <param name='packageName'>
 /// The name of python package.
 /// </param>
 /// <param name='parameters'>
 /// The update parameters for python package.
 /// </param>
 public static Module Update(this IPython2PackageOperations operations, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, automationAccountName, packageName, parameters).GetAwaiter().GetResult());
 }