-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding server level threat detection sdk
Adding server level threat detection sdk
- Loading branch information
Showing
11 changed files
with
1,344 additions
and
506 deletions.
There are no files selected for viewing
114 changes: 114 additions & 0 deletions
114
src/SDKs/SqlManagement/Management.Sql/Generated/IServerSecurityAlertPoliciesOperations.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
// <auto-generated> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.Sql | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Azure; | ||
using Models; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
|
||
/// <summary> | ||
/// ServerSecurityAlertPoliciesOperations operations. | ||
/// </summary> | ||
public partial interface IServerSecurityAlertPoliciesOperations | ||
{ | ||
/// <summary> | ||
/// Get a server's security alert policy. | ||
/// </summary> | ||
/// <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='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<ServerSecurityAlertPolicy>> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Creates or updates a threat detection policy. | ||
/// </summary> | ||
/// <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='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<ServerSecurityAlertPolicy>> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerSecurityAlertPolicy parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
/// <summary> | ||
/// Creates or updates a threat detection policy. | ||
/// </summary> | ||
/// <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='customHeaders'> | ||
/// The headers that will be added to request. | ||
/// </param> | ||
/// <param name='cancellationToken'> | ||
/// The cancellation token. | ||
/// </param> | ||
/// <exception cref="Microsoft.Rest.Azure.CloudException"> | ||
/// Thrown when the operation returned an invalid status code | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.SerializationException"> | ||
/// Thrown when unable to deserialize the response | ||
/// </exception> | ||
/// <exception cref="Microsoft.Rest.ValidationException"> | ||
/// Thrown when a required parameter is null | ||
/// </exception> | ||
Task<AzureOperationResponse<ServerSecurityAlertPolicy>> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, ServerSecurityAlertPolicy parameters, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
137 changes: 137 additions & 0 deletions
137
src/SDKs/SqlManagement/Management.Sql/Generated/Models/ServerSecurityAlertPolicy.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
// <auto-generated> | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for | ||
// license information. | ||
// | ||
// Code generated by Microsoft (R) AutoRest Code Generator. | ||
// Changes may cause incorrect behavior and will be lost if the code is | ||
// regenerated. | ||
// </auto-generated> | ||
|
||
namespace Microsoft.Azure.Management.Sql.Models | ||
{ | ||
using Microsoft.Rest; | ||
using Microsoft.Rest.Serialization; | ||
using Newtonsoft.Json; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
/// <summary> | ||
/// A server security alert policy. | ||
/// </summary> | ||
[Rest.Serialization.JsonTransformation] | ||
public partial class ServerSecurityAlertPolicy : ProxyResource | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the ServerSecurityAlertPolicy class. | ||
/// </summary> | ||
public ServerSecurityAlertPolicy() | ||
{ | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the ServerSecurityAlertPolicy class. | ||
/// </summary> | ||
/// <param name="state">Specifies the state of the policy, whether it | ||
/// is enabled or disabled. Possible values include: 'New', 'Enabled', | ||
/// 'Disabled'</param> | ||
/// <param name="id">Resource ID.</param> | ||
/// <param name="name">Resource name.</param> | ||
/// <param name="type">Resource type.</param> | ||
/// <param name="disabledAlerts">Specifies an array of alerts that are | ||
/// disabled. Allowed values are: Sql_Injection, | ||
/// Sql_Injection_Vulnerability, Access_Anomaly</param> | ||
/// <param name="emailAddresses">Specifies an array of e-mail addresses | ||
/// to which the alert is sent.</param> | ||
/// <param name="emailAccountAdmins">Specifies that the alert is sent | ||
/// to the account administrators.</param> | ||
/// <param name="storageEndpoint">Specifies the blob storage endpoint | ||
/// (e.g. https://MyAccount.blob.core.windows.net). This blob storage | ||
/// will hold all Threat Detection audit logs.</param> | ||
/// <param name="storageAccountAccessKey">Specifies the identifier key | ||
/// of the Threat Detection audit storage account.</param> | ||
/// <param name="retentionDays">Specifies the number of days to keep in | ||
/// the Threat Detection audit logs.</param> | ||
public ServerSecurityAlertPolicy(SecurityAlertPolicyState state, string id = default(string), string name = default(string), string type = default(string), IList<string> disabledAlerts = default(IList<string>), IList<string> emailAddresses = default(IList<string>), bool? emailAccountAdmins = default(bool?), string storageEndpoint = default(string), string storageAccountAccessKey = default(string), int? retentionDays = default(int?)) | ||
: base(id, name, type) | ||
{ | ||
State = state; | ||
DisabledAlerts = disabledAlerts; | ||
EmailAddresses = emailAddresses; | ||
EmailAccountAdmins = emailAccountAdmins; | ||
StorageEndpoint = storageEndpoint; | ||
StorageAccountAccessKey = storageAccountAccessKey; | ||
RetentionDays = retentionDays; | ||
CustomInit(); | ||
} | ||
|
||
/// <summary> | ||
/// An initialization method that performs custom operations like setting defaults | ||
/// </summary> | ||
partial void CustomInit(); | ||
|
||
/// <summary> | ||
/// Gets or sets specifies the state of the policy, whether it is | ||
/// enabled or disabled. Possible values include: 'New', 'Enabled', | ||
/// 'Disabled' | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties.state")] | ||
public SecurityAlertPolicyState State { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets specifies an array of alerts that are disabled. | ||
/// Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, | ||
/// Access_Anomaly | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties.disabledAlerts")] | ||
public IList<string> DisabledAlerts { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets specifies an array of e-mail addresses to which the | ||
/// alert is sent. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties.emailAddresses")] | ||
public IList<string> EmailAddresses { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets specifies that the alert is sent to the account | ||
/// administrators. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties.emailAccountAdmins")] | ||
public bool? EmailAccountAdmins { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets specifies the blob storage endpoint (e.g. | ||
/// https://MyAccount.blob.core.windows.net). This blob storage will | ||
/// hold all Threat Detection audit logs. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties.storageEndpoint")] | ||
public string StorageEndpoint { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets specifies the identifier key of the Threat Detection | ||
/// audit storage account. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties.storageAccountAccessKey")] | ||
public string StorageAccountAccessKey { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets specifies the number of days to keep in the Threat | ||
/// Detection audit logs. | ||
/// </summary> | ||
[JsonProperty(PropertyName = "properties.retentionDays")] | ||
public int? RetentionDays { get; set; } | ||
|
||
/// <summary> | ||
/// Validate the object. | ||
/// </summary> | ||
/// <exception cref="ValidationException"> | ||
/// Thrown if validation fails | ||
/// </exception> | ||
public virtual void Validate() | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.