Class DatabaseSecurityAlertPolicyInner
- java.lang.Object
-
- com.azure.core.management.ProxyResource
-
- com.azure.resourcemanager.sql.fluent.models.DatabaseSecurityAlertPolicyInner
-
public class DatabaseSecurityAlertPolicyInner extends com.azure.core.management.ProxyResourceContains information about a database Threat Detection policy.
-
-
Constructor Summary
Constructors Constructor Description DatabaseSecurityAlertPolicyInner()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdisabledAlerts()Get the disabledAlerts property: Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts.SecurityAlertPolicyEmailAccountAdminsemailAccountAdmins()Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.StringemailAddresses()Get the emailAddresses property: Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.Stringkind()Get the kind property: Resource kind.Stringlocation()Get the location property: The geo-location where the resource lives.IntegerretentionDays()Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.SecurityAlertPolicyStatestate()Get the state property: Specifies the state of the policy.StringstorageAccountAccessKey()Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account.StringstorageEndpoint()Get the storageEndpoint property: Specifies the blob storage endpoint (e.g.SecurityAlertPolicyUseServerDefaultuseServerDefault()Get the useServerDefault property: Specifies whether to use the default server policy.voidvalidate()Validates the instance.DatabaseSecurityAlertPolicyInnerwithDisabledAlerts(String disabledAlerts)Set the disabledAlerts property: Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable no alerts.DatabaseSecurityAlertPolicyInnerwithEmailAccountAdmins(SecurityAlertPolicyEmailAccountAdmins emailAccountAdmins)Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.DatabaseSecurityAlertPolicyInnerwithEmailAddresses(String emailAddresses)Set the emailAddresses property: Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.DatabaseSecurityAlertPolicyInnerwithLocation(String location)Set the location property: The geo-location where the resource lives.DatabaseSecurityAlertPolicyInnerwithRetentionDays(Integer retentionDays)Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs.DatabaseSecurityAlertPolicyInnerwithState(SecurityAlertPolicyState state)Set the state property: Specifies the state of the policy.DatabaseSecurityAlertPolicyInnerwithStorageAccountAccessKey(String storageAccountAccessKey)Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account.DatabaseSecurityAlertPolicyInnerwithStorageEndpoint(String storageEndpoint)Set the storageEndpoint property: Specifies the blob storage endpoint (e.g.DatabaseSecurityAlertPolicyInnerwithUseServerDefault(SecurityAlertPolicyUseServerDefault useServerDefault)Set the useServerDefault property: Specifies whether to use the default server policy.
-
-
-
Method Detail
-
location
public String location()
Get the location property: The geo-location where the resource lives.- Returns:
- the location value.
-
withLocation
public DatabaseSecurityAlertPolicyInner withLocation(String location)
Set the location property: The geo-location where the resource lives.- Parameters:
location- the location value to set.- Returns:
- the DatabaseSecurityAlertPolicyInner object itself.
-
kind
public String kind()
Get the kind property: Resource kind.- Returns:
- the kind value.
-
state
public SecurityAlertPolicyState state()
Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.- Returns:
- the state value.
-
withState
public DatabaseSecurityAlertPolicyInner withState(SecurityAlertPolicyState state)
Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required.- Parameters:
state- the state value to set.- Returns:
- the DatabaseSecurityAlertPolicyInner object itself.
-
disabledAlerts
public String disabledAlerts()
Get the disabledAlerts property: 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.- Returns:
- the disabledAlerts value.
-
withDisabledAlerts
public DatabaseSecurityAlertPolicyInner withDisabledAlerts(String disabledAlerts)
Set the disabledAlerts property: 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.- Parameters:
disabledAlerts- the disabledAlerts value to set.- Returns:
- the DatabaseSecurityAlertPolicyInner object itself.
-
emailAddresses
public String emailAddresses()
Get the emailAddresses property: Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.- Returns:
- the emailAddresses value.
-
withEmailAddresses
public DatabaseSecurityAlertPolicyInner withEmailAddresses(String emailAddresses)
Set the emailAddresses property: Specifies the semicolon-separated list of e-mail addresses to which the alert is sent.- Parameters:
emailAddresses- the emailAddresses value to set.- Returns:
- the DatabaseSecurityAlertPolicyInner object itself.
-
emailAccountAdmins
public SecurityAlertPolicyEmailAccountAdmins emailAccountAdmins()
Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.- Returns:
- the emailAccountAdmins value.
-
withEmailAccountAdmins
public DatabaseSecurityAlertPolicyInner withEmailAccountAdmins(SecurityAlertPolicyEmailAccountAdmins emailAccountAdmins)
Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators.- Parameters:
emailAccountAdmins- the emailAccountAdmins value to set.- Returns:
- the DatabaseSecurityAlertPolicyInner 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. If state is Enabled, storageEndpoint is required.- Returns:
- the storageEndpoint value.
-
withStorageEndpoint
public DatabaseSecurityAlertPolicyInner 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. If state is Enabled, storageEndpoint is required.- Parameters:
storageEndpoint- the storageEndpoint value to set.- Returns:
- the DatabaseSecurityAlertPolicyInner object itself.
-
storageAccountAccessKey
public String storageAccountAccessKey()
Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.- Returns:
- the storageAccountAccessKey value.
-
withStorageAccountAccessKey
public DatabaseSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey)
Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required.- Parameters:
storageAccountAccessKey- the storageAccountAccessKey value to set.- Returns:
- the DatabaseSecurityAlertPolicyInner 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 DatabaseSecurityAlertPolicyInner 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 DatabaseSecurityAlertPolicyInner object itself.
-
useServerDefault
public SecurityAlertPolicyUseServerDefault useServerDefault()
Get the useServerDefault property: Specifies whether to use the default server policy.- Returns:
- the useServerDefault value.
-
withUseServerDefault
public DatabaseSecurityAlertPolicyInner withUseServerDefault(SecurityAlertPolicyUseServerDefault useServerDefault)
Set the useServerDefault property: Specifies whether to use the default server policy.- Parameters:
useServerDefault- the useServerDefault value to set.- Returns:
- the DatabaseSecurityAlertPolicyInner object itself.
-
validate
public void validate()
Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-