/// <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: 'Enabled', /// 'Disabled'</param> /// <param name="id">Fully qualified resource ID for the resource. Ex - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}</param> /// <param name="name">The name of the resource</param> /// <param name="type">The type of the resource. E.g. /// "Microsoft.Compute/virtualMachines" or /// "Microsoft.Storage/storageAccounts"</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(ServerSecurityAlertPolicyState 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(); }
internal static string ToSerializedValue(this ServerSecurityAlertPolicyState value) { switch (value) { case ServerSecurityAlertPolicyState.Enabled: return("Enabled"); case ServerSecurityAlertPolicyState.Disabled: return("Disabled"); } return(null); }
/// <summary> /// Converts the <see cref="sourceValue" /> parameter to the <see cref="destinationType" /> parameter using <see cref="formatProvider" /// /> and <see cref="ignoreCase" /> /// </summary> /// <param name="sourceValue">the <see cref="System.Object"/> to convert from</param> /// <param name="destinationType">the <see cref="System.Type" /> to convert to</param> /// <param name="formatProvider">not used by this TypeConverter.</param> /// <param name="ignoreCase">when set to <c>true</c>, will ignore the case when converting.</param> /// <returns> /// an instance of <see cref="ServerSecurityAlertPolicyState" />, or <c>null</c> if there is no suitable conversion. /// </returns> public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ServerSecurityAlertPolicyState.CreateFrom(sourceValue);