Class MhsmNetworkRuleSet
java.lang.Object
com.azure.resourcemanager.keyvault.models.MhsmNetworkRuleSet
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MhsmNetworkRuleSet>
public final class MhsmNetworkRuleSet
extends Object
implements com.azure.json.JsonSerializable<MhsmNetworkRuleSet>
A set of rules governing the network accessibility of a managed hsm pool.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbypass()Get the bypass property: Tells what traffic can bypass network rules.Get the defaultAction property: The default action when no rule from ipRules and from virtualNetworkRules match.static MhsmNetworkRuleSetfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MhsmNetworkRuleSet from the JsonReader.ipRules()Get the ipRules property: The list of IP address rules.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Get the virtualNetworkRules property: The list of virtual network rules.withBypass(NetworkRuleBypassOptions bypass) Set the bypass property: Tells what traffic can bypass network rules.withDefaultAction(NetworkRuleAction defaultAction) Set the defaultAction property: The default action when no rule from ipRules and from virtualNetworkRules match.withIpRules(List<MhsmipRule> ipRules) Set the ipRules property: The list of IP address rules.withVirtualNetworkRules(List<MhsmVirtualNetworkRule> virtualNetworkRules) Set the virtualNetworkRules property: The list of virtual network rules.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
MhsmNetworkRuleSet
public MhsmNetworkRuleSet()Creates an instance of MhsmNetworkRuleSet class.
-
-
Method Details
-
bypass
Get the bypass property: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'.- Returns:
- the bypass value.
-
withBypass
Set the bypass property: Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'.- Parameters:
bypass- the bypass value to set.- Returns:
- the MhsmNetworkRuleSet object itself.
-
defaultAction
Get the defaultAction property: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.- Returns:
- the defaultAction value.
-
withDefaultAction
Set the defaultAction property: The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated.- Parameters:
defaultAction- the defaultAction value to set.- Returns:
- the MhsmNetworkRuleSet object itself.
-
ipRules
Get the ipRules property: The list of IP address rules.- Returns:
- the ipRules value.
-
withIpRules
Set the ipRules property: The list of IP address rules.- Parameters:
ipRules- the ipRules value to set.- Returns:
- the MhsmNetworkRuleSet object itself.
-
virtualNetworkRules
Get the virtualNetworkRules property: The list of virtual network rules.- Returns:
- the virtualNetworkRules value.
-
withVirtualNetworkRules
Set the virtualNetworkRules property: The list of virtual network rules.- Parameters:
virtualNetworkRules- the virtualNetworkRules value to set.- Returns:
- the MhsmNetworkRuleSet object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<MhsmNetworkRuleSet>- Throws:
IOException
-
fromJson
Reads an instance of MhsmNetworkRuleSet from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MhsmNetworkRuleSet if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the MhsmNetworkRuleSet.
-