SecurityRuleInner Class
- java.
lang. Object - com.
azure. core. management. SubResource - com.
azure. resourcemanager. network. fluent. models. SecurityRuleInner
- com.
- com.
public final class SecurityRuleInner
extends SubResource
Network security rule.
Constructor Summary
Constructor | Description |
---|---|
SecurityRuleInner() |
Creates an instance of Security |
Method Summary
Modifier and Type | Method and Description |
---|---|
Security |
access()
Get the access property: The network traffic is allowed or denied. |
String |
description()
Get the description property: A description for this rule. |
String |
destinationAddressPrefix()
Get the destination |
List<String> |
destinationAddressPrefixes()
Get the destination |
List<Application |
destinationApplicationSecurityGroups()
Get the destination |
String |
destinationPortRange()
Get the destination |
List<String> |
destinationPortRanges()
Get the destination |
Security |
direction()
Get the direction property: The direction of the rule. |
String |
etag()
Get the etag property: A unique read-only string that changes whenever the resource is updated. |
static
Security |
fromJson(JsonReader jsonReader)
Reads an instance of Security |
String |
name()
Get the name property: The name of the resource that is unique within a resource group. |
Integer |
priority()
Get the priority property: The priority of the rule. |
Security |
protocol()
Get the protocol property: Network protocol this rule applies to. |
Provisioning |
provisioningState()
Get the provisioning |
String |
sourceAddressPrefix()
Get the source |
List<String> |
sourceAddressPrefixes()
Get the source |
List<Application |
sourceApplicationSecurityGroups()
Get the source |
String |
sourcePortRange()
Get the source |
List<String> |
sourcePortRanges()
Get the source |
Json |
toJson(JsonWriter jsonWriter) |
String |
type()
Get the type property: The type of the resource. |
void |
validate()
Validates the instance. |
Security |
withAccess(SecurityRuleAccess access)
Set the access property: The network traffic is allowed or denied. |
Security |
withDescription(String description)
Set the description property: A description for this rule. |
Security |
withDestinationAddressPrefix(String destinationAddressPrefix)
Set the destination |
Security |
withDestinationAddressPrefixes(List<String> destinationAddressPrefixes)
Set the destination |
Security |
withDestinationApplicationSecurityGroups(List<ApplicationSecurityGroupInner> destinationApplicationSecurityGroups)
Set the destination |
Security |
withDestinationPortRange(String destinationPortRange)
Set the destination |
Security |
withDestinationPortRanges(List<String> destinationPortRanges)
Set the destination |
Security |
withDirection(SecurityRuleDirection direction)
Set the direction property: The direction of the rule. |
Security |
withId(String id) |
Security |
withName(String name)
Set the name property: The name of the resource that is unique within a resource group. |
Security |
withPriority(Integer priority)
Set the priority property: The priority of the rule. |
Security |
withProtocol(SecurityRuleProtocol protocol)
Set the protocol property: Network protocol this rule applies to. |
Security |
withSourceAddressPrefix(String sourceAddressPrefix)
Set the source |
Security |
withSourceAddressPrefixes(List<String> sourceAddressPrefixes)
Set the source |
Security |
withSourceApplicationSecurityGroups(List<ApplicationSecurityGroupInner> sourceApplicationSecurityGroups)
Set the source |
Security |
withSourcePortRange(String sourcePortRange)
Set the source |
Security |
withSourcePortRanges(List<String> sourcePortRanges)
Set the source |
Security |
withType(String type)
Set the type property: The type of the resource. |
Methods inherited from SubResource
Methods inherited from java.lang.Object
Constructor Details
SecurityRuleInner
public SecurityRuleInner()
Creates an instance of SecurityRuleInner class.
Method Details
access
public SecurityRuleAccess access()
Get the access property: The network traffic is allowed or denied.
Returns:
description
public String description()
Get the description property: A description for this rule. Restricted to 140 chars.
Returns:
destinationAddressPrefix
public String destinationAddressPrefix()
Get the destinationAddressPrefix property: The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
Returns:
destinationAddressPrefixes
public List
Get the destinationAddressPrefixes property: The destination address prefixes. CIDR or destination IP ranges.
Returns:
destinationApplicationSecurityGroups
public List
Get the destinationApplicationSecurityGroups property: The application security group specified as destination.
Returns:
destinationPortRange
public String destinationPortRange()
Get the destinationPortRange property: The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
Returns:
destinationPortRanges
public List
Get the destinationPortRanges property: The destination port ranges.
Returns:
direction
public SecurityRuleDirection direction()
Get the direction property: The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.
Returns:
etag
public String etag()
Get the etag property: A unique read-only string that changes whenever the resource is updated.
Returns:
fromJson
public static SecurityRuleInner fromJson(JsonReader jsonReader)
Reads an instance of SecurityRuleInner from the JsonReader.
Parameters:
Returns:
Throws:
name
public String name()
Get the name property: The name of the resource that is unique within a resource group. This name can be used to access the resource.
Returns:
priority
public Integer priority()
Get the priority property: The priority of the rule. The value can be between 100 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:
protocol
public SecurityRuleProtocol protocol()
Get the protocol property: Network protocol this rule applies to.
Returns:
provisioningState
public ProvisioningState provisioningState()
Get the provisioningState property: The provisioning state of the security rule resource.
Returns:
sourceAddressPrefix
public String sourceAddressPrefix()
Get the sourceAddressPrefix property: The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
Returns:
sourceAddressPrefixes
public List
Get the sourceAddressPrefixes property: The CIDR or source IP ranges.
Returns:
sourceApplicationSecurityGroups
public List
Get the sourceApplicationSecurityGroups property: The application security group specified as source.
Returns:
sourcePortRange
public String sourcePortRange()
Get the sourcePortRange property: The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
Returns:
sourcePortRanges
public List
Get the sourcePortRanges property: The source port ranges.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
SecurityRuleInner.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public String type()
Get the type property: The type of the resource.
Returns:
validate
public void validate()
Validates the instance.
withAccess
public SecurityRuleInner withAccess(SecurityRuleAccess access)
Set the access property: The network traffic is allowed or denied.
Parameters:
Returns:
withDescription
public SecurityRuleInner withDescription(String description)
Set the description property: A description for this rule. Restricted to 140 chars.
Parameters:
Returns:
withDestinationAddressPrefix
public SecurityRuleInner withDestinationAddressPrefix(String destinationAddressPrefix)
Set the destinationAddressPrefix property: The destination address prefix. CIDR or destination IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used.
Parameters:
Returns:
withDestinationAddressPrefixes
public SecurityRuleInner withDestinationAddressPrefixes(List
Set the destinationAddressPrefixes property: The destination address prefixes. CIDR or destination IP ranges.
Parameters:
Returns:
withDestinationApplicationSecurityGroups
public SecurityRuleInner withDestinationApplicationSecurityGroups(List
Set the destinationApplicationSecurityGroups property: The application security group specified as destination.
Parameters:
Returns:
withDestinationPortRange
public SecurityRuleInner withDestinationPortRange(String destinationPortRange)
Set the destinationPortRange property: The destination port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
Parameters:
Returns:
withDestinationPortRanges
public SecurityRuleInner withDestinationPortRanges(List
Set the destinationPortRanges property: The destination port ranges.
Parameters:
Returns:
withDirection
public SecurityRuleInner withDirection(SecurityRuleDirection direction)
Set the direction property: The direction of the rule. The direction specifies if rule will be evaluated on incoming or outgoing traffic.
Parameters:
Returns:
withId
public SecurityRuleInner withId(String id)
Overrides:
SecurityRuleInner.withId(String id)Parameters:
withName
public SecurityRuleInner withName(String name)
Set the name property: The name of the resource that is unique within a resource group. This name can be used to access the resource.
Parameters:
Returns:
withPriority
public SecurityRuleInner withPriority(Integer priority)
Set the priority property: The priority of the rule. The value can be between 100 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:
Returns:
withProtocol
public SecurityRuleInner withProtocol(SecurityRuleProtocol protocol)
Set the protocol property: Network protocol this rule applies to.
Parameters:
Returns:
withSourceAddressPrefix
public SecurityRuleInner withSourceAddressPrefix(String sourceAddressPrefix)
Set the sourceAddressPrefix property: The CIDR or source IP range. Asterisk '*' can also be used to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. If this is an ingress rule, specifies where network traffic originates from.
Parameters:
Returns:
withSourceAddressPrefixes
public SecurityRuleInner withSourceAddressPrefixes(List
Set the sourceAddressPrefixes property: The CIDR or source IP ranges.
Parameters:
Returns:
withSourceApplicationSecurityGroups
public SecurityRuleInner withSourceApplicationSecurityGroups(List
Set the sourceApplicationSecurityGroups property: The application security group specified as source.
Parameters:
Returns:
withSourcePortRange
public SecurityRuleInner withSourcePortRange(String sourcePortRange)
Set the sourcePortRange property: The source port or range. Integer or range between 0 and 65535. Asterisk '*' can also be used to match all ports.
Parameters:
Returns:
withSourcePortRanges
public SecurityRuleInner withSourcePortRanges(List
Set the sourcePortRanges property: The source port ranges.
Parameters:
Returns:
withType
public SecurityRuleInner withType(String type)
Set the type property: The type of the resource.
Parameters:
Returns:
Applies to
Azure SDK for Java