# NOT RUN {
nsg_config()
nsg_config(list(nsg_rule_allow_ssh))  # for Linux
nsg_config(list(nsg_rule_allow_rdp))  # for Windows
nsg_config(list(nsg_rule_allow_http, nsg_rule_allow_https))
# a custom rule
nsg_config(list(
    nsg_rule(
        name="whitelist",
        source_addr="114.198.100.0/24",
        access="allow",
        protocol="*"
    )
))
# }
Run the code above in your browser using DataLab