Compartir a través de


InboundSecurityRules Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.InboundSecurityRules

Implements

public final class InboundSecurityRules
implements JsonSerializable<InboundSecurityRules>

Properties of the Inbound Security Rules resource.

Constructor Summary

Constructor Description
InboundSecurityRules()

Creates an instance of InboundSecurityRules class.

Method Summary

Modifier and Type Method and Description
List<String> appliesOn()

Get the appliesOn property: Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type.

Integer destinationPortRange()

Get the destinationPortRange property: NVA port ranges to be opened up.

List<String> destinationPortRanges()

Get the destinationPortRanges property: NVA port ranges to be opened up.

static InboundSecurityRules fromJson(JsonReader jsonReader)

Reads an instance of InboundSecurityRules from the JsonReader.

String name()

Get the name property: Name of the rule.

InboundSecurityRulesProtocol protocol()

Get the protocol property: Protocol.

String sourceAddressPrefix()

Get the sourceAddressPrefix property: The CIDR or source IP range.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

InboundSecurityRules withAppliesOn(List<String> appliesOn)

Set the appliesOn property: Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type.

InboundSecurityRules withDestinationPortRange(Integer destinationPortRange)

Set the destinationPortRange property: NVA port ranges to be opened up.

InboundSecurityRules withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: NVA port ranges to be opened up.

InboundSecurityRules withName(String name)

Set the name property: Name of the rule.

InboundSecurityRules withProtocol(InboundSecurityRulesProtocol protocol)

Set the protocol property: Protocol.

InboundSecurityRules withSourceAddressPrefix(String sourceAddressPrefix)

Set the sourceAddressPrefix property: The CIDR or source IP range.

Methods inherited from java.lang.Object

Constructor Details

InboundSecurityRules

public InboundSecurityRules()

Creates an instance of InboundSecurityRules class.

Method Details

appliesOn

public List<String> appliesOn()

Get the appliesOn property: Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type.

Returns:

the appliesOn value.

destinationPortRange

public Integer destinationPortRange()

Get the destinationPortRange property: NVA port ranges to be opened up. One needs to provide specific ports.

Returns:

the destinationPortRange value.

destinationPortRanges

public List<String> destinationPortRanges()

Get the destinationPortRanges property: NVA port ranges to be opened up. One can provide a range of ports. Allowed port value between 0 and 65535.

Returns:

the destinationPortRanges value.

fromJson

public static InboundSecurityRules fromJson(JsonReader jsonReader)

Reads an instance of InboundSecurityRules from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of InboundSecurityRules 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 InboundSecurityRules.

name

public String name()

Get the name property: Name of the rule.

Returns:

the name value.

protocol

public InboundSecurityRulesProtocol protocol()

Get the protocol property: Protocol. This should be either TCP or UDP.

Returns:

the protocol value.

sourceAddressPrefix

public String sourceAddressPrefix()

Get the sourceAddressPrefix property: The CIDR or source IP range.

Returns:

the sourceAddressPrefix value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAppliesOn

public InboundSecurityRules withAppliesOn(List<String> appliesOn)

Set the appliesOn property: Public IP name in case of Permanent Rule type & Interface Name in case of Auto Expire Rule type.

Parameters:

appliesOn - the appliesOn value to set.

Returns:

the InboundSecurityRules object itself.

withDestinationPortRange

public InboundSecurityRules withDestinationPortRange(Integer destinationPortRange)

Set the destinationPortRange property: NVA port ranges to be opened up. One needs to provide specific ports.

Parameters:

destinationPortRange - the destinationPortRange value to set.

Returns:

the InboundSecurityRules object itself.

withDestinationPortRanges

public InboundSecurityRules withDestinationPortRanges(List<String> destinationPortRanges)

Set the destinationPortRanges property: NVA port ranges to be opened up. One can provide a range of ports. Allowed port value between 0 and 65535.

Parameters:

destinationPortRanges - the destinationPortRanges value to set.

Returns:

the InboundSecurityRules object itself.

withName

public InboundSecurityRules withName(String name)

Set the name property: Name of the rule.

Parameters:

name - the name value to set.

Returns:

the InboundSecurityRules object itself.

withProtocol

public InboundSecurityRules withProtocol(InboundSecurityRulesProtocol protocol)

Set the protocol property: Protocol. This should be either TCP or UDP.

Parameters:

protocol - the protocol value to set.

Returns:

the InboundSecurityRules object itself.

withSourceAddressPrefix

public InboundSecurityRules withSourceAddressPrefix(String sourceAddressPrefix)

Set the sourceAddressPrefix property: The CIDR or source IP range.

Parameters:

sourceAddressPrefix - the sourceAddressPrefix value to set.

Returns:

the InboundSecurityRules object itself.

Applies to