/// <summary>
 /// Retrieve the linked workspace for the account id.
 /// <see href="http://aka.ms/azureautomationsdk/linkedworkspaceoperations" />
 /// </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='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <LinkedWorkspace> GetAsync(this ILinkedWorkspaceOperations operations, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, automationAccountName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Retrieve the linked workspace for the account id.  (see
 /// http://aka.ms/azureautomationsdk/linkedworkspaceoperations for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.ILinkedWorkspaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <returns>
 /// The response model for the get linked workspace operation.
 /// </returns>
 public static LinkedWorkspaceGetResponse Get(this ILinkedWorkspaceOperations operations, string resourceGroupName, string automationAccount)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((ILinkedWorkspaceOperations)s).GetAsync(resourceGroupName, automationAccount);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the AutomationManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public AutomationManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._activities = new ActivityOperations(this);
     this._agentRegistrationInformation = new AgentRegistrationOperation(this);
     this._automationAccounts           = new AutomationAccountOperations(this);
     this._certificates       = new CertificateOperations(this);
     this._connections        = new ConnectionOperations(this);
     this._connectionTypes    = new ConnectionTypeOperations(this);
     this._psCredentials      = new CredentialOperations(this);
     this._compilationJobs    = new DscCompilationJobOperations(this);
     this._configurations     = new DscConfigurationOperations(this);
     this._nodeConfigurations = new DscNodeConfigurationOperations(this);
     this._nodes       = new DscNodeOperations(this);
     this._nodeReports = new DscNodeReportsOperations(this);
     this._hybridRunbookWorkerGroups = new HybridRunbookWorkerGroupOperations(this);
     this._jobs              = new JobOperations(this);
     this._jobSchedules      = new JobScheduleOperations(this);
     this._jobStreams        = new JobStreamOperations(this);
     this._linkedWorkspace   = new LinkedWorkspaceOperations(this);
     this._modules           = new ModuleOperations(this);
     this._objectDataTypes   = new ObjectDataTypeOperations(this);
     this._runbookDraft      = new RunbookDraftOperations(this);
     this._runbooks          = new RunbookOperations(this);
     this._schedules         = new ScheduleOperations(this);
     this._statistics        = new StatisticsOperations(this);
     this._testJobs          = new TestJobOperations(this);
     this._typeFields        = new TypeFieldOperations(this);
     this._usages            = new UsageOperations(this);
     this._variables         = new VariableOperations(this);
     this._watcherActions    = new WatcherActionOperations(this);
     this._watchers          = new WatcherOperations(this);
     this._watcherStreams    = new WatcherStreamOperations(this);
     this._webhooks          = new WebhookOperations(this);
     this._resourceNamespace = "Microsoft.Automation";
     this._apiVersion        = "2014-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Retrieve the linked workspace for the account id.
 /// <see href="http://aka.ms/azureautomationsdk/linkedworkspaceoperations" />
 /// </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 LinkedWorkspace Get(this ILinkedWorkspaceOperations operations, string resourceGroupName, string automationAccountName)
 {
     return(operations.GetAsync(resourceGroupName, automationAccountName).GetAwaiter().GetResult());
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Retrieve the linked workspace for the account id.  (see
 /// http://aka.ms/azureautomationsdk/linkedworkspaceoperations for
 /// more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.ILinkedWorkspaceOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <returns>
 /// The response model for the get linked workspace operation.
 /// </returns>
 public static Task <LinkedWorkspaceGetResponse> GetAsync(this ILinkedWorkspaceOperations operations, string resourceGroupName, string automationAccount)
 {
     return(operations.GetAsync(resourceGroupName, automationAccount, CancellationToken.None));
 }