/// <summary> /// Get a server's security alert policy. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerSecurityAlertPolicy> GetAsync(this IServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string serverName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Creates or updates a threat detection policy. /// </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='serverName'> /// The name of the server. /// </param> /// <param name='parameters'> /// The server security alert policy. /// </param> public static ServerSecurityAlertPolicy CreateOrUpdate(this IServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string serverName, ServerSecurityAlertPolicy parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Get a server's security alert policy. /// </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='serverName'> /// The name of the server. /// </param> public static ServerSecurityAlertPolicy Get(this IServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string serverName) { return(operations.GetAsync(resourceGroupName, serverName).GetAwaiter().GetResult()); }
/// <summary> /// Get the server's threat detection policies. /// </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 <ServerSecurityAlertPolicy> > ListByServerNextAsync(this IServerSecurityAlertPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get the server's threat detection policies. /// </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 <ServerSecurityAlertPolicy> ListByServerNext(this IServerSecurityAlertPoliciesOperations operations, string nextPageLink) { return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Creates or updates a threat detection policy. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='serverName'> /// The name of the server. /// </param> /// <param name='parameters'> /// The server security alert policy. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ServerSecurityAlertPolicyInner> BeginCreateOrUpdateAsync(this IServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string serverName, ServerSecurityAlertPolicyInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }