コード例 #1
0
 /// <summary>
 /// Puts the new diagnostic settings.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Insights.IAgentDiagnosticSettingsOperations.
 /// </param>
 /// <param name='resourceUri'>
 /// Required. The resource uri.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the operation.
 /// </param>
 /// <returns>
 /// Generic empty response. We only pass it to ensure json error
 /// handling
 /// </returns>
 public static EmptyResponse Put(this IAgentDiagnosticSettingsOperations operations, string resourceUri, AgentDiagnosticSettgingsPutParameters parameters)
 {
     return(Task.Factory.StartNew((object s) =>
     {
         return ((IAgentDiagnosticSettingsOperations)s).PutAsync(resourceUri, parameters);
     }
                                  , operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult());
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the InsightsManagementClient class.
 /// </summary>
 /// <param name='httpClient'>
 /// The Http client
 /// </param>
 public InsightsManagementClient(HttpClient httpClient)
     : base(httpClient)
 {
     this._agentDiagnosticSettingsOperations = new AgentDiagnosticSettingsOperations(this);
     this._alertOperations     = new AlertOperations(this);
     this._autoscaleOperations = new AutoscaleOperations(this);
     this._monitoringConfigurationOperations   = new MonitoringConfigurationOperations(this);
     this._serviceDiagnosticSettingsOperations = new ServiceDiagnosticSettingsOperations(this);
     this._storageDiagnosticSettingsOperations = new StorageDiagnosticSettingsOperations(this);
     this._apiVersion = "2014-04-01";
     this._longRunningOperationInitialTimeout = -1;
     this._longRunningOperationRetryTimeout   = -1;
     this.HttpClient.Timeout = TimeSpan.FromSeconds(300);
 }
コード例 #3
0
 /// <summary>
 /// Gets the diagnostic settings.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Insights.IAgentDiagnosticSettingsOperations.
 /// </param>
 /// <param name='resourceUri'>
 /// Required. The resource uri.
 /// </param>
 /// <returns>
 /// A standard service response including an HTTP status code and
 /// request ID.
 /// </returns>
 public static Task <AgentDiagnosticSettingsGetResponse> GetAsync(this IAgentDiagnosticSettingsOperations operations, string resourceUri)
 {
     return(operations.GetAsync(resourceUri, CancellationToken.None));
 }
コード例 #4
0
 /// <summary>
 /// Puts the new diagnostic settings.
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.Azure.Management.Insights.IAgentDiagnosticSettingsOperations.
 /// </param>
 /// <param name='resourceUri'>
 /// Required. The resource uri.
 /// </param>
 /// <param name='parameters'>
 /// Required. Parameters supplied to the operation.
 /// </param>
 /// <returns>
 /// Generic empty response. We only pass it to ensure json error
 /// handling
 /// </returns>
 public static Task <EmptyResponse> PutAsync(this IAgentDiagnosticSettingsOperations operations, string resourceUri, AgentDiagnosticSettgingsPutParameters parameters)
 {
     return(operations.PutAsync(resourceUri, parameters, CancellationToken.None));
 }