Class ServerSecurityAlertPolicyInner

java.lang.Object
com.azure.core.management.ProxyResource
com.azure.resourcemanager.sql.fluent.models.ServerSecurityAlertPolicyInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>

public final class ServerSecurityAlertPolicyInner extends com.azure.core.management.ProxyResource
A server security alert policy.
  • Constructor Details

    • ServerSecurityAlertPolicyInner

      public ServerSecurityAlertPolicyInner()
      Creates an instance of ServerSecurityAlertPolicyInner class.
  • Method Details

    • systemData

      public com.azure.core.management.SystemData systemData()
      Get the systemData property: SystemData of SecurityAlertPolicyResource.
      Returns:
      the systemData value.
    • type

      public String type()
      Get the type property: The type of the resource.
      Overrides:
      type in class com.azure.core.management.ProxyResource
      Returns:
      the type value.
    • name

      public String name()
      Get the name property: The name of the resource.
      Overrides:
      name in class com.azure.core.management.ProxyResource
      Returns:
      the name value.
    • id

      public String id()
      Get the id property: Fully qualified resource Id for the resource.
      Overrides:
      id in class com.azure.core.management.ProxyResource
      Returns:
      the id value.
    • state

      public SecurityAlertPolicyState state()
      Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.
      Returns:
      the state value.
    • withState

      Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database.
      Parameters:
      state - the state value to set.
      Returns:
      the ServerSecurityAlertPolicyInner object itself.
    • disabledAlerts

      public List<String> disabledAlerts()
      Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force.
      Returns:
      the disabledAlerts value.
    • withDisabledAlerts

      public ServerSecurityAlertPolicyInner withDisabledAlerts(List<String> disabledAlerts)
      Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action, Brute_Force.
      Parameters:
      disabledAlerts - the disabledAlerts value to set.
      Returns:
      the ServerSecurityAlertPolicyInner object itself.
    • emailAddresses

      public List<String> emailAddresses()
      Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.
      Returns:
      the emailAddresses value.
    • withEmailAddresses

      public ServerSecurityAlertPolicyInner withEmailAddresses(List<String> emailAddresses)
      Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent.
      Parameters:
      emailAddresses - the emailAddresses value to set.
      Returns:
      the ServerSecurityAlertPolicyInner object itself.
    • emailAccountAdmins

      public Boolean emailAccountAdmins()
      Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.
      Returns:
      the emailAccountAdmins value.
    • withEmailAccountAdmins

      public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins)
      Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.
      Parameters:
      emailAccountAdmins - the emailAccountAdmins value to set.
      Returns:
      the ServerSecurityAlertPolicyInner object itself.
    • storageEndpoint

      public String storageEndpoint()
      Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
      Returns:
      the storageEndpoint value.
    • withStorageEndpoint

      public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint)
      Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs.
      Parameters:
      storageEndpoint - the storageEndpoint value to set.
      Returns:
      the ServerSecurityAlertPolicyInner object itself.
    • storageAccountAccessKey

      public String storageAccountAccessKey()
      Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account.
      Returns:
      the storageAccountAccessKey value.
    • withStorageAccountAccessKey

      public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey)
      Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account.
      Parameters:
      storageAccountAccessKey - the storageAccountAccessKey value to set.
      Returns:
      the ServerSecurityAlertPolicyInner object itself.
    • retentionDays

      public Integer retentionDays()
      Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.
      Returns:
      the retentionDays value.
    • withRetentionDays

      public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays)
      Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.
      Parameters:
      retentionDays - the retentionDays value to set.
      Returns:
      the ServerSecurityAlertPolicyInner object itself.
    • creationTime

      public OffsetDateTime creationTime()
      Get the creationTime property: Specifies the UTC creation time of the policy.
      Returns:
      the creationTime value.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
      Overrides:
      toJson in class com.azure.core.management.ProxyResource
      Throws:
      IOException
    • fromJson

      public static ServerSecurityAlertPolicyInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ServerSecurityAlertPolicyInner from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ServerSecurityAlertPolicyInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the ServerSecurityAlertPolicyInner.