/// <summary> /// Initializes a new instance of the /// ManagedDatabaseSecurityAlertPolicy class. /// </summary> /// <param name="state">Specifies the state of the policy, whether it /// is enabled or disabled or a policy has not been applied yet on the /// specific database. 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, Data_Exfiltration, /// Unsafe_Action</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> /// <param name="creationTime">Specifies the UTC creation time of the /// policy.</param> public ManagedDatabaseSecurityAlertPolicy(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?), System.DateTime?creationTime = default(System.DateTime?)) : base(id, name, type) { State = state; DisabledAlerts = disabledAlerts; EmailAddresses = emailAddresses; EmailAccountAdmins = emailAccountAdmins; StorageEndpoint = storageEndpoint; StorageAccountAccessKey = storageAccountAccessKey; RetentionDays = retentionDays; CreationTime = creationTime; CustomInit(); }
internal static string ToSerializedValue(this SecurityAlertPolicyState value) { switch( value ) { case SecurityAlertPolicyState.New: return "New"; case SecurityAlertPolicyState.Enabled: return "Enabled"; case SecurityAlertPolicyState.Disabled: return "Disabled"; } return null; }
/// <summary> /// Initializes a new instance of the DatabaseSecurityAlertPolicy /// class. /// </summary> /// <param name="state">Specifies the state of the policy. If state is /// Enabled, storageEndpoint and storageAccountAccessKey are required. /// 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="location">The geo-location where the resource /// lives</param> /// <param name="kind">Resource kind.</param> /// <param name="disabledAlerts">Specifies the semicolon-separated list /// of alerts that are disabled, or empty string to disable no alerts. /// Possible values: Sql_Injection; Sql_Injection_Vulnerability; /// Access_Anomaly; Data_Exfiltration; Unsafe_Action.</param> /// <param name="emailAddresses">Specifies the semicolon-separated list /// of e-mail addresses to which the alert is sent.</param> /// <param name="emailAccountAdmins">Specifies that the alert is sent /// to the account administrators. Possible values include: 'Enabled', /// 'Disabled'</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. If state is Enabled, /// storageEndpoint is required.</param> /// <param name="storageAccountAccessKey">Specifies the identifier key /// of the Threat Detection audit storage account. If state is Enabled, /// storageAccountAccessKey is required.</param> /// <param name="retentionDays">Specifies the number of days to keep in /// the Threat Detection audit logs.</param> /// <param name="useServerDefault">Specifies whether to use the default /// server policy. Possible values include: 'Enabled', /// 'Disabled'</param> public DatabaseSecurityAlertPolicy(SecurityAlertPolicyState state, string id = default(string), string name = default(string), string type = default(string), string location = default(string), string kind = default(string), string disabledAlerts = default(string), string emailAddresses = default(string), SecurityAlertPolicyEmailAccountAdmins?emailAccountAdmins = default(SecurityAlertPolicyEmailAccountAdmins?), string storageEndpoint = default(string), string storageAccountAccessKey = default(string), int?retentionDays = default(int?), SecurityAlertPolicyUseServerDefault?useServerDefault = default(SecurityAlertPolicyUseServerDefault?)) : base(id, name, type) { Location = location; Kind = kind; State = state; DisabledAlerts = disabledAlerts; EmailAddresses = emailAddresses; EmailAccountAdmins = emailAccountAdmins; StorageEndpoint = storageEndpoint; StorageAccountAccessKey = storageAccountAccessKey; RetentionDays = retentionDays; UseServerDefault = useServerDefault; CustomInit(); }
public static string ToSerialString(this SecurityAlertPolicyState value) => value switch {