Esempio n. 1
0
 /// <summary>
 /// Retrieve a list of connections.
 /// <see href="http://aka.ms/azureautomationsdk/connectionoperations" />
 /// </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 <IPage <Connection> > ListByAutomationAccountAsync(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByAutomationAccountWithHttpMessagesAsync(resourceGroupName, automationAccountName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Update a connection.
 /// <see href="http://aka.ms/azureautomationsdk/connectionoperations" />
 /// </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='connectionName'>
 /// The parameters supplied to the update a connection operation.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the update a connection operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <Connection> UpdateAsync(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName, ConnectionUpdateParameters parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, automationAccountName, connectionName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <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._modules           = new ModuleOperations(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._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);
 }
Esempio n. 4
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._automationAccounts = new AutomationAccountOperations(this);
     this._certificates       = new CertificateOperations(this);
     this._cloudServices      = new CloudServiceOperations(this);
     this._connections        = new ConnectionOperations(this);
     this._connectionTypes    = new ConnectionTypeOperations(this);
     this._psCredentials      = new CredentialOperations(this);
     this._jobs              = new JobOperations(this);
     this._jobSchedules      = new JobScheduleOperations(this);
     this._jobStreams        = new JobStreamOperations(this);
     this._modules           = new ModuleOperations(this);
     this._runbookDraft      = new RunbookDraftOperations(this);
     this._runbooks          = new RunbookOperations(this);
     this._schedules         = new ScheduleOperations(this);
     this._testJobs          = new TestJobOperations(this);
     this._variables         = new VariableOperations(this);
     this._resourceNamespace = "automation";
     this._apiVersion        = "2013-06-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
 /// <summary>
 /// Retrieve a list of connections.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IConnectionOperations.
 /// </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 list connection operation.
 /// </returns>
 public static ConnectionListResponse List(this IConnectionOperations operations, string resourceGroupName, string automationAccount)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IConnectionOperations)s).ListAsync(resourceGroupName, automationAccount);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a connection.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the patch a connection
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Patch(this IConnectionOperations operations, string resourceGroupName, string automationAccount, ConnectionPatchParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IConnectionOperations)s).PatchAsync(resourceGroupName, automationAccount, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create a connection.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create connection
 /// operation.
 /// </param>
 /// <returns>
 /// The response model for the create connection operation.
 /// </returns>
 public static ConnectionCreateResponse Create(this IConnectionOperations operations, string automationAccount, ConnectionCreateParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IConnectionOperations)s).CreateAsync(automationAccount, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete the connection.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='connectionName'>
 /// Required. The name of connection.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static AzureOperationResponse Delete(this IConnectionOperations operations, string automationAccount, string connectionName)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IConnectionOperations)s).DeleteAsync(automationAccount, connectionName);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
 /// <summary>
 /// Retrieve next list of connections.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list connection operation.
 /// </returns>
 public static ConnectionListResponse ListNext(this IConnectionOperations operations, string nextLink)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IConnectionOperations)s).ListNextAsync(nextLink);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
Esempio n. 10
0
        private void InitSubApis()
        {
            this.communicationOperations = new CommunicationTemplate(this.RestTemplate);
            this.connectionOperations    = new ConnectionTemplate(this.RestTemplate);
            this.profileOperations       = new ProfileTemplate(this.RestTemplate);
#if NET_4_0 || SILVERLIGHT_5
            this.groupOperations = new GroupTemplate(this.RestTemplate);
#endif
        }
Esempio n. 11
0
 private void InitSubApis()
 {
     _userOperations         = new UserTemplate(RestTemplate, IsAuthorized);
     _cardOperations         = new CardTemplate(RestTemplate, IsAuthorized);
     _contributionOperations = new ContributionTemplate(RestTemplate, IsAuthorized);
     _microOperations        = new MicroTemplate(RestTemplate, IsAuthorized);
     _followerOperations     = new FollowerTemplate(RestTemplate, IsAuthorized);
     _followingOperations    = new FollowingTemplate(RestTemplate, IsAuthorized);
     _connectionOperations   = new ConnectionsTemplate(RestTemplate, IsAuthorized);
     _linkOperations         = new LinkTemplate(RestTemplate, IsAuthorized);
     _activityOperations     = new ActivityTemplate(RestTemplate, IsAuthorized);
     _highfiveOperations     = new HighfiveTemplate(RestTemplate, IsAuthorized);
 }
 /// <summary>
 /// Retrieve a list of connections.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <returns>
 /// The response model for the list connection operation.
 /// </returns>
 public static Task <ConnectionListResponse> ListAsync(this IConnectionOperations operations, string automationAccount)
 {
     return(operations.ListAsync(automationAccount, CancellationToken.None));
 }
 /// <summary>
 /// Retrieve the connection identified by connection name.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='connectionName'>
 /// Required. The name of connection.
 /// </param>
 /// <returns>
 /// The response model for the get connection operation.
 /// </returns>
 public static Task <ConnectionGetResponse> GetAsync(this IConnectionOperations operations, string automationAccount, string connectionName)
 {
     return(operations.GetAsync(automationAccount, connectionName, CancellationToken.None));
 }
 /// <summary>
 /// Delete the connection.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='connectionName'>
 /// Required. The name of connection.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> DeleteAsync(this IConnectionOperations operations, string automationAccount, string connectionName)
 {
     return(operations.DeleteAsync(automationAccount, connectionName, CancellationToken.None));
 }
Esempio n. 15
0
 /// <summary>
 /// Delete the connection.
 /// <see href="http://aka.ms/azureautomationsdk/connectionoperations" />
 /// </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='connectionName'>
 /// The name of connection.
 /// </param>
 public static void Delete(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName)
 {
     operations.DeleteAsync(resourceGroupName, automationAccountName, connectionName).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Create a connection.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the create connection
 /// operation.
 /// </param>
 /// <returns>
 /// The response model for the create connection operation.
 /// </returns>
 public static Task <ConnectionCreateResponse> CreateAsync(this IConnectionOperations operations, string automationAccount, ConnectionCreateParameters parameters)
 {
     return(operations.CreateAsync(automationAccount, parameters, CancellationToken.None));
 }
 private void InitSubApis()
 {
     this.communicationOperations = new CommunicationTemplate(this.RestTemplate);
     this.connectionOperations = new ConnectionTemplate(this.RestTemplate);
     this.profileOperations = new ProfileTemplate(this.RestTemplate);
 }
        private void InitSubApis()
        {
            this.communicationOperations = new CommunicationTemplate(this.RestTemplate);
            this.connectionOperations = new ConnectionTemplate(this.RestTemplate);
            this.profileOperations = new ProfileTemplate(this.RestTemplate);
#if NET_4_0 || SILVERLIGHT_5
            this.groupOperations = new GroupTemplate(this.RestTemplate);
#endif
        }
Esempio n. 19
0
 /// <summary>
 /// Retrieve the connection identified by connection name.
 /// <see href="http://aka.ms/azureautomationsdk/connectionoperations" />
 /// </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='connectionName'>
 /// The name of connection.
 /// </param>
 public static Connection Get(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName)
 {
     return(operations.GetAsync(resourceGroupName, automationAccountName, connectionName).GetAwaiter().GetResult());
 }
Esempio n. 20
0
 /// <summary>
 /// Delete the connection.
 /// <see href="http://aka.ms/azureautomationsdk/connectionoperations" />
 /// </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='connectionName'>
 /// The name of connection.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, automationAccountName, connectionName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Retrieve next list of connections.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='nextLink'>
 /// Required. The link to retrieve next set of items.
 /// </param>
 /// <returns>
 /// The response model for the list connection operation.
 /// </returns>
 public static Task <ConnectionListResponse> ListNextAsync(this IConnectionOperations operations, string nextLink)
 {
     return(operations.ListNextAsync(nextLink, CancellationToken.None));
 }
Esempio n. 22
0
 /// <summary>
 /// Update a connection.
 /// <see href="http://aka.ms/azureautomationsdk/connectionoperations" />
 /// </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='connectionName'>
 /// The parameters supplied to the update a connection operation.
 /// </param>
 /// <param name='parameters'>
 /// The parameters supplied to the update a connection operation.
 /// </param>
 public static Connection Update(this IConnectionOperations operations, string resourceGroupName, string automationAccountName, string connectionName, ConnectionUpdateParameters parameters)
 {
     return(operations.UpdateAsync(resourceGroupName, automationAccountName, connectionName, parameters).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Update a connection.  (see
 /// http://aka.ms/azureautomationsdk/connectionoperations for more
 /// information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Automation.IConnectionOperations.
 /// </param>
 /// <param name='resourceGroupName'>
 /// Required. The name of the resource group
 /// </param>
 /// <param name='automationAccount'>
 /// Required. The automation account name.
 /// </param>
 /// <param name='parameters'>
 /// Required. The parameters supplied to the patch a connection
 /// operation.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AzureOperationResponse> PatchAsync(this IConnectionOperations operations, string resourceGroupName, string automationAccount, ConnectionPatchParameters parameters)
 {
     return(operations.PatchAsync(resourceGroupName, automationAccount, parameters, CancellationToken.None));
 }
Esempio n. 24
0
 /// <summary>
 /// Retrieve a list of connections.
 /// <see href="http://aka.ms/azureautomationsdk/connectionoperations" />
 /// </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 <Connection> ListByAutomationAccountNext(this IConnectionOperations operations, string nextPageLink)
 {
     return(operations.ListByAutomationAccountNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
        private void InitSubApis()
        {
            _userOperations = new UserTemplate(RestTemplate, IsAuthorized);
			_cardOperations = new CardTemplate(RestTemplate, IsAuthorized);
            _contributionOperations = new ContributionTemplate(RestTemplate, IsAuthorized);
			_microOperations = new MicroTemplate(RestTemplate, IsAuthorized);
			_followerOperations = new FollowerTemplate(RestTemplate, IsAuthorized);
			_followingOperations = new FollowingTemplate(RestTemplate, IsAuthorized);
            _connectionOperations = new ConnectionsTemplate(RestTemplate, IsAuthorized);
            _linkOperations = new LinkTemplate(RestTemplate, IsAuthorized);
			_activityOperations = new ActivityTemplate(RestTemplate, IsAuthorized);
			_highfiveOperations = new HighfiveTemplate(RestTemplate, IsAuthorized);
        }
Esempio n. 26
0
 /// <summary>
 /// Retrieve a list of connections.
 /// <see href="http://aka.ms/azureautomationsdk/connectionoperations" />
 /// </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 <Connection> ListByAutomationAccount(this IConnectionOperations operations, string resourceGroupName, string automationAccountName)
 {
     return(operations.ListByAutomationAccountAsync(resourceGroupName, automationAccountName).GetAwaiter().GetResult());
 }