コード例 #1
0
 /// <summary>
 /// Get history of a monitor of a resource (with optional filter).
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The subscriptionId of the resource
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resourceGroupName of the resource
 /// </param>
 /// <param name='resourceNamespace'>
 /// The resourceNamespace of the resource
 /// </param>
 /// <param name='resourceType'>
 /// The resourceType of the resource
 /// </param>
 /// <param name='resourceName'>
 /// The resourceType of the resource
 /// </param>
 /// <param name='monitorId'>
 /// The monitorId of the resource (url encoded)
 /// </param>
 /// <param name='filter'>
 /// list example: $filter=monitorName eq 'logical-disks|C:|disk-free-space-mb';
 /// history example: $filter=isHeartbeat eq false
 /// </param>
 /// <param name='expand'>
 /// ex: $expand=evidence,configuration
 /// </param>
 /// <param name='startTimestampUtc'>
 /// The start Timestamp for the desired history
 /// </param>
 /// <param name='endTimestampUtc'>
 /// The end Timestamp for the desired history
 /// </param>
 public static IPage <MonitorStateChange> ListStateChanges(this IMonitorsOperations operations, string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string monitorId, string filter = default(string), string expand = default(string), System.DateTime?startTimestampUtc = default(System.DateTime?), System.DateTime?endTimestampUtc = default(System.DateTime?))
 {
     return(operations.ListStateChangesAsync(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, monitorId, filter, expand, startTimestampUtc, endTimestampUtc).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List the hosts for a given monitor resource.
 /// </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 <DatadogHost> ListHostsNext(this IMonitorsOperations operations, string nextPageLink)
 {
     return(operations.ListHostsNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #3
0
 /// <summary>
 /// List the resources currently being monitored by the Logz monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 public static IPage <MonitoredResource> ListMonitoredResources(this IMonitorsOperations operations, string resourceGroupName, string monitorName)
 {
     return(operations.ListMonitoredResourcesAsync(resourceGroupName, monitorName).GetAwaiter().GetResult());
 }
コード例 #4
0
 /// <summary>
 /// List the resources currently being monitored by the Logz monitor resource.
 /// </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 <MonitoredResource> > ListMonitoredResourcesNextAsync(this IMonitorsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListMonitoredResourcesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #5
0
 /// <summary>
 /// Get the properties of a specific monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 public static LogzMonitorResource Get(this IMonitorsOperations operations, string resourceGroupName, string monitorName)
 {
     return(operations.GetAsync(resourceGroupName, monitorName).GetAwaiter().GetResult());
 }
コード例 #6
0
 /// <summary>
 /// Create a monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 /// <param name='body'>
 /// </param>
 public static LogzMonitorResource BeginCreate(this IMonitorsOperations operations, string resourceGroupName, string monitorName, LogzMonitorResource body = default(LogzMonitorResource))
 {
     return(operations.BeginCreateAsync(resourceGroupName, monitorName, body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List all monitors under the specified subscription.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IPage <DatadogMonitorResource> List(this IMonitorsOperations operations)
 {
     return(operations.ListAsync().GetAwaiter().GetResult());
 }
コード例 #8
0
 /// <summary>
 /// List all monitors under the specified resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 public static IPage <LogzMonitorResource> ListByResourceGroup(this IMonitorsOperations operations, string resourceGroupName)
 {
     return(operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Set the default api key.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 /// <param name='body'>
 /// </param>
 public static void SetDefaultKey(this IMonitorsOperations operations, string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey))
 {
     operations.SetDefaultKeyAsync(resourceGroupName, monitorName, body).GetAwaiter().GetResult();
 }
 /// <summary>
 /// Set the default api key.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 /// <param name='body'>
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task SetDefaultKeyAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, DatadogApiKey body = default(DatadogApiKey), CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.SetDefaultKeyWithHttpMessagesAsync(resourceGroupName, monitorName, body, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #11
0
 /// <summary>
 /// Update a monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group to which the Elastic resource belongs.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 /// <param name='tags'>
 /// elastic monitor resource tags.
 /// </param>
 public static ElasticMonitorResource Update(this IMonitorsOperations operations, string resourceGroupName, string monitorName, IDictionary <string, string> tags = default(IDictionary <string, string>))
 {
     return(operations.UpdateAsync(resourceGroupName, monitorName, tags).GetAwaiter().GetResult());
 }
コード例 #12
0
 /// <summary>
 /// Get list of a monitors of a resource (with optional filter).
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The subscriptionId of the resource
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resourceGroupName of the resource
 /// </param>
 /// <param name='resourceNamespace'>
 /// The resourceNamespace of the resource
 /// </param>
 /// <param name='resourceType'>
 /// The resourceType of the resource
 /// </param>
 /// <param name='resourceName'>
 /// The resourceType of the resource
 /// </param>
 /// <param name='filter'>
 /// list example: $filter=monitorName eq 'logical-disks|C:|disk-free-space-mb';
 /// history example: $filter=isHeartbeat eq false
 /// </param>
 /// <param name='expand'>
 /// ex: $expand=evidence,configuration
 /// </param>
 public static IPage <Models.Monitor> List(this IMonitorsOperations operations, string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string filter = default(string), string expand = default(string))
 {
     return(operations.ListAsync(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, filter, expand).GetAwaiter().GetResult());
 }
コード例 #13
0
 /// <summary>
 /// Get the status of a monitor at a specific timestamp in history.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The subscriptionId of the resource
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resourceGroupName of the resource
 /// </param>
 /// <param name='resourceNamespace'>
 /// The resourceNamespace of the resource
 /// </param>
 /// <param name='resourceType'>
 /// The resourceType of the resource
 /// </param>
 /// <param name='resourceName'>
 /// The resourceType of the resource
 /// </param>
 /// <param name='monitorId'>
 /// The monitorId of the resource (url encoded)
 /// </param>
 /// <param name='timestampUnix'>
 /// The timestamp of the state change (Unix format)
 /// </param>
 /// <param name='expand'>
 /// ex: $expand=evidence,configuration
 /// </param>
 public static MonitorStateChange GetStateChange(this IMonitorsOperations operations, string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string monitorId, string timestampUnix, string expand = default(string))
 {
     return(operations.GetStateChangeAsync(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, monitorId, timestampUnix, expand).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Get the default api key.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 public static DatadogApiKey GetDefaultKey(this IMonitorsOperations operations, string resourceGroupName, string monitorName)
 {
     return(operations.GetDefaultKeyAsync(resourceGroupName, monitorName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List the api keys for a given monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 public static IPage <DatadogApiKey> ListApiKeys(this IMonitorsOperations operations, string resourceGroupName, string monitorName)
 {
     return(operations.ListApiKeysAsync(resourceGroupName, monitorName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// List all monitors under the specified resource group.
 /// </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 <DatadogMonitorResource> ListByResourceGroupNext(this IMonitorsOperations operations, string nextPageLink)
 {
     return(operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Create a monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 /// <param name='body'>
 /// </param>
 public static DatadogMonitorResource Create(this IMonitorsOperations operations, string resourceGroupName, string monitorName, DatadogMonitorResource body = default(DatadogMonitorResource))
 {
     return(operations.CreateAsync(resourceGroupName, monitorName, body).GetAwaiter().GetResult());
 }
コード例 #18
0
 /// <summary>
 /// List all monitors under the specified resource group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <LogzMonitorResource> > ListByResourceGroupAsync(this IMonitorsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Refresh the set password link and return a latest one.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 public static DatadogSetPasswordLink RefreshSetPasswordLink(this IMonitorsOperations operations, string resourceGroupName, string monitorName)
 {
     return(operations.RefreshSetPasswordLinkAsync(resourceGroupName, monitorName).GetAwaiter().GetResult());
 }
コード例 #20
0
 /// <summary>
 /// Update a monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 /// <param name='body'>
 /// </param>
 public static LogzMonitorResource Update(this IMonitorsOperations operations, string resourceGroupName, string monitorName, LogzMonitorResourceUpdateParameters body = default(LogzMonitorResourceUpdateParameters))
 {
     return(operations.UpdateAsync(resourceGroupName, monitorName, body).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Refresh the set password link and return a latest one.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DatadogSetPasswordLink> RefreshSetPasswordLinkAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.RefreshSetPasswordLinkWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
コード例 #22
0
 /// <summary>
 /// Delete a monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 public static MonitorsDeleteHeaders BeginDelete(this IMonitorsOperations operations, string resourceGroupName, string monitorName)
 {
     return(operations.BeginDeleteAsync(resourceGroupName, monitorName).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete a monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 public static void BeginDelete(this IMonitorsOperations operations, string resourceGroupName, string monitorName)
 {
     operations.BeginDeleteAsync(resourceGroupName, monitorName).GetAwaiter().GetResult();
 }
コード例 #24
0
 /// <summary>
 /// List the resources currently being monitored by the Logz monitor resource.
 /// </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 <MonitoredResource> ListMonitoredResourcesNext(this IMonitorsOperations operations, string nextPageLink)
 {
     return(operations.ListMonitoredResourcesNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
 /// <summary>
 /// Delete a monitor resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='monitorName'>
 /// Monitor resource name
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginDeleteAsync(this IMonitorsOperations operations, string resourceGroupName, string monitorName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, monitorName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
コード例 #26
0
 /// <summary>
 /// List all monitors under the specified subscription.
 /// </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 <LogzMonitorResource> ListBySubscriptionNext(this IMonitorsOperations operations, string nextPageLink)
 {
     return(operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
コード例 #27
0
 /// <summary>
 /// Get the current status of a monitor of a resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='subscriptionId'>
 /// The subscriptionId of the resource
 /// </param>
 /// <param name='resourceGroupName'>
 /// The resourceGroupName of the resource
 /// </param>
 /// <param name='resourceNamespace'>
 /// The resourceNamespace of the resource
 /// </param>
 /// <param name='resourceType'>
 /// The resourceType of the resource
 /// </param>
 /// <param name='resourceName'>
 /// The resourceType of the resource
 /// </param>
 /// <param name='monitorId'>
 /// The monitorId of the resource (url encoded)
 /// </param>
 /// <param name='expand'>
 /// ex: $expand=evidence,configuration
 /// </param>
 public static Models.Monitor Get(this IMonitorsOperations operations, string subscriptionId, string resourceGroupName, string resourceNamespace, string resourceType, string resourceName, string monitorId, string expand = default(string))
 {
     return(operations.GetAsync(subscriptionId, resourceGroupName, resourceNamespace, resourceType, resourceName, monitorId, expand).GetAwaiter().GetResult());
 }