AdminRule Class

public final class AdminRule
extends BaseAdminRuleInner

Network admin rule.

Constructor Summary

Constructor Description
AdminRule()

Creates an instance of AdminRule class.

Method Summary

Modifier and Type Method and Description
SecurityConfigurationRuleAccess access()

Get the access property: Indicates the access allowed for this particular rule.

String description()

Get the description property: A description for this rule.

List<String> destinationPortRanges()

Get the destinationPortRanges property: The destination port ranges.

List<AddressPrefixItem> destinations()

Get the destinations property: The destination address prefixes.

SecurityConfigurationRuleDirection direction()

Get the direction property: Indicates if the traffic matched against the rule in inbound or outbound.

String etag()

Get the etag property: A unique read-only string that changes whenever the resource is updated.

static AdminRule fromJson(JsonReader jsonReader)

Reads an instance of AdminRule from the JsonReader.

AdminRuleKind kind()

Get the kind property: Whether the rule is custom or default.

String name()

Get the name property: The name of the resource.

Integer priority()

Get the priority property: The priority of the rule.

SecurityConfigurationRuleProtocol protocol()

Get the protocol property: Network protocol this rule applies to.

ProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the resource.

String resourceGuid()

Get the resourceGuid property: Unique identifier for this resource.

List<String> sourcePortRanges()

Get the sourcePortRanges property: The source port ranges.

List<AddressPrefixItem> sources()

Get the sources property: The CIDR or source IP ranges.

SystemData systemData()

Get the systemData property: The system metadata related to this resource.

JsonWriter toJson(JsonWriter jsonWriter)
String type()

Get the type property: The type of the resource.

void validate()

Validates the instance.

AdminRule withAccess(SecurityConfigurationRuleAccess access)

Set the access property: Indicates the access allowed for this particular rule.

AdminRule withDescription(String description)

Set the description property: A description for this rule.

AdminRule withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: The destination port ranges.

AdminRule withDestinations(List<AddressPrefixItem> destinations)

Set the destinations property: The destination address prefixes.

AdminRule withDirection(SecurityConfigurationRuleDirection direction)

Set the direction property: Indicates if the traffic matched against the rule in inbound or outbound.

AdminRule withId(String id)

Set the id property: Resource ID.

AdminRule withPriority(Integer priority)

Set the priority property: The priority of the rule.

AdminRule withProtocol(SecurityConfigurationRuleProtocol protocol)

Set the protocol property: Network protocol this rule applies to.

AdminRule withSourcePortRanges(List<String> sourcePortRanges)

Set the sourcePortRanges property: The source port ranges.

AdminRule withSources(List<AddressPrefixItem> sources)

Set the sources property: The CIDR or source IP ranges.

Methods inherited from BaseAdminRuleInner

Methods inherited from ChildResource

id

Methods inherited from java.lang.Object

Constructor Details

AdminRule

public AdminRule()

Creates an instance of AdminRule class.

Method Details

access

public SecurityConfigurationRuleAccess access()

Get the access property: Indicates the access allowed for this particular rule.

Returns:

the access value.

description

public String description()

Get the description property: A description for this rule. Restricted to 140 chars.

Returns:

the description value.

destinationPortRanges

public List<String> destinationPortRanges()

Get the destinationPortRanges property: The destination port ranges.

Returns:

the destinationPortRanges value.

destinations

public List<AddressPrefixItem> destinations()

Get the destinations property: The destination address prefixes. CIDR or destination IP ranges.

Returns:

the destinations value.

direction

public SecurityConfigurationRuleDirection direction()

Get the direction property: Indicates if the traffic matched against the rule in inbound or outbound.

Returns:

the direction value.

etag

public String etag()

Get the etag property: A unique read-only string that changes whenever the resource is updated.

Overrides:

AdminRule.etag()

Returns:

the etag value.

fromJson

public static AdminRule fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

kind

public AdminRuleKind kind()

Get the kind property: Whether the rule is custom or default.

Overrides:

AdminRule.kind()

Returns:

the kind value.

name

public String name()

Get the name property: The name of the resource.

Overrides:

AdminRule.name()

Returns:

the name value.

priority

public Integer 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.

protocol

public SecurityConfigurationRuleProtocol protocol()

Get the protocol property: Network protocol this rule applies to.

Returns:

the protocol value.

provisioningState

public ProvisioningState provisioningState()

Get the provisioningState property: The provisioning state of the resource.

Returns:

the provisioningState value.

resourceGuid

public String resourceGuid()

Get the resourceGuid property: Unique identifier for this resource.

Returns:

the resourceGuid value.

sourcePortRanges

public List<String> sourcePortRanges()

Get the sourcePortRanges property: The source port ranges.

Returns:

the sourcePortRanges value.

sources

public List<AddressPrefixItem> sources()

Get the sources property: The CIDR or source IP ranges.

Returns:

the sources value.

systemData

public SystemData systemData()

Get the systemData property: The system metadata related to this resource.

Overrides:

AdminRule.systemData()

Returns:

the systemData value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

AdminRule.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public String type()

Get the type property: The type of the resource.

Overrides:

AdminRule.type()

Returns:

the type value.

validate

public void validate()

Validates the instance.

Overrides:

AdminRule.validate()

withAccess

public AdminRule withAccess(SecurityConfigurationRuleAccess access)

Set the access property: Indicates the access allowed for this particular rule.

Parameters:

access - the access value to set.

Returns:

the AdminRule object itself.

withDescription

public AdminRule withDescription(String description)

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.

withDestinationPortRanges

public AdminRule withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: The destination port ranges.

Parameters:

destinationPortRanges - the destinationPortRanges value to set.

Returns:

the AdminRule object itself.

withDestinations

public AdminRule withDestinations(List<AddressPrefixItem> destinations)

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.

withDirection

public AdminRule withDirection(SecurityConfigurationRuleDirection direction)

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.

withId

public AdminRule withId(String id)

Set the id property: Resource ID.

Overrides:

AdminRule.withId(String id)

Parameters:

id

withPriority

public AdminRule withPriority(Integer priority)

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.

withProtocol

public AdminRule withProtocol(SecurityConfigurationRuleProtocol protocol)

Set the protocol property: Network protocol this rule applies to.

Parameters:

protocol - the protocol value to set.

Returns:

the AdminRule object itself.

withSourcePortRanges

public AdminRule withSourcePortRanges(List<String> sourcePortRanges)

Set the sourcePortRanges property: The source port ranges.

Parameters:

sourcePortRanges - the sourcePortRanges value to set.

Returns:

the AdminRule object itself.

withSources

public AdminRule withSources(List<AddressPrefixItem> sources)

Set the sources property: The CIDR or source IP ranges.

Parameters:

sources - the sources value to set.

Returns:

the AdminRule object itself.

Applies to