internal static string ToSerializedValue(this SecurityAlertsPolicyState value) { switch (value) { case SecurityAlertsPolicyState.Enabled: return("Enabled"); case SecurityAlertsPolicyState.Disabled: return("Disabled"); } return(null); }
/// <summary> /// Initializes a new instance of the DatabaseSecurityAlertPolicy /// 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: 'Enabled', /// 'Disabled'</param> /// <param name="id">Resource ID.</param> /// <param name="name">Resource name.</param> /// <param name="type">Resource type.</param> /// <param name="systemData">SystemData of /// SecurityAlertPolicyResource.</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, Brute_Force</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 DatabaseSecurityAlertPolicy(SecurityAlertsPolicyState state, string id = default(string), string name = default(string), string type = default(string), SystemData systemData = default(SystemData), 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) { SystemData = systemData; State = state; DisabledAlerts = disabledAlerts; EmailAddresses = emailAddresses; EmailAccountAdmins = emailAccountAdmins; StorageEndpoint = storageEndpoint; StorageAccountAccessKey = storageAccountAccessKey; RetentionDays = retentionDays; CreationTime = creationTime; CustomInit(); }
public static string ToSerialString(this SecurityAlertsPolicyState value) => value switch {