Share via


NetworkSecurityGroupResourceSettings Class

public final class NetworkSecurityGroupResourceSettings
extends ResourceSettings

Defines the NSG resource settings.

Constructor Summary

Constructor Description
NetworkSecurityGroupResourceSettings()

Creates an instance of NetworkSecurityGroupResourceSettings class.

Method Summary

Modifier and Type Method and Description
static NetworkSecurityGroupResourceSettings fromJson(JsonReader jsonReader)

Reads an instance of NetworkSecurityGroupResourceSettings from the JsonReader.

String resourceType()

Get the resourceType property: The resource type.

List<NsgSecurityRule> securityRules()

Get the securityRules property: Gets or sets Security rules of network security group.

Map<String,String> tags()

Get the tags property: Gets or sets the Resource tags.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

NetworkSecurityGroupResourceSettings withSecurityRules(List<NsgSecurityRule> securityRules)

Set the securityRules property: Gets or sets Security rules of network security group.

NetworkSecurityGroupResourceSettings withTags(Map<String,String> tags)

Set the tags property: Gets or sets the Resource tags.

NetworkSecurityGroupResourceSettings withTargetResourceGroupName(String targetResourceGroupName)

Set the targetResourceGroupName property: Gets or sets the target resource group name.

NetworkSecurityGroupResourceSettings withTargetResourceName(String targetResourceName)

Set the targetResourceName property: Gets or sets the target Resource name.

Methods inherited from ResourceSettings

Methods inherited from java.lang.Object

Constructor Details

NetworkSecurityGroupResourceSettings

public NetworkSecurityGroupResourceSettings()

Creates an instance of NetworkSecurityGroupResourceSettings class.

Method Details

fromJson

public static NetworkSecurityGroupResourceSettings fromJson(JsonReader jsonReader)

Reads an instance of NetworkSecurityGroupResourceSettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

resourceType

public String resourceType()

Get the resourceType property: The resource type. For example, the value can be Microsoft.Compute/virtualMachines.

Overrides:

NetworkSecurityGroupResourceSettings.resourceType()

Returns:

the resourceType value.

securityRules

public List<NsgSecurityRule> securityRules()

Get the securityRules property: Gets or sets Security rules of network security group.

Returns:

the securityRules value.

tags

public Map<String,String> tags()

Get the tags property: Gets or sets the Resource tags.

Returns:

the tags value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

NetworkSecurityGroupResourceSettings.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

Overrides:

NetworkSecurityGroupResourceSettings.validate()

withSecurityRules

public NetworkSecurityGroupResourceSettings withSecurityRules(List<NsgSecurityRule> securityRules)

Set the securityRules property: Gets or sets Security rules of network security group.

Parameters:

securityRules - the securityRules value to set.

Returns:

the NetworkSecurityGroupResourceSettings object itself.

withTags

public NetworkSecurityGroupResourceSettings withTags(Map<String,String> tags)

Set the tags property: Gets or sets the Resource tags.

Parameters:

tags - the tags value to set.

Returns:

the NetworkSecurityGroupResourceSettings object itself.

withTargetResourceGroupName

public NetworkSecurityGroupResourceSettings withTargetResourceGroupName(String targetResourceGroupName)

Set the targetResourceGroupName property: Gets or sets the target resource group name.

Overrides:

NetworkSecurityGroupResourceSettings.withTargetResourceGroupName(String targetResourceGroupName)

Parameters:

targetResourceGroupName

withTargetResourceName

public NetworkSecurityGroupResourceSettings withTargetResourceName(String targetResourceName)

Set the targetResourceName property: Gets or sets the target Resource name.

Overrides:

NetworkSecurityGroupResourceSettings.withTargetResourceName(String targetResourceName)

Parameters:

targetResourceName

Applies to