/// <summary> /// Get a managed server's 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='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ManagedServerSecurityAlertPolicy> GetAsync(this IManagedServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string managedInstanceName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, managedInstanceName, 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 that contains the resource. You can obtain /// this value from the Azure Resource Manager API or the portal. /// </param> /// <param name='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='parameters'> /// The managed server security alert policy. /// </param> public static ManagedServerSecurityAlertPolicy CreateOrUpdate(this IManagedServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string managedInstanceName, ManagedServerSecurityAlertPolicy parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, managedInstanceName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Get a managed server's 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='managedInstanceName'> /// The name of the managed instance. /// </param> public static ManagedServerSecurityAlertPolicy Get(this IManagedServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string managedInstanceName) { return(operations.GetAsync(resourceGroupName, managedInstanceName).GetAwaiter().GetResult()); }
/// <summary> /// Get the managed 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 <ManagedServerSecurityAlertPolicy> > ListByInstanceNextAsync(this IManagedServerSecurityAlertPoliciesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByInstanceNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Get the managed 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 <ManagedServerSecurityAlertPolicy> ListByInstanceNext(this IManagedServerSecurityAlertPoliciesOperations operations, string nextPageLink) { return(operations.ListByInstanceNextAsync(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='managedInstanceName'> /// The name of the managed instance. /// </param> /// <param name='parameters'> /// The managed server security alert policy. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ManagedServerSecurityAlertPolicyInner> BeginCreateOrUpdateAsync(this IManagedServerSecurityAlertPoliciesOperations operations, string resourceGroupName, string managedInstanceName, ManagedServerSecurityAlertPolicyInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, managedInstanceName, parameters, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }