JitNetworkAccessPortRule Class

  • java.lang.Object
    • com.azure.resourcemanager.security.models.JitNetworkAccessPortRule

Implements

public final class JitNetworkAccessPortRule
implements JsonSerializable<JitNetworkAccessPortRule>

The JitNetworkAccessPortRule model.

Constructor Summary

Constructor Description
JitNetworkAccessPortRule()

Creates an instance of JitNetworkAccessPortRule class.

Method Summary

Modifier and Type Method and Description
String allowedSourceAddressPrefix()

Get the allowedSourceAddressPrefix property: Mutually exclusive with the "allowedSourceAddressPrefixes" parameter.

List<String> allowedSourceAddressPrefixes()

Get the allowedSourceAddressPrefixes property: Mutually exclusive with the "allowedSourceAddressPrefix" parameter.

static JitNetworkAccessPortRule fromJson(JsonReader jsonReader)

Reads an instance of JitNetworkAccessPortRule from the JsonReader.

String maxRequestAccessDuration()

Get the maxRequestAccessDuration property: Maximum duration requests can be made for.

int number()

Get the number property: The number property.

Protocol protocol()

Get the protocol property: The protocol property.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

JitNetworkAccessPortRule withAllowedSourceAddressPrefix(String allowedSourceAddressPrefix)

Set the allowedSourceAddressPrefix property: Mutually exclusive with the "allowedSourceAddressPrefixes" parameter.

JitNetworkAccessPortRule withAllowedSourceAddressPrefixes(List<String> allowedSourceAddressPrefixes)

Set the allowedSourceAddressPrefixes property: Mutually exclusive with the "allowedSourceAddressPrefix" parameter.

JitNetworkAccessPortRule withMaxRequestAccessDuration(String maxRequestAccessDuration)

Set the maxRequestAccessDuration property: Maximum duration requests can be made for.

JitNetworkAccessPortRule withNumber(int number)

Set the number property: The number property.

JitNetworkAccessPortRule withProtocol(Protocol protocol)

Set the protocol property: The protocol property.

Methods inherited from java.lang.Object

Constructor Details

JitNetworkAccessPortRule

public JitNetworkAccessPortRule()

Creates an instance of JitNetworkAccessPortRule class.

Method Details

allowedSourceAddressPrefix

public String allowedSourceAddressPrefix()

Get the allowedSourceAddressPrefix property: Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".

Returns:

the allowedSourceAddressPrefix value.

allowedSourceAddressPrefixes

public List<String> allowedSourceAddressPrefixes()

Get the allowedSourceAddressPrefixes property: Mutually exclusive with the "allowedSourceAddressPrefix" parameter.

Returns:

the allowedSourceAddressPrefixes value.

fromJson

public static JitNetworkAccessPortRule fromJson(JsonReader jsonReader)

Reads an instance of JitNetworkAccessPortRule from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

maxRequestAccessDuration

public String maxRequestAccessDuration()

Get the maxRequestAccessDuration property: Maximum duration requests can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day.

Returns:

the maxRequestAccessDuration value.

number

public int number()

Get the number property: The number property.

Returns:

the number value.

protocol

public Protocol protocol()

Get the protocol property: The protocol property.

Returns:

the protocol value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAllowedSourceAddressPrefix

public JitNetworkAccessPortRule withAllowedSourceAddressPrefix(String allowedSourceAddressPrefix)

Set the allowedSourceAddressPrefix property: Mutually exclusive with the "allowedSourceAddressPrefixes" parameter. Should be an IP address or CIDR, for example "192.168.0.3" or "192.168.0.0/16".

Parameters:

allowedSourceAddressPrefix - the allowedSourceAddressPrefix value to set.

Returns:

the JitNetworkAccessPortRule object itself.

withAllowedSourceAddressPrefixes

public JitNetworkAccessPortRule withAllowedSourceAddressPrefixes(List<String> allowedSourceAddressPrefixes)

Set the allowedSourceAddressPrefixes property: Mutually exclusive with the "allowedSourceAddressPrefix" parameter.

Parameters:

allowedSourceAddressPrefixes - the allowedSourceAddressPrefixes value to set.

Returns:

the JitNetworkAccessPortRule object itself.

withMaxRequestAccessDuration

public JitNetworkAccessPortRule withMaxRequestAccessDuration(String maxRequestAccessDuration)

Set the maxRequestAccessDuration property: Maximum duration requests can be made for. In ISO 8601 duration format. Minimum 5 minutes, maximum 1 day.

Parameters:

maxRequestAccessDuration - the maxRequestAccessDuration value to set.

Returns:

the JitNetworkAccessPortRule object itself.

withNumber

public JitNetworkAccessPortRule withNumber(int number)

Set the number property: The number property.

Parameters:

number - the number value to set.

Returns:

the JitNetworkAccessPortRule object itself.

withProtocol

public JitNetworkAccessPortRule withProtocol(Protocol protocol)

Set the protocol property: The protocol property.

Parameters:

protocol - the protocol value to set.

Returns:

the JitNetworkAccessPortRule object itself.

Applies to