Azure Network Security Group v2
Manage Azure Network Security Groups and their rules
Lists, creates, updates and deletes Network Security Groups and their security rules, lists subscriptions, resource groups and locations, and sends any Azure Resource Manager request with the connector's own token.
azure-network-security-group-v2_2.0.1.tgz
Community code that runs on your platform. A maintainer reviewed this exact source; the download is rebuilt from it. Follow the to install it.
Connector for Azure Network Security Groups (v2, the next major version of the stock 1.2.0 connector, installed alongside it). Pydantic input and output models cover all 14 operations. Subscriptions, resource groups and locations: list and get. Network Security Groups: create, read, list (full or names only), delete, and list rule names. Update adds or deletes security rules; it refuses a rule whose name or priority is already taken, before the write. Delete reads the group first, because Azure answers a delete of a missing group with success. Execute API Request calls any Azure Resource Manager endpoint with the connector's token.
Authentication is a Microsoft Entra ID app registration (client credentials, service principal). The app needs Network Contributor on the resource groups that hold the NSGs it manages.
Live-tested on FortiSOAR 8.0.1 against an Azure subscription: every operation ran, including the write methods of Execute API Request (POST, PUT, PATCH, DELETE), and the success and error mocks are captured from those runs.
Not live-tested
- The 429 status is synthetic: Azure throttling cannot be provoked on demand.
- Delete is asynchronous in Azure: the connector returns once Azure accepts the delete. A playbook that creates a rule right after deleting the group should check the group first.
Configuration · 7 fields
- Directory (tenant) ID
tenant_idtext requiredTenant ID of the Entra ID directory that holds the app registration.
- Application (client) ID
client_idtext requiredClient ID of the app registration. Grant it Network Contributor on the resource groups it manages.
- Client Secret
client_secretpassword requiredA client secret of the app registration.
- Management Endpoint
resourcetextAzure Resource Manager endpoint. Leave the default for public Azure.
Default
https://management.azure.com - Entra ID Authority
authority_hosttextEntra ID login endpoint. Leave the default for public Azure.
- Verify SSL
verify_sslcheckboxVerify the TLS certificate of the Azure endpoints.
Default
true - Timeout (seconds)
timeouttextPer-request timeout in seconds.
Default
30
Operations · 14
Health Check
health_checkhealth_checkAcquire a token and list subscriptions to confirm the connector can reach Azure Resource Manager.
No parameters.
List of Subscriptions
list_of_subscriptionslist_of_subscriptionsList the subscriptions the app registration can see.
No parameters.
Get Subscription Info 1 param
get_subscription_infoget_subscription_infoGet the details of one subscription.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
List of Resource Groups 1 param
list_of_resource_groupslist_of_resource_groupsList the resource groups in a subscription.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
Get Resource Group Info 2 params
get_resource_group_infoget_resource_group_infoGet one resource group.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
- Resource Group Name
resource_group_nametext requiredName of the resource group that holds the Network Security Group.
List of Locations 1 param
list_of_locationslist_of_locationsList the Azure regions available to a subscription.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
Create Network Security Group 6 params
create_network_security_groupcreate_network_security_groupCreate a Network Security Group with optional security rules.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
- Resource Group Name
resource_group_nametext requiredName of the resource group that holds the Network Security Group.
- Network Security Group Name
nsg_nametext requiredName of the Network Security Group.
- Location
locationtext requiredAzure region, for example eastus.
- Security Rules
security_rulesobjectJSON array of security rules: name, priority (100-4096), direction (Inbound or Outbound), access (Allow or Deny), protocol (Tcp, Udp, Icmp, Esp, Ah or *), source_address_prefix, destination_address_prefix, source_port_range, destination_port_range (each a value or a JSON list).
- Tags
tagsobjectOptional JSON object of tags.
Update Network Security Group 6 params
update_network_security_groupupdate_network_security_groupAdd security rules to a Network Security Group, or delete rules by name. Adding refuses a rule whose name or priority is taken.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
- Resource Group Name
resource_group_nametext requiredName of the resource group that holds the Network Security Group.
- Network Security Group Name
nsg_nametext requiredName of the Network Security Group.
- Operation
operation_to_perform_on_network_security_groupselect requiredAdd Rules or Delete Rules.
Options Add RulesDelete Rules - Security Rules
security_rulesobjectJSON array of security rules: name, priority (100-4096), direction (Inbound or Outbound), access (Allow or Deny), protocol (Tcp, Udp, Icmp, Esp, Ah or *), source_address_prefix, destination_address_prefix, source_port_range, destination_port_range (each a value or a JSON list).
- Rules to Delete
rules_to_deleteobjectJSON array of rule names to delete (Delete Rules).
Delete Network Security Group 3 params
delete_network_security_groupdelete_network_security_groupDelete a Network Security Group.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
- Resource Group Name
resource_group_nametext requiredName of the resource group that holds the Network Security Group.
- Network Security Group Name
nsg_nametext requiredName of the Network Security Group.
List of Network Security Groups 2 params
list_of_network_security_groupslist_of_network_security_groupsList the Network Security Groups in a resource group, or in the whole subscription when the resource group is empty.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
- Resource Group Name
resource_group_nametextEmpty lists the whole subscription.
List of Network Security Group Names 2 params
list_of_network_security_groups_only_nameslist_of_network_security_groups_only_namesList only the names of the Network Security Groups in a resource group, or in the subscription when it is empty.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
- Resource Group Name
resource_group_nametextEmpty lists the whole subscription.
Get Network Security Group Info 3 params
get_network_security_group_infoget_network_security_group_infoGet one Network Security Group with its rules.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
- Resource Group Name
resource_group_nametext requiredName of the resource group that holds the Network Security Group.
- Network Security Group Name
nsg_nametext requiredName of the Network Security Group.
List of Rule Names in a Network Security Group 3 params
list_of_rule_names_in_a_nsglist_of_rule_names_in_a_nsgList the security rule names of one Network Security Group.
- Subscription ID
subscription_idtext requiredSubscription GUID, for example from List of Subscriptions.
- Resource Group Name
resource_group_nametext requiredName of the resource group that holds the Network Security Group.
- Network Security Group Name
nsg_nametext requiredName of the Network Security Group.
Execute API Request 4 params
execute_api_requestexecute_api_requestCall any management endpoint with the connector's own token, so new Azure Resource Manager capabilities are usable without a connector update.
- Endpoint
endpointtext requiredPath on the management endpoint with its api-version, for example /subscriptions/<id>/resourceGroups?api-version=2021-04-01.
- Method
methodselectHTTP method.
Options GETPOSTPUTPATCHDELETE - Query Parameters
query_paramsobjectOptional JSON object of extra query parameters.
- Request Body
request_bodyobjectOptional JSON request body.