Class AdminRule
java.lang.Object
com.azure.core.management.ProxyResource
com.azure.resourcemanager.network.models.ChildResource
com.azure.resourcemanager.network.fluent.models.BaseAdminRuleInner
com.azure.resourcemanager.network.models.AdminRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
Network admin rule.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccess()Get the access property: Indicates the access allowed for this particular rule.Get the description property: A description for this rule.Get the destinationPortRanges property: The destination port ranges.Get the destinations property: The destination address prefixes.Get the direction property: Indicates if the traffic matched against the rule in inbound or outbound.etag()Get the etag property: A unique read-only string that changes whenever the resource is updated.static AdminRulefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AdminRule from the JsonReader.id()Get the id property: Fully qualified resource Id for the resource.kind()Get the kind property: Whether the rule is custom or default.name()Get the name property: The name of the resource.priority()Get the priority property: The priority of the rule.protocol()Get the protocol property: Network protocol this rule applies to.Get the provisioningState property: The provisioning state of the resource.Get the resourceGuid property: Unique identifier for this resource.Get the sourcePortRanges property: The source port ranges.sources()Get the sources property: The CIDR or source IP ranges.com.azure.core.management.SystemDataGet the systemData property: The system metadata related to this resource.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) type()Get the type property: The type of the resource.voidvalidate()Validates the instance.Set the access property: Indicates the access allowed for this particular rule.withDescription(String description) Set the description property: A description for this rule.withDestinationPortRanges(List<String> destinationPortRanges) Set the destinationPortRanges property: The destination port ranges.withDestinations(List<AddressPrefixItem> destinations) Set the destinations property: The destination address prefixes.withDirection(SecurityConfigurationRuleDirection direction) Set the direction property: Indicates if the traffic matched against the rule in inbound or outbound.withPriority(Integer priority) Set the priority property: The priority of the rule.Set the protocol property: Network protocol this rule applies to.withSourcePortRanges(List<String> sourcePortRanges) Set the sourcePortRanges property: The source port ranges.withSources(List<AddressPrefixItem> sources) Set the sources property: The CIDR or source IP ranges.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
-
AdminRule
public AdminRule()Creates an instance of AdminRule class.
-
-
Method Details
-
kind
Get the kind property: Whether the rule is custom or default.- Overrides:
kindin classBaseAdminRuleInner- Returns:
- the kind value.
-
systemData
public com.azure.core.management.SystemData systemData()Get the systemData property: The system metadata related to this resource.- Overrides:
systemDatain classBaseAdminRuleInner- Returns:
- the systemData value.
-
etag
Get the etag property: A unique read-only string that changes whenever the resource is updated.- Overrides:
etagin classBaseAdminRuleInner- Returns:
- the etag value.
-
type
Get the type property: The type of the resource.- Overrides:
typein classBaseAdminRuleInner- Returns:
- the type value.
-
name
Get the name property: The name of the resource.- Overrides:
namein classBaseAdminRuleInner- Returns:
- the name value.
-
id
Get the id property: Fully qualified resource Id for the resource.- Overrides:
idin classBaseAdminRuleInner- Returns:
- the id value.
-
description
Get the description property: A description for this rule. Restricted to 140 chars.- Returns:
- the description value.
-
withDescription
Set the description property: A description for this rule. Restricted to 140 chars.- Parameters:
description- the description value to set.- Returns:
- the AdminRule object itself.
-
protocol
Get the protocol property: Network protocol this rule applies to.- Returns:
- the protocol value.
-
withProtocol
Set the protocol property: Network protocol this rule applies to.- Parameters:
protocol- the protocol value to set.- Returns:
- the AdminRule object itself.
-
sources
Get the sources property: The CIDR or source IP ranges.- Returns:
- the sources value.
-
withSources
Set the sources property: The CIDR or source IP ranges.- Parameters:
sources- the sources value to set.- Returns:
- the AdminRule object itself.
-
destinations
Get the destinations property: The destination address prefixes. CIDR or destination IP ranges.- Returns:
- the destinations value.
-
withDestinations
Set the destinations property: The destination address prefixes. CIDR or destination IP ranges.- Parameters:
destinations- the destinations value to set.- Returns:
- the AdminRule object itself.
-
sourcePortRanges
Get the sourcePortRanges property: The source port ranges.- Returns:
- the sourcePortRanges value.
-
withSourcePortRanges
Set the sourcePortRanges property: The source port ranges.- Parameters:
sourcePortRanges- the sourcePortRanges value to set.- Returns:
- the AdminRule object itself.
-
destinationPortRanges
Get the destinationPortRanges property: The destination port ranges.- Returns:
- the destinationPortRanges value.
-
withDestinationPortRanges
Set the destinationPortRanges property: The destination port ranges.- Parameters:
destinationPortRanges- the destinationPortRanges value to set.- Returns:
- the AdminRule object itself.
-
access
Get the access property: Indicates the access allowed for this particular rule.- Returns:
- the access value.
-
withAccess
Set the access property: Indicates the access allowed for this particular rule.- Parameters:
access- the access value to set.- Returns:
- the AdminRule object itself.
-
priority
Get the priority property: The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.- Returns:
- the priority value.
-
withPriority
Set the priority property: The priority of the rule. The value can be between 1 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule.- Parameters:
priority- the priority value to set.- Returns:
- the AdminRule object itself.
-
direction
Get the direction property: Indicates if the traffic matched against the rule in inbound or outbound.- Returns:
- the direction value.
-
withDirection
Set the direction property: Indicates if the traffic matched against the rule in inbound or outbound.- Parameters:
direction- the direction value to set.- Returns:
- the AdminRule object itself.
-
provisioningState
Get the provisioningState property: The provisioning state of the resource.- Returns:
- the provisioningState value.
-
resourceGuid
Get the resourceGuid property: Unique identifier for this resource.- Returns:
- the resourceGuid value.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classBaseAdminRuleInner- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>- Overrides:
toJsonin classBaseAdminRuleInner- Throws:
IOException
-
fromJson
Reads an instance of AdminRule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AdminRule 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 AdminRule.
-