From e368088848ba56dba998ca4fa3c07afddedfbfa3 Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Wed, 12 Jul 2023 18:01:02 +0800 Subject: [PATCH 01/10] update --- src/palo-alto-networks/HISTORY.rst | 8 + src/palo-alto-networks/README.md | 5 + .../azext_palo_alto_networks/__init__.py | 42 + .../azext_palo_alto_networks/_help.py | 11 + .../azext_palo_alto_networks/_params.py | 13 + .../azext_palo_alto_networks/aaz/__init__.py | 6 + .../aaz/latest/__init__.py | 6 + .../aaz/latest/palo_alto/__cmd_group.py | 23 + .../aaz/latest/palo_alto/__init__.py | 11 + .../latest/palo_alto/cloudngfw/__cmd_group.py | 23 + .../latest/palo_alto/cloudngfw/__init__.py | 11 + .../cloudngfw/firewall/__cmd_group.py | 23 + .../palo_alto/cloudngfw/firewall/__init__.py | 21 + .../palo_alto/cloudngfw/firewall/_create.py | 1055 +++++++++++++++++ .../palo_alto/cloudngfw/firewall/_delete.py | 159 +++ .../firewall/_get_global_rulestack.py | 165 +++ .../cloudngfw/firewall/_get_log_profile.py | 252 ++++ .../cloudngfw/firewall/_get_support_info.py | 204 ++++ .../palo_alto/cloudngfw/firewall/_list.py | 904 ++++++++++++++ .../cloudngfw/firewall/_save_log_profile.py | 334 ++++++ .../palo_alto/cloudngfw/firewall/_show.py | 519 ++++++++ .../palo_alto/cloudngfw/firewall/_update.py | 765 ++++++++++++ .../palo_alto/cloudngfw/firewall/_wait.py | 518 ++++++++ .../cloudngfw/firewall/status/__cmd_group.py | 23 + .../cloudngfw/firewall/status/__init__.py | 12 + .../cloudngfw/firewall/status/_list.py | 233 ++++ .../firewall/status/default/__cmd_group.py | 23 + .../firewall/status/default/__init__.py | 12 + .../firewall/status/default/_show.py | 223 ++++ .../cloudngfw/global_rulestack/__cmd_group.py | 23 + .../cloudngfw/global_rulestack/__init__.py | 26 + .../cloudngfw/global_rulestack/_commit.py | 123 ++ .../cloudngfw/global_rulestack/_create.py | 465 ++++++++ .../cloudngfw/global_rulestack/_delete.py | 148 +++ .../global_rulestack/_get_change_log.py | 161 +++ .../cloudngfw/global_rulestack/_list.py | 253 ++++ .../_list_advanced_security_object.py | 191 +++ .../global_rulestack/_list_app_id.py | 182 +++ .../global_rulestack/_list_country.py | 176 +++ .../global_rulestack/_list_firewall.py | 158 +++ .../_list_predefined_url_category.py | 178 +++ .../_list_security_service.py | 191 +++ .../cloudngfw/global_rulestack/_revert.py | 118 ++ .../cloudngfw/global_rulestack/_show.py | 270 +++++ .../cloudngfw/global_rulestack/_update.py | 495 ++++++++ .../cloudngfw/global_rulestack/_wait.py | 269 +++++ .../certificate/__cmd_group.py | 23 + .../global_rulestack/certificate/__init__.py | 16 + .../global_rulestack/certificate/_create.py | 281 +++++ .../global_rulestack/certificate/_delete.py | 157 +++ .../global_rulestack/certificate/_list.py | 213 ++++ .../global_rulestack/certificate/_show.py | 211 ++++ .../global_rulestack/certificate/_wait.py | 210 ++++ .../global_rulestack/fqdnlist/__cmd_group.py | 23 + .../global_rulestack/fqdnlist/__init__.py | 16 + .../global_rulestack/fqdnlist/_create.py | 281 +++++ .../global_rulestack/fqdnlist/_delete.py | 157 +++ .../global_rulestack/fqdnlist/_list.py | 213 ++++ .../global_rulestack/fqdnlist/_show.py | 211 ++++ .../global_rulestack/fqdnlist/_wait.py | 210 ++++ .../global_rulestack/post_rule/__cmd_group.py | 23 + .../global_rulestack/post_rule/__init__.py | 19 + .../global_rulestack/post_rule/_create.py | 660 +++++++++++ .../global_rulestack/post_rule/_delete.py | 157 +++ .../post_rule/_get_counter.py | 230 ++++ .../global_rulestack/post_rule/_list.py | 321 +++++ .../post_rule/_refresh_counter.py | 133 +++ .../post_rule/_reset_counter.py | 179 +++ .../global_rulestack/post_rule/_show.py | 319 +++++ .../global_rulestack/post_rule/_wait.py | 318 +++++ .../global_rulestack/pre_rule/__cmd_group.py | 23 + .../global_rulestack/pre_rule/__init__.py | 19 + .../global_rulestack/pre_rule/_create.py | 660 +++++++++++ .../global_rulestack/pre_rule/_delete.py | 157 +++ .../global_rulestack/pre_rule/_get_counter.py | 230 ++++ .../global_rulestack/pre_rule/_list.py | 321 +++++ .../pre_rule/_refresh_counter.py | 133 +++ .../pre_rule/_reset_counter.py | 179 +++ .../global_rulestack/pre_rule/_show.py | 319 +++++ .../global_rulestack/pre_rule/_wait.py | 318 +++++ .../prefixlist/__cmd_group.py | 23 + .../global_rulestack/prefixlist/__init__.py | 16 + .../global_rulestack/prefixlist/_create.py | 281 +++++ .../global_rulestack/prefixlist/_delete.py | 157 +++ .../global_rulestack/prefixlist/_list.py | 213 ++++ .../global_rulestack/prefixlist/_show.py | 211 ++++ .../global_rulestack/prefixlist/_wait.py | 210 ++++ .../cloudngfw/local_rulestack/__cmd_group.py | 23 + .../cloudngfw/local_rulestack/__init__.py | 27 + .../cloudngfw/local_rulestack/_commit.py | 135 +++ .../cloudngfw/local_rulestack/_create.py | 496 ++++++++ .../cloudngfw/local_rulestack/_delete.py | 160 +++ .../local_rulestack/_get_change_log.py | 173 +++ .../local_rulestack/_get_support_info.py | 204 ++++ .../cloudngfw/local_rulestack/_list.py | 503 ++++++++ .../_list_advanced_security_object.py | 203 ++++ .../cloudngfw/local_rulestack/_list_app_id.py | 194 +++ .../local_rulestack/_list_country.py | 188 +++ .../local_rulestack/_list_firewall.py | 170 +++ .../_list_predefined_url_category.py | 190 +++ .../local_rulestack/_list_security_service.py | 203 ++++ .../cloudngfw/local_rulestack/_revert.py | 130 ++ .../cloudngfw/local_rulestack/_show.py | 286 +++++ .../cloudngfw/local_rulestack/_update.py | 532 +++++++++ .../cloudngfw/local_rulestack/_wait.py | 285 +++++ .../certificate/__cmd_group.py | 23 + .../local_rulestack/certificate/__init__.py | 16 + .../local_rulestack/certificate/_create.py | 292 +++++ .../local_rulestack/certificate/_delete.py | 170 +++ .../local_rulestack/certificate/_list.py | 224 ++++ .../local_rulestack/certificate/_show.py | 224 ++++ .../local_rulestack/certificate/_wait.py | 223 ++++ .../local_rulestack/fqdnlist/__cmd_group.py | 23 + .../local_rulestack/fqdnlist/__init__.py | 16 + .../local_rulestack/fqdnlist/_create.py | 292 +++++ .../local_rulestack/fqdnlist/_delete.py | 170 +++ .../local_rulestack/fqdnlist/_list.py | 224 ++++ .../local_rulestack/fqdnlist/_show.py | 224 ++++ .../local_rulestack/fqdnlist/_wait.py | 223 ++++ .../local_rulestack/local_rule/__cmd_group.py | 23 + .../local_rulestack/local_rule/__init__.py | 19 + .../local_rulestack/local_rule/_create.py | 671 +++++++++++ .../local_rulestack/local_rule/_delete.py | 170 +++ .../local_rule/_get_counter.py | 243 ++++ .../local_rulestack/local_rule/_list.py | 332 ++++++ .../local_rule/_refresh_counter.py | 146 +++ .../local_rule/_reset_counter.py | 192 +++ .../local_rulestack/local_rule/_show.py | 332 ++++++ .../local_rulestack/local_rule/_wait.py | 331 ++++++ .../local_rulestack/prefixlist/__cmd_group.py | 23 + .../local_rulestack/prefixlist/__init__.py | 16 + .../local_rulestack/prefixlist/_create.py | 292 +++++ .../local_rulestack/prefixlist/_delete.py | 170 +++ .../local_rulestack/prefixlist/_list.py | 224 ++++ .../local_rulestack/prefixlist/_show.py | 224 ++++ .../local_rulestack/prefixlist/_wait.py | 223 ++++ .../azext_metadata.json | 4 + .../azext_palo_alto_networks/commands.py | 15 + .../azext_palo_alto_networks/custom.py | 14 + .../tests/__init__.py | 6 + .../tests/latest/__init__.py | 6 + .../tests/latest/test_palo_alto_networks.py | 281 +++++ src/palo-alto-networks/setup.cfg | 1 + src/palo-alto-networks/setup.py | 49 + 144 files changed, 27535 insertions(+) create mode 100644 src/palo-alto-networks/HISTORY.rst create mode 100644 src/palo-alto-networks/README.md create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/_help.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/_params.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_global_rulestack.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_commit.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_get_change_log.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_advanced_security_object.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_app_id.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_country.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_firewall.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_predefined_url_category.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_security_service.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_revert.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_update.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_get_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_refresh_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_reset_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_get_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_refresh_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_reset_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_commit.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/__cmd_group.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_list.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_show.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_wait.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/azext_metadata.json create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/commands.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/custom.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/tests/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/tests/latest/__init__.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py create mode 100644 src/palo-alto-networks/setup.cfg create mode 100644 src/palo-alto-networks/setup.py diff --git a/src/palo-alto-networks/HISTORY.rst b/src/palo-alto-networks/HISTORY.rst new file mode 100644 index 00000000000..8c34bccfff8 --- /dev/null +++ b/src/palo-alto-networks/HISTORY.rst @@ -0,0 +1,8 @@ +.. :changelog: + +Release History +=============== + +0.1.0 +++++++ +* Initial release. \ No newline at end of file diff --git a/src/palo-alto-networks/README.md b/src/palo-alto-networks/README.md new file mode 100644 index 00000000000..18733e0155b --- /dev/null +++ b/src/palo-alto-networks/README.md @@ -0,0 +1,5 @@ +# Azure CLI PaloAltoNetworks Extension # +This is an extension to Azure CLI to manage PaloAltoNetworks resources. + +## How to use ## +Please add commands usage here. \ No newline at end of file diff --git a/src/palo-alto-networks/azext_palo_alto_networks/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/__init__.py new file mode 100644 index 00000000000..44fc8f79a4f --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/__init__.py @@ -0,0 +1,42 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.core import AzCommandsLoader +from azext_palo_alto_networks._help import helps # pylint: disable=unused-import + + +class PaloAltoNetworksCommandsLoader(AzCommandsLoader): + + def __init__(self, cli_ctx=None): + from azure.cli.core.commands import CliCommandType + custom_command_type = CliCommandType( + operations_tmpl='azext_palo_alto_networks.custom#{}') + super().__init__(cli_ctx=cli_ctx, + custom_command_type=custom_command_type) + + def load_command_table(self, args): + from azext_palo_alto_networks.commands import load_command_table + from azure.cli.core.aaz import load_aaz_command_table + try: + from . import aaz + except ImportError: + aaz = None + if aaz: + load_aaz_command_table( + loader=self, + aaz_pkg_name=aaz.__name__, + args=args + ) + load_command_table(self, args) + return self.command_table + + def load_arguments(self, command): + from azext_palo_alto_networks._params import load_arguments + load_arguments(self, command) + + +COMMAND_LOADER_CLS = PaloAltoNetworksCommandsLoader diff --git a/src/palo-alto-networks/azext_palo_alto_networks/_help.py b/src/palo-alto-networks/azext_palo_alto_networks/_help.py new file mode 100644 index 00000000000..126d5d00714 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/_help.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=line-too-long +# pylint: disable=too-many-lines + +from knack.help_files import helps # pylint: disable=unused-import diff --git a/src/palo-alto-networks/azext_palo_alto_networks/_params.py b/src/palo-alto-networks/azext_palo_alto_networks/_params.py new file mode 100644 index 00000000000..cfcec717c9c --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/_params.py @@ -0,0 +1,13 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + + +def load_arguments(self, _): # pylint: disable=unused-argument + pass diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/__cmd_group.py new file mode 100644 index 00000000000..1a7f27ad7f5 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto", +) +class __CMDGroup(AAZCommandGroup): + """Manage palo-alto networks resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__cmd_group.py new file mode 100644 index 00000000000..b6600d11ce6 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw", +) +class __CMDGroup(AAZCommandGroup): + """Manage cloudngfw resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__init__.py new file mode 100644 index 00000000000..5a9d61963d6 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/__init__.py @@ -0,0 +1,11 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__cmd_group.py new file mode 100644 index 00000000000..78c87971d1e --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw firewall", +) +class __CMDGroup(AAZCommandGroup): + """Manage cloudngfw firewall resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py new file mode 100644 index 00000000000..5fa2f09d223 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._get_global_rulestack import * +from ._get_log_profile import * +from ._get_support_info import * +from ._list import * +from ._save_log_profile import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py new file mode 100644 index 00000000000..97da402b39e --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py @@ -0,0 +1,1055 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall create", +) +class Create(AAZCommand): + """Create a FirewallResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.associated_rulestack = AAZObjectArg( + options=["--associated-rulestack"], + arg_group="Properties", + help="Associated Rulestack", + ) + _args_schema.dns_settings = AAZObjectArg( + options=["--dns-settings"], + arg_group="Properties", + help="DNS settings for Firewall", + required=True, + ) + _args_schema.front_end_settings = AAZListArg( + options=["--front-end-settings"], + arg_group="Properties", + help="Frontend settings for Firewall", + ) + _args_schema.is_panorama_managed = AAZStrArg( + options=["--is-panorama-managed"], + arg_group="Properties", + help="Panorama Managed: Default is False. Default will be CloudSec managed", + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.marketplace_details = AAZObjectArg( + options=["--marketplace-details"], + arg_group="Properties", + help="Marketplace details", + required=True, + ) + _args_schema.network_profile = AAZObjectArg( + options=["--network-profile"], + arg_group="Properties", + help="Network settings", + required=True, + ) + _args_schema.pan_etag = AAZStrArg( + options=["--pan-etag"], + arg_group="Properties", + help="panEtag info", + ) + _args_schema.panorama_config = AAZObjectArg( + options=["--panorama-config"], + arg_group="Properties", + help="Panorama Configuration", + ) + _args_schema.plan_data = AAZObjectArg( + options=["--plan-data"], + arg_group="Properties", + help="Billing plan information.", + required=True, + ) + + associated_rulestack = cls._args_schema.associated_rulestack + associated_rulestack.location = AAZStrArg( + options=["location"], + help="Rulestack location", + ) + associated_rulestack.resource_id = AAZStrArg( + options=["resource-id"], + help="Resource Id", + ) + associated_rulestack.rulestack_id = AAZStrArg( + options=["rulestack-id"], + help="Associated rulestack Id", + ) + + dns_settings = cls._args_schema.dns_settings + dns_settings.dns_servers = AAZListArg( + options=["dns-servers"], + help="List of IPs associated with the Firewall", + ) + dns_settings.enable_dns_proxy = AAZStrArg( + options=["enable-dns-proxy"], + help="Enable DNS proxy, disabled by default", + enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, + ) + dns_settings.enabled_dns_type = AAZStrArg( + options=["enabled-dns-type"], + help="Enabled DNS proxy type, disabled by default", + enum={"AZURE": "AZURE", "CUSTOM": "CUSTOM"}, + ) + + dns_servers = cls._args_schema.dns_settings.dns_servers + dns_servers.Element = AAZObjectArg() + cls._build_args_ip_address_create(dns_servers.Element) + + front_end_settings = cls._args_schema.front_end_settings + front_end_settings.Element = AAZObjectArg() + + _element = cls._args_schema.front_end_settings.Element + _element.backend_configuration = AAZObjectArg( + options=["backend-configuration"], + help="Backend configurations", + required=True, + ) + cls._build_args_endpoint_configuration_create(_element.backend_configuration) + _element.frontend_configuration = AAZObjectArg( + options=["frontend-configuration"], + help="Frontend configurations", + required=True, + ) + cls._build_args_endpoint_configuration_create(_element.frontend_configuration) + _element.name = AAZStrArg( + options=["name"], + help="Settings name", + required=True, + ) + _element.protocol = AAZStrArg( + options=["protocol"], + help="Protocol Type", + required=True, + enum={"TCP": "TCP", "UDP": "UDP"}, + ) + + marketplace_details = cls._args_schema.marketplace_details + marketplace_details.marketplace_subscription_status = AAZStrArg( + options=["marketplace-subscription-status"], + help="Marketplace Subscription Status", + enum={"FulfillmentRequested": "FulfillmentRequested", "NotStarted": "NotStarted", "PendingFulfillmentStart": "PendingFulfillmentStart", "Subscribed": "Subscribed", "Suspended": "Suspended", "Unsubscribed": "Unsubscribed"}, + ) + marketplace_details.offer_id = AAZStrArg( + options=["offer-id"], + help="Offer Id", + required=True, + ) + marketplace_details.publisher_id = AAZStrArg( + options=["publisher-id"], + help="Publisher Id", + required=True, + ) + + network_profile = cls._args_schema.network_profile + network_profile.egress_nat_ip = AAZListArg( + options=["egress-nat-ip"], + help="Egress nat IP to use", + ) + network_profile.enable_egress_nat = AAZStrArg( + options=["enable-egress-nat"], + help="Enable egress NAT, enabled by default", + required=True, + enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, + ) + network_profile.network_type = AAZStrArg( + options=["network-type"], + help="vnet or vwan, cannot be updated", + required=True, + enum={"VNET": "VNET", "VWAN": "VWAN"}, + ) + network_profile.public_ips = AAZListArg( + options=["public-ips"], + help="List of IPs associated with the Firewall", + required=True, + ) + network_profile.vnet_configuration = AAZObjectArg( + options=["vnet-configuration"], + help="Vnet configurations", + ) + network_profile.vwan_configuration = AAZObjectArg( + options=["vwan-configuration"], + help="Vwan configurations", + ) + + egress_nat_ip = cls._args_schema.network_profile.egress_nat_ip + egress_nat_ip.Element = AAZObjectArg() + cls._build_args_ip_address_create(egress_nat_ip.Element) + + public_ips = cls._args_schema.network_profile.public_ips + public_ips.Element = AAZObjectArg() + cls._build_args_ip_address_create(public_ips.Element) + + vnet_configuration = cls._args_schema.network_profile.vnet_configuration + vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectArg( + options=["ip-of-trust-subnet-for-udr"], + help="IP of trust subnet for UDR", + ) + cls._build_args_ip_address_create(vnet_configuration.ip_of_trust_subnet_for_udr) + vnet_configuration.trust_subnet = AAZObjectArg( + options=["trust-subnet"], + help="Trust Subnet", + required=True, + ) + cls._build_args_ip_address_space_create(vnet_configuration.trust_subnet) + vnet_configuration.un_trust_subnet = AAZObjectArg( + options=["un-trust-subnet"], + help="Untrust Subnet", + required=True, + ) + cls._build_args_ip_address_space_create(vnet_configuration.un_trust_subnet) + vnet_configuration.vnet = AAZObjectArg( + options=["vnet"], + help="Azure Virtual Network", + required=True, + ) + cls._build_args_ip_address_space_create(vnet_configuration.vnet) + + vwan_configuration = cls._args_schema.network_profile.vwan_configuration + vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectArg( + options=["ip-of-trust-subnet-for-udr"], + help="IP of trust subnet for UDR", + ) + cls._build_args_ip_address_create(vwan_configuration.ip_of_trust_subnet_for_udr) + vwan_configuration.network_virtual_appliance_id = AAZStrArg( + options=["network-virtual-appliance-id"], + help="Network Virtual Appliance resource ID ", + ) + vwan_configuration.trust_subnet = AAZObjectArg( + options=["trust-subnet"], + help="Trust Subnet", + ) + cls._build_args_ip_address_space_create(vwan_configuration.trust_subnet) + vwan_configuration.un_trust_subnet = AAZObjectArg( + options=["un-trust-subnet"], + help="Untrust Subnet", + ) + cls._build_args_ip_address_space_create(vwan_configuration.un_trust_subnet) + vwan_configuration.v_hub = AAZObjectArg( + options=["v-hub"], + help="vHub Address", + required=True, + ) + cls._build_args_ip_address_space_create(vwan_configuration.v_hub) + + panorama_config = cls._args_schema.panorama_config + panorama_config.config_string = AAZStrArg( + options=["config-string"], + help="Base64 encoded string representing Panorama parameters to be used by Firewall to connect to Panorama. This string is generated via azure plugin in Panorama", + required=True, + ) + + plan_data = cls._args_schema.plan_data + plan_data.billing_cycle = AAZStrArg( + options=["billing-cycle"], + help="different billing cycles like MONTHLY/WEEKLY", + required=True, + enum={"MONTHLY": "MONTHLY", "WEEKLY": "WEEKLY"}, + ) + plan_data.plan_id = AAZStrArg( + options=["plan-id"], + help="plan id as published by Liftr.PAN", + required=True, + fmt=AAZStrArgFormat( + max_length=50, + ), + ) + plan_data.usage_type = AAZStrArg( + options=["usage-type"], + help="different usage type like PAYG/COMMITTED", + enum={"COMMITTED": "COMMITTED", "PAYG": "PAYG"}, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="Resource", + help="The managed service identities assigned to this resource.", + ) + _args_schema.location = AAZResourceLocationArg( + arg_group="Resource", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="The type of managed identity assigned to this resource.", + required=True, + enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + help="The identities assigned to this resource by the user.", + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg() + + _element = cls._args_schema.identity.user_assigned_identities.Element + _element.client_id = AAZStrArg( + options=["client-id"], + help="The active directory client identifier for this principal.", + ) + _element.principal_id = AAZStrArg( + options=["principal-id"], + help="The active directory identifier for this principal.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + _args_endpoint_configuration_create = None + + @classmethod + def _build_args_endpoint_configuration_create(cls, _schema): + if cls._args_endpoint_configuration_create is not None: + _schema.address = cls._args_endpoint_configuration_create.address + _schema.port = cls._args_endpoint_configuration_create.port + return + + cls._args_endpoint_configuration_create = AAZObjectArg() + + endpoint_configuration_create = cls._args_endpoint_configuration_create + endpoint_configuration_create.address = AAZObjectArg( + options=["address"], + help="Address Space", + required=True, + ) + cls._build_args_ip_address_create(endpoint_configuration_create.address) + endpoint_configuration_create.port = AAZStrArg( + options=["port"], + help="port ID", + required=True, + ) + + _schema.address = cls._args_endpoint_configuration_create.address + _schema.port = cls._args_endpoint_configuration_create.port + + _args_ip_address_space_create = None + + @classmethod + def _build_args_ip_address_space_create(cls, _schema): + if cls._args_ip_address_space_create is not None: + _schema.address_space = cls._args_ip_address_space_create.address_space + _schema.resource_id = cls._args_ip_address_space_create.resource_id + return + + cls._args_ip_address_space_create = AAZObjectArg() + + ip_address_space_create = cls._args_ip_address_space_create + ip_address_space_create.address_space = AAZStrArg( + options=["address-space"], + help="Address Space", + ) + ip_address_space_create.resource_id = AAZStrArg( + options=["resource-id"], + help="Resource Id", + ) + + _schema.address_space = cls._args_ip_address_space_create.address_space + _schema.resource_id = cls._args_ip_address_space_create.resource_id + + _args_ip_address_create = None + + @classmethod + def _build_args_ip_address_create(cls, _schema): + if cls._args_ip_address_create is not None: + _schema.address = cls._args_ip_address_create.address + _schema.resource_id = cls._args_ip_address_create.resource_id + return + + cls._args_ip_address_create = AAZObjectArg() + + ip_address_create = cls._args_ip_address_create + ip_address_create.address = AAZStrArg( + options=["address"], + help="Address value", + ) + ip_address_create.resource_id = AAZStrArg( + options=["resource-id"], + help="Resource Id", + ) + + _schema.address = cls._args_ip_address_create.address + _schema.resource_id = cls._args_ip_address_create.resource_id + + def _execute_operations(self): + self.pre_operations() + yield self.FirewallsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirewallsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".identity.userAssignedIdentities{}") + if _elements is not None: + _elements.set_prop("clientId", AAZStrType, ".client_id") + _elements.set_prop("principalId", AAZStrType, ".principal_id") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("associatedRulestack", AAZObjectType, ".associated_rulestack") + properties.set_prop("dnsSettings", AAZObjectType, ".dns_settings", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("frontEndSettings", AAZListType, ".front_end_settings") + properties.set_prop("isPanoramaManaged", AAZStrType, ".is_panorama_managed") + properties.set_prop("marketplaceDetails", AAZObjectType, ".marketplace_details", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("networkProfile", AAZObjectType, ".network_profile", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("panEtag", AAZStrType, ".pan_etag") + properties.set_prop("panoramaConfig", AAZObjectType, ".panorama_config") + properties.set_prop("planData", AAZObjectType, ".plan_data", typ_kwargs={"flags": {"required": True}}) + + associated_rulestack = _builder.get(".properties.associatedRulestack") + if associated_rulestack is not None: + associated_rulestack.set_prop("location", AAZStrType, ".location") + associated_rulestack.set_prop("resourceId", AAZStrType, ".resource_id") + associated_rulestack.set_prop("rulestackId", AAZStrType, ".rulestack_id") + + dns_settings = _builder.get(".properties.dnsSettings") + if dns_settings is not None: + dns_settings.set_prop("dnsServers", AAZListType, ".dns_servers") + dns_settings.set_prop("enableDnsProxy", AAZStrType, ".enable_dns_proxy") + dns_settings.set_prop("enabledDnsType", AAZStrType, ".enabled_dns_type") + + dns_servers = _builder.get(".properties.dnsSettings.dnsServers") + if dns_servers is not None: + _CreateHelper._build_schema_ip_address_create(dns_servers.set_elements(AAZObjectType, ".")) + + front_end_settings = _builder.get(".properties.frontEndSettings") + if front_end_settings is not None: + front_end_settings.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.frontEndSettings[]") + if _elements is not None: + _CreateHelper._build_schema_endpoint_configuration_create(_elements.set_prop("backendConfiguration", AAZObjectType, ".backend_configuration", typ_kwargs={"flags": {"required": True}})) + _CreateHelper._build_schema_endpoint_configuration_create(_elements.set_prop("frontendConfiguration", AAZObjectType, ".frontend_configuration", typ_kwargs={"flags": {"required": True}})) + _elements.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("protocol", AAZStrType, ".protocol", typ_kwargs={"flags": {"required": True}}) + + marketplace_details = _builder.get(".properties.marketplaceDetails") + if marketplace_details is not None: + marketplace_details.set_prop("marketplaceSubscriptionStatus", AAZStrType, ".marketplace_subscription_status") + marketplace_details.set_prop("offerId", AAZStrType, ".offer_id", typ_kwargs={"flags": {"required": True}}) + marketplace_details.set_prop("publisherId", AAZStrType, ".publisher_id", typ_kwargs={"flags": {"required": True}}) + + network_profile = _builder.get(".properties.networkProfile") + if network_profile is not None: + network_profile.set_prop("egressNatIp", AAZListType, ".egress_nat_ip") + network_profile.set_prop("enableEgressNat", AAZStrType, ".enable_egress_nat", typ_kwargs={"flags": {"required": True}}) + network_profile.set_prop("networkType", AAZStrType, ".network_type", typ_kwargs={"flags": {"required": True}}) + network_profile.set_prop("publicIps", AAZListType, ".public_ips", typ_kwargs={"flags": {"required": True}}) + network_profile.set_prop("vnetConfiguration", AAZObjectType, ".vnet_configuration") + network_profile.set_prop("vwanConfiguration", AAZObjectType, ".vwan_configuration") + + egress_nat_ip = _builder.get(".properties.networkProfile.egressNatIp") + if egress_nat_ip is not None: + _CreateHelper._build_schema_ip_address_create(egress_nat_ip.set_elements(AAZObjectType, ".")) + + public_ips = _builder.get(".properties.networkProfile.publicIps") + if public_ips is not None: + _CreateHelper._build_schema_ip_address_create(public_ips.set_elements(AAZObjectType, ".")) + + vnet_configuration = _builder.get(".properties.networkProfile.vnetConfiguration") + if vnet_configuration is not None: + _CreateHelper._build_schema_ip_address_create(vnet_configuration.set_prop("ipOfTrustSubnetForUdr", AAZObjectType, ".ip_of_trust_subnet_for_udr")) + _CreateHelper._build_schema_ip_address_space_create(vnet_configuration.set_prop("trustSubnet", AAZObjectType, ".trust_subnet", typ_kwargs={"flags": {"required": True}})) + _CreateHelper._build_schema_ip_address_space_create(vnet_configuration.set_prop("unTrustSubnet", AAZObjectType, ".un_trust_subnet", typ_kwargs={"flags": {"required": True}})) + _CreateHelper._build_schema_ip_address_space_create(vnet_configuration.set_prop("vnet", AAZObjectType, ".vnet", typ_kwargs={"flags": {"required": True}})) + + vwan_configuration = _builder.get(".properties.networkProfile.vwanConfiguration") + if vwan_configuration is not None: + _CreateHelper._build_schema_ip_address_create(vwan_configuration.set_prop("ipOfTrustSubnetForUdr", AAZObjectType, ".ip_of_trust_subnet_for_udr")) + vwan_configuration.set_prop("networkVirtualApplianceId", AAZStrType, ".network_virtual_appliance_id") + _CreateHelper._build_schema_ip_address_space_create(vwan_configuration.set_prop("trustSubnet", AAZObjectType, ".trust_subnet")) + _CreateHelper._build_schema_ip_address_space_create(vwan_configuration.set_prop("unTrustSubnet", AAZObjectType, ".un_trust_subnet")) + _CreateHelper._build_schema_ip_address_space_create(vwan_configuration.set_prop("vHub", AAZObjectType, ".v_hub", typ_kwargs={"flags": {"required": True}})) + + panorama_config = _builder.get(".properties.panoramaConfig") + if panorama_config is not None: + panorama_config.set_prop("configString", AAZStrType, ".config_string", typ_kwargs={"flags": {"required": True}}) + + plan_data = _builder.get(".properties.planData") + if plan_data is not None: + plan_data.set_prop("billingCycle", AAZStrType, ".billing_cycle", typ_kwargs={"flags": {"required": True}}) + plan_data.set_prop("planId", AAZStrType, ".plan_id", typ_kwargs={"flags": {"required": True}}) + plan_data.set_prop("usageType", AAZStrType, ".usage_type") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.identity = AAZObjectType() + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200_201.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200_201.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200_201.properties + properties.associated_rulestack = AAZObjectType( + serialized_name="associatedRulestack", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + flags={"required": True}, + ) + properties.front_end_settings = AAZListType( + serialized_name="frontEndSettings", + ) + properties.is_panorama_managed = AAZStrType( + serialized_name="isPanoramaManaged", + ) + properties.marketplace_details = AAZObjectType( + serialized_name="marketplaceDetails", + flags={"required": True}, + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + flags={"required": True}, + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.panorama_config = AAZObjectType( + serialized_name="panoramaConfig", + ) + properties.plan_data = AAZObjectType( + serialized_name="planData", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + associated_rulestack = cls._schema_on_200_201.properties.associated_rulestack + associated_rulestack.location = AAZStrType() + associated_rulestack.resource_id = AAZStrType( + serialized_name="resourceId", + ) + associated_rulestack.rulestack_id = AAZStrType( + serialized_name="rulestackId", + ) + + dns_settings = cls._schema_on_200_201.properties.dns_settings + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.enable_dns_proxy = AAZStrType( + serialized_name="enableDnsProxy", + ) + dns_settings.enabled_dns_type = AAZStrType( + serialized_name="enabledDnsType", + ) + + dns_servers = cls._schema_on_200_201.properties.dns_settings.dns_servers + dns_servers.Element = AAZObjectType() + _CreateHelper._build_schema_ip_address_read(dns_servers.Element) + + front_end_settings = cls._schema_on_200_201.properties.front_end_settings + front_end_settings.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.front_end_settings.Element + _element.backend_configuration = AAZObjectType( + serialized_name="backendConfiguration", + flags={"required": True}, + ) + _CreateHelper._build_schema_endpoint_configuration_read(_element.backend_configuration) + _element.frontend_configuration = AAZObjectType( + serialized_name="frontendConfiguration", + flags={"required": True}, + ) + _CreateHelper._build_schema_endpoint_configuration_read(_element.frontend_configuration) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + + marketplace_details = cls._schema_on_200_201.properties.marketplace_details + marketplace_details.marketplace_subscription_id = AAZStrType( + serialized_name="marketplaceSubscriptionId", + flags={"read_only": True}, + ) + marketplace_details.marketplace_subscription_status = AAZStrType( + serialized_name="marketplaceSubscriptionStatus", + ) + marketplace_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + marketplace_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + + network_profile = cls._schema_on_200_201.properties.network_profile + network_profile.egress_nat_ip = AAZListType( + serialized_name="egressNatIp", + ) + network_profile.enable_egress_nat = AAZStrType( + serialized_name="enableEgressNat", + flags={"required": True}, + ) + network_profile.network_type = AAZStrType( + serialized_name="networkType", + flags={"required": True}, + ) + network_profile.public_ips = AAZListType( + serialized_name="publicIps", + flags={"required": True}, + ) + network_profile.vnet_configuration = AAZObjectType( + serialized_name="vnetConfiguration", + ) + network_profile.vwan_configuration = AAZObjectType( + serialized_name="vwanConfiguration", + ) + + egress_nat_ip = cls._schema_on_200_201.properties.network_profile.egress_nat_ip + egress_nat_ip.Element = AAZObjectType() + _CreateHelper._build_schema_ip_address_read(egress_nat_ip.Element) + + public_ips = cls._schema_on_200_201.properties.network_profile.public_ips + public_ips.Element = AAZObjectType() + _CreateHelper._build_schema_ip_address_read(public_ips.Element) + + vnet_configuration = cls._schema_on_200_201.properties.network_profile.vnet_configuration + vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _CreateHelper._build_schema_ip_address_read(vnet_configuration.ip_of_trust_subnet_for_udr) + vnet_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + flags={"required": True}, + ) + _CreateHelper._build_schema_ip_address_space_read(vnet_configuration.trust_subnet) + vnet_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + flags={"required": True}, + ) + _CreateHelper._build_schema_ip_address_space_read(vnet_configuration.un_trust_subnet) + vnet_configuration.vnet = AAZObjectType( + flags={"required": True}, + ) + _CreateHelper._build_schema_ip_address_space_read(vnet_configuration.vnet) + + vwan_configuration = cls._schema_on_200_201.properties.network_profile.vwan_configuration + vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _CreateHelper._build_schema_ip_address_read(vwan_configuration.ip_of_trust_subnet_for_udr) + vwan_configuration.network_virtual_appliance_id = AAZStrType( + serialized_name="networkVirtualApplianceId", + ) + vwan_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + ) + _CreateHelper._build_schema_ip_address_space_read(vwan_configuration.trust_subnet) + vwan_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + ) + _CreateHelper._build_schema_ip_address_space_read(vwan_configuration.un_trust_subnet) + vwan_configuration.v_hub = AAZObjectType( + serialized_name="vHub", + flags={"required": True}, + ) + _CreateHelper._build_schema_ip_address_space_read(vwan_configuration.v_hub) + + panorama_config = cls._schema_on_200_201.properties.panorama_config + panorama_config.cg_name = AAZStrType( + serialized_name="cgName", + flags={"read_only": True}, + ) + panorama_config.config_string = AAZStrType( + serialized_name="configString", + flags={"required": True}, + ) + panorama_config.dg_name = AAZStrType( + serialized_name="dgName", + flags={"read_only": True}, + ) + panorama_config.host_name = AAZStrType( + serialized_name="hostName", + flags={"read_only": True}, + ) + panorama_config.panorama_server = AAZStrType( + serialized_name="panoramaServer", + flags={"read_only": True}, + ) + panorama_config.panorama_server2 = AAZStrType( + serialized_name="panoramaServer2", + flags={"read_only": True}, + ) + panorama_config.tpl_name = AAZStrType( + serialized_name="tplName", + flags={"read_only": True}, + ) + panorama_config.vm_auth_key = AAZStrType( + serialized_name="vmAuthKey", + flags={"read_only": True}, + ) + + plan_data = cls._schema_on_200_201.properties.plan_data + plan_data.billing_cycle = AAZStrType( + serialized_name="billingCycle", + flags={"required": True}, + ) + plan_data.effective_date = AAZStrType( + serialized_name="effectiveDate", + flags={"read_only": True}, + ) + plan_data.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + plan_data.usage_type = AAZStrType( + serialized_name="usageType", + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + @classmethod + def _build_schema_endpoint_configuration_create(cls, _builder): + if _builder is None: + return + cls._build_schema_ip_address_create(_builder.set_prop("address", AAZObjectType, ".address", typ_kwargs={"flags": {"required": True}})) + _builder.set_prop("port", AAZStrType, ".port", typ_kwargs={"flags": {"required": True}}) + + @classmethod + def _build_schema_ip_address_space_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("addressSpace", AAZStrType, ".address_space") + _builder.set_prop("resourceId", AAZStrType, ".resource_id") + + @classmethod + def _build_schema_ip_address_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("address", AAZStrType, ".address") + _builder.set_prop("resourceId", AAZStrType, ".resource_id") + + _schema_endpoint_configuration_read = None + + @classmethod + def _build_schema_endpoint_configuration_read(cls, _schema): + if cls._schema_endpoint_configuration_read is not None: + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + return + + cls._schema_endpoint_configuration_read = _schema_endpoint_configuration_read = AAZObjectType() + + endpoint_configuration_read = _schema_endpoint_configuration_read + endpoint_configuration_read.address = AAZObjectType( + flags={"required": True}, + ) + cls._build_schema_ip_address_read(endpoint_configuration_read.address) + endpoint_configuration_read.port = AAZStrType( + flags={"required": True}, + ) + + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + + _schema_ip_address_space_read = None + + @classmethod + def _build_schema_ip_address_space_read(cls, _schema): + if cls._schema_ip_address_space_read is not None: + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + return + + cls._schema_ip_address_space_read = _schema_ip_address_space_read = AAZObjectType() + + ip_address_space_read = _schema_ip_address_space_read + ip_address_space_read.address_space = AAZStrType( + serialized_name="addressSpace", + ) + ip_address_space_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + ip_address_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py new file mode 100644 index 00000000000..2a410a4ebcc --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py @@ -0,0 +1,159 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall delete", +) +class Delete(AAZCommand): + """Delete a FirewallResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FirewallsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class FirewallsDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_global_rulestack.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_global_rulestack.py new file mode 100644 index 00000000000..527a8fda089 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_global_rulestack.py @@ -0,0 +1,165 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall get-global-rulestack", +) +class GetGlobalRulestack(AAZCommand): + """Get Global Rulestack associated with the Firewall + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}/getglobalrulestack", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirewallsGetGlobalRulestack(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirewallsGetGlobalRulestack(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getGlobalRulestack", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.azure_id = AAZStrType( + serialized_name="azureId", + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _GetGlobalRulestackHelper: + """Helper class for GetGlobalRulestack""" + + +__all__ = ["GetGlobalRulestack"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py new file mode 100644 index 00000000000..c244e770be7 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py @@ -0,0 +1,252 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall get-log-profile", +) +class GetLogProfile(AAZCommand): + """Log Profile for Firewall + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}/getlogprofile", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirewallsGetLogProfile(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirewallsGetLogProfile(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getLogProfile", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.application_insights = AAZObjectType( + serialized_name="applicationInsights", + ) + _schema_on_200.common_destination = AAZObjectType( + serialized_name="commonDestination", + ) + _GetLogProfileHelper._build_schema_log_destination_read(_schema_on_200.common_destination) + _schema_on_200.decrypt_log_destination = AAZObjectType( + serialized_name="decryptLogDestination", + ) + _GetLogProfileHelper._build_schema_log_destination_read(_schema_on_200.decrypt_log_destination) + _schema_on_200.log_option = AAZStrType( + serialized_name="logOption", + ) + _schema_on_200.log_type = AAZStrType( + serialized_name="logType", + ) + _schema_on_200.threat_log_destination = AAZObjectType( + serialized_name="threatLogDestination", + ) + _GetLogProfileHelper._build_schema_log_destination_read(_schema_on_200.threat_log_destination) + _schema_on_200.traffic_log_destination = AAZObjectType( + serialized_name="trafficLogDestination", + ) + _GetLogProfileHelper._build_schema_log_destination_read(_schema_on_200.traffic_log_destination) + + application_insights = cls._schema_on_200.application_insights + application_insights.id = AAZStrType() + application_insights.key = AAZStrType() + + return cls._schema_on_200 + + +class _GetLogProfileHelper: + """Helper class for GetLogProfile""" + + _schema_log_destination_read = None + + @classmethod + def _build_schema_log_destination_read(cls, _schema): + if cls._schema_log_destination_read is not None: + _schema.event_hub_configurations = cls._schema_log_destination_read.event_hub_configurations + _schema.monitor_configurations = cls._schema_log_destination_read.monitor_configurations + _schema.storage_configurations = cls._schema_log_destination_read.storage_configurations + return + + cls._schema_log_destination_read = _schema_log_destination_read = AAZObjectType() + + log_destination_read = _schema_log_destination_read + log_destination_read.event_hub_configurations = AAZObjectType( + serialized_name="eventHubConfigurations", + ) + log_destination_read.monitor_configurations = AAZObjectType( + serialized_name="monitorConfigurations", + ) + log_destination_read.storage_configurations = AAZObjectType( + serialized_name="storageConfigurations", + ) + + event_hub_configurations = _schema_log_destination_read.event_hub_configurations + event_hub_configurations.id = AAZStrType() + event_hub_configurations.name = AAZStrType() + event_hub_configurations.name_space = AAZStrType( + serialized_name="nameSpace", + ) + event_hub_configurations.policy_name = AAZStrType( + serialized_name="policyName", + ) + event_hub_configurations.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + + monitor_configurations = _schema_log_destination_read.monitor_configurations + monitor_configurations.id = AAZStrType() + monitor_configurations.primary_key = AAZStrType( + serialized_name="primaryKey", + ) + monitor_configurations.secondary_key = AAZStrType( + serialized_name="secondaryKey", + ) + monitor_configurations.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + monitor_configurations.workspace = AAZStrType() + + storage_configurations = _schema_log_destination_read.storage_configurations + storage_configurations.account_name = AAZStrType( + serialized_name="accountName", + ) + storage_configurations.id = AAZStrType() + storage_configurations.subscription_id = AAZStrType( + serialized_name="subscriptionId", + ) + + _schema.event_hub_configurations = cls._schema_log_destination_read.event_hub_configurations + _schema.monitor_configurations = cls._schema_log_destination_read.monitor_configurations + _schema.storage_configurations = cls._schema_log_destination_read.storage_configurations + + +__all__ = ["GetLogProfile"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py new file mode 100644 index 00000000000..fc85fa70821 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py @@ -0,0 +1,204 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall get-support-info", +) +class GetSupportInfo(AAZCommand): + """support info for firewall. + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}/getsupportinfo", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.email = AAZStrArg( + options=["--email"], + help="email address on behalf of which this API called", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirewallsGetSupportInfo(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirewallsGetSupportInfo(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getSupportInfo", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "email", self.ctx.args.email, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.account_id = AAZStrType( + serialized_name="accountId", + ) + _schema_on_200.account_registered = AAZStrType( + serialized_name="accountRegistered", + ) + _schema_on_200.free_trial = AAZStrType( + serialized_name="freeTrial", + ) + _schema_on_200.free_trial_credit_left = AAZIntType( + serialized_name="freeTrialCreditLeft", + ) + _schema_on_200.free_trial_days_left = AAZIntType( + serialized_name="freeTrialDaysLeft", + ) + _schema_on_200.help_url = AAZStrType( + serialized_name="helpURL", + ) + _schema_on_200.product_serial = AAZStrType( + serialized_name="productSerial", + ) + _schema_on_200.product_sku = AAZStrType( + serialized_name="productSku", + ) + _schema_on_200.register_url = AAZStrType( + serialized_name="registerURL", + ) + _schema_on_200.support_url = AAZStrType( + serialized_name="supportURL", + ) + _schema_on_200.user_domain_supported = AAZStrType( + serialized_name="userDomainSupported", + ) + _schema_on_200.user_registered = AAZStrType( + serialized_name="userRegistered", + ) + + return cls._schema_on_200 + + +class _GetSupportInfoHelper: + """Helper class for GetSupportInfo""" + + +__all__ = ["GetSupportInfo"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py new file mode 100644 index 00000000000..439f2fd93cb --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py @@ -0,0 +1,904 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall list", +) +class List(AAZCommand): + """List FirewallResource resources by subscription ID + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/paloaltonetworks.cloudngfw/firewalls", "2022-08-29"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.FirewallsListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.FirewallsListBySubscription(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class FirewallsListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.value.Element.properties + properties.associated_rulestack = AAZObjectType( + serialized_name="associatedRulestack", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + flags={"required": True}, + ) + properties.front_end_settings = AAZListType( + serialized_name="frontEndSettings", + ) + properties.is_panorama_managed = AAZStrType( + serialized_name="isPanoramaManaged", + ) + properties.marketplace_details = AAZObjectType( + serialized_name="marketplaceDetails", + flags={"required": True}, + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + flags={"required": True}, + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.panorama_config = AAZObjectType( + serialized_name="panoramaConfig", + ) + properties.plan_data = AAZObjectType( + serialized_name="planData", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + associated_rulestack = cls._schema_on_200.value.Element.properties.associated_rulestack + associated_rulestack.location = AAZStrType() + associated_rulestack.resource_id = AAZStrType( + serialized_name="resourceId", + ) + associated_rulestack.rulestack_id = AAZStrType( + serialized_name="rulestackId", + ) + + dns_settings = cls._schema_on_200.value.Element.properties.dns_settings + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.enable_dns_proxy = AAZStrType( + serialized_name="enableDnsProxy", + ) + dns_settings.enabled_dns_type = AAZStrType( + serialized_name="enabledDnsType", + ) + + dns_servers = cls._schema_on_200.value.Element.properties.dns_settings.dns_servers + dns_servers.Element = AAZObjectType() + _ListHelper._build_schema_ip_address_read(dns_servers.Element) + + front_end_settings = cls._schema_on_200.value.Element.properties.front_end_settings + front_end_settings.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.front_end_settings.Element + _element.backend_configuration = AAZObjectType( + serialized_name="backendConfiguration", + flags={"required": True}, + ) + _ListHelper._build_schema_endpoint_configuration_read(_element.backend_configuration) + _element.frontend_configuration = AAZObjectType( + serialized_name="frontendConfiguration", + flags={"required": True}, + ) + _ListHelper._build_schema_endpoint_configuration_read(_element.frontend_configuration) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + + marketplace_details = cls._schema_on_200.value.Element.properties.marketplace_details + marketplace_details.marketplace_subscription_id = AAZStrType( + serialized_name="marketplaceSubscriptionId", + flags={"read_only": True}, + ) + marketplace_details.marketplace_subscription_status = AAZStrType( + serialized_name="marketplaceSubscriptionStatus", + ) + marketplace_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + marketplace_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + + network_profile = cls._schema_on_200.value.Element.properties.network_profile + network_profile.egress_nat_ip = AAZListType( + serialized_name="egressNatIp", + ) + network_profile.enable_egress_nat = AAZStrType( + serialized_name="enableEgressNat", + flags={"required": True}, + ) + network_profile.network_type = AAZStrType( + serialized_name="networkType", + flags={"required": True}, + ) + network_profile.public_ips = AAZListType( + serialized_name="publicIps", + flags={"required": True}, + ) + network_profile.vnet_configuration = AAZObjectType( + serialized_name="vnetConfiguration", + ) + network_profile.vwan_configuration = AAZObjectType( + serialized_name="vwanConfiguration", + ) + + egress_nat_ip = cls._schema_on_200.value.Element.properties.network_profile.egress_nat_ip + egress_nat_ip.Element = AAZObjectType() + _ListHelper._build_schema_ip_address_read(egress_nat_ip.Element) + + public_ips = cls._schema_on_200.value.Element.properties.network_profile.public_ips + public_ips.Element = AAZObjectType() + _ListHelper._build_schema_ip_address_read(public_ips.Element) + + vnet_configuration = cls._schema_on_200.value.Element.properties.network_profile.vnet_configuration + vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _ListHelper._build_schema_ip_address_read(vnet_configuration.ip_of_trust_subnet_for_udr) + vnet_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + flags={"required": True}, + ) + _ListHelper._build_schema_ip_address_space_read(vnet_configuration.trust_subnet) + vnet_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + flags={"required": True}, + ) + _ListHelper._build_schema_ip_address_space_read(vnet_configuration.un_trust_subnet) + vnet_configuration.vnet = AAZObjectType( + flags={"required": True}, + ) + _ListHelper._build_schema_ip_address_space_read(vnet_configuration.vnet) + + vwan_configuration = cls._schema_on_200.value.Element.properties.network_profile.vwan_configuration + vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _ListHelper._build_schema_ip_address_read(vwan_configuration.ip_of_trust_subnet_for_udr) + vwan_configuration.network_virtual_appliance_id = AAZStrType( + serialized_name="networkVirtualApplianceId", + ) + vwan_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + ) + _ListHelper._build_schema_ip_address_space_read(vwan_configuration.trust_subnet) + vwan_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + ) + _ListHelper._build_schema_ip_address_space_read(vwan_configuration.un_trust_subnet) + vwan_configuration.v_hub = AAZObjectType( + serialized_name="vHub", + flags={"required": True}, + ) + _ListHelper._build_schema_ip_address_space_read(vwan_configuration.v_hub) + + panorama_config = cls._schema_on_200.value.Element.properties.panorama_config + panorama_config.cg_name = AAZStrType( + serialized_name="cgName", + flags={"read_only": True}, + ) + panorama_config.config_string = AAZStrType( + serialized_name="configString", + flags={"required": True}, + ) + panorama_config.dg_name = AAZStrType( + serialized_name="dgName", + flags={"read_only": True}, + ) + panorama_config.host_name = AAZStrType( + serialized_name="hostName", + flags={"read_only": True}, + ) + panorama_config.panorama_server = AAZStrType( + serialized_name="panoramaServer", + flags={"read_only": True}, + ) + panorama_config.panorama_server2 = AAZStrType( + serialized_name="panoramaServer2", + flags={"read_only": True}, + ) + panorama_config.tpl_name = AAZStrType( + serialized_name="tplName", + flags={"read_only": True}, + ) + panorama_config.vm_auth_key = AAZStrType( + serialized_name="vmAuthKey", + flags={"read_only": True}, + ) + + plan_data = cls._schema_on_200.value.Element.properties.plan_data + plan_data.billing_cycle = AAZStrType( + serialized_name="billingCycle", + flags={"required": True}, + ) + plan_data.effective_date = AAZStrType( + serialized_name="effectiveDate", + flags={"read_only": True}, + ) + plan_data.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + plan_data.usage_type = AAZStrType( + serialized_name="usageType", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class FirewallsListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/PaloAltoNetworks.Cloudngfw/firewalls", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.value.Element.properties + properties.associated_rulestack = AAZObjectType( + serialized_name="associatedRulestack", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + flags={"required": True}, + ) + properties.front_end_settings = AAZListType( + serialized_name="frontEndSettings", + ) + properties.is_panorama_managed = AAZStrType( + serialized_name="isPanoramaManaged", + ) + properties.marketplace_details = AAZObjectType( + serialized_name="marketplaceDetails", + flags={"required": True}, + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + flags={"required": True}, + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.panorama_config = AAZObjectType( + serialized_name="panoramaConfig", + ) + properties.plan_data = AAZObjectType( + serialized_name="planData", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + associated_rulestack = cls._schema_on_200.value.Element.properties.associated_rulestack + associated_rulestack.location = AAZStrType() + associated_rulestack.resource_id = AAZStrType( + serialized_name="resourceId", + ) + associated_rulestack.rulestack_id = AAZStrType( + serialized_name="rulestackId", + ) + + dns_settings = cls._schema_on_200.value.Element.properties.dns_settings + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.enable_dns_proxy = AAZStrType( + serialized_name="enableDnsProxy", + ) + dns_settings.enabled_dns_type = AAZStrType( + serialized_name="enabledDnsType", + ) + + dns_servers = cls._schema_on_200.value.Element.properties.dns_settings.dns_servers + dns_servers.Element = AAZObjectType() + _ListHelper._build_schema_ip_address_read(dns_servers.Element) + + front_end_settings = cls._schema_on_200.value.Element.properties.front_end_settings + front_end_settings.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.front_end_settings.Element + _element.backend_configuration = AAZObjectType( + serialized_name="backendConfiguration", + flags={"required": True}, + ) + _ListHelper._build_schema_endpoint_configuration_read(_element.backend_configuration) + _element.frontend_configuration = AAZObjectType( + serialized_name="frontendConfiguration", + flags={"required": True}, + ) + _ListHelper._build_schema_endpoint_configuration_read(_element.frontend_configuration) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + + marketplace_details = cls._schema_on_200.value.Element.properties.marketplace_details + marketplace_details.marketplace_subscription_id = AAZStrType( + serialized_name="marketplaceSubscriptionId", + flags={"read_only": True}, + ) + marketplace_details.marketplace_subscription_status = AAZStrType( + serialized_name="marketplaceSubscriptionStatus", + ) + marketplace_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + marketplace_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + + network_profile = cls._schema_on_200.value.Element.properties.network_profile + network_profile.egress_nat_ip = AAZListType( + serialized_name="egressNatIp", + ) + network_profile.enable_egress_nat = AAZStrType( + serialized_name="enableEgressNat", + flags={"required": True}, + ) + network_profile.network_type = AAZStrType( + serialized_name="networkType", + flags={"required": True}, + ) + network_profile.public_ips = AAZListType( + serialized_name="publicIps", + flags={"required": True}, + ) + network_profile.vnet_configuration = AAZObjectType( + serialized_name="vnetConfiguration", + ) + network_profile.vwan_configuration = AAZObjectType( + serialized_name="vwanConfiguration", + ) + + egress_nat_ip = cls._schema_on_200.value.Element.properties.network_profile.egress_nat_ip + egress_nat_ip.Element = AAZObjectType() + _ListHelper._build_schema_ip_address_read(egress_nat_ip.Element) + + public_ips = cls._schema_on_200.value.Element.properties.network_profile.public_ips + public_ips.Element = AAZObjectType() + _ListHelper._build_schema_ip_address_read(public_ips.Element) + + vnet_configuration = cls._schema_on_200.value.Element.properties.network_profile.vnet_configuration + vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _ListHelper._build_schema_ip_address_read(vnet_configuration.ip_of_trust_subnet_for_udr) + vnet_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + flags={"required": True}, + ) + _ListHelper._build_schema_ip_address_space_read(vnet_configuration.trust_subnet) + vnet_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + flags={"required": True}, + ) + _ListHelper._build_schema_ip_address_space_read(vnet_configuration.un_trust_subnet) + vnet_configuration.vnet = AAZObjectType( + flags={"required": True}, + ) + _ListHelper._build_schema_ip_address_space_read(vnet_configuration.vnet) + + vwan_configuration = cls._schema_on_200.value.Element.properties.network_profile.vwan_configuration + vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _ListHelper._build_schema_ip_address_read(vwan_configuration.ip_of_trust_subnet_for_udr) + vwan_configuration.network_virtual_appliance_id = AAZStrType( + serialized_name="networkVirtualApplianceId", + ) + vwan_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + ) + _ListHelper._build_schema_ip_address_space_read(vwan_configuration.trust_subnet) + vwan_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + ) + _ListHelper._build_schema_ip_address_space_read(vwan_configuration.un_trust_subnet) + vwan_configuration.v_hub = AAZObjectType( + serialized_name="vHub", + flags={"required": True}, + ) + _ListHelper._build_schema_ip_address_space_read(vwan_configuration.v_hub) + + panorama_config = cls._schema_on_200.value.Element.properties.panorama_config + panorama_config.cg_name = AAZStrType( + serialized_name="cgName", + flags={"read_only": True}, + ) + panorama_config.config_string = AAZStrType( + serialized_name="configString", + flags={"required": True}, + ) + panorama_config.dg_name = AAZStrType( + serialized_name="dgName", + flags={"read_only": True}, + ) + panorama_config.host_name = AAZStrType( + serialized_name="hostName", + flags={"read_only": True}, + ) + panorama_config.panorama_server = AAZStrType( + serialized_name="panoramaServer", + flags={"read_only": True}, + ) + panorama_config.panorama_server2 = AAZStrType( + serialized_name="panoramaServer2", + flags={"read_only": True}, + ) + panorama_config.tpl_name = AAZStrType( + serialized_name="tplName", + flags={"read_only": True}, + ) + panorama_config.vm_auth_key = AAZStrType( + serialized_name="vmAuthKey", + flags={"read_only": True}, + ) + + plan_data = cls._schema_on_200.value.Element.properties.plan_data + plan_data.billing_cycle = AAZStrType( + serialized_name="billingCycle", + flags={"required": True}, + ) + plan_data.effective_date = AAZStrType( + serialized_name="effectiveDate", + flags={"read_only": True}, + ) + plan_data.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + plan_data.usage_type = AAZStrType( + serialized_name="usageType", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_endpoint_configuration_read = None + + @classmethod + def _build_schema_endpoint_configuration_read(cls, _schema): + if cls._schema_endpoint_configuration_read is not None: + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + return + + cls._schema_endpoint_configuration_read = _schema_endpoint_configuration_read = AAZObjectType() + + endpoint_configuration_read = _schema_endpoint_configuration_read + endpoint_configuration_read.address = AAZObjectType( + flags={"required": True}, + ) + cls._build_schema_ip_address_read(endpoint_configuration_read.address) + endpoint_configuration_read.port = AAZStrType( + flags={"required": True}, + ) + + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + + _schema_ip_address_space_read = None + + @classmethod + def _build_schema_ip_address_space_read(cls, _schema): + if cls._schema_ip_address_space_read is not None: + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + return + + cls._schema_ip_address_space_read = _schema_ip_address_space_read = AAZObjectType() + + ip_address_space_read = _schema_ip_address_space_read + ip_address_space_read.address_space = AAZStrType( + serialized_name="addressSpace", + ) + ip_address_space_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + ip_address_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py new file mode 100644 index 00000000000..85b43f52fd9 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py @@ -0,0 +1,334 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall save-log-profile", +) +class SaveLogProfile(AAZCommand): + """Log Profile for Firewall + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}/savelogprofile", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "LogSettings" + + _args_schema = cls._args_schema + _args_schema.application_insights = AAZObjectArg( + options=["--application-insights"], + arg_group="LogSettings", + help="Application Insight details", + ) + _args_schema.common_destination = AAZObjectArg( + options=["--common-destination"], + arg_group="LogSettings", + help="Common destination configurations", + ) + cls._build_args_log_destination_create(_args_schema.common_destination) + _args_schema.decrypt_log_destination = AAZObjectArg( + options=["--decrypt-log-destination"], + arg_group="LogSettings", + help="Decrypt destination configurations", + ) + cls._build_args_log_destination_create(_args_schema.decrypt_log_destination) + _args_schema.log_option = AAZStrArg( + options=["--log-option"], + arg_group="LogSettings", + help="Log option SAME/INDIVIDUAL", + enum={"INDIVIDUAL_DESTINATION": "INDIVIDUAL_DESTINATION", "SAME_DESTINATION": "SAME_DESTINATION"}, + ) + _args_schema.log_type = AAZStrArg( + options=["--log-type"], + arg_group="LogSettings", + help="One of possible log type", + enum={"AUDIT": "AUDIT", "DECRYPTION": "DECRYPTION", "DLP": "DLP", "THREAT": "THREAT", "TRAFFIC": "TRAFFIC", "WILDFIRE": "WILDFIRE"}, + ) + _args_schema.threat_log_destination = AAZObjectArg( + options=["--threat-log-destination"], + arg_group="LogSettings", + help="Threat destination configurations", + ) + cls._build_args_log_destination_create(_args_schema.threat_log_destination) + _args_schema.traffic_log_destination = AAZObjectArg( + options=["--traffic-log-destination"], + arg_group="LogSettings", + help="Traffic destination configurations", + ) + cls._build_args_log_destination_create(_args_schema.traffic_log_destination) + + application_insights = cls._args_schema.application_insights + application_insights.id = AAZStrArg( + options=["id"], + help="Resource id for Application Insights", + ) + application_insights.key = AAZStrArg( + options=["key"], + help="Application Insights key", + ) + return cls._args_schema + + _args_log_destination_create = None + + @classmethod + def _build_args_log_destination_create(cls, _schema): + if cls._args_log_destination_create is not None: + _schema.event_hub_configurations = cls._args_log_destination_create.event_hub_configurations + _schema.monitor_configurations = cls._args_log_destination_create.monitor_configurations + _schema.storage_configurations = cls._args_log_destination_create.storage_configurations + return + + cls._args_log_destination_create = AAZObjectArg() + + log_destination_create = cls._args_log_destination_create + log_destination_create.event_hub_configurations = AAZObjectArg( + options=["event-hub-configurations"], + help="Event Hub configurations", + ) + log_destination_create.monitor_configurations = AAZObjectArg( + options=["monitor-configurations"], + help="Monitor Log configurations", + ) + log_destination_create.storage_configurations = AAZObjectArg( + options=["storage-configurations"], + help="Storage account configurations", + ) + + event_hub_configurations = cls._args_log_destination_create.event_hub_configurations + event_hub_configurations.id = AAZStrArg( + options=["id"], + help="Resource ID of EventHub", + ) + event_hub_configurations.name = AAZStrArg( + options=["name"], + help="EventHub name", + ) + event_hub_configurations.name_space = AAZStrArg( + options=["name-space"], + help="EventHub namespace", + ) + event_hub_configurations.policy_name = AAZStrArg( + options=["policy-name"], + help="EventHub policy name", + ) + event_hub_configurations.subscription_id = AAZStrArg( + options=["subscription-id"], + help="Subscription Id", + ) + + monitor_configurations = cls._args_log_destination_create.monitor_configurations + monitor_configurations.id = AAZStrArg( + options=["id"], + help="Resource ID of MonitorLog", + ) + monitor_configurations.primary_key = AAZStrArg( + options=["primary-key"], + help="Primary Key value for Monitor", + ) + monitor_configurations.secondary_key = AAZStrArg( + options=["secondary-key"], + help="Secondary Key value for Monitor", + ) + monitor_configurations.subscription_id = AAZStrArg( + options=["subscription-id"], + help="Subscription Id", + ) + monitor_configurations.workspace = AAZStrArg( + options=["workspace"], + help="MonitorLog workspace", + ) + + storage_configurations = cls._args_log_destination_create.storage_configurations + storage_configurations.account_name = AAZStrArg( + options=["account-name"], + help="Storage account name", + ) + storage_configurations.id = AAZStrArg( + options=["id"], + help="Resource ID of storage account", + ) + storage_configurations.subscription_id = AAZStrArg( + options=["subscription-id"], + help="Subscription Id", + ) + + _schema.event_hub_configurations = cls._args_log_destination_create.event_hub_configurations + _schema.monitor_configurations = cls._args_log_destination_create.monitor_configurations + _schema.storage_configurations = cls._args_log_destination_create.storage_configurations + + def _execute_operations(self): + self.pre_operations() + self.FirewallsSaveLogProfile(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class FirewallsSaveLogProfile(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/saveLogProfile", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"client_flatten": True}} + ) + _builder.set_prop("applicationInsights", AAZObjectType, ".application_insights") + _SaveLogProfileHelper._build_schema_log_destination_create(_builder.set_prop("commonDestination", AAZObjectType, ".common_destination")) + _SaveLogProfileHelper._build_schema_log_destination_create(_builder.set_prop("decryptLogDestination", AAZObjectType, ".decrypt_log_destination")) + _builder.set_prop("logOption", AAZStrType, ".log_option") + _builder.set_prop("logType", AAZStrType, ".log_type") + _SaveLogProfileHelper._build_schema_log_destination_create(_builder.set_prop("threatLogDestination", AAZObjectType, ".threat_log_destination")) + _SaveLogProfileHelper._build_schema_log_destination_create(_builder.set_prop("trafficLogDestination", AAZObjectType, ".traffic_log_destination")) + + application_insights = _builder.get(".applicationInsights") + if application_insights is not None: + application_insights.set_prop("id", AAZStrType, ".id") + application_insights.set_prop("key", AAZStrType, ".key") + + return self.serialize_content(_content_value) + + def on_204(self, session): + pass + + +class _SaveLogProfileHelper: + """Helper class for SaveLogProfile""" + + @classmethod + def _build_schema_log_destination_create(cls, _builder): + if _builder is None: + return + _builder.set_prop("eventHubConfigurations", AAZObjectType, ".event_hub_configurations") + _builder.set_prop("monitorConfigurations", AAZObjectType, ".monitor_configurations") + _builder.set_prop("storageConfigurations", AAZObjectType, ".storage_configurations") + + event_hub_configurations = _builder.get(".eventHubConfigurations") + if event_hub_configurations is not None: + event_hub_configurations.set_prop("id", AAZStrType, ".id") + event_hub_configurations.set_prop("name", AAZStrType, ".name") + event_hub_configurations.set_prop("nameSpace", AAZStrType, ".name_space") + event_hub_configurations.set_prop("policyName", AAZStrType, ".policy_name") + event_hub_configurations.set_prop("subscriptionId", AAZStrType, ".subscription_id") + + monitor_configurations = _builder.get(".monitorConfigurations") + if monitor_configurations is not None: + monitor_configurations.set_prop("id", AAZStrType, ".id") + monitor_configurations.set_prop("primaryKey", AAZStrType, ".primary_key") + monitor_configurations.set_prop("secondaryKey", AAZStrType, ".secondary_key") + monitor_configurations.set_prop("subscriptionId", AAZStrType, ".subscription_id") + monitor_configurations.set_prop("workspace", AAZStrType, ".workspace") + + storage_configurations = _builder.get(".storageConfigurations") + if storage_configurations is not None: + storage_configurations.set_prop("accountName", AAZStrType, ".account_name") + storage_configurations.set_prop("id", AAZStrType, ".id") + storage_configurations.set_prop("subscriptionId", AAZStrType, ".subscription_id") + + +__all__ = ["SaveLogProfile"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py new file mode 100644 index 00000000000..aecd4256496 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py @@ -0,0 +1,519 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall show", +) +class Show(AAZCommand): + """Get a FirewallResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirewallsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirewallsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.properties + properties.associated_rulestack = AAZObjectType( + serialized_name="associatedRulestack", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + flags={"required": True}, + ) + properties.front_end_settings = AAZListType( + serialized_name="frontEndSettings", + ) + properties.is_panorama_managed = AAZStrType( + serialized_name="isPanoramaManaged", + ) + properties.marketplace_details = AAZObjectType( + serialized_name="marketplaceDetails", + flags={"required": True}, + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + flags={"required": True}, + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.panorama_config = AAZObjectType( + serialized_name="panoramaConfig", + ) + properties.plan_data = AAZObjectType( + serialized_name="planData", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + associated_rulestack = cls._schema_on_200.properties.associated_rulestack + associated_rulestack.location = AAZStrType() + associated_rulestack.resource_id = AAZStrType( + serialized_name="resourceId", + ) + associated_rulestack.rulestack_id = AAZStrType( + serialized_name="rulestackId", + ) + + dns_settings = cls._schema_on_200.properties.dns_settings + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.enable_dns_proxy = AAZStrType( + serialized_name="enableDnsProxy", + ) + dns_settings.enabled_dns_type = AAZStrType( + serialized_name="enabledDnsType", + ) + + dns_servers = cls._schema_on_200.properties.dns_settings.dns_servers + dns_servers.Element = AAZObjectType() + _ShowHelper._build_schema_ip_address_read(dns_servers.Element) + + front_end_settings = cls._schema_on_200.properties.front_end_settings + front_end_settings.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.front_end_settings.Element + _element.backend_configuration = AAZObjectType( + serialized_name="backendConfiguration", + flags={"required": True}, + ) + _ShowHelper._build_schema_endpoint_configuration_read(_element.backend_configuration) + _element.frontend_configuration = AAZObjectType( + serialized_name="frontendConfiguration", + flags={"required": True}, + ) + _ShowHelper._build_schema_endpoint_configuration_read(_element.frontend_configuration) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + + marketplace_details = cls._schema_on_200.properties.marketplace_details + marketplace_details.marketplace_subscription_id = AAZStrType( + serialized_name="marketplaceSubscriptionId", + flags={"read_only": True}, + ) + marketplace_details.marketplace_subscription_status = AAZStrType( + serialized_name="marketplaceSubscriptionStatus", + ) + marketplace_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + marketplace_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + + network_profile = cls._schema_on_200.properties.network_profile + network_profile.egress_nat_ip = AAZListType( + serialized_name="egressNatIp", + ) + network_profile.enable_egress_nat = AAZStrType( + serialized_name="enableEgressNat", + flags={"required": True}, + ) + network_profile.network_type = AAZStrType( + serialized_name="networkType", + flags={"required": True}, + ) + network_profile.public_ips = AAZListType( + serialized_name="publicIps", + flags={"required": True}, + ) + network_profile.vnet_configuration = AAZObjectType( + serialized_name="vnetConfiguration", + ) + network_profile.vwan_configuration = AAZObjectType( + serialized_name="vwanConfiguration", + ) + + egress_nat_ip = cls._schema_on_200.properties.network_profile.egress_nat_ip + egress_nat_ip.Element = AAZObjectType() + _ShowHelper._build_schema_ip_address_read(egress_nat_ip.Element) + + public_ips = cls._schema_on_200.properties.network_profile.public_ips + public_ips.Element = AAZObjectType() + _ShowHelper._build_schema_ip_address_read(public_ips.Element) + + vnet_configuration = cls._schema_on_200.properties.network_profile.vnet_configuration + vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _ShowHelper._build_schema_ip_address_read(vnet_configuration.ip_of_trust_subnet_for_udr) + vnet_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + flags={"required": True}, + ) + _ShowHelper._build_schema_ip_address_space_read(vnet_configuration.trust_subnet) + vnet_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + flags={"required": True}, + ) + _ShowHelper._build_schema_ip_address_space_read(vnet_configuration.un_trust_subnet) + vnet_configuration.vnet = AAZObjectType( + flags={"required": True}, + ) + _ShowHelper._build_schema_ip_address_space_read(vnet_configuration.vnet) + + vwan_configuration = cls._schema_on_200.properties.network_profile.vwan_configuration + vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _ShowHelper._build_schema_ip_address_read(vwan_configuration.ip_of_trust_subnet_for_udr) + vwan_configuration.network_virtual_appliance_id = AAZStrType( + serialized_name="networkVirtualApplianceId", + ) + vwan_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + ) + _ShowHelper._build_schema_ip_address_space_read(vwan_configuration.trust_subnet) + vwan_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + ) + _ShowHelper._build_schema_ip_address_space_read(vwan_configuration.un_trust_subnet) + vwan_configuration.v_hub = AAZObjectType( + serialized_name="vHub", + flags={"required": True}, + ) + _ShowHelper._build_schema_ip_address_space_read(vwan_configuration.v_hub) + + panorama_config = cls._schema_on_200.properties.panorama_config + panorama_config.cg_name = AAZStrType( + serialized_name="cgName", + flags={"read_only": True}, + ) + panorama_config.config_string = AAZStrType( + serialized_name="configString", + flags={"required": True}, + ) + panorama_config.dg_name = AAZStrType( + serialized_name="dgName", + flags={"read_only": True}, + ) + panorama_config.host_name = AAZStrType( + serialized_name="hostName", + flags={"read_only": True}, + ) + panorama_config.panorama_server = AAZStrType( + serialized_name="panoramaServer", + flags={"read_only": True}, + ) + panorama_config.panorama_server2 = AAZStrType( + serialized_name="panoramaServer2", + flags={"read_only": True}, + ) + panorama_config.tpl_name = AAZStrType( + serialized_name="tplName", + flags={"read_only": True}, + ) + panorama_config.vm_auth_key = AAZStrType( + serialized_name="vmAuthKey", + flags={"read_only": True}, + ) + + plan_data = cls._schema_on_200.properties.plan_data + plan_data.billing_cycle = AAZStrType( + serialized_name="billingCycle", + flags={"required": True}, + ) + plan_data.effective_date = AAZStrType( + serialized_name="effectiveDate", + flags={"read_only": True}, + ) + plan_data.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + plan_data.usage_type = AAZStrType( + serialized_name="usageType", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_endpoint_configuration_read = None + + @classmethod + def _build_schema_endpoint_configuration_read(cls, _schema): + if cls._schema_endpoint_configuration_read is not None: + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + return + + cls._schema_endpoint_configuration_read = _schema_endpoint_configuration_read = AAZObjectType() + + endpoint_configuration_read = _schema_endpoint_configuration_read + endpoint_configuration_read.address = AAZObjectType( + flags={"required": True}, + ) + cls._build_schema_ip_address_read(endpoint_configuration_read.address) + endpoint_configuration_read.port = AAZStrType( + flags={"required": True}, + ) + + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + + _schema_ip_address_space_read = None + + @classmethod + def _build_schema_ip_address_space_read(cls, _schema): + if cls._schema_ip_address_space_read is not None: + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + return + + cls._schema_ip_address_space_read = _schema_ip_address_space_read = AAZObjectType() + + ip_address_space_read = _schema_ip_address_space_read + ip_address_space_read.address_space = AAZStrType( + serialized_name="addressSpace", + ) + ip_address_space_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + ip_address_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py new file mode 100644 index 00000000000..7f1d00aabea --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py @@ -0,0 +1,765 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall update", +) +class Update(AAZCommand): + """Update a FirewallResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="Resource", + help="The managed service identities assigned to this resource.", + nullable=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + nullable=True, + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="The type of managed identity assigned to this resource.", + enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + help="The identities assigned to this resource by the user.", + nullable=True, + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.identity.user_assigned_identities.Element + _element.client_id = AAZStrArg( + options=["client-id"], + help="The active directory client identifier for this principal.", + nullable=True, + ) + _element.principal_id = AAZStrArg( + options=["principal-id"], + help="The active directory identifier for this principal.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirewallsGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.FirewallsCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirewallsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_firewall_resource_read(cls._schema_on_200) + + return cls._schema_on_200 + + class FirewallsCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_firewall_resource_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".identity.userAssignedIdentities{}") + if _elements is not None: + _elements.set_prop("clientId", AAZStrType, ".client_id") + _elements.set_prop("principalId", AAZStrType, ".principal_id") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_endpoint_configuration_read = None + + @classmethod + def _build_schema_endpoint_configuration_read(cls, _schema): + if cls._schema_endpoint_configuration_read is not None: + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + return + + cls._schema_endpoint_configuration_read = _schema_endpoint_configuration_read = AAZObjectType() + + endpoint_configuration_read = _schema_endpoint_configuration_read + endpoint_configuration_read.address = AAZObjectType( + flags={"required": True}, + ) + cls._build_schema_ip_address_read(endpoint_configuration_read.address) + endpoint_configuration_read.port = AAZStrType( + flags={"required": True}, + ) + + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + + _schema_firewall_resource_read = None + + @classmethod + def _build_schema_firewall_resource_read(cls, _schema): + if cls._schema_firewall_resource_read is not None: + _schema.id = cls._schema_firewall_resource_read.id + _schema.identity = cls._schema_firewall_resource_read.identity + _schema.location = cls._schema_firewall_resource_read.location + _schema.name = cls._schema_firewall_resource_read.name + _schema.properties = cls._schema_firewall_resource_read.properties + _schema.system_data = cls._schema_firewall_resource_read.system_data + _schema.tags = cls._schema_firewall_resource_read.tags + _schema.type = cls._schema_firewall_resource_read.type + return + + cls._schema_firewall_resource_read = _schema_firewall_resource_read = AAZObjectType() + + firewall_resource_read = _schema_firewall_resource_read + firewall_resource_read.id = AAZStrType( + flags={"read_only": True}, + ) + firewall_resource_read.identity = AAZObjectType() + firewall_resource_read.location = AAZStrType( + flags={"required": True}, + ) + firewall_resource_read.name = AAZStrType( + flags={"read_only": True}, + ) + firewall_resource_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + firewall_resource_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + firewall_resource_read.tags = AAZDictType() + firewall_resource_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_firewall_resource_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = _schema_firewall_resource_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = _schema_firewall_resource_read.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = _schema_firewall_resource_read.properties + properties.associated_rulestack = AAZObjectType( + serialized_name="associatedRulestack", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + flags={"required": True}, + ) + properties.front_end_settings = AAZListType( + serialized_name="frontEndSettings", + ) + properties.is_panorama_managed = AAZStrType( + serialized_name="isPanoramaManaged", + ) + properties.marketplace_details = AAZObjectType( + serialized_name="marketplaceDetails", + flags={"required": True}, + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + flags={"required": True}, + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.panorama_config = AAZObjectType( + serialized_name="panoramaConfig", + ) + properties.plan_data = AAZObjectType( + serialized_name="planData", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + associated_rulestack = _schema_firewall_resource_read.properties.associated_rulestack + associated_rulestack.location = AAZStrType() + associated_rulestack.resource_id = AAZStrType( + serialized_name="resourceId", + ) + associated_rulestack.rulestack_id = AAZStrType( + serialized_name="rulestackId", + ) + + dns_settings = _schema_firewall_resource_read.properties.dns_settings + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.enable_dns_proxy = AAZStrType( + serialized_name="enableDnsProxy", + ) + dns_settings.enabled_dns_type = AAZStrType( + serialized_name="enabledDnsType", + ) + + dns_servers = _schema_firewall_resource_read.properties.dns_settings.dns_servers + dns_servers.Element = AAZObjectType() + cls._build_schema_ip_address_read(dns_servers.Element) + + front_end_settings = _schema_firewall_resource_read.properties.front_end_settings + front_end_settings.Element = AAZObjectType() + + _element = _schema_firewall_resource_read.properties.front_end_settings.Element + _element.backend_configuration = AAZObjectType( + serialized_name="backendConfiguration", + flags={"required": True}, + ) + cls._build_schema_endpoint_configuration_read(_element.backend_configuration) + _element.frontend_configuration = AAZObjectType( + serialized_name="frontendConfiguration", + flags={"required": True}, + ) + cls._build_schema_endpoint_configuration_read(_element.frontend_configuration) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + + marketplace_details = _schema_firewall_resource_read.properties.marketplace_details + marketplace_details.marketplace_subscription_id = AAZStrType( + serialized_name="marketplaceSubscriptionId", + flags={"read_only": True}, + ) + marketplace_details.marketplace_subscription_status = AAZStrType( + serialized_name="marketplaceSubscriptionStatus", + ) + marketplace_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + marketplace_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + + network_profile = _schema_firewall_resource_read.properties.network_profile + network_profile.egress_nat_ip = AAZListType( + serialized_name="egressNatIp", + ) + network_profile.enable_egress_nat = AAZStrType( + serialized_name="enableEgressNat", + flags={"required": True}, + ) + network_profile.network_type = AAZStrType( + serialized_name="networkType", + flags={"required": True}, + ) + network_profile.public_ips = AAZListType( + serialized_name="publicIps", + flags={"required": True}, + ) + network_profile.vnet_configuration = AAZObjectType( + serialized_name="vnetConfiguration", + ) + network_profile.vwan_configuration = AAZObjectType( + serialized_name="vwanConfiguration", + ) + + egress_nat_ip = _schema_firewall_resource_read.properties.network_profile.egress_nat_ip + egress_nat_ip.Element = AAZObjectType() + cls._build_schema_ip_address_read(egress_nat_ip.Element) + + public_ips = _schema_firewall_resource_read.properties.network_profile.public_ips + public_ips.Element = AAZObjectType() + cls._build_schema_ip_address_read(public_ips.Element) + + vnet_configuration = _schema_firewall_resource_read.properties.network_profile.vnet_configuration + vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + cls._build_schema_ip_address_read(vnet_configuration.ip_of_trust_subnet_for_udr) + vnet_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + flags={"required": True}, + ) + cls._build_schema_ip_address_space_read(vnet_configuration.trust_subnet) + vnet_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + flags={"required": True}, + ) + cls._build_schema_ip_address_space_read(vnet_configuration.un_trust_subnet) + vnet_configuration.vnet = AAZObjectType( + flags={"required": True}, + ) + cls._build_schema_ip_address_space_read(vnet_configuration.vnet) + + vwan_configuration = _schema_firewall_resource_read.properties.network_profile.vwan_configuration + vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + cls._build_schema_ip_address_read(vwan_configuration.ip_of_trust_subnet_for_udr) + vwan_configuration.network_virtual_appliance_id = AAZStrType( + serialized_name="networkVirtualApplianceId", + ) + vwan_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + ) + cls._build_schema_ip_address_space_read(vwan_configuration.trust_subnet) + vwan_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + ) + cls._build_schema_ip_address_space_read(vwan_configuration.un_trust_subnet) + vwan_configuration.v_hub = AAZObjectType( + serialized_name="vHub", + flags={"required": True}, + ) + cls._build_schema_ip_address_space_read(vwan_configuration.v_hub) + + panorama_config = _schema_firewall_resource_read.properties.panorama_config + panorama_config.cg_name = AAZStrType( + serialized_name="cgName", + flags={"read_only": True}, + ) + panorama_config.config_string = AAZStrType( + serialized_name="configString", + flags={"required": True}, + ) + panorama_config.dg_name = AAZStrType( + serialized_name="dgName", + flags={"read_only": True}, + ) + panorama_config.host_name = AAZStrType( + serialized_name="hostName", + flags={"read_only": True}, + ) + panorama_config.panorama_server = AAZStrType( + serialized_name="panoramaServer", + flags={"read_only": True}, + ) + panorama_config.panorama_server2 = AAZStrType( + serialized_name="panoramaServer2", + flags={"read_only": True}, + ) + panorama_config.tpl_name = AAZStrType( + serialized_name="tplName", + flags={"read_only": True}, + ) + panorama_config.vm_auth_key = AAZStrType( + serialized_name="vmAuthKey", + flags={"read_only": True}, + ) + + plan_data = _schema_firewall_resource_read.properties.plan_data + plan_data.billing_cycle = AAZStrType( + serialized_name="billingCycle", + flags={"required": True}, + ) + plan_data.effective_date = AAZStrType( + serialized_name="effectiveDate", + flags={"read_only": True}, + ) + plan_data.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + plan_data.usage_type = AAZStrType( + serialized_name="usageType", + ) + + system_data = _schema_firewall_resource_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = _schema_firewall_resource_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_firewall_resource_read.id + _schema.identity = cls._schema_firewall_resource_read.identity + _schema.location = cls._schema_firewall_resource_read.location + _schema.name = cls._schema_firewall_resource_read.name + _schema.properties = cls._schema_firewall_resource_read.properties + _schema.system_data = cls._schema_firewall_resource_read.system_data + _schema.tags = cls._schema_firewall_resource_read.tags + _schema.type = cls._schema_firewall_resource_read.type + + _schema_ip_address_space_read = None + + @classmethod + def _build_schema_ip_address_space_read(cls, _schema): + if cls._schema_ip_address_space_read is not None: + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + return + + cls._schema_ip_address_space_read = _schema_ip_address_space_read = AAZObjectType() + + ip_address_space_read = _schema_ip_address_space_read + ip_address_space_read.address_space = AAZStrType( + serialized_name="addressSpace", + ) + ip_address_space_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + ip_address_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + + +__all__ = ["Update"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_wait.py new file mode 100644 index 00000000000..f076909b9bf --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_wait.py @@ -0,0 +1,518 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirewallsGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class FirewallsGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.properties + properties.associated_rulestack = AAZObjectType( + serialized_name="associatedRulestack", + ) + properties.dns_settings = AAZObjectType( + serialized_name="dnsSettings", + flags={"required": True}, + ) + properties.front_end_settings = AAZListType( + serialized_name="frontEndSettings", + ) + properties.is_panorama_managed = AAZStrType( + serialized_name="isPanoramaManaged", + ) + properties.marketplace_details = AAZObjectType( + serialized_name="marketplaceDetails", + flags={"required": True}, + ) + properties.network_profile = AAZObjectType( + serialized_name="networkProfile", + flags={"required": True}, + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.panorama_config = AAZObjectType( + serialized_name="panoramaConfig", + ) + properties.plan_data = AAZObjectType( + serialized_name="planData", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + associated_rulestack = cls._schema_on_200.properties.associated_rulestack + associated_rulestack.location = AAZStrType() + associated_rulestack.resource_id = AAZStrType( + serialized_name="resourceId", + ) + associated_rulestack.rulestack_id = AAZStrType( + serialized_name="rulestackId", + ) + + dns_settings = cls._schema_on_200.properties.dns_settings + dns_settings.dns_servers = AAZListType( + serialized_name="dnsServers", + ) + dns_settings.enable_dns_proxy = AAZStrType( + serialized_name="enableDnsProxy", + ) + dns_settings.enabled_dns_type = AAZStrType( + serialized_name="enabledDnsType", + ) + + dns_servers = cls._schema_on_200.properties.dns_settings.dns_servers + dns_servers.Element = AAZObjectType() + _WaitHelper._build_schema_ip_address_read(dns_servers.Element) + + front_end_settings = cls._schema_on_200.properties.front_end_settings + front_end_settings.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.front_end_settings.Element + _element.backend_configuration = AAZObjectType( + serialized_name="backendConfiguration", + flags={"required": True}, + ) + _WaitHelper._build_schema_endpoint_configuration_read(_element.backend_configuration) + _element.frontend_configuration = AAZObjectType( + serialized_name="frontendConfiguration", + flags={"required": True}, + ) + _WaitHelper._build_schema_endpoint_configuration_read(_element.frontend_configuration) + _element.name = AAZStrType( + flags={"required": True}, + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + + marketplace_details = cls._schema_on_200.properties.marketplace_details + marketplace_details.marketplace_subscription_id = AAZStrType( + serialized_name="marketplaceSubscriptionId", + flags={"read_only": True}, + ) + marketplace_details.marketplace_subscription_status = AAZStrType( + serialized_name="marketplaceSubscriptionStatus", + ) + marketplace_details.offer_id = AAZStrType( + serialized_name="offerId", + flags={"required": True}, + ) + marketplace_details.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"required": True}, + ) + + network_profile = cls._schema_on_200.properties.network_profile + network_profile.egress_nat_ip = AAZListType( + serialized_name="egressNatIp", + ) + network_profile.enable_egress_nat = AAZStrType( + serialized_name="enableEgressNat", + flags={"required": True}, + ) + network_profile.network_type = AAZStrType( + serialized_name="networkType", + flags={"required": True}, + ) + network_profile.public_ips = AAZListType( + serialized_name="publicIps", + flags={"required": True}, + ) + network_profile.vnet_configuration = AAZObjectType( + serialized_name="vnetConfiguration", + ) + network_profile.vwan_configuration = AAZObjectType( + serialized_name="vwanConfiguration", + ) + + egress_nat_ip = cls._schema_on_200.properties.network_profile.egress_nat_ip + egress_nat_ip.Element = AAZObjectType() + _WaitHelper._build_schema_ip_address_read(egress_nat_ip.Element) + + public_ips = cls._schema_on_200.properties.network_profile.public_ips + public_ips.Element = AAZObjectType() + _WaitHelper._build_schema_ip_address_read(public_ips.Element) + + vnet_configuration = cls._schema_on_200.properties.network_profile.vnet_configuration + vnet_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _WaitHelper._build_schema_ip_address_read(vnet_configuration.ip_of_trust_subnet_for_udr) + vnet_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + flags={"required": True}, + ) + _WaitHelper._build_schema_ip_address_space_read(vnet_configuration.trust_subnet) + vnet_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + flags={"required": True}, + ) + _WaitHelper._build_schema_ip_address_space_read(vnet_configuration.un_trust_subnet) + vnet_configuration.vnet = AAZObjectType( + flags={"required": True}, + ) + _WaitHelper._build_schema_ip_address_space_read(vnet_configuration.vnet) + + vwan_configuration = cls._schema_on_200.properties.network_profile.vwan_configuration + vwan_configuration.ip_of_trust_subnet_for_udr = AAZObjectType( + serialized_name="ipOfTrustSubnetForUdr", + ) + _WaitHelper._build_schema_ip_address_read(vwan_configuration.ip_of_trust_subnet_for_udr) + vwan_configuration.network_virtual_appliance_id = AAZStrType( + serialized_name="networkVirtualApplianceId", + ) + vwan_configuration.trust_subnet = AAZObjectType( + serialized_name="trustSubnet", + ) + _WaitHelper._build_schema_ip_address_space_read(vwan_configuration.trust_subnet) + vwan_configuration.un_trust_subnet = AAZObjectType( + serialized_name="unTrustSubnet", + ) + _WaitHelper._build_schema_ip_address_space_read(vwan_configuration.un_trust_subnet) + vwan_configuration.v_hub = AAZObjectType( + serialized_name="vHub", + flags={"required": True}, + ) + _WaitHelper._build_schema_ip_address_space_read(vwan_configuration.v_hub) + + panorama_config = cls._schema_on_200.properties.panorama_config + panorama_config.cg_name = AAZStrType( + serialized_name="cgName", + flags={"read_only": True}, + ) + panorama_config.config_string = AAZStrType( + serialized_name="configString", + flags={"required": True}, + ) + panorama_config.dg_name = AAZStrType( + serialized_name="dgName", + flags={"read_only": True}, + ) + panorama_config.host_name = AAZStrType( + serialized_name="hostName", + flags={"read_only": True}, + ) + panorama_config.panorama_server = AAZStrType( + serialized_name="panoramaServer", + flags={"read_only": True}, + ) + panorama_config.panorama_server2 = AAZStrType( + serialized_name="panoramaServer2", + flags={"read_only": True}, + ) + panorama_config.tpl_name = AAZStrType( + serialized_name="tplName", + flags={"read_only": True}, + ) + panorama_config.vm_auth_key = AAZStrType( + serialized_name="vmAuthKey", + flags={"read_only": True}, + ) + + plan_data = cls._schema_on_200.properties.plan_data + plan_data.billing_cycle = AAZStrType( + serialized_name="billingCycle", + flags={"required": True}, + ) + plan_data.effective_date = AAZStrType( + serialized_name="effectiveDate", + flags={"read_only": True}, + ) + plan_data.plan_id = AAZStrType( + serialized_name="planId", + flags={"required": True}, + ) + plan_data.usage_type = AAZStrType( + serialized_name="usageType", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + _schema_endpoint_configuration_read = None + + @classmethod + def _build_schema_endpoint_configuration_read(cls, _schema): + if cls._schema_endpoint_configuration_read is not None: + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + return + + cls._schema_endpoint_configuration_read = _schema_endpoint_configuration_read = AAZObjectType() + + endpoint_configuration_read = _schema_endpoint_configuration_read + endpoint_configuration_read.address = AAZObjectType( + flags={"required": True}, + ) + cls._build_schema_ip_address_read(endpoint_configuration_read.address) + endpoint_configuration_read.port = AAZStrType( + flags={"required": True}, + ) + + _schema.address = cls._schema_endpoint_configuration_read.address + _schema.port = cls._schema_endpoint_configuration_read.port + + _schema_ip_address_space_read = None + + @classmethod + def _build_schema_ip_address_space_read(cls, _schema): + if cls._schema_ip_address_space_read is not None: + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + return + + cls._schema_ip_address_space_read = _schema_ip_address_space_read = AAZObjectType() + + ip_address_space_read = _schema_ip_address_space_read + ip_address_space_read.address_space = AAZStrType( + serialized_name="addressSpace", + ) + ip_address_space_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address_space = cls._schema_ip_address_space_read.address_space + _schema.resource_id = cls._schema_ip_address_space_read.resource_id + + _schema_ip_address_read = None + + @classmethod + def _build_schema_ip_address_read(cls, _schema): + if cls._schema_ip_address_read is not None: + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + return + + cls._schema_ip_address_read = _schema_ip_address_read = AAZObjectType() + + ip_address_read = _schema_ip_address_read + ip_address_read.address = AAZStrType() + ip_address_read.resource_id = AAZStrType( + serialized_name="resourceId", + ) + + _schema.address = cls._schema_ip_address_read.address + _schema.resource_id = cls._schema_ip_address_read.resource_id + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/__cmd_group.py new file mode 100644 index 00000000000..81d39d187f0 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw firewall status", +) +class __CMDGroup(AAZCommandGroup): + """Manage cloudngfw firewall status resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/__init__.py new file mode 100644 index 00000000000..d63ae5a6fc9 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py new file mode 100644 index 00000000000..2478256a5bb --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py @@ -0,0 +1,233 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall status list", +) +class List(AAZCommand): + """List FirewallStatusResource resources by Firewalls + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}/statuses", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirewallStatusListByFirewalls(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class FirewallStatusListByFirewalls(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/statuses", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.health_reason = AAZStrType( + serialized_name="healthReason", + flags={"read_only": True}, + ) + properties.health_status = AAZStrType( + serialized_name="healthStatus", + ) + properties.is_panorama_managed = AAZStrType( + serialized_name="isPanoramaManaged", + ) + properties.panorama_status = AAZObjectType( + serialized_name="panoramaStatus", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + panorama_status = cls._schema_on_200.value.Element.properties.panorama_status + panorama_status.panorama_server2_status = AAZStrType( + serialized_name="panoramaServer2Status", + ) + panorama_status.panorama_server_status = AAZStrType( + serialized_name="panoramaServerStatus", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/__cmd_group.py new file mode 100644 index 00000000000..a712e99665d --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw firewall status default", +) +class __CMDGroup(AAZCommandGroup): + """Manage cloudngfw firewall status default resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/__init__.py new file mode 100644 index 00000000000..28d5f355813 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/__init__.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._show import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py new file mode 100644 index 00000000000..a90ad16f785 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py @@ -0,0 +1,223 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw firewall status default show", +) +class Show(AAZCommand): + """Get a FirewallStatusResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}/statuses/default", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.firewall_name = AAZStrArg( + options=["-n", "--name", "--firewall-name"], + help="Firewall resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FirewallStatusGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FirewallStatusGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/statuses/default", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "firewallName", self.ctx.args.firewall_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.health_reason = AAZStrType( + serialized_name="healthReason", + flags={"read_only": True}, + ) + properties.health_status = AAZStrType( + serialized_name="healthStatus", + ) + properties.is_panorama_managed = AAZStrType( + serialized_name="isPanoramaManaged", + ) + properties.panorama_status = AAZObjectType( + serialized_name="panoramaStatus", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + panorama_status = cls._schema_on_200.properties.panorama_status + panorama_status.panorama_server2_status = AAZStrType( + serialized_name="panoramaServer2Status", + ) + panorama_status.panorama_server_status = AAZStrType( + serialized_name="panoramaServerStatus", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__cmd_group.py new file mode 100644 index 00000000000..ece352db63c --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw global-rulestack", +) +class __CMDGroup(AAZCommandGroup): + """Manage global-rulestack resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__init__.py new file mode 100644 index 00000000000..0ac4cc75aad --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__init__.py @@ -0,0 +1,26 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._commit import * +from ._create import * +from ._delete import * +from ._get_change_log import * +from ._list import * +from ._list_advanced_security_object import * +from ._list_app_id import * +from ._list_country import * +from ._list_firewall import * +from ._list_predefined_url_category import * +from ._list_security_service import * +from ._revert import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_commit.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_commit.py new file mode 100644 index 00000000000..94d8f347740 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_commit.py @@ -0,0 +1,123 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack commit", +) +class Commit(AAZCommand): + """Commit rulestack configuration + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/commit", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.GlobalRulestackCommit(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class GlobalRulestackCommit(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + None, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/commit", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + +class _CommitHelper: + """Helper class for Commit""" + + +__all__ = ["Commit"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_create.py new file mode 100644 index 00000000000..5df24e17ff4 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_create.py @@ -0,0 +1,465 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack create", +) +class Create(AAZCommand): + """Create a GlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.associated_subscriptions = AAZListArg( + options=["--associated-subscriptions"], + arg_group="Properties", + help="subscription scope of global rulestack", + ) + _args_schema.default_mode = AAZStrArg( + options=["--default-mode"], + arg_group="Properties", + help="Mode for default rules creation", + enum={"FIREWALL": "FIREWALL", "IPS": "IPS", "NONE": "NONE"}, + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="rulestack description", + ) + _args_schema.min_app_id_version = AAZStrArg( + options=["--min-app-id-version"], + arg_group="Properties", + help="minimum version", + ) + _args_schema.pan_etag = AAZStrArg( + options=["--pan-etag"], + arg_group="Properties", + help="PanEtag info", + ) + _args_schema.pan_location = AAZStrArg( + options=["--pan-location"], + arg_group="Properties", + help="Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks", + ) + _args_schema.scope = AAZStrArg( + options=["--scope"], + arg_group="Properties", + help="Rulestack Type", + enum={"GLOBAL": "GLOBAL", "LOCAL": "LOCAL"}, + ) + _args_schema.security_services = AAZObjectArg( + options=["--security-services"], + arg_group="Properties", + help="Security Profile", + ) + + associated_subscriptions = cls._args_schema.associated_subscriptions + associated_subscriptions.Element = AAZStrArg() + + security_services = cls._args_schema.security_services + security_services.anti_spyware_profile = AAZStrArg( + options=["anti-spyware-profile"], + help="Anti spyware Profile data", + ) + security_services.anti_virus_profile = AAZStrArg( + options=["anti-virus-profile"], + help="anti virus profile data", + ) + security_services.dns_subscription = AAZStrArg( + options=["dns-subscription"], + help="DNS Subscription profile data", + ) + security_services.file_blocking_profile = AAZStrArg( + options=["file-blocking-profile"], + help="File blocking profile data", + ) + security_services.outbound_trust_certificate = AAZStrArg( + options=["outbound-trust-certificate"], + help="Trusted Egress Decryption profile data", + ) + security_services.outbound_un_trust_certificate = AAZStrArg( + options=["outbound-un-trust-certificate"], + help="Untrusted Egress Decryption profile data", + ) + security_services.url_filtering_profile = AAZStrArg( + options=["url-filtering-profile"], + help="URL filtering profile data", + ) + security_services.vulnerability_profile = AAZStrArg( + options=["vulnerability-profile"], + help="IPs Vulnerability Profile Data", + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="Resource", + help="The managed service identities assigned to this resource.", + ) + _args_schema.location = AAZResourceLocationArg( + arg_group="Resource", + help="Global Location", + required=True, + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="The type of managed identity assigned to this resource.", + required=True, + enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + help="The identities assigned to this resource by the user.", + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg() + + _element = cls._args_schema.identity.user_assigned_identities.Element + _element.client_id = AAZStrArg( + options=["client-id"], + help="The active directory client identifier for this principal.", + ) + _element.principal_id = AAZStrArg( + options=["principal-id"], + help="The active directory identifier for this principal.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.GlobalRulestackCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".identity.userAssignedIdentities{}") + if _elements is not None: + _elements.set_prop("clientId", AAZStrType, ".client_id") + _elements.set_prop("principalId", AAZStrType, ".principal_id") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("associatedSubscriptions", AAZListType, ".associated_subscriptions") + properties.set_prop("defaultMode", AAZStrType, ".default_mode") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("minAppIdVersion", AAZStrType, ".min_app_id_version") + properties.set_prop("panEtag", AAZStrType, ".pan_etag") + properties.set_prop("panLocation", AAZStrType, ".pan_location") + properties.set_prop("scope", AAZStrType, ".scope") + properties.set_prop("securityServices", AAZObjectType, ".security_services") + + associated_subscriptions = _builder.get(".properties.associatedSubscriptions") + if associated_subscriptions is not None: + associated_subscriptions.set_elements(AAZStrType, ".") + + security_services = _builder.get(".properties.securityServices") + if security_services is not None: + security_services.set_prop("antiSpywareProfile", AAZStrType, ".anti_spyware_profile") + security_services.set_prop("antiVirusProfile", AAZStrType, ".anti_virus_profile") + security_services.set_prop("dnsSubscription", AAZStrType, ".dns_subscription") + security_services.set_prop("fileBlockingProfile", AAZStrType, ".file_blocking_profile") + security_services.set_prop("outboundTrustCertificate", AAZStrType, ".outbound_trust_certificate") + security_services.set_prop("outboundUnTrustCertificate", AAZStrType, ".outbound_un_trust_certificate") + security_services.set_prop("urlFilteringProfile", AAZStrType, ".url_filtering_profile") + security_services.set_prop("vulnerabilityProfile", AAZStrType, ".vulnerability_profile") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.identity = AAZObjectType() + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200_201.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200_201.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200_201.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200_201.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200_201.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_delete.py new file mode 100644 index 00000000000..b1b6999ff49 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_delete.py @@ -0,0 +1,148 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a GlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.GlobalRulestackDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class GlobalRulestackDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_get_change_log.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_get_change_log.py new file mode 100644 index 00000000000..4539586612c --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_get_change_log.py @@ -0,0 +1,161 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack get-change-log", +) +class GetChangeLog(AAZCommand): + """Get changelog + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/getchangelog", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackGetChangeLog(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackGetChangeLog(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/getChangeLog", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.changes = AAZListType( + flags={"required": True}, + ) + _schema_on_200.last_committed = AAZStrType( + serialized_name="lastCommitted", + ) + _schema_on_200.last_modified = AAZStrType( + serialized_name="lastModified", + ) + + changes = cls._schema_on_200.changes + changes.Element = AAZStrType() + + return cls._schema_on_200 + + +class _GetChangeLogHelper: + """Helper class for GetChangeLog""" + + +__all__ = ["GetChangeLog"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list.py new file mode 100644 index 00000000000..e289c505ead --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list.py @@ -0,0 +1,253 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack list", +) +class List(AAZCommand): + """List GlobalRulestackResource resources by Tenant + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class GlobalRulestackList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.value.Element.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200.value.Element.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200.value.Element.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_advanced_security_object.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_advanced_security_object.py new file mode 100644 index 00000000000..ae0a9f68c20 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_advanced_security_object.py @@ -0,0 +1,191 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack list-advanced-security-object", +) +class ListAdvancedSecurityObject(AAZCommand): + """Get the list of advanced security objects + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listadvancedsecurityobjects", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + _args_schema.type = AAZStrArg( + options=["--type"], + required=True, + enum={"feeds": "feeds", "urlCustom": "urlCustom"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackListAdvancedSecurityObjects(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackListAdvancedSecurityObjects(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listAdvancedSecurityObjects", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "type", self.ctx.args.type, + required=True, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZObjectType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.entry = AAZListType( + flags={"required": True}, + ) + value.type = AAZStrType() + + entry = cls._schema_on_200.value.entry + entry.Element = AAZObjectType() + + _element = cls._schema_on_200.value.entry.Element + _element.description = AAZStrType() + _element.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListAdvancedSecurityObjectHelper: + """Helper class for ListAdvancedSecurityObject""" + + +__all__ = ["ListAdvancedSecurityObject"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_app_id.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_app_id.py new file mode 100644 index 00000000000..0047c641880 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_app_id.py @@ -0,0 +1,182 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack list-app-id", +) +class ListAppId(AAZCommand): + """List of AppIds for GlobalRulestack ApiVersion + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listappids", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.app_id_version = AAZStrArg( + options=["--app-id-version"], + ) + _args_schema.app_prefix = AAZStrArg( + options=["--app-prefix"], + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackListAppIds(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackListAppIds(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listAppIds", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "appIdVersion", self.ctx.args.app_id_version, + ), + **self.serialize_query_param( + "appPrefix", self.ctx.args.app_prefix, + ), + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListAppIdHelper: + """Helper class for ListAppId""" + + +__all__ = ["ListAppId"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_country.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_country.py new file mode 100644 index 00000000000..45c1e65da26 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_country.py @@ -0,0 +1,176 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack list-country", +) +class ListCountry(AAZCommand): + """List of countries for Rulestack + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listcountries", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackListCountries(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackListCountries(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listCountries", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.code = AAZStrType( + flags={"required": True}, + ) + _element.description = AAZStrType() + + return cls._schema_on_200 + + +class _ListCountryHelper: + """Helper class for ListCountry""" + + +__all__ = ["ListCountry"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_firewall.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_firewall.py new file mode 100644 index 00000000000..c0ae6230631 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_firewall.py @@ -0,0 +1,158 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack list-firewall", +) +class ListFirewall(AAZCommand): + """List of Firewalls associated with Rulestack + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listfirewalls", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackListFirewalls(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackListFirewalls(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listFirewalls", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListFirewallHelper: + """Helper class for ListFirewall""" + + +__all__ = ["ListFirewall"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_predefined_url_category.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_predefined_url_category.py new file mode 100644 index 00000000000..6b682d556ea --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_predefined_url_category.py @@ -0,0 +1,178 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack list-predefined-url-category", +) +class ListPredefinedUrlCategory(AAZCommand): + """List predefined URL categories for rulestack + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listpredefinedurlcategories", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackListPredefinedUrlCategories(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackListPredefinedUrlCategories(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listPredefinedUrlCategories", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.action = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListPredefinedUrlCategoryHelper: + """Helper class for ListPredefinedUrlCategory""" + + +__all__ = ["ListPredefinedUrlCategory"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_security_service.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_security_service.py new file mode 100644 index 00000000000..dec4f6761fa --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_security_service.py @@ -0,0 +1,191 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack list-security-service", +) +class ListSecurityService(AAZCommand): + """List the security services for rulestack + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listsecurityservices", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + _args_schema.type = AAZStrArg( + options=["--type"], + required=True, + enum={"antiSpyware": "antiSpyware", "antiVirus": "antiVirus", "dnsSubscription": "dnsSubscription", "fileBlocking": "fileBlocking", "ipsVulnerability": "ipsVulnerability", "urlFiltering": "urlFiltering"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackListSecurityServices(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackListSecurityServices(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listSecurityServices", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "type", self.ctx.args.type, + required=True, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZObjectType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.entry = AAZListType( + flags={"required": True}, + ) + value.type = AAZStrType() + + entry = cls._schema_on_200.value.entry + entry.Element = AAZObjectType() + + _element = cls._schema_on_200.value.entry.Element + _element.description = AAZStrType() + _element.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListSecurityServiceHelper: + """Helper class for ListSecurityService""" + + +__all__ = ["ListSecurityService"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_revert.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_revert.py new file mode 100644 index 00000000000..855581bb289 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_revert.py @@ -0,0 +1,118 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack revert", +) +class Revert(AAZCommand): + """Revert rulestack configuration + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/revert", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackRevert(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class GlobalRulestackRevert(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/revert", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + +class _RevertHelper: + """Helper class for Revert""" + + +__all__ = ["Revert"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_show.py new file mode 100644 index 00000000000..49cc1fb1f51 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_show.py @@ -0,0 +1,270 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack show", +) +class Show(AAZCommand): + """Get a GlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_update.py new file mode 100644 index 00000000000..881a2dce803 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_update.py @@ -0,0 +1,495 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack update", +) +class Update(AAZCommand): + """Update a GlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="Resource", + help="The managed service identities assigned to this resource.", + nullable=True, + ) + _args_schema.location = AAZResourceLocationArg( + arg_group="Resource", + help="Global Location", + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="The type of managed identity assigned to this resource.", + enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + help="The identities assigned to this resource by the user.", + nullable=True, + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.identity.user_assigned_identities.Element + _element.client_id = AAZStrArg( + options=["client-id"], + help="The active directory client identifier for this principal.", + nullable=True, + ) + _element.principal_id = AAZStrArg( + options=["principal-id"], + help="The active directory identifier for this principal.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.GlobalRulestackCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class GlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_global_rulestack_resource_read(cls._schema_on_200) + + return cls._schema_on_200 + + class GlobalRulestackCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_global_rulestack_resource_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".identity.userAssignedIdentities{}") + if _elements is not None: + _elements.set_prop("clientId", AAZStrType, ".client_id") + _elements.set_prop("principalId", AAZStrType, ".principal_id") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_global_rulestack_resource_read = None + + @classmethod + def _build_schema_global_rulestack_resource_read(cls, _schema): + if cls._schema_global_rulestack_resource_read is not None: + _schema.id = cls._schema_global_rulestack_resource_read.id + _schema.identity = cls._schema_global_rulestack_resource_read.identity + _schema.location = cls._schema_global_rulestack_resource_read.location + _schema.name = cls._schema_global_rulestack_resource_read.name + _schema.properties = cls._schema_global_rulestack_resource_read.properties + _schema.system_data = cls._schema_global_rulestack_resource_read.system_data + _schema.type = cls._schema_global_rulestack_resource_read.type + return + + cls._schema_global_rulestack_resource_read = _schema_global_rulestack_resource_read = AAZObjectType() + + global_rulestack_resource_read = _schema_global_rulestack_resource_read + global_rulestack_resource_read.id = AAZStrType( + flags={"read_only": True}, + ) + global_rulestack_resource_read.identity = AAZObjectType() + global_rulestack_resource_read.location = AAZStrType( + flags={"required": True}, + ) + global_rulestack_resource_read.name = AAZStrType( + flags={"read_only": True}, + ) + global_rulestack_resource_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + global_rulestack_resource_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + global_rulestack_resource_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_global_rulestack_resource_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = _schema_global_rulestack_resource_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = _schema_global_rulestack_resource_read.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = _schema_global_rulestack_resource_read.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = _schema_global_rulestack_resource_read.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = _schema_global_rulestack_resource_read.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = _schema_global_rulestack_resource_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + _schema.id = cls._schema_global_rulestack_resource_read.id + _schema.identity = cls._schema_global_rulestack_resource_read.identity + _schema.location = cls._schema_global_rulestack_resource_read.location + _schema.name = cls._schema_global_rulestack_resource_read.name + _schema.properties = cls._schema_global_rulestack_resource_read.properties + _schema.system_data = cls._schema_global_rulestack_resource_read.system_data + _schema.type = cls._schema_global_rulestack_resource_read.type + + +__all__ = ["Update"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_wait.py new file mode 100644 index 00000000000..3c05f48b79b --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_wait.py @@ -0,0 +1,269 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GlobalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class GlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__cmd_group.py new file mode 100644 index 00000000000..b730dd4a6d6 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw global-rulestack certificate", +) +class __CMDGroup(AAZCommandGroup): + """Manage global-rulestack certificate resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_create.py new file mode 100644 index 00000000000..d68e01b8b92 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_create.py @@ -0,0 +1,281 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack certificate create", +) +class Create(AAZCommand): + """Create a CertificateObjectGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="certificate name", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="comment for this object", + ) + _args_schema.certificate_self_signed = AAZStrArg( + options=["--certificate-self-signed"], + arg_group="Properties", + help="use certificate self signed", + required=True, + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.certificate_signer_resource_id = AAZStrArg( + options=["--certificate-signer-resource-id"], + arg_group="Properties", + help="Resource Id of certificate signer, to be populated only when certificateSelfSigned is false", + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="user description for this object", + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="read only string representing last create or update", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.CertificateObjectGlobalRulestackCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CertificateObjectGlobalRulestackCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("certificateSelfSigned", AAZStrType, ".certificate_self_signed", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("certificateSignerResourceId", AAZStrType, ".certificate_signer_resource_id") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("etag", AAZStrType, ".etag") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.certificate_self_signed = AAZStrType( + serialized_name="certificateSelfSigned", + flags={"required": True}, + ) + properties.certificate_signer_resource_id = AAZStrType( + serialized_name="certificateSignerResourceId", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_delete.py new file mode 100644 index 00000000000..291bc34bace --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_delete.py @@ -0,0 +1,157 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack certificate delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a CertificateObjectGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="certificate name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.CertificateObjectGlobalRulestackDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class CertificateObjectGlobalRulestackDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_list.py new file mode 100644 index 00000000000..d13c27ab76b --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_list.py @@ -0,0 +1,213 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack certificate list", +) +class List(AAZCommand): + """List CertificateObjectGlobalRulestackResource resources by Tenant + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CertificateObjectGlobalRulestackList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class CertificateObjectGlobalRulestackList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.certificate_self_signed = AAZStrType( + serialized_name="certificateSelfSigned", + flags={"required": True}, + ) + properties.certificate_signer_resource_id = AAZStrType( + serialized_name="certificateSignerResourceId", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_show.py new file mode 100644 index 00000000000..e58b3a7fe5a --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_show.py @@ -0,0 +1,211 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack certificate show", +) +class Show(AAZCommand): + """Get a CertificateObjectGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="certificate name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CertificateObjectGlobalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CertificateObjectGlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.certificate_self_signed = AAZStrType( + serialized_name="certificateSelfSigned", + flags={"required": True}, + ) + properties.certificate_signer_resource_id = AAZStrType( + serialized_name="certificateSignerResourceId", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_wait.py new file mode 100644 index 00000000000..b8efef0d126 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_wait.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack certificate wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="certificate name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CertificateObjectGlobalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class CertificateObjectGlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.certificate_self_signed = AAZStrType( + serialized_name="certificateSelfSigned", + flags={"required": True}, + ) + properties.certificate_signer_resource_id = AAZStrType( + serialized_name="certificateSignerResourceId", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__cmd_group.py new file mode 100644 index 00000000000..5e64488bdd5 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw global-rulestack fqdnlist", +) +class __CMDGroup(AAZCommandGroup): + """Manage global-rulestack fqdnlist resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_create.py new file mode 100644 index 00000000000..cdc297a091c --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_create.py @@ -0,0 +1,281 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack fqdnlist create", +) +class Create(AAZCommand): + """Create a FqdnListGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="fqdn list name", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="comment for this object", + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="fqdn object description", + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="etag info", + ) + _args_schema.fqdn_list = AAZListArg( + options=["--fqdn-list"], + arg_group="Properties", + help="fqdn list", + required=True, + ) + + fqdn_list = cls._args_schema.fqdn_list + fqdn_list.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FqdnListGlobalRulestackCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FqdnListGlobalRulestackCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("etag", AAZStrType, ".etag") + properties.set_prop("fqdnList", AAZListType, ".fqdn_list", typ_kwargs={"flags": {"required": True}}) + + fqdn_list = _builder.get(".properties.fqdnList") + if fqdn_list is not None: + fqdn_list.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.fqdn_list = AAZListType( + serialized_name="fqdnList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + fqdn_list = cls._schema_on_200_201.properties.fqdn_list + fqdn_list.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_delete.py new file mode 100644 index 00000000000..c66b05fac41 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_delete.py @@ -0,0 +1,157 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack fqdnlist delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a FqdnListGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="fqdn list name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FqdnListGlobalRulestackDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class FqdnListGlobalRulestackDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_list.py new file mode 100644 index 00000000000..c6218b74ac9 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_list.py @@ -0,0 +1,213 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack fqdnlist list", +) +class List(AAZCommand): + """List FqdnListGlobalRulestackResource resources by Tenant + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FqdnListGlobalRulestackList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class FqdnListGlobalRulestackList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.fqdn_list = AAZListType( + serialized_name="fqdnList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + fqdn_list = cls._schema_on_200.value.Element.properties.fqdn_list + fqdn_list.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_show.py new file mode 100644 index 00000000000..66cd3f6546e --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_show.py @@ -0,0 +1,211 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack fqdnlist show", +) +class Show(AAZCommand): + """Get a FqdnListGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="fqdn list name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FqdnListGlobalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FqdnListGlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.fqdn_list = AAZListType( + serialized_name="fqdnList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + fqdn_list = cls._schema_on_200.properties.fqdn_list + fqdn_list.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_wait.py new file mode 100644 index 00000000000..c4b833a8a27 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_wait.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack fqdnlist wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="fqdn list name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FqdnListGlobalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class FqdnListGlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.fqdn_list = AAZListType( + serialized_name="fqdnList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + fqdn_list = cls._schema_on_200.properties.fqdn_list + fqdn_list.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__cmd_group.py new file mode 100644 index 00000000000..7224378a974 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw global-rulestack post-rule", +) +class __CMDGroup(AAZCommandGroup): + """Manage global-rulestack fqdnlist resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__init__.py new file mode 100644 index 00000000000..060f7aff0e8 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__init__.py @@ -0,0 +1,19 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._get_counter import * +from ._list import * +from ._refresh_counter import * +from ._reset_counter import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_create.py new file mode 100644 index 00000000000..fbef92a974a --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_create.py @@ -0,0 +1,660 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack post-rule create", +) +class Create(AAZCommand): + """Create a PostRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Post Rule priority", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.action_type = AAZStrArg( + options=["--action-type"], + arg_group="Properties", + help="rule action", + enum={"Allow": "Allow", "DenyResetBoth": "DenyResetBoth", "DenyResetServer": "DenyResetServer", "DenySilent": "DenySilent"}, + ) + _args_schema.applications = AAZListArg( + options=["--applications"], + arg_group="Properties", + help="array of rule applications", + ) + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="rule comment", + ) + _args_schema.category = AAZObjectArg( + options=["--category"], + arg_group="Properties", + help="rule category", + ) + _args_schema.decryption_rule_type = AAZStrArg( + options=["--decryption-rule-type"], + arg_group="Properties", + help="enable or disable decryption", + enum={"None": "None", "SSLInboundInspection": "SSLInboundInspection", "SSLOutboundInspection": "SSLOutboundInspection"}, + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="rule description", + ) + _args_schema.destination = AAZObjectArg( + options=["--destination"], + arg_group="Properties", + help="destination address", + ) + _args_schema.enable_logging = AAZStrArg( + options=["--enable-logging"], + arg_group="Properties", + help="enable or disable logging", + enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="etag info", + ) + _args_schema.inbound_inspection_certificate = AAZStrArg( + options=["--inbound-inspection-certificate"], + arg_group="Properties", + help="inbound Inspection Certificate", + ) + _args_schema.negate_destination = AAZStrArg( + options=["--negate-destination"], + arg_group="Properties", + help="cidr should not be 'any'", + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.negate_source = AAZStrArg( + options=["--negate-source"], + arg_group="Properties", + help="cidr should not be 'any'", + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.protocol = AAZStrArg( + options=["--protocol"], + arg_group="Properties", + help="any, application-default, TCP:number, UDP:number", + default="application-default", + ) + _args_schema.protocol_port_list = AAZListArg( + options=["--protocol-port-list"], + arg_group="Properties", + help="prot port list", + ) + _args_schema.rule_name = AAZStrArg( + options=["--rule-name"], + arg_group="Properties", + help="rule name", + required=True, + ) + _args_schema.rule_state = AAZStrArg( + options=["--rule-state"], + arg_group="Properties", + help="state of this rule", + enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, + ) + _args_schema.source = AAZObjectArg( + options=["--source"], + arg_group="Properties", + help="source address", + ) + _args_schema.tags = AAZListArg( + options=["--tags"], + arg_group="Properties", + help="tag for rule", + ) + + applications = cls._args_schema.applications + applications.Element = AAZStrArg() + + category = cls._args_schema.category + category.feeds = AAZListArg( + options=["feeds"], + help="feed list", + required=True, + ) + category.url_custom = AAZListArg( + options=["url-custom"], + help="custom URL", + required=True, + ) + + feeds = cls._args_schema.category.feeds + feeds.Element = AAZStrArg() + + url_custom = cls._args_schema.category.url_custom + url_custom.Element = AAZStrArg() + + destination = cls._args_schema.destination + destination.cidrs = AAZListArg( + options=["cidrs"], + help="special value 'any'", + ) + destination.countries = AAZListArg( + options=["countries"], + help="list of countries", + ) + destination.feeds = AAZListArg( + options=["feeds"], + help="list of feeds", + ) + destination.fqdn_lists = AAZListArg( + options=["fqdn-lists"], + help="fqdn list", + ) + destination.prefix_lists = AAZListArg( + options=["prefix-lists"], + help="prefix list", + ) + + cidrs = cls._args_schema.destination.cidrs + cidrs.Element = AAZStrArg() + + countries = cls._args_schema.destination.countries + countries.Element = AAZStrArg() + + feeds = cls._args_schema.destination.feeds + feeds.Element = AAZStrArg() + + fqdn_lists = cls._args_schema.destination.fqdn_lists + fqdn_lists.Element = AAZStrArg() + + prefix_lists = cls._args_schema.destination.prefix_lists + prefix_lists.Element = AAZStrArg() + + protocol_port_list = cls._args_schema.protocol_port_list + protocol_port_list.Element = AAZStrArg() + + source = cls._args_schema.source + source.cidrs = AAZListArg( + options=["cidrs"], + help="special value 'any'", + ) + source.countries = AAZListArg( + options=["countries"], + help="list of countries", + ) + source.feeds = AAZListArg( + options=["feeds"], + help="list of feeds", + ) + source.prefix_lists = AAZListArg( + options=["prefix-lists"], + help="prefix list", + ) + + cidrs = cls._args_schema.source.cidrs + cidrs.Element = AAZStrArg() + + countries = cls._args_schema.source.countries + countries.Element = AAZStrArg() + + feeds = cls._args_schema.source.feeds + feeds.Element = AAZStrArg() + + prefix_lists = cls._args_schema.source.prefix_lists + prefix_lists.Element = AAZStrArg() + + tags = cls._args_schema.tags + tags.Element = AAZObjectArg() + + _element = cls._args_schema.tags.Element + _element.key = AAZStrArg( + options=["key"], + help="tag name", + required=True, + ) + _element.value = AAZStrArg( + options=["value"], + help="tag value", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PostRulesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PostRulesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("actionType", AAZStrType, ".action_type") + properties.set_prop("applications", AAZListType, ".applications") + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("category", AAZObjectType, ".category") + properties.set_prop("decryptionRuleType", AAZStrType, ".decryption_rule_type") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("destination", AAZObjectType, ".destination") + properties.set_prop("enableLogging", AAZStrType, ".enable_logging") + properties.set_prop("etag", AAZStrType, ".etag") + properties.set_prop("inboundInspectionCertificate", AAZStrType, ".inbound_inspection_certificate") + properties.set_prop("negateDestination", AAZStrType, ".negate_destination") + properties.set_prop("negateSource", AAZStrType, ".negate_source") + properties.set_prop("protocol", AAZStrType, ".protocol") + properties.set_prop("protocolPortList", AAZListType, ".protocol_port_list") + properties.set_prop("ruleName", AAZStrType, ".rule_name", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("ruleState", AAZStrType, ".rule_state") + properties.set_prop("source", AAZObjectType, ".source") + properties.set_prop("tags", AAZListType, ".tags") + + applications = _builder.get(".properties.applications") + if applications is not None: + applications.set_elements(AAZStrType, ".") + + category = _builder.get(".properties.category") + if category is not None: + category.set_prop("feeds", AAZListType, ".feeds", typ_kwargs={"flags": {"required": True}}) + category.set_prop("urlCustom", AAZListType, ".url_custom", typ_kwargs={"flags": {"required": True}}) + + feeds = _builder.get(".properties.category.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + url_custom = _builder.get(".properties.category.urlCustom") + if url_custom is not None: + url_custom.set_elements(AAZStrType, ".") + + destination = _builder.get(".properties.destination") + if destination is not None: + destination.set_prop("cidrs", AAZListType, ".cidrs") + destination.set_prop("countries", AAZListType, ".countries") + destination.set_prop("feeds", AAZListType, ".feeds") + destination.set_prop("fqdnLists", AAZListType, ".fqdn_lists") + destination.set_prop("prefixLists", AAZListType, ".prefix_lists") + + cidrs = _builder.get(".properties.destination.cidrs") + if cidrs is not None: + cidrs.set_elements(AAZStrType, ".") + + countries = _builder.get(".properties.destination.countries") + if countries is not None: + countries.set_elements(AAZStrType, ".") + + feeds = _builder.get(".properties.destination.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + fqdn_lists = _builder.get(".properties.destination.fqdnLists") + if fqdn_lists is not None: + fqdn_lists.set_elements(AAZStrType, ".") + + prefix_lists = _builder.get(".properties.destination.prefixLists") + if prefix_lists is not None: + prefix_lists.set_elements(AAZStrType, ".") + + protocol_port_list = _builder.get(".properties.protocolPortList") + if protocol_port_list is not None: + protocol_port_list.set_elements(AAZStrType, ".") + + source = _builder.get(".properties.source") + if source is not None: + source.set_prop("cidrs", AAZListType, ".cidrs") + source.set_prop("countries", AAZListType, ".countries") + source.set_prop("feeds", AAZListType, ".feeds") + source.set_prop("prefixLists", AAZListType, ".prefix_lists") + + cidrs = _builder.get(".properties.source.cidrs") + if cidrs is not None: + cidrs.set_elements(AAZStrType, ".") + + countries = _builder.get(".properties.source.countries") + if countries is not None: + countries.set_elements(AAZStrType, ".") + + feeds = _builder.get(".properties.source.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + prefix_lists = _builder.get(".properties.source.prefixLists") + if prefix_lists is not None: + prefix_lists.set_elements(AAZStrType, ".") + + tags = _builder.get(".properties.tags") + if tags is not None: + tags.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.tags[]") + if _elements is not None: + _elements.set_prop("key", AAZStrType, ".key", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200_201.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200_201.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200_201.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200_201.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200_201.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200_201.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200_201.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200_201.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200_201.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200_201.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200_201.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200_201.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200_201.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200_201.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200_201.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200_201.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200_201.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_delete.py new file mode 100644 index 00000000000..0ce4c449c5a --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_delete.py @@ -0,0 +1,157 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack post-rule delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a PostRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Post Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PostRulesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PostRulesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_get_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_get_counter.py new file mode 100644 index 00000000000..334b4e2601a --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_get_counter.py @@ -0,0 +1,230 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack post-rule get-counter", +) +class GetCounter(AAZCommand): + """Get counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}/getcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Post Rule priority", + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PostRulesGetCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PostRulesGetCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/getCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.app_seen = AAZObjectType( + serialized_name="appSeen", + ) + _schema_on_200.firewall_name = AAZStrType( + serialized_name="firewallName", + ) + _schema_on_200.hit_count = AAZIntType( + serialized_name="hitCount", + ) + _schema_on_200.last_updated_timestamp = AAZStrType( + serialized_name="lastUpdatedTimestamp", + ) + _schema_on_200.priority = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.request_timestamp = AAZStrType( + serialized_name="requestTimestamp", + ) + _schema_on_200.rule_list_name = AAZStrType( + serialized_name="ruleListName", + ) + _schema_on_200.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + _schema_on_200.rule_stack_name = AAZStrType( + serialized_name="ruleStackName", + ) + _schema_on_200.timestamp = AAZStrType() + + app_seen = cls._schema_on_200.app_seen + app_seen.app_seen_list = AAZListType( + serialized_name="appSeenList", + flags={"required": True}, + ) + app_seen.count = AAZIntType( + flags={"required": True}, + ) + + app_seen_list = cls._schema_on_200.app_seen.app_seen_list + app_seen_list.Element = AAZObjectType() + + _element = cls._schema_on_200.app_seen.app_seen_list.Element + _element.category = AAZStrType( + flags={"required": True}, + ) + _element.risk = AAZStrType( + flags={"required": True}, + ) + _element.standard_ports = AAZStrType( + serialized_name="standardPorts", + flags={"required": True}, + ) + _element.sub_category = AAZStrType( + serialized_name="subCategory", + flags={"required": True}, + ) + _element.tag = AAZStrType( + flags={"required": True}, + ) + _element.technology = AAZStrType( + flags={"required": True}, + ) + _element.title = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _GetCounterHelper: + """Helper class for GetCounter""" + + +__all__ = ["GetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_list.py new file mode 100644 index 00000000000..2ebb8695aed --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_list.py @@ -0,0 +1,321 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack post-rule list", +) +class List(AAZCommand): + """List PostRulesResource resources by Tenant + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PostRulesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class PostRulesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.value.Element.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.value.Element.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.value.Element.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.value.Element.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.value.Element.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.value.Element.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.value.Element.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.value.Element.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.value.Element.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.value.Element.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.value.Element.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.value.Element.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.value.Element.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.value.Element.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.value.Element.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.value.Element.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.value.Element.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_refresh_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_refresh_counter.py new file mode 100644 index 00000000000..ec7bbae20b3 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_refresh_counter.py @@ -0,0 +1,133 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack post-rule refresh-counter", +) +class RefreshCounter(AAZCommand): + """Refresh counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}/refreshcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Post Rule priority", + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PostRulesRefreshCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PostRulesRefreshCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/refreshCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + +class _RefreshCounterHelper: + """Helper class for RefreshCounter""" + + +__all__ = ["RefreshCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_reset_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_reset_counter.py new file mode 100644 index 00000000000..d505c88dc0c --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_reset_counter.py @@ -0,0 +1,179 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack post-rule reset-counter", +) +class ResetCounter(AAZCommand): + """Reset counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}/resetcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Post Rule priority", + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PostRulesResetCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PostRulesResetCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/resetCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.firewall_name = AAZStrType( + serialized_name="firewallName", + ) + _schema_on_200.priority = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.rule_list_name = AAZStrType( + serialized_name="ruleListName", + ) + _schema_on_200.rule_name = AAZStrType( + serialized_name="ruleName", + ) + _schema_on_200.rule_stack_name = AAZStrType( + serialized_name="ruleStackName", + ) + + return cls._schema_on_200 + + +class _ResetCounterHelper: + """Helper class for ResetCounter""" + + +__all__ = ["ResetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_show.py new file mode 100644 index 00000000000..2bae3320b19 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_show.py @@ -0,0 +1,319 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack post-rule show", +) +class Show(AAZCommand): + """Get a PostRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Post Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PostRulesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PostRulesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_wait.py new file mode 100644 index 00000000000..49de866bd17 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_wait.py @@ -0,0 +1,318 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack post-rule wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Post Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PostRulesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class PostRulesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__cmd_group.py new file mode 100644 index 00000000000..77c35a46d8b --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw global-rulestack pre-rule", +) +class __CMDGroup(AAZCommandGroup): + """Manage global-rulestack pre-rule resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__init__.py new file mode 100644 index 00000000000..060f7aff0e8 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__init__.py @@ -0,0 +1,19 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._get_counter import * +from ._list import * +from ._refresh_counter import * +from ._reset_counter import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_create.py new file mode 100644 index 00000000000..e99f05131f6 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_create.py @@ -0,0 +1,660 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack pre-rule create", +) +class Create(AAZCommand): + """Create a PreRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Pre Rule priority", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.action_type = AAZStrArg( + options=["--action-type"], + arg_group="Properties", + help="rule action", + enum={"Allow": "Allow", "DenyResetBoth": "DenyResetBoth", "DenyResetServer": "DenyResetServer", "DenySilent": "DenySilent"}, + ) + _args_schema.applications = AAZListArg( + options=["--applications"], + arg_group="Properties", + help="array of rule applications", + ) + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="rule comment", + ) + _args_schema.category = AAZObjectArg( + options=["--category"], + arg_group="Properties", + help="rule category", + ) + _args_schema.decryption_rule_type = AAZStrArg( + options=["--decryption-rule-type"], + arg_group="Properties", + help="enable or disable decryption", + enum={"None": "None", "SSLInboundInspection": "SSLInboundInspection", "SSLOutboundInspection": "SSLOutboundInspection"}, + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="rule description", + ) + _args_schema.destination = AAZObjectArg( + options=["--destination"], + arg_group="Properties", + help="destination address", + ) + _args_schema.enable_logging = AAZStrArg( + options=["--enable-logging"], + arg_group="Properties", + help="enable or disable logging", + enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="etag info", + ) + _args_schema.inbound_inspection_certificate = AAZStrArg( + options=["--inbound-inspection-certificate"], + arg_group="Properties", + help="inbound Inspection Certificate", + ) + _args_schema.negate_destination = AAZStrArg( + options=["--negate-destination"], + arg_group="Properties", + help="cidr should not be 'any'", + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.negate_source = AAZStrArg( + options=["--negate-source"], + arg_group="Properties", + help="cidr should not be 'any'", + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.protocol = AAZStrArg( + options=["--protocol"], + arg_group="Properties", + help="any, application-default, TCP:number, UDP:number", + default="application-default", + ) + _args_schema.protocol_port_list = AAZListArg( + options=["--protocol-port-list"], + arg_group="Properties", + help="prot port list", + ) + _args_schema.rule_name = AAZStrArg( + options=["--rule-name"], + arg_group="Properties", + help="rule name", + required=True, + ) + _args_schema.rule_state = AAZStrArg( + options=["--rule-state"], + arg_group="Properties", + help="state of this rule", + enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, + ) + _args_schema.source = AAZObjectArg( + options=["--source"], + arg_group="Properties", + help="source address", + ) + _args_schema.tags = AAZListArg( + options=["--tags"], + arg_group="Properties", + help="tag for rule", + ) + + applications = cls._args_schema.applications + applications.Element = AAZStrArg() + + category = cls._args_schema.category + category.feeds = AAZListArg( + options=["feeds"], + help="feed list", + required=True, + ) + category.url_custom = AAZListArg( + options=["url-custom"], + help="custom URL", + required=True, + ) + + feeds = cls._args_schema.category.feeds + feeds.Element = AAZStrArg() + + url_custom = cls._args_schema.category.url_custom + url_custom.Element = AAZStrArg() + + destination = cls._args_schema.destination + destination.cidrs = AAZListArg( + options=["cidrs"], + help="special value 'any'", + ) + destination.countries = AAZListArg( + options=["countries"], + help="list of countries", + ) + destination.feeds = AAZListArg( + options=["feeds"], + help="list of feeds", + ) + destination.fqdn_lists = AAZListArg( + options=["fqdn-lists"], + help="fqdn list", + ) + destination.prefix_lists = AAZListArg( + options=["prefix-lists"], + help="prefix list", + ) + + cidrs = cls._args_schema.destination.cidrs + cidrs.Element = AAZStrArg() + + countries = cls._args_schema.destination.countries + countries.Element = AAZStrArg() + + feeds = cls._args_schema.destination.feeds + feeds.Element = AAZStrArg() + + fqdn_lists = cls._args_schema.destination.fqdn_lists + fqdn_lists.Element = AAZStrArg() + + prefix_lists = cls._args_schema.destination.prefix_lists + prefix_lists.Element = AAZStrArg() + + protocol_port_list = cls._args_schema.protocol_port_list + protocol_port_list.Element = AAZStrArg() + + source = cls._args_schema.source + source.cidrs = AAZListArg( + options=["cidrs"], + help="special value 'any'", + ) + source.countries = AAZListArg( + options=["countries"], + help="list of countries", + ) + source.feeds = AAZListArg( + options=["feeds"], + help="list of feeds", + ) + source.prefix_lists = AAZListArg( + options=["prefix-lists"], + help="prefix list", + ) + + cidrs = cls._args_schema.source.cidrs + cidrs.Element = AAZStrArg() + + countries = cls._args_schema.source.countries + countries.Element = AAZStrArg() + + feeds = cls._args_schema.source.feeds + feeds.Element = AAZStrArg() + + prefix_lists = cls._args_schema.source.prefix_lists + prefix_lists.Element = AAZStrArg() + + tags = cls._args_schema.tags + tags.Element = AAZObjectArg() + + _element = cls._args_schema.tags.Element + _element.key = AAZStrArg( + options=["key"], + help="tag name", + required=True, + ) + _element.value = AAZStrArg( + options=["value"], + help="tag value", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PreRulesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PreRulesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("actionType", AAZStrType, ".action_type") + properties.set_prop("applications", AAZListType, ".applications") + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("category", AAZObjectType, ".category") + properties.set_prop("decryptionRuleType", AAZStrType, ".decryption_rule_type") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("destination", AAZObjectType, ".destination") + properties.set_prop("enableLogging", AAZStrType, ".enable_logging") + properties.set_prop("etag", AAZStrType, ".etag") + properties.set_prop("inboundInspectionCertificate", AAZStrType, ".inbound_inspection_certificate") + properties.set_prop("negateDestination", AAZStrType, ".negate_destination") + properties.set_prop("negateSource", AAZStrType, ".negate_source") + properties.set_prop("protocol", AAZStrType, ".protocol") + properties.set_prop("protocolPortList", AAZListType, ".protocol_port_list") + properties.set_prop("ruleName", AAZStrType, ".rule_name", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("ruleState", AAZStrType, ".rule_state") + properties.set_prop("source", AAZObjectType, ".source") + properties.set_prop("tags", AAZListType, ".tags") + + applications = _builder.get(".properties.applications") + if applications is not None: + applications.set_elements(AAZStrType, ".") + + category = _builder.get(".properties.category") + if category is not None: + category.set_prop("feeds", AAZListType, ".feeds", typ_kwargs={"flags": {"required": True}}) + category.set_prop("urlCustom", AAZListType, ".url_custom", typ_kwargs={"flags": {"required": True}}) + + feeds = _builder.get(".properties.category.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + url_custom = _builder.get(".properties.category.urlCustom") + if url_custom is not None: + url_custom.set_elements(AAZStrType, ".") + + destination = _builder.get(".properties.destination") + if destination is not None: + destination.set_prop("cidrs", AAZListType, ".cidrs") + destination.set_prop("countries", AAZListType, ".countries") + destination.set_prop("feeds", AAZListType, ".feeds") + destination.set_prop("fqdnLists", AAZListType, ".fqdn_lists") + destination.set_prop("prefixLists", AAZListType, ".prefix_lists") + + cidrs = _builder.get(".properties.destination.cidrs") + if cidrs is not None: + cidrs.set_elements(AAZStrType, ".") + + countries = _builder.get(".properties.destination.countries") + if countries is not None: + countries.set_elements(AAZStrType, ".") + + feeds = _builder.get(".properties.destination.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + fqdn_lists = _builder.get(".properties.destination.fqdnLists") + if fqdn_lists is not None: + fqdn_lists.set_elements(AAZStrType, ".") + + prefix_lists = _builder.get(".properties.destination.prefixLists") + if prefix_lists is not None: + prefix_lists.set_elements(AAZStrType, ".") + + protocol_port_list = _builder.get(".properties.protocolPortList") + if protocol_port_list is not None: + protocol_port_list.set_elements(AAZStrType, ".") + + source = _builder.get(".properties.source") + if source is not None: + source.set_prop("cidrs", AAZListType, ".cidrs") + source.set_prop("countries", AAZListType, ".countries") + source.set_prop("feeds", AAZListType, ".feeds") + source.set_prop("prefixLists", AAZListType, ".prefix_lists") + + cidrs = _builder.get(".properties.source.cidrs") + if cidrs is not None: + cidrs.set_elements(AAZStrType, ".") + + countries = _builder.get(".properties.source.countries") + if countries is not None: + countries.set_elements(AAZStrType, ".") + + feeds = _builder.get(".properties.source.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + prefix_lists = _builder.get(".properties.source.prefixLists") + if prefix_lists is not None: + prefix_lists.set_elements(AAZStrType, ".") + + tags = _builder.get(".properties.tags") + if tags is not None: + tags.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.tags[]") + if _elements is not None: + _elements.set_prop("key", AAZStrType, ".key", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200_201.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200_201.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200_201.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200_201.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200_201.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200_201.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200_201.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200_201.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200_201.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200_201.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200_201.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200_201.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200_201.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200_201.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200_201.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200_201.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200_201.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_delete.py new file mode 100644 index 00000000000..0c5ceeb4f7e --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_delete.py @@ -0,0 +1,157 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack pre-rule delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a PreRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Pre Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PreRulesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PreRulesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_get_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_get_counter.py new file mode 100644 index 00000000000..4d7d729f167 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_get_counter.py @@ -0,0 +1,230 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack pre-rule get-counter", +) +class GetCounter(AAZCommand): + """Get counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}/getcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Pre Rule priority", + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PreRulesGetCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PreRulesGetCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/getCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.app_seen = AAZObjectType( + serialized_name="appSeen", + ) + _schema_on_200.firewall_name = AAZStrType( + serialized_name="firewallName", + ) + _schema_on_200.hit_count = AAZIntType( + serialized_name="hitCount", + ) + _schema_on_200.last_updated_timestamp = AAZStrType( + serialized_name="lastUpdatedTimestamp", + ) + _schema_on_200.priority = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.request_timestamp = AAZStrType( + serialized_name="requestTimestamp", + ) + _schema_on_200.rule_list_name = AAZStrType( + serialized_name="ruleListName", + ) + _schema_on_200.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + _schema_on_200.rule_stack_name = AAZStrType( + serialized_name="ruleStackName", + ) + _schema_on_200.timestamp = AAZStrType() + + app_seen = cls._schema_on_200.app_seen + app_seen.app_seen_list = AAZListType( + serialized_name="appSeenList", + flags={"required": True}, + ) + app_seen.count = AAZIntType( + flags={"required": True}, + ) + + app_seen_list = cls._schema_on_200.app_seen.app_seen_list + app_seen_list.Element = AAZObjectType() + + _element = cls._schema_on_200.app_seen.app_seen_list.Element + _element.category = AAZStrType( + flags={"required": True}, + ) + _element.risk = AAZStrType( + flags={"required": True}, + ) + _element.standard_ports = AAZStrType( + serialized_name="standardPorts", + flags={"required": True}, + ) + _element.sub_category = AAZStrType( + serialized_name="subCategory", + flags={"required": True}, + ) + _element.tag = AAZStrType( + flags={"required": True}, + ) + _element.technology = AAZStrType( + flags={"required": True}, + ) + _element.title = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _GetCounterHelper: + """Helper class for GetCounter""" + + +__all__ = ["GetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_list.py new file mode 100644 index 00000000000..7fd0d7c9cd0 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_list.py @@ -0,0 +1,321 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack pre-rule list", +) +class List(AAZCommand): + """List PreRulesResource resources by Tenant + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PreRulesList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class PreRulesList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.value.Element.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.value.Element.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.value.Element.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.value.Element.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.value.Element.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.value.Element.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.value.Element.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.value.Element.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.value.Element.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.value.Element.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.value.Element.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.value.Element.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.value.Element.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.value.Element.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.value.Element.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.value.Element.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.value.Element.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_refresh_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_refresh_counter.py new file mode 100644 index 00000000000..92e86bcbf83 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_refresh_counter.py @@ -0,0 +1,133 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack pre-rule refresh-counter", +) +class RefreshCounter(AAZCommand): + """Refresh counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}/refreshcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Pre Rule priority", + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PreRulesRefreshCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PreRulesRefreshCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/refreshCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + +class _RefreshCounterHelper: + """Helper class for RefreshCounter""" + + +__all__ = ["RefreshCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_reset_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_reset_counter.py new file mode 100644 index 00000000000..7beb1a260e3 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_reset_counter.py @@ -0,0 +1,179 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack pre-rule reset-counter", +) +class ResetCounter(AAZCommand): + """Reset counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}/resetcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Pre Rule priority", + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PreRulesResetCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PreRulesResetCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/resetCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.firewall_name = AAZStrType( + serialized_name="firewallName", + ) + _schema_on_200.priority = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.rule_list_name = AAZStrType( + serialized_name="ruleListName", + ) + _schema_on_200.rule_name = AAZStrType( + serialized_name="ruleName", + ) + _schema_on_200.rule_stack_name = AAZStrType( + serialized_name="ruleStackName", + ) + + return cls._schema_on_200 + + +class _ResetCounterHelper: + """Helper class for ResetCounter""" + + +__all__ = ["ResetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_show.py new file mode 100644 index 00000000000..447e592442b --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_show.py @@ -0,0 +1,319 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack pre-rule show", +) +class Show(AAZCommand): + """Get a PreRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Pre Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PreRulesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PreRulesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_wait.py new file mode 100644 index 00000000000..412749e23b9 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_wait.py @@ -0,0 +1,318 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack pre-rule wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Pre Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PreRulesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class PreRulesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__cmd_group.py new file mode 100644 index 00000000000..b5b7a122120 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw global-rulestack prefixlist", +) +class __CMDGroup(AAZCommandGroup): + """Manage global-rulestack pre-rule resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_create.py new file mode 100644 index 00000000000..6fb23808743 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_create.py @@ -0,0 +1,281 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack prefixlist create", +) +class Create(AAZCommand): + """Create a PrefixListGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="Local Rule priority", + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="comment for this object", + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="prefix description", + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="etag info", + ) + _args_schema.prefix_list = AAZListArg( + options=["--prefix-list"], + arg_group="Properties", + help="prefix list", + required=True, + ) + + prefix_list = cls._args_schema.prefix_list + prefix_list.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PrefixListGlobalRulestackCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PrefixListGlobalRulestackCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("etag", AAZStrType, ".etag") + properties.set_prop("prefixList", AAZListType, ".prefix_list", typ_kwargs={"flags": {"required": True}}) + + prefix_list = _builder.get(".properties.prefixList") + if prefix_list is not None: + prefix_list.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.prefix_list = AAZListType( + serialized_name="prefixList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + prefix_list = cls._schema_on_200_201.properties.prefix_list + prefix_list.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_delete.py new file mode 100644 index 00000000000..90e62b9a5e8 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_delete.py @@ -0,0 +1,157 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack prefixlist delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a PrefixListGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="Local Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PrefixListGlobalRulestackDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PrefixListGlobalRulestackDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_list.py new file mode 100644 index 00000000000..4ffab5c9a87 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_list.py @@ -0,0 +1,213 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack prefixlist list", +) +class List(AAZCommand): + """List PrefixListGlobalRulestackResource resources by Tenant + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrefixListGlobalRulestackList(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class PrefixListGlobalRulestackList(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.prefix_list = AAZListType( + serialized_name="prefixList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + prefix_list = cls._schema_on_200.value.Element.properties.prefix_list + prefix_list.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_show.py new file mode 100644 index 00000000000..cdf272dceba --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_show.py @@ -0,0 +1,211 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack prefixlist show", +) +class Show(AAZCommand): + """Get a PrefixListGlobalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="Local Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrefixListGlobalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PrefixListGlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.prefix_list = AAZListType( + serialized_name="prefixList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + prefix_list = cls._schema_on_200.properties.prefix_list + prefix_list.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_wait.py new file mode 100644 index 00000000000..5fdf233e907 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_wait.py @@ -0,0 +1,210 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw global-rulestack prefixlist wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.global_rulestack_name = AAZStrArg( + options=["--global-rulestack-name"], + help="GlobalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["--name"], + help="Local Rule priority", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrefixListGlobalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class PrefixListGlobalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "globalRulestackName", self.ctx.args.global_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.prefix_list = AAZListType( + serialized_name="prefixList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + prefix_list = cls._schema_on_200.properties.prefix_list + prefix_list.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__cmd_group.py new file mode 100644 index 00000000000..67c121c7de2 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw local-rulestack", +) +class __CMDGroup(AAZCommandGroup): + """Manage local-rulestack resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__init__.py new file mode 100644 index 00000000000..50b3ca9c4e8 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__init__.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._commit import * +from ._create import * +from ._delete import * +from ._get_change_log import * +from ._get_support_info import * +from ._list import * +from ._list_advanced_security_object import * +from ._list_app_id import * +from ._list_country import * +from ._list_firewall import * +from ._list_predefined_url_category import * +from ._list_security_service import * +from ._revert import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_commit.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_commit.py new file mode 100644 index 00000000000..3e28e8d3722 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_commit.py @@ -0,0 +1,135 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack commit", +) +class Commit(AAZCommand): + """Commit rulestack configuration + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/commit", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.LocalRulestacksCommit(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class LocalRulestacksCommit(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + None, + self.on_error, + lro_options={"final-state-via": "location"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/commit", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + +class _CommitHelper: + """Helper class for Commit""" + + +__all__ = ["Commit"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py new file mode 100644 index 00000000000..c1a72bbe8f3 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py @@ -0,0 +1,496 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack create", +) +class Create(AAZCommand): + """Create a LocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["-n", "--name", "--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.associated_subscriptions = AAZListArg( + options=["--associated-subscriptions"], + arg_group="Properties", + help="subscription scope of global rulestack", + ) + _args_schema.default_mode = AAZStrArg( + options=["--default-mode"], + arg_group="Properties", + help="Mode for default rules creation", + enum={"FIREWALL": "FIREWALL", "IPS": "IPS", "NONE": "NONE"}, + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="rulestack description", + ) + _args_schema.min_app_id_version = AAZStrArg( + options=["--min-app-id-version"], + arg_group="Properties", + help="minimum version", + ) + _args_schema.pan_etag = AAZStrArg( + options=["--pan-etag"], + arg_group="Properties", + help="PanEtag info", + ) + _args_schema.pan_location = AAZStrArg( + options=["--pan-location"], + arg_group="Properties", + help="Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks", + ) + _args_schema.scope = AAZStrArg( + options=["--scope"], + arg_group="Properties", + help="Rulestack Type", + enum={"GLOBAL": "GLOBAL", "LOCAL": "LOCAL"}, + ) + _args_schema.security_services = AAZObjectArg( + options=["--security-services"], + arg_group="Properties", + help="Security Profile", + ) + + associated_subscriptions = cls._args_schema.associated_subscriptions + associated_subscriptions.Element = AAZStrArg() + + security_services = cls._args_schema.security_services + security_services.anti_spyware_profile = AAZStrArg( + options=["anti-spyware-profile"], + help="Anti spyware Profile data", + ) + security_services.anti_virus_profile = AAZStrArg( + options=["anti-virus-profile"], + help="anti virus profile data", + ) + security_services.dns_subscription = AAZStrArg( + options=["dns-subscription"], + help="DNS Subscription profile data", + ) + security_services.file_blocking_profile = AAZStrArg( + options=["file-blocking-profile"], + help="File blocking profile data", + ) + security_services.outbound_trust_certificate = AAZStrArg( + options=["outbound-trust-certificate"], + help="Trusted Egress Decryption profile data", + ) + security_services.outbound_un_trust_certificate = AAZStrArg( + options=["outbound-un-trust-certificate"], + help="Untrusted Egress Decryption profile data", + ) + security_services.url_filtering_profile = AAZStrArg( + options=["url-filtering-profile"], + help="URL filtering profile data", + ) + security_services.vulnerability_profile = AAZStrArg( + options=["vulnerability-profile"], + help="IPs Vulnerability Profile Data", + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="Resource", + help="The managed service identities assigned to this resource.", + ) + _args_schema.location = AAZResourceLocationArg( + arg_group="Resource", + help="The geo-location where the resource lives", + required=True, + fmt=AAZResourceLocationArgFormat( + resource_group_arg="resource_group", + ), + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="The type of managed identity assigned to this resource.", + required=True, + enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + help="The identities assigned to this resource by the user.", + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg() + + _element = cls._args_schema.identity.user_assigned_identities.Element + _element.client_id = AAZStrArg( + options=["client-id"], + help="The active directory client identifier for this principal.", + ) + _element.principal_id = AAZStrArg( + options=["principal-id"], + help="The active directory identifier for this principal.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.LocalRulestacksCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".identity.userAssignedIdentities{}") + if _elements is not None: + _elements.set_prop("clientId", AAZStrType, ".client_id") + _elements.set_prop("principalId", AAZStrType, ".principal_id") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("associatedSubscriptions", AAZListType, ".associated_subscriptions") + properties.set_prop("defaultMode", AAZStrType, ".default_mode") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("minAppIdVersion", AAZStrType, ".min_app_id_version") + properties.set_prop("panEtag", AAZStrType, ".pan_etag") + properties.set_prop("panLocation", AAZStrType, ".pan_location") + properties.set_prop("scope", AAZStrType, ".scope") + properties.set_prop("securityServices", AAZObjectType, ".security_services") + + associated_subscriptions = _builder.get(".properties.associatedSubscriptions") + if associated_subscriptions is not None: + associated_subscriptions.set_elements(AAZStrType, ".") + + security_services = _builder.get(".properties.securityServices") + if security_services is not None: + security_services.set_prop("antiSpywareProfile", AAZStrType, ".anti_spyware_profile") + security_services.set_prop("antiVirusProfile", AAZStrType, ".anti_virus_profile") + security_services.set_prop("dnsSubscription", AAZStrType, ".dns_subscription") + security_services.set_prop("fileBlockingProfile", AAZStrType, ".file_blocking_profile") + security_services.set_prop("outboundTrustCertificate", AAZStrType, ".outbound_trust_certificate") + security_services.set_prop("outboundUnTrustCertificate", AAZStrType, ".outbound_un_trust_certificate") + security_services.set_prop("urlFilteringProfile", AAZStrType, ".url_filtering_profile") + security_services.set_prop("vulnerabilityProfile", AAZStrType, ".vulnerability_profile") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.identity = AAZObjectType() + _schema_on_200_201.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.tags = AAZDictType() + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200_201.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200_201.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200_201.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200_201.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200_201.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py new file mode 100644 index 00000000000..94b731888a4 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py @@ -0,0 +1,160 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a LocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["-n", "--name", "--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.LocalRulestacksDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class LocalRulestacksDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py new file mode 100644 index 00000000000..87490cc0462 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py @@ -0,0 +1,173 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack get-change-log", +) +class GetChangeLog(AAZCommand): + """Get changelog + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/getchangelog", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksGetChangeLog(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksGetChangeLog(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/getChangeLog", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.changes = AAZListType( + flags={"required": True}, + ) + _schema_on_200.last_committed = AAZStrType( + serialized_name="lastCommitted", + ) + _schema_on_200.last_modified = AAZStrType( + serialized_name="lastModified", + ) + + changes = cls._schema_on_200.changes + changes.Element = AAZStrType() + + return cls._schema_on_200 + + +class _GetChangeLogHelper: + """Helper class for GetChangeLog""" + + +__all__ = ["GetChangeLog"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py new file mode 100644 index 00000000000..e2166392650 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py @@ -0,0 +1,204 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack get-support-info", +) +class GetSupportInfo(AAZCommand): + """support info for rulestack. + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/getsupportinfo", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.email = AAZStrArg( + options=["--email"], + help="email address on behalf of which this API called", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksGetSupportInfo(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksGetSupportInfo(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/getSupportInfo", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "email", self.ctx.args.email, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.account_id = AAZStrType( + serialized_name="accountId", + ) + _schema_on_200.account_registered = AAZStrType( + serialized_name="accountRegistered", + ) + _schema_on_200.free_trial = AAZStrType( + serialized_name="freeTrial", + ) + _schema_on_200.free_trial_credit_left = AAZIntType( + serialized_name="freeTrialCreditLeft", + ) + _schema_on_200.free_trial_days_left = AAZIntType( + serialized_name="freeTrialDaysLeft", + ) + _schema_on_200.help_url = AAZStrType( + serialized_name="helpURL", + ) + _schema_on_200.product_serial = AAZStrType( + serialized_name="productSerial", + ) + _schema_on_200.product_sku = AAZStrType( + serialized_name="productSku", + ) + _schema_on_200.register_url = AAZStrType( + serialized_name="registerURL", + ) + _schema_on_200.support_url = AAZStrType( + serialized_name="supportURL", + ) + _schema_on_200.user_domain_supported = AAZStrType( + serialized_name="userDomainSupported", + ) + _schema_on_200.user_registered = AAZStrType( + serialized_name="userRegistered", + ) + + return cls._schema_on_200 + + +class _GetSupportInfoHelper: + """Helper class for GetSupportInfo""" + + +__all__ = ["GetSupportInfo"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py new file mode 100644 index 00000000000..aed9d1a4dfe --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py @@ -0,0 +1,503 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack list", +) +class List(AAZCommand): + """List LocalRulestackResource resources by subscription ID + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/paloaltonetworks.cloudngfw/localrulestacks", "2022-08-29"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.resource_group = AAZResourceGroupNameArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + if condition_0: + self.LocalRulestacksListByResourceGroup(ctx=self.ctx)() + if condition_1: + self.LocalRulestacksListBySubscription(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class LocalRulestacksListByResourceGroup(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.value.Element.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200.value.Element.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200.value.Element.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class LocalRulestacksListBySubscription(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.identity = AAZObjectType() + _element.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.value.Element.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.value.Element.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200.value.Element.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200.value.Element.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py new file mode 100644 index 00000000000..88897af06d5 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py @@ -0,0 +1,203 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack list-advanced-security-object", +) +class ListAdvancedSecurityObject(AAZCommand): + """Get the list of advanced security objects + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/listadvancedsecurityobjects", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + _args_schema.type = AAZStrArg( + options=["--type"], + required=True, + enum={"feeds": "feeds", "urlCustom": "urlCustom"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksListAdvancedSecurityObjects(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksListAdvancedSecurityObjects(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listAdvancedSecurityObjects", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "type", self.ctx.args.type, + required=True, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZObjectType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.entry = AAZListType( + flags={"required": True}, + ) + value.type = AAZStrType() + + entry = cls._schema_on_200.value.entry + entry.Element = AAZObjectType() + + _element = cls._schema_on_200.value.entry.Element + _element.description = AAZStrType() + _element.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListAdvancedSecurityObjectHelper: + """Helper class for ListAdvancedSecurityObject""" + + +__all__ = ["ListAdvancedSecurityObject"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py new file mode 100644 index 00000000000..26a22475a24 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py @@ -0,0 +1,194 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack list-app-id", +) +class ListAppId(AAZCommand): + """List of AppIds for LocalRulestack ApiVersion + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/listappids", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.app_id_version = AAZStrArg( + options=["--app-id-version"], + ) + _args_schema.app_prefix = AAZStrArg( + options=["--app-prefix"], + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksListAppIds(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksListAppIds(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listAppIds", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "appIdVersion", self.ctx.args.app_id_version, + ), + **self.serialize_query_param( + "appPrefix", self.ctx.args.app_prefix, + ), + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListAppIdHelper: + """Helper class for ListAppId""" + + +__all__ = ["ListAppId"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py new file mode 100644 index 00000000000..f4d746b7f2b --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py @@ -0,0 +1,188 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack list-country", +) +class ListCountry(AAZCommand): + """List of countries for Rulestack + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/listcountries", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksListCountries(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksListCountries(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listCountries", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.code = AAZStrType( + flags={"required": True}, + ) + _element.description = AAZStrType() + + return cls._schema_on_200 + + +class _ListCountryHelper: + """Helper class for ListCountry""" + + +__all__ = ["ListCountry"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py new file mode 100644 index 00000000000..4180f0bd2b7 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py @@ -0,0 +1,170 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack list-firewall", +) +class ListFirewall(AAZCommand): + """List of Firewalls associated with Rulestack + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/listfirewalls", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksListFirewalls(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksListFirewalls(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listFirewalls", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListFirewallHelper: + """Helper class for ListFirewall""" + + +__all__ = ["ListFirewall"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py new file mode 100644 index 00000000000..2e9792e2463 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py @@ -0,0 +1,190 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack list-predefined-url-category", +) +class ListPredefinedUrlCategory(AAZCommand): + """List predefined URL categories for rulestack + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/listpredefinedurlcategories", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksListPredefinedUrlCategories(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksListPredefinedUrlCategories(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listPredefinedUrlCategories", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.action = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListPredefinedUrlCategoryHelper: + """Helper class for ListPredefinedUrlCategory""" + + +__all__ = ["ListPredefinedUrlCategory"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py new file mode 100644 index 00000000000..ca237b4a9a8 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py @@ -0,0 +1,203 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack list-security-service", +) +class ListSecurityService(AAZCommand): + """List the security services for rulestack + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/listsecurityservices", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.skip = AAZStrArg( + options=["--skip"], + ) + _args_schema.top = AAZIntArg( + options=["--top"], + ) + _args_schema.type = AAZStrArg( + options=["--type"], + required=True, + enum={"antiSpyware": "antiSpyware", "antiVirus": "antiVirus", "dnsSubscription": "dnsSubscription", "fileBlocking": "fileBlocking", "ipsVulnerability": "ipsVulnerability", "urlFiltering": "urlFiltering"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksListSecurityServices(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksListSecurityServices(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/listSecurityServices", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "skip", self.ctx.args.skip, + ), + **self.serialize_query_param( + "top", self.ctx.args.top, + ), + **self.serialize_query_param( + "type", self.ctx.args.type, + required=True, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZObjectType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.entry = AAZListType( + flags={"required": True}, + ) + value.type = AAZStrType() + + entry = cls._schema_on_200.value.entry + entry.Element = AAZObjectType() + + _element = cls._schema_on_200.value.entry.Element + _element.description = AAZStrType() + _element.name = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListSecurityServiceHelper: + """Helper class for ListSecurityService""" + + +__all__ = ["ListSecurityService"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py new file mode 100644 index 00000000000..27fa9e7b8c5 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py @@ -0,0 +1,130 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack revert", +) +class Revert(AAZCommand): + """Revert rulestack configuration + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/revert", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksRevert(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class LocalRulestacksRevert(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/revert", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + +class _RevertHelper: + """Helper class for Revert""" + + +__all__ = ["Revert"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show.py new file mode 100644 index 00000000000..6c8720902d6 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show.py @@ -0,0 +1,286 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack show", +) +class Show(AAZCommand): + """Get a LocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["-n", "--name", "--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py new file mode 100644 index 00000000000..edb7c966ab6 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py @@ -0,0 +1,532 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack update", +) +class Update(AAZCommand): + """Update a LocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + AZ_SUPPORT_GENERIC_UPDATE = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["-n", "--name", "--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.identity = AAZObjectArg( + options=["--identity"], + arg_group="Resource", + help="The managed service identities assigned to this resource.", + nullable=True, + ) + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + nullable=True, + ) + + identity = cls._args_schema.identity + identity.type = AAZStrArg( + options=["type"], + help="The type of managed identity assigned to this resource.", + enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"}, + ) + identity.user_assigned_identities = AAZDictArg( + options=["user-assigned-identities"], + help="The identities assigned to this resource by the user.", + nullable=True, + ) + + user_assigned_identities = cls._args_schema.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.identity.user_assigned_identities.Element + _element.client_id = AAZStrArg( + options=["client-id"], + help="The active directory client identifier for this principal.", + nullable=True, + ) + _element.principal_id = AAZStrArg( + options=["principal-id"], + help="The active directory identifier for this principal.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksGet(ctx=self.ctx)() + self.pre_instance_update(self.ctx.vars.instance) + self.InstanceUpdateByJson(ctx=self.ctx)() + self.InstanceUpdateByGeneric(ctx=self.ctx)() + self.post_instance_update(self.ctx.vars.instance) + yield self.LocalRulestacksCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + @register_callback + def pre_instance_update(self, instance): + pass + + @register_callback + def post_instance_update(self, instance): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulestacksGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + _UpdateHelper._build_schema_local_rulestack_resource_read(cls._schema_on_200) + + return cls._schema_on_200 + + class LocalRulestacksCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + value=self.ctx.vars.instance, + ) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + _UpdateHelper._build_schema_local_rulestack_resource_read(cls._schema_on_200_201) + + return cls._schema_on_200_201 + + class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance(self.ctx.vars.instance) + + def _update_instance(self, instance): + _instance_value, _builder = self.new_content_builder( + self.ctx.args, + value=instance, + typ=AAZObjectType + ) + _builder.set_prop("identity", AAZObjectType, ".identity") + _builder.set_prop("tags", AAZDictType, ".tags") + + identity = _builder.get(".identity") + if identity is not None: + identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) + identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") + + user_assigned_identities = _builder.get(".identity.userAssignedIdentities") + if user_assigned_identities is not None: + user_assigned_identities.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".identity.userAssignedIdentities{}") + if _elements is not None: + _elements.set_prop("clientId", AAZStrType, ".client_id") + _elements.set_prop("principalId", AAZStrType, ".principal_id") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + return _instance_value + + class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): + + def __call__(self, *args, **kwargs): + self._update_instance_by_generic( + self.ctx.vars.instance, + self.ctx.generic_update_args + ) + + +class _UpdateHelper: + """Helper class for Update""" + + _schema_local_rulestack_resource_read = None + + @classmethod + def _build_schema_local_rulestack_resource_read(cls, _schema): + if cls._schema_local_rulestack_resource_read is not None: + _schema.id = cls._schema_local_rulestack_resource_read.id + _schema.identity = cls._schema_local_rulestack_resource_read.identity + _schema.location = cls._schema_local_rulestack_resource_read.location + _schema.name = cls._schema_local_rulestack_resource_read.name + _schema.properties = cls._schema_local_rulestack_resource_read.properties + _schema.system_data = cls._schema_local_rulestack_resource_read.system_data + _schema.tags = cls._schema_local_rulestack_resource_read.tags + _schema.type = cls._schema_local_rulestack_resource_read.type + return + + cls._schema_local_rulestack_resource_read = _schema_local_rulestack_resource_read = AAZObjectType() + + local_rulestack_resource_read = _schema_local_rulestack_resource_read + local_rulestack_resource_read.id = AAZStrType( + flags={"read_only": True}, + ) + local_rulestack_resource_read.identity = AAZObjectType() + local_rulestack_resource_read.location = AAZStrType( + flags={"required": True}, + ) + local_rulestack_resource_read.name = AAZStrType( + flags={"read_only": True}, + ) + local_rulestack_resource_read.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + local_rulestack_resource_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + local_rulestack_resource_read.tags = AAZDictType() + local_rulestack_resource_read.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = _schema_local_rulestack_resource_read.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = _schema_local_rulestack_resource_read.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = _schema_local_rulestack_resource_read.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = _schema_local_rulestack_resource_read.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = _schema_local_rulestack_resource_read.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = _schema_local_rulestack_resource_read.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = _schema_local_rulestack_resource_read.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = _schema_local_rulestack_resource_read.tags + tags.Element = AAZStrType() + + _schema.id = cls._schema_local_rulestack_resource_read.id + _schema.identity = cls._schema_local_rulestack_resource_read.identity + _schema.location = cls._schema_local_rulestack_resource_read.location + _schema.name = cls._schema_local_rulestack_resource_read.name + _schema.properties = cls._schema_local_rulestack_resource_read.properties + _schema.system_data = cls._schema_local_rulestack_resource_read.system_data + _schema.tags = cls._schema_local_rulestack_resource_read.tags + _schema.type = cls._schema_local_rulestack_resource_read.type + + +__all__ = ["Update"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_wait.py new file mode 100644 index 00000000000..8c6dc839bf2 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_wait.py @@ -0,0 +1,285 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["-n", "--name", "--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulestacksGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class LocalRulestacksGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.identity = AAZObjectType() + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.tags = AAZDictType() + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + identity = cls._schema_on_200.identity + identity.principal_id = AAZStrType( + serialized_name="principalId", + flags={"read_only": True}, + ) + identity.tenant_id = AAZStrType( + serialized_name="tenantId", + flags={"read_only": True}, + ) + identity.type = AAZStrType( + flags={"required": True}, + ) + identity.user_assigned_identities = AAZDictType( + serialized_name="userAssignedIdentities", + ) + + user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities + user_assigned_identities.Element = AAZObjectType() + + _element = cls._schema_on_200.identity.user_assigned_identities.Element + _element.client_id = AAZStrType( + serialized_name="clientId", + ) + _element.principal_id = AAZStrType( + serialized_name="principalId", + ) + + properties = cls._schema_on_200.properties + properties.associated_subscriptions = AAZListType( + serialized_name="associatedSubscriptions", + ) + properties.default_mode = AAZStrType( + serialized_name="defaultMode", + ) + properties.description = AAZStrType() + properties.min_app_id_version = AAZStrType( + serialized_name="minAppIdVersion", + ) + properties.pan_etag = AAZStrType( + serialized_name="panEtag", + ) + properties.pan_location = AAZStrType( + serialized_name="panLocation", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.scope = AAZStrType() + properties.security_services = AAZObjectType( + serialized_name="securityServices", + ) + + associated_subscriptions = cls._schema_on_200.properties.associated_subscriptions + associated_subscriptions.Element = AAZStrType() + + security_services = cls._schema_on_200.properties.security_services + security_services.anti_spyware_profile = AAZStrType( + serialized_name="antiSpywareProfile", + ) + security_services.anti_virus_profile = AAZStrType( + serialized_name="antiVirusProfile", + ) + security_services.dns_subscription = AAZStrType( + serialized_name="dnsSubscription", + ) + security_services.file_blocking_profile = AAZStrType( + serialized_name="fileBlockingProfile", + ) + security_services.outbound_trust_certificate = AAZStrType( + serialized_name="outboundTrustCertificate", + ) + security_services.outbound_un_trust_certificate = AAZStrType( + serialized_name="outboundUnTrustCertificate", + ) + security_services.url_filtering_profile = AAZStrType( + serialized_name="urlFilteringProfile", + ) + security_services.vulnerability_profile = AAZStrType( + serialized_name="vulnerabilityProfile", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/__cmd_group.py new file mode 100644 index 00000000000..2b543f433ad --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw local-rulestack certificate", +) +class __CMDGroup(AAZCommandGroup): + """Manage local-rulestack certificate resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py new file mode 100644 index 00000000000..16fe2514085 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py @@ -0,0 +1,292 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack certificate create", +) +class Create(AAZCommand): + """Create a CertificateObjectLocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/certificates/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="certificate name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="comment for this object", + ) + _args_schema.certificate_self_signed = AAZStrArg( + options=["--certificate-self-signed"], + arg_group="Properties", + help="use certificate self signed", + required=True, + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.certificate_signer_resource_id = AAZStrArg( + options=["--certificate-signer-resource-id"], + arg_group="Properties", + help="Resource Id of certificate signer, to be populated only when certificateSelfSigned is false", + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="user description for this object", + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="read only string representing last create or update", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.CertificateObjectLocalRulestackCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CertificateObjectLocalRulestackCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("certificateSelfSigned", AAZStrType, ".certificate_self_signed", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("certificateSignerResourceId", AAZStrType, ".certificate_signer_resource_id") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("etag", AAZStrType, ".etag") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.certificate_self_signed = AAZStrType( + serialized_name="certificateSelfSigned", + flags={"required": True}, + ) + properties.certificate_signer_resource_id = AAZStrType( + serialized_name="certificateSignerResourceId", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py new file mode 100644 index 00000000000..91fe4acd0b1 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py @@ -0,0 +1,170 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack certificate delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a CertificateObjectLocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/certificates/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="certificate name", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.CertificateObjectLocalRulestackDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class CertificateObjectLocalRulestackDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py new file mode 100644 index 00000000000..fafe7588f03 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py @@ -0,0 +1,224 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack certificate list", +) +class List(AAZCommand): + """List CertificateObjectLocalRulestackResource resources by LocalRulestacks + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/certificates", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CertificateObjectLocalRulestackListByLocalRulestacks(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class CertificateObjectLocalRulestackListByLocalRulestacks(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.certificate_self_signed = AAZStrType( + serialized_name="certificateSelfSigned", + flags={"required": True}, + ) + properties.certificate_signer_resource_id = AAZStrType( + serialized_name="certificateSignerResourceId", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_show.py new file mode 100644 index 00000000000..81540b0cf78 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_show.py @@ -0,0 +1,224 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack certificate show", +) +class Show(AAZCommand): + """Get a CertificateObjectLocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/certificates/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="certificate name", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CertificateObjectLocalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class CertificateObjectLocalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.certificate_self_signed = AAZStrType( + serialized_name="certificateSelfSigned", + flags={"required": True}, + ) + properties.certificate_signer_resource_id = AAZStrType( + serialized_name="certificateSignerResourceId", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_wait.py new file mode 100644 index 00000000000..33c1c8bfded --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_wait.py @@ -0,0 +1,223 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack certificate wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/certificates/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="certificate name", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CertificateObjectLocalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class CertificateObjectLocalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/certificates/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.certificate_self_signed = AAZStrType( + serialized_name="certificateSelfSigned", + flags={"required": True}, + ) + properties.certificate_signer_resource_id = AAZStrType( + serialized_name="certificateSignerResourceId", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/__cmd_group.py new file mode 100644 index 00000000000..94fb10184c8 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw local-rulestack fqdnlist", +) +class __CMDGroup(AAZCommandGroup): + """Manage local-rulestack fqdnlist resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py new file mode 100644 index 00000000000..b9d96acfed9 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py @@ -0,0 +1,292 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack fqdnlist create", +) +class Create(AAZCommand): + """Create a FqdnListLocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/fqdnlists/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="fqdn list name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="comment for this object", + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="fqdn object description", + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="etag info", + ) + _args_schema.fqdn_list = AAZListArg( + options=["--fqdn-list"], + arg_group="Properties", + help="fqdn list", + required=True, + ) + + fqdn_list = cls._args_schema.fqdn_list + fqdn_list.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FqdnListLocalRulestackCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FqdnListLocalRulestackCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("etag", AAZStrType, ".etag") + properties.set_prop("fqdnList", AAZListType, ".fqdn_list", typ_kwargs={"flags": {"required": True}}) + + fqdn_list = _builder.get(".properties.fqdnList") + if fqdn_list is not None: + fqdn_list.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.fqdn_list = AAZListType( + serialized_name="fqdnList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + fqdn_list = cls._schema_on_200_201.properties.fqdn_list + fqdn_list.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py new file mode 100644 index 00000000000..28f80df436e --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py @@ -0,0 +1,170 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack fqdnlist delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a FqdnListLocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/fqdnlists/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="fqdn list name", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.FqdnListLocalRulestackDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class FqdnListLocalRulestackDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py new file mode 100644 index 00000000000..88eec87140f --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py @@ -0,0 +1,224 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack fqdnlist list", +) +class List(AAZCommand): + """List FqdnListLocalRulestackResource resources by LocalRulestacks + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/fqdnlists", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FqdnListLocalRulestackListByLocalRulestacks(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class FqdnListLocalRulestackListByLocalRulestacks(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.fqdn_list = AAZListType( + serialized_name="fqdnList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + fqdn_list = cls._schema_on_200.value.Element.properties.fqdn_list + fqdn_list.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_show.py new file mode 100644 index 00000000000..a754364f6f2 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_show.py @@ -0,0 +1,224 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack fqdnlist show", +) +class Show(AAZCommand): + """Get a FqdnListLocalRulestackResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/fqdnlists/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="fqdn list name", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FqdnListLocalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class FqdnListLocalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.fqdn_list = AAZListType( + serialized_name="fqdnList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + fqdn_list = cls._schema_on_200.properties.fqdn_list + fqdn_list.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_wait.py new file mode 100644 index 00000000000..1674c44ade7 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_wait.py @@ -0,0 +1,223 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack fqdnlist wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/fqdnlists/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="fqdn list name", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FqdnListLocalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class FqdnListLocalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/fqdnlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.fqdn_list = AAZListType( + serialized_name="fqdnList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + fqdn_list = cls._schema_on_200.properties.fqdn_list + fqdn_list.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__cmd_group.py new file mode 100644 index 00000000000..ba991881162 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw local-rulestack local-rule", +) +class __CMDGroup(AAZCommandGroup): + """Manage local-rulestack local-rule resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__init__.py new file mode 100644 index 00000000000..060f7aff0e8 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__init__.py @@ -0,0 +1,19 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._get_counter import * +from ._list import * +from ._refresh_counter import * +from ._reset_counter import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py new file mode 100644 index 00000000000..c2ed6ce8dc7 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py @@ -0,0 +1,671 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack local-rule create", +) +class Create(AAZCommand): + """Create a LocalRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/localrules/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.priority = AAZStrArg( + options=["-n", "--name", "--priority"], + help="Local Rule priority", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.action_type = AAZStrArg( + options=["--action-type"], + arg_group="Properties", + help="rule action", + enum={"Allow": "Allow", "DenyResetBoth": "DenyResetBoth", "DenyResetServer": "DenyResetServer", "DenySilent": "DenySilent"}, + ) + _args_schema.applications = AAZListArg( + options=["--applications"], + arg_group="Properties", + help="array of rule applications", + ) + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="rule comment", + ) + _args_schema.category = AAZObjectArg( + options=["--category"], + arg_group="Properties", + help="rule category", + ) + _args_schema.decryption_rule_type = AAZStrArg( + options=["--decryption-rule-type"], + arg_group="Properties", + help="enable or disable decryption", + enum={"None": "None", "SSLInboundInspection": "SSLInboundInspection", "SSLOutboundInspection": "SSLOutboundInspection"}, + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="rule description", + ) + _args_schema.destination = AAZObjectArg( + options=["--destination"], + arg_group="Properties", + help="destination address", + ) + _args_schema.enable_logging = AAZStrArg( + options=["--enable-logging"], + arg_group="Properties", + help="enable or disable logging", + enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="etag info", + ) + _args_schema.inbound_inspection_certificate = AAZStrArg( + options=["--inbound-inspection-certificate"], + arg_group="Properties", + help="inbound Inspection Certificate", + ) + _args_schema.negate_destination = AAZStrArg( + options=["--negate-destination"], + arg_group="Properties", + help="cidr should not be 'any'", + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.negate_source = AAZStrArg( + options=["--negate-source"], + arg_group="Properties", + help="cidr should not be 'any'", + enum={"FALSE": "FALSE", "TRUE": "TRUE"}, + ) + _args_schema.protocol = AAZStrArg( + options=["--protocol"], + arg_group="Properties", + help="any, application-default, TCP:number, UDP:number", + default="application-default", + ) + _args_schema.protocol_port_list = AAZListArg( + options=["--protocol-port-list"], + arg_group="Properties", + help="prot port list", + ) + _args_schema.rule_name = AAZStrArg( + options=["--rule-name"], + arg_group="Properties", + help="rule name", + required=True, + ) + _args_schema.rule_state = AAZStrArg( + options=["--rule-state"], + arg_group="Properties", + help="state of this rule", + enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, + ) + _args_schema.source = AAZObjectArg( + options=["--source"], + arg_group="Properties", + help="source address", + ) + _args_schema.tags = AAZListArg( + options=["--tags"], + arg_group="Properties", + help="tag for rule", + ) + + applications = cls._args_schema.applications + applications.Element = AAZStrArg() + + category = cls._args_schema.category + category.feeds = AAZListArg( + options=["feeds"], + help="feed list", + required=True, + ) + category.url_custom = AAZListArg( + options=["url-custom"], + help="custom URL", + required=True, + ) + + feeds = cls._args_schema.category.feeds + feeds.Element = AAZStrArg() + + url_custom = cls._args_schema.category.url_custom + url_custom.Element = AAZStrArg() + + destination = cls._args_schema.destination + destination.cidrs = AAZListArg( + options=["cidrs"], + help="special value 'any'", + ) + destination.countries = AAZListArg( + options=["countries"], + help="list of countries", + ) + destination.feeds = AAZListArg( + options=["feeds"], + help="list of feeds", + ) + destination.fqdn_lists = AAZListArg( + options=["fqdn-lists"], + help="fqdn list", + ) + destination.prefix_lists = AAZListArg( + options=["prefix-lists"], + help="prefix list", + ) + + cidrs = cls._args_schema.destination.cidrs + cidrs.Element = AAZStrArg() + + countries = cls._args_schema.destination.countries + countries.Element = AAZStrArg() + + feeds = cls._args_schema.destination.feeds + feeds.Element = AAZStrArg() + + fqdn_lists = cls._args_schema.destination.fqdn_lists + fqdn_lists.Element = AAZStrArg() + + prefix_lists = cls._args_schema.destination.prefix_lists + prefix_lists.Element = AAZStrArg() + + protocol_port_list = cls._args_schema.protocol_port_list + protocol_port_list.Element = AAZStrArg() + + source = cls._args_schema.source + source.cidrs = AAZListArg( + options=["cidrs"], + help="special value 'any'", + ) + source.countries = AAZListArg( + options=["countries"], + help="list of countries", + ) + source.feeds = AAZListArg( + options=["feeds"], + help="list of feeds", + ) + source.prefix_lists = AAZListArg( + options=["prefix-lists"], + help="prefix list", + ) + + cidrs = cls._args_schema.source.cidrs + cidrs.Element = AAZStrArg() + + countries = cls._args_schema.source.countries + countries.Element = AAZStrArg() + + feeds = cls._args_schema.source.feeds + feeds.Element = AAZStrArg() + + prefix_lists = cls._args_schema.source.prefix_lists + prefix_lists.Element = AAZStrArg() + + tags = cls._args_schema.tags + tags.Element = AAZObjectArg() + + _element = cls._args_schema.tags.Element + _element.key = AAZStrArg( + options=["key"], + help="tag name", + required=True, + ) + _element.value = AAZStrArg( + options=["value"], + help="tag value", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.LocalRulesCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulesCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("actionType", AAZStrType, ".action_type") + properties.set_prop("applications", AAZListType, ".applications") + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("category", AAZObjectType, ".category") + properties.set_prop("decryptionRuleType", AAZStrType, ".decryption_rule_type") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("destination", AAZObjectType, ".destination") + properties.set_prop("enableLogging", AAZStrType, ".enable_logging") + properties.set_prop("etag", AAZStrType, ".etag") + properties.set_prop("inboundInspectionCertificate", AAZStrType, ".inbound_inspection_certificate") + properties.set_prop("negateDestination", AAZStrType, ".negate_destination") + properties.set_prop("negateSource", AAZStrType, ".negate_source") + properties.set_prop("protocol", AAZStrType, ".protocol") + properties.set_prop("protocolPortList", AAZListType, ".protocol_port_list") + properties.set_prop("ruleName", AAZStrType, ".rule_name", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("ruleState", AAZStrType, ".rule_state") + properties.set_prop("source", AAZObjectType, ".source") + properties.set_prop("tags", AAZListType, ".tags") + + applications = _builder.get(".properties.applications") + if applications is not None: + applications.set_elements(AAZStrType, ".") + + category = _builder.get(".properties.category") + if category is not None: + category.set_prop("feeds", AAZListType, ".feeds", typ_kwargs={"flags": {"required": True}}) + category.set_prop("urlCustom", AAZListType, ".url_custom", typ_kwargs={"flags": {"required": True}}) + + feeds = _builder.get(".properties.category.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + url_custom = _builder.get(".properties.category.urlCustom") + if url_custom is not None: + url_custom.set_elements(AAZStrType, ".") + + destination = _builder.get(".properties.destination") + if destination is not None: + destination.set_prop("cidrs", AAZListType, ".cidrs") + destination.set_prop("countries", AAZListType, ".countries") + destination.set_prop("feeds", AAZListType, ".feeds") + destination.set_prop("fqdnLists", AAZListType, ".fqdn_lists") + destination.set_prop("prefixLists", AAZListType, ".prefix_lists") + + cidrs = _builder.get(".properties.destination.cidrs") + if cidrs is not None: + cidrs.set_elements(AAZStrType, ".") + + countries = _builder.get(".properties.destination.countries") + if countries is not None: + countries.set_elements(AAZStrType, ".") + + feeds = _builder.get(".properties.destination.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + fqdn_lists = _builder.get(".properties.destination.fqdnLists") + if fqdn_lists is not None: + fqdn_lists.set_elements(AAZStrType, ".") + + prefix_lists = _builder.get(".properties.destination.prefixLists") + if prefix_lists is not None: + prefix_lists.set_elements(AAZStrType, ".") + + protocol_port_list = _builder.get(".properties.protocolPortList") + if protocol_port_list is not None: + protocol_port_list.set_elements(AAZStrType, ".") + + source = _builder.get(".properties.source") + if source is not None: + source.set_prop("cidrs", AAZListType, ".cidrs") + source.set_prop("countries", AAZListType, ".countries") + source.set_prop("feeds", AAZListType, ".feeds") + source.set_prop("prefixLists", AAZListType, ".prefix_lists") + + cidrs = _builder.get(".properties.source.cidrs") + if cidrs is not None: + cidrs.set_elements(AAZStrType, ".") + + countries = _builder.get(".properties.source.countries") + if countries is not None: + countries.set_elements(AAZStrType, ".") + + feeds = _builder.get(".properties.source.feeds") + if feeds is not None: + feeds.set_elements(AAZStrType, ".") + + prefix_lists = _builder.get(".properties.source.prefixLists") + if prefix_lists is not None: + prefix_lists.set_elements(AAZStrType, ".") + + tags = _builder.get(".properties.tags") + if tags is not None: + tags.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.tags[]") + if _elements is not None: + _elements.set_prop("key", AAZStrType, ".key", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200_201.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200_201.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200_201.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200_201.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200_201.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200_201.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200_201.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200_201.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200_201.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200_201.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200_201.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200_201.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200_201.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200_201.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200_201.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200_201.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200_201.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py new file mode 100644 index 00000000000..11ea1a68aae --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py @@ -0,0 +1,170 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack local-rule delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a LocalRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/localrules/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.priority = AAZStrArg( + options=["-n", "--name", "--priority"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.LocalRulesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class LocalRulesDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py new file mode 100644 index 00000000000..da54ded476d --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py @@ -0,0 +1,243 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack local-rule get-counter", +) +class GetCounter(AAZCommand): + """Get counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/localrules/{}/getcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulesGetCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulesGetCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/getCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.app_seen = AAZObjectType( + serialized_name="appSeen", + ) + _schema_on_200.firewall_name = AAZStrType( + serialized_name="firewallName", + ) + _schema_on_200.hit_count = AAZIntType( + serialized_name="hitCount", + ) + _schema_on_200.last_updated_timestamp = AAZStrType( + serialized_name="lastUpdatedTimestamp", + ) + _schema_on_200.priority = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.request_timestamp = AAZStrType( + serialized_name="requestTimestamp", + ) + _schema_on_200.rule_list_name = AAZStrType( + serialized_name="ruleListName", + ) + _schema_on_200.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + _schema_on_200.rule_stack_name = AAZStrType( + serialized_name="ruleStackName", + ) + _schema_on_200.timestamp = AAZStrType() + + app_seen = cls._schema_on_200.app_seen + app_seen.app_seen_list = AAZListType( + serialized_name="appSeenList", + flags={"required": True}, + ) + app_seen.count = AAZIntType( + flags={"required": True}, + ) + + app_seen_list = cls._schema_on_200.app_seen.app_seen_list + app_seen_list.Element = AAZObjectType() + + _element = cls._schema_on_200.app_seen.app_seen_list.Element + _element.category = AAZStrType( + flags={"required": True}, + ) + _element.risk = AAZStrType( + flags={"required": True}, + ) + _element.standard_ports = AAZStrType( + serialized_name="standardPorts", + flags={"required": True}, + ) + _element.sub_category = AAZStrType( + serialized_name="subCategory", + flags={"required": True}, + ) + _element.tag = AAZStrType( + flags={"required": True}, + ) + _element.technology = AAZStrType( + flags={"required": True}, + ) + _element.title = AAZStrType( + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _GetCounterHelper: + """Helper class for GetCounter""" + + +__all__ = ["GetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py new file mode 100644 index 00000000000..47e77f46131 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py @@ -0,0 +1,332 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack local-rule list", +) +class List(AAZCommand): + """List LocalRulesResource resources by LocalRulestacks + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/localrules", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulesListByLocalRulestacks(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class LocalRulesListByLocalRulestacks(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.value.Element.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.value.Element.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.value.Element.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.value.Element.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.value.Element.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.value.Element.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.value.Element.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.value.Element.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.value.Element.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.value.Element.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.value.Element.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.value.Element.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.value.Element.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.value.Element.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.value.Element.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.value.Element.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.value.Element.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py new file mode 100644 index 00000000000..2f7228f0bb6 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py @@ -0,0 +1,146 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack local-rule refresh-counter", +) +class RefreshCounter(AAZCommand): + """Refresh counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/localrules/{}/refreshcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return None + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulesRefreshCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class LocalRulesRefreshCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [204]: + return self.on_204(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/refreshCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + +class _RefreshCounterHelper: + """Helper class for RefreshCounter""" + + +__all__ = ["RefreshCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py new file mode 100644 index 00000000000..c2783969f85 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py @@ -0,0 +1,192 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack local-rule reset-counter", +) +class ResetCounter(AAZCommand): + """Reset counters + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/localrules/{}/resetcounters", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.priority = AAZStrArg( + options=["--priority"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.firewall_name = AAZStrArg( + options=["--firewall-name"], + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulesResetCounters(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulesResetCounters(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}/resetCounters", + **self.url_parameters + ) + + @property + def method(self): + return "POST" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "firewallName", self.ctx.args.firewall_name, + ), + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.firewall_name = AAZStrType( + serialized_name="firewallName", + ) + _schema_on_200.priority = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.rule_list_name = AAZStrType( + serialized_name="ruleListName", + ) + _schema_on_200.rule_name = AAZStrType( + serialized_name="ruleName", + ) + _schema_on_200.rule_stack_name = AAZStrType( + serialized_name="ruleStackName", + ) + + return cls._schema_on_200 + + +class _ResetCounterHelper: + """Helper class for ResetCounter""" + + +__all__ = ["ResetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py new file mode 100644 index 00000000000..b3bbc293237 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py @@ -0,0 +1,332 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack local-rule show", +) +class Show(AAZCommand): + """Get a LocalRulesResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/localrules/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.priority = AAZStrArg( + options=["-n", "--name", "--priority"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class LocalRulesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_wait.py new file mode 100644 index 00000000000..7970d755f8e --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_wait.py @@ -0,0 +1,331 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack local-rule wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/localrules/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.priority = AAZStrArg( + options=["-n", "--name", "--priority"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.LocalRulesGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class LocalRulesGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/localRules/{priority}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "priority", self.ctx.args.priority, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.action_type = AAZStrType( + serialized_name="actionType", + ) + properties.applications = AAZListType() + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.category = AAZObjectType() + properties.decryption_rule_type = AAZStrType( + serialized_name="decryptionRuleType", + ) + properties.description = AAZStrType() + properties.destination = AAZObjectType() + properties.enable_logging = AAZStrType( + serialized_name="enableLogging", + ) + properties.etag = AAZStrType() + properties.inbound_inspection_certificate = AAZStrType( + serialized_name="inboundInspectionCertificate", + ) + properties.negate_destination = AAZStrType( + serialized_name="negateDestination", + ) + properties.negate_source = AAZStrType( + serialized_name="negateSource", + ) + properties.priority = AAZIntType( + flags={"read_only": True}, + ) + properties.protocol = AAZStrType() + properties.protocol_port_list = AAZListType( + serialized_name="protocolPortList", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + properties.rule_name = AAZStrType( + serialized_name="ruleName", + flags={"required": True}, + ) + properties.rule_state = AAZStrType( + serialized_name="ruleState", + ) + properties.source = AAZObjectType() + properties.tags = AAZListType() + + applications = cls._schema_on_200.properties.applications + applications.Element = AAZStrType() + + category = cls._schema_on_200.properties.category + category.feeds = AAZListType( + flags={"required": True}, + ) + category.url_custom = AAZListType( + serialized_name="urlCustom", + flags={"required": True}, + ) + + feeds = cls._schema_on_200.properties.category.feeds + feeds.Element = AAZStrType() + + url_custom = cls._schema_on_200.properties.category.url_custom + url_custom.Element = AAZStrType() + + destination = cls._schema_on_200.properties.destination + destination.cidrs = AAZListType() + destination.countries = AAZListType() + destination.feeds = AAZListType() + destination.fqdn_lists = AAZListType( + serialized_name="fqdnLists", + ) + destination.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.destination.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.destination.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.destination.feeds + feeds.Element = AAZStrType() + + fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists + fqdn_lists.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.destination.prefix_lists + prefix_lists.Element = AAZStrType() + + protocol_port_list = cls._schema_on_200.properties.protocol_port_list + protocol_port_list.Element = AAZStrType() + + source = cls._schema_on_200.properties.source + source.cidrs = AAZListType() + source.countries = AAZListType() + source.feeds = AAZListType() + source.prefix_lists = AAZListType( + serialized_name="prefixLists", + ) + + cidrs = cls._schema_on_200.properties.source.cidrs + cidrs.Element = AAZStrType() + + countries = cls._schema_on_200.properties.source.countries + countries.Element = AAZStrType() + + feeds = cls._schema_on_200.properties.source.feeds + feeds.Element = AAZStrType() + + prefix_lists = cls._schema_on_200.properties.source.prefix_lists + prefix_lists.Element = AAZStrType() + + tags = cls._schema_on_200.properties.tags + tags.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.tags.Element + _element.key = AAZStrType( + flags={"required": True}, + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/__cmd_group.py new file mode 100644 index 00000000000..f2ae14edd8a --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "palo-alto cloudngfw local-rulestack prefixlist", +) +class __CMDGroup(AAZCommandGroup): + """Manage local-rulestack prefixlist resource + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/__init__.py new file mode 100644 index 00000000000..2d1a2078686 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/__init__.py @@ -0,0 +1,16 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._create import * +from ._delete import * +from ._list import * +from ._show import * +from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py new file mode 100644 index 00000000000..5f80ff28f1f --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py @@ -0,0 +1,292 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack prefixlist create", +) +class Create(AAZCommand): + """Create a PrefixListResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/prefixlists/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Local Rule priority", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.audit_comment = AAZStrArg( + options=["--audit-comment"], + arg_group="Properties", + help="comment for this object", + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="prefix description", + ) + _args_schema.etag = AAZStrArg( + options=["--etag"], + arg_group="Properties", + help="etag info", + ) + _args_schema.prefix_list = AAZListArg( + options=["--prefix-list"], + arg_group="Properties", + help="prefix list", + required=True, + ) + + prefix_list = cls._args_schema.prefix_list + prefix_list.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PrefixListLocalRulestackCreateOrUpdate(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PrefixListLocalRulestackCreateOrUpdate(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200, 201]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200_201, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "PUT" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Content-Type", "application/json", + ), + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + @property + def content(self): + _content_value, _builder = self.new_content_builder( + self.ctx.args, + typ=AAZObjectType, + typ_kwargs={"flags": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("auditComment", AAZStrType, ".audit_comment") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("etag", AAZStrType, ".etag") + properties.set_prop("prefixList", AAZListType, ".prefix_list", typ_kwargs={"flags": {"required": True}}) + + prefix_list = _builder.get(".properties.prefixList") + if prefix_list is not None: + prefix_list.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + def on_200_201(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200_201 + ) + + _schema_on_200_201 = None + + @classmethod + def _build_schema_on_200_201(cls): + if cls._schema_on_200_201 is not None: + return cls._schema_on_200_201 + + cls._schema_on_200_201 = AAZObjectType() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.prefix_list = AAZListType( + serialized_name="prefixList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + prefix_list = cls._schema_on_200_201.properties.prefix_list + prefix_list.Element = AAZStrType() + + system_data = cls._schema_on_200_201.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py new file mode 100644 index 00000000000..46345675337 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py @@ -0,0 +1,170 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack prefixlist delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a PrefixListResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/prefixlists/{}", "2022-08-29"], + ] + } + + AZ_SUPPORT_NO_WAIT = True + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_lro_poller(self._execute_operations, None) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.PrefixListLocalRulestackDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class PrefixListLocalRulestackDelete(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [202]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [200]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_200, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + if session.http_response.status_code in [204]: + return self.client.build_lro_polling( + self.ctx.args.no_wait, + session, + self.on_204, + self.on_error, + lro_options={"final-state-via": "azure-async-operation"}, + path_format_arguments=self.url_parameters, + ) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "DELETE" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + def on_200(self, session): + pass + + def on_204(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_list.py new file mode 100644 index 00000000000..7c4a892e6fd --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_list.py @@ -0,0 +1,224 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack prefixlist list", +) +class List(AAZCommand): + """List PrefixListResource resources by LocalRulestacks + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/prefixlists", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + return self.build_paging(self._execute_operations, self._output) + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrefixListLocalRulestackListByLocalRulestacks(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) + next_link = self.deserialize_output(self.ctx.vars.instance.next_link) + return result, next_link + + class PrefixListLocalRulestackListByLocalRulestacks(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.next_link = AAZStrType( + serialized_name="nextLink", + ) + _schema_on_200.value = AAZListType( + flags={"required": True}, + ) + + value = cls._schema_on_200.value + value.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element + _element.id = AAZStrType( + flags={"read_only": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.prefix_list = AAZListType( + serialized_name="prefixList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + prefix_list = cls._schema_on_200.value.Element.properties.prefix_list + prefix_list.Element = AAZStrType() + + system_data = cls._schema_on_200.value.Element.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_show.py new file mode 100644 index 00000000000..7b5eacb3837 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_show.py @@ -0,0 +1,224 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack prefixlist show", +) +class Show(AAZCommand): + """Get a PrefixListResource + """ + + _aaz_info = { + "version": "2022-08-29", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/prefixlists/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrefixListLocalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) + return result + + class PrefixListLocalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.prefix_list = AAZListType( + serialized_name="prefixList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + prefix_list = cls._schema_on_200.properties.prefix_list + prefix_list.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_wait.py new file mode 100644 index 00000000000..e04fcbadbbc --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_wait.py @@ -0,0 +1,223 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command( + "palo-alto cloudngfw local-rulestack prefixlist wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/localrulestacks/{}/prefixlists/{}", "2022-08-29"], + ] + } + + def _handler(self, command_args): + super()._handler(command_args) + self._execute_operations() + return self._output() + + _args_schema = None + + @classmethod + def _build_arguments_schema(cls, *args, **kwargs): + if cls._args_schema is not None: + return cls._args_schema + cls._args_schema = super()._build_arguments_schema(*args, **kwargs) + + # define Arg Group "" + + _args_schema = cls._args_schema + _args_schema.local_rulestack_name = AAZStrArg( + options=["--local-rulestack-name"], + help="LocalRulestack resource name", + required=True, + id_part="name", + ) + _args_schema.name = AAZStrArg( + options=["-n", "--name"], + help="Local Rule priority", + required=True, + id_part="child_name_1", + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.PrefixListLocalRulestackGet(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + def _output(self, *args, **kwargs): + result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) + return result + + class PrefixListLocalRulestackGet(AAZHttpOperation): + CLIENT_TYPE = "MgmtClient" + + def __call__(self, *args, **kwargs): + request = self.make_request() + session = self.client.send_request(request=request, stream=False, **kwargs) + if session.http_response.status_code in [200]: + return self.on_200(session) + + return self.on_error(session.http_response) + + @property + def url(self): + return self.client.format_url( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/{localRulestackName}/prefixlists/{name}", + **self.url_parameters + ) + + @property + def method(self): + return "GET" + + @property + def error_format(self): + return "MgmtErrorFormat" + + @property + def url_parameters(self): + parameters = { + **self.serialize_url_param( + "localRulestackName", self.ctx.args.local_rulestack_name, + required=True, + ), + **self.serialize_url_param( + "name", self.ctx.args.name, + required=True, + ), + **self.serialize_url_param( + "resourceGroupName", self.ctx.args.resource_group, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2022-08-29", + required=True, + ), + } + return parameters + + @property + def header_parameters(self): + parameters = { + **self.serialize_header_param( + "Accept", "application/json", + ), + } + return parameters + + def on_200(self, session): + data = self.deserialize_http_content(session) + self.ctx.set_var( + "instance", + data, + schema_builder=self._build_schema_on_200 + ) + + _schema_on_200 = None + + @classmethod + def _build_schema_on_200(cls): + if cls._schema_on_200 is not None: + return cls._schema_on_200 + + cls._schema_on_200 = AAZObjectType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"required": True, "client_flatten": True}, + ) + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.properties + properties.audit_comment = AAZStrType( + serialized_name="auditComment", + ) + properties.description = AAZStrType() + properties.etag = AAZStrType() + properties.prefix_list = AAZListType( + serialized_name="prefixList", + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + prefix_list = cls._schema_on_200.properties.prefix_list + prefix_list.Element = AAZStrType() + + system_data = cls._schema_on_200.system_data + system_data.created_at = AAZStrType( + serialized_name="createdAt", + ) + system_data.created_by = AAZStrType( + serialized_name="createdBy", + ) + system_data.created_by_type = AAZStrType( + serialized_name="createdByType", + ) + system_data.last_modified_at = AAZStrType( + serialized_name="lastModifiedAt", + ) + system_data.last_modified_by = AAZStrType( + serialized_name="lastModifiedBy", + ) + system_data.last_modified_by_type = AAZStrType( + serialized_name="lastModifiedByType", + ) + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/azext_metadata.json b/src/palo-alto-networks/azext_palo_alto_networks/azext_metadata.json new file mode 100644 index 00000000000..7923ce3c67b --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/azext_metadata.json @@ -0,0 +1,4 @@ +{ + "azext.isPreview": true, + "azext.minCliCoreVersion": "2.49.0" +} \ No newline at end of file diff --git a/src/palo-alto-networks/azext_palo_alto_networks/commands.py b/src/palo-alto-networks/azext_palo_alto_networks/commands.py new file mode 100644 index 00000000000..b0d842e4993 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/commands.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +# from azure.cli.core.commands import CliCommandType + + +def load_command_table(self, _): # pylint: disable=unused-argument + pass diff --git a/src/palo-alto-networks/azext_palo_alto_networks/custom.py b/src/palo-alto-networks/azext_palo_alto_networks/custom.py new file mode 100644 index 00000000000..86df1e48ef5 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/custom.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: disable=too-many-lines +# pylint: disable=too-many-statements + +from knack.log import get_logger + + +logger = get_logger(__name__) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/tests/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/__init__.py new file mode 100644 index 00000000000..5757aea3175 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/__init__.py @@ -0,0 +1,6 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py new file mode 100644 index 00000000000..d7e8e38c9e0 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py @@ -0,0 +1,281 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from azure.cli.testsdk.scenario_tests import AllowLargeResponse +from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) + + +class PaloAltoNetworksScenario(ScenarioTest): + + @AllowLargeResponse(size_kb=10240) + @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_networks_cloudngfw_firewall') + def test_palo_alto_networks_cloudngfw_firewall(self, resource_group): + self.kwargs.update({ + 'cloudngfw_firewall_name': self.create_random_name('firewall', 10), + 'public_ip_name': 'test-public-ip', + 'local_rulestack_name': 'test-local-rulestack', + 'user_email': 'v-taoxuzeng@microsoft.com', + 'prefix': 'test-publicip-prefix', + 'loc': 'eastus' + }) + ip_prefix = self.cmd('az network public-ip prefix create -g {rg} -n {prefix} --length 28').get_output_in_json()['ipPrefix'] + self.kwargs.update({'ip_address': ip_prefix.split('/')[0]}) + public_ip = self.cmd('az network public-ip create -g {rg} -n {public_ip_name} --ip-address {ip_address} --public-ip-prefix {prefix}').get_output_in_json()['publicIp'] + vnet = self.cmd('az network vnet create -g {rg} -n testvnet --address-prefix 10.0.0.0/16').get_output_in_json()['newVNet'] + local_rulestack = self.cmd('az palo-alto cloudngfw local-rulestack create --local-rulestack-name testlrs -g {rg} -l eastus --default-mode "IPS" --scope "LOCAL" --pan-etag "9fa4e2c6-1b0c-11ee-b587-3e4c117c6534" --min-app-id-version "8595-7473" --security-services {{"vulnerability-profile":"BestPractice","anti-spyware-profile":"BestPractice","anti-virus-profile":"BestPractice","url-filtering-profile":"BestPractice","file-blocking-profile":"BestPractice","dns-subscription":"BestPractice"}}').get_output_in_json() + self.kwargs.update({'public_ip_id': public_ip['id'], 'vnet_id': vnet['id'], 'rulestack_id': local_rulestack['id']}) + self.cmd('az palo-alto cloudngfw firewall create ' + '--name {cloudngfw_firewall_name} ' + '-g {rg} ' + '--identity {{"type":None}} ' + '--location eastus ' + '--associated-rulestack {{"location":eastus,"resource-id":{rulestack_id}}} ' + '--dns-settings {{"dns-servers":[{{"address":{ip_address},"resource-id":{public_ip_id}}}],"enable-dns-proxy":DISABLED,"enabled-dns-type":CUSTOM}} ' + '--front-end-settings [{{"backend-configuration":{{"address":{{"address":{ip_address},"resource-id":{public_ip_id}}},"port":80}},"frontend-configuration":{{"address":{{"address":{ip_address},"resource-id":{public_ip_id}}},"port":80}},"name":frontendsetting1,"protocol":TCP}}] ' + '--is-panorama-managed True ' + '--marketplace-details {{"marketplace-subscription-status":NotStarted,"offer-id":pan_swfw_cloud_ngfw,"publisher-id":paloaltonetworks}} ' + '--network-profile {{"egress-nat-ip":[{{"address":{ip_address},"resource-id":{public_ip_id}}}],"enable-egress-nat":ENABLED,"network-type":VNET,"public-ips":[{{"address":{ip_address},"resource-id":{public_ip_id}}}],' + '"vnet-configuration":{{"ip-of-trust-subnet-for-udr":{{"address":10.0.0.0/16,"resource-id":{vnet_id}}},"trust-subnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"un-trust-subnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"vnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}}}},' + '"vwan-configuration":{{"ip-of-trust-subnet-for-udr":{{"address":10.0.0.0/16,"resource-id":{vnet_id}}},"trust-subnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"un-trust-subnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"vHub":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"network-virtual-appliance-id":2bf4a339-294d-4c25-b0b2-ef649e9f5c12}}}} ' + '--panorama-config {{"config-string":bas64EncodedString}} --plan-data {{"billing-cycle":MONTHLY,"plan-id":panw-cloud-ngfw-payg,"usage-type":PAYG}} --no-wait') + self.cmd('az palo-alto cloudngfw firewall wait --resource-group {rg} --name {cloudngfw_firewall_name} --created') + self.cmd('az palo-alto cloudngfw firewall list --resource-group {rg}', + checks=[ + self.check('length(@)', 1), + ]) + self.cmd('az palo-alto cloudngfw firewall show --resource-group {rg} -n {cloudngfw_firewall_name}', + checks=[ + self.check('associatedRulestack.resourceId', '{rulestack_id}'), + self.check('dnsSettings.enableDnsProxy', 'DISABLED'), + self.check('length(frontEndSettings)', 1), + self.check('identity.type', "None"), + self.check('isPanoramaManaged', "TRUE"), + self.check('location', "eastus"), + self.check('marketplaceDetails.marketplaceSubscriptionStatus', "NotStarted"), + self.check('marketplaceDetails.offerId', "pan_swfw_cloud_ngfw"), + self.check('marketplaceDetails.publisherId', "paloaltonetworks"), + self.check('name', '{cloudngfw_firewall_name}'), + self.check('length(networkProfile.egressNatIp)', 1), + self.check('networkProfile.enableEgressNat', "ENABLED"), + self.check('panoramaConfig.configString', "bas64EncodedString"), + self.check('planData.billingCycle', "MONTHLY") + ]) + # self.cmd('az palo-alto cloudngfw firewall update --name {cloudngfw_firewall_name} -g {rg} --tags {{"tagName":"value"}}') + # self.cmd('az palo-alto cloudngfw firewall show --name {cloudngfw_firewall_name} -g {rg}', self.check('tags.tagName', "value")) + + self.cmd('az palo-alto cloudngfw firewall save-log-profile --resource-group {rg} -n {cloudngfw_firewall_name} --log-option "SAME_DESTINATION" --log-type "TRAFFIC"') + self.cmd('az palo-alto cloudngfw firewall get-global-rulestack --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall get-log-profile --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall get-support-info --resource-group {rg} -n {cloudngfw_firewall_name}') + + self.cmd('az palo-alto cloudngfw firewall status list --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {rg} -n {cloudngfw_firewall_name}') + + @AllowLargeResponse(size_kb=10240) + @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_firewall_update') + def test_palo_alto_firewall_update(self, resource_group): + self.kwargs.update({ + 'cloudngfw_firewall_name': self.create_random_name('firewall', 15), + 'public_ip_name': 'test-public-ip', + 'local_rulestack_name': 'test-local-rulestack', + 'user_email': 'v-taoxuzeng@microsoft.com', + 'prefix': 'test-publicip-prefix', + 'loc': 'eastus', + 'resource_group': 'CUSEUAP', + 'firewall_name': 'OsamaV3', + }) + ip_prefix = self.cmd('az network public-ip prefix create -g {rg} -n {prefix} --length 28').get_output_in_json()['ipPrefix'] + self.kwargs.update({'ip_address': ip_prefix.split('/')[0]}) + public_ip = self.cmd('az network public-ip create -g {rg} -n {public_ip_name} --ip-address {ip_address} --public-ip-prefix {prefix}').get_output_in_json()['publicIp'] + self.kwargs.update({'public_ip_id': public_ip['id']}) + self.cmd('az palo-alto cloudngfw firewall create ' + '--name {cloudngfw_firewall_name} ' + '-g {rg} ' + '--location {loc} ' + '--dns-settings {{}} ' + '--marketplace-details {{"offer-id":pan_swfw_cloud_ngfw,"publisher-id":paloaltonetworks}} ' + '--network-profile {{"enable-egress-nat":"ENABLED","network-type":"VNET","public-ips":[{{"address":{ip_address},"resource-id":{public_ip_id}}}]}} ' + '--plan-data {{"billing-cycle":MONTHLY,"plan-id":panw-cloud-ngfw-payg,"usage-type":PAYG}} --no-wait') + self.cmd('az palo-alto cloudngfw firewall wait --resource-group {rg} --name {cloudngfw_firewall_name} --created') + self.cmd('az palo-alto cloudngfw firewall list --resource-group {rg}', + checks=[ + self.check('length(@)', 1), + ]) + + self.cmd('az palo-alto cloudngfw firewall update --name {cloudngfw_firewall_name} -g {rg} --tags {{"tagName":"value"}}') + self.cmd('az palo-alto cloudngfw firewall show --name {cloudngfw_firewall_name} -g {rg}', self.check('tags.tagName', "value")) + + self.cmd('az palo-alto cloudngfw firewall save-log-profile --resource-group {resource_group} -n {firewall_name}') + self.cmd('az palo-alto cloudngfw firewall get-global-rulestack --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall get-log-profile --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall get-support-info --resource-group {rg} -n {cloudngfw_firewall_name}') + + self.cmd('az palo-alto cloudngfw firewall status list --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {rg} -n {cloudngfw_firewall_name}') + + @AllowLargeResponse(size_kb=10240) + @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_networks_cloudngfw_global_rulestack') + def test_palo_alto_networks_cloudngfw_global_rulestack(self, resource_group): + self.kwargs.update({ + 'global_rulestack_name': 'test-cloudngfw-global-rulestack', + 'public_ip_name': 'test-public-ip', + 'local_rulestack_name': 'test-local-rulestack', + 'user_email': 'v-taoxuzeng@microsoft.com', + 'prefix': 'test-publicip-prefix', + 'loc': 'eastus' + }) + + self.cmd('az palo-alto cloudngfw global-rulestack create -g {rg} -n {global_rulestack_name} ' + '--identity {{"type":None}} ' + '--location {loc} ' + '--associated-subscriptions [""] ' + '--default-mode IPS ' + '--description "global rulestacks" ' + '--min-app-id-version "8.5.3" ' + '--pan-etag ' + '--pan-location {loc} ' + '--scope "GLOBAL" ' + '--security-services {{"anti-spyware-profile":"default","anti-virus-profile":"default","dns-subscription":"default","file-blocking-profile":"default","outbound-trust-certificate":"default","outbound-un-trust-certificate":"default","url-filtering-profile":"default","vulnerability-profile":"default"}}') + self.cmd('az palo-alto cloudngfw global-rulestack get-change-log') + self.cmd('az palo-alto cloudngfw global-rulestack list-advanced-security-object') + self.cmd('az palo-alto cloudngfw global-rulestack list-app-id') + self.cmd('az palo-alto cloudngfw global-rulestack list-country') + self.cmd('az palo-alto cloudngfw global-rulestack list-firewall') + self.cmd('az palo-alto cloudngfw global-rulestack list-predefined-url-category') + self.cmd('az palo-alto cloudngfw global-rulestack list-security-service') + self.cmd('az palo-alto cloudngfw global-rulestack revert') + + self.cmd('az palo-alto cloudngfw global-rulestack certificate create -g {rg} -n {global_rulestack_name} ' + '--audit-comment comment ' + '--certificate-self-signed "TRUE" ' + '--description "description" ' + '--etag "2bf4a339-294d-4c25-b0b2-ef649e9f5c27"') + self.cmd('az palo-alto cloudngfw global-rulestack certificate list') + self.cmd('az palo-alto cloudngfw global-rulestack certificate show') + self.cmd('az palo-alto cloudngfw global-rulestack certificate delete') + + self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist create -g {rg} -n {global_rulestack_name} ' + '--audit-comment "string" ' + '--description "description" ' + '--etag "2bf4a339-294d-4c25-b0b2-ef649e9f5c27" ' + '--fqdn-list ["string1","string2"]') + self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist list') + self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist show') + self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist delete') + + self.cmd('az palo-alto cloudngfw global-rulestack post-rule create ' + '--priority "1" ' + '--action-type Allow ' + '--applications ["app1"] ' + '--audit-comment "example comment" ' + '--category {{"feeds":["feed"],"url-custom":["https://microsoft.com"]}} ' + '--decryption-rule-type SSLOutboundInspection ' + '--description "" ' + '--destination {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"prefix-lists": ["PL1"]}} ' + '--tags [{{"key":"keyName","value":"value"}}]') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule list') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule show') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule get-counter') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule refresh-counter') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule reset-counter') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule delete') + + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule create ' + '--action-type "Allow" ' + '--applications ["app1"] ' + '--audit-comment "example comment" ' + '--category {{"feeds":["feed"],"url-custom":["https://microsoft.com"]}} ' + '--decryption-rule-type SSLOutboundInspection ' + '--description "" ' + '--destination {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"fqdn-lists":"FQDN1","prefix-lists": ["PL1"]}} ' + '--enable-logging "DISABLED" ' + '--etag "" ' + '--inbound-inspection-certificate "cert1" ' + '--negate-destination "TRUE" ' + '--negate-source "TRUE" ' + '--rule-state "DISABLED" ' + '--source {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"prefix-lists": ["PL1"]}} ' + '') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule list') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule show') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule get-counter') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule refresh-counter') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule reset-counter') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule delete') + + self.cmd('az palo-alto cloudngfw global-rulestack prefixlist create ' + '--audit-comment "comment" ' + '--description "string" ' + '--etag "" ' + '--prefix-list ["1.0.0.0/24"]') + self.cmd('az palo-alto cloudngfw global-rulestack prefixlist list') + self.cmd('az palo-alto cloudngfw global-rulestack prefixlist show') + self.cmd('az palo-alto cloudngfw global-rulestack prefixlist delete') + + @AllowLargeResponse(size_kb=10240) + @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_networks_cloudngfw_local_rulestack') + def test_palo_alto_networks_cloudngfw_local_rulestack(self, resource_group): + self.kwargs.update({ + 'global_rulestack_name': 'test-cloudngfw-global-rulestack', + 'public_ip_name': 'test-public-ip', + 'local_rulestack_name': 'test-local-rulestack', + 'user_email': 'v-taoxuzeng@microsoft.com', + 'prefix': 'test-publicip-prefix', + 'loc': 'eastus' + }) + + self.cmd('az palo-alto cloudngfw global-rulestack create -g {rg} -n {global_rulestack_name} ' + '--identity {{"type":None}} ' + '--location {loc} ' + '--associated-subscriptions [""] ' + '--default-mode IPS ' + '--description "global rulestacks" ' + '--min-app-id-version "8.5.3" ' + '--pan-etag ' + '--pan-location {loc} ' + '--scope "GLOBAL" ' + '--security-services {{"anti-spyware-profile":"default","anti-virus-profile":"default","dns-subscription":"default","file-blocking-profile":"default","outbound-trust-certificate":"default","outbound-un-trust-certificate":"default","url-filtering-profile":"default","vulnerability-profile":"default"}}') + self.cmd('az palo-alto cloudngfw global-rulestack get-change-log') + self.cmd('az palo-alto cloudngfw global-rulestack list-advanced-security-object') + self.cmd('az palo-alto cloudngfw global-rulestack list-app-id') + self.cmd('az palo-alto cloudngfw global-rulestack list-country') + self.cmd('az palo-alto cloudngfw global-rulestack list-firewall') + self.cmd('az palo-alto cloudngfw global-rulestack list-predefined-url-category') + self.cmd('az palo-alto cloudngfw global-rulestack list-security-service') + self.cmd('az palo-alto cloudngfw global-rulestack revert') + + self.cmd('az palo-alto cloudngfw global-rulestack certificate create') + self.cmd('az palo-alto cloudngfw global-rulestack certificate list') + self.cmd('az palo-alto cloudngfw global-rulestack certificate show') + self.cmd('az palo-alto cloudngfw global-rulestack certificate delete') + + self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist create') + self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist list') + self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist show') + self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist delete') + + self.cmd('az palo-alto cloudngfw global-rulestack post-rule create') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule list') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule show') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule get-counter') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule refresh-counter') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule reset-counter') + self.cmd('az palo-alto cloudngfw global-rulestack post-rule delete') + + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule create') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule list') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule show') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule get-counter') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule refresh-counter') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule reset-counter') + self.cmd('az palo-alto cloudngfw global-rulestack pre-rule delete') + + self.cmd('az palo-alto cloudngfw global-rulestack prefixlist create') + self.cmd('az palo-alto cloudngfw global-rulestack prefixlist list') + self.cmd('az palo-alto cloudngfw global-rulestack prefixlist show') + self.cmd('az palo-alto cloudngfw global-rulestack prefixlist delete') + diff --git a/src/palo-alto-networks/setup.cfg b/src/palo-alto-networks/setup.cfg new file mode 100644 index 00000000000..2fdd96e5d39 --- /dev/null +++ b/src/palo-alto-networks/setup.cfg @@ -0,0 +1 @@ +#setup.cfg \ No newline at end of file diff --git a/src/palo-alto-networks/setup.py b/src/palo-alto-networks/setup.py new file mode 100644 index 00000000000..de703d55eb2 --- /dev/null +++ b/src/palo-alto-networks/setup.py @@ -0,0 +1,49 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +from codecs import open +from setuptools import setup, find_packages + + +# HISTORY.rst entry. +VERSION = '0.1.0' + +# The full list of classifiers is available at +# https://pypi.python.org/pypi?%3Aaction=list_classifiers +CLASSIFIERS = [ + 'Development Status :: 4 - Beta', + 'Intended Audience :: Developers', + 'Intended Audience :: System Administrators', + 'Programming Language :: Python', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', +] + +DEPENDENCIES = [] + +with open('README.md', 'r', encoding='utf-8') as f: + README = f.read() +with open('HISTORY.rst', 'r', encoding='utf-8') as f: + HISTORY = f.read() + +setup( + name='palo-alto-networks', + version=VERSION, + description='Microsoft Azure Command-Line Tools PaloAltoNetworks Extension.', + long_description=README + '\n\n' + HISTORY, + license='MIT', + author='Microsoft Corporation', + author_email='azpycli@microsoft.com', + url='https://github.com/Azure/azure-cli-extensions/tree/main/src/palo-alto-networks', + classifiers=CLASSIFIERS, + packages=find_packages(exclude=["tests"]), + package_data={'azext_palo_alto_networks': ['azext_metadata.json']}, + install_requires=DEPENDENCIES +) From d01615c6620a8bb0fe863a998ed1b72ae4647b9c Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Thu, 13 Jul 2023 17:13:47 +0800 Subject: [PATCH 02/10] update --- .../cloudngfw/global_rulestack/__cmd_group.py | 23 - .../cloudngfw/global_rulestack/__init__.py | 26 - .../cloudngfw/global_rulestack/_commit.py | 123 ---- .../cloudngfw/global_rulestack/_create.py | 465 ------------ .../cloudngfw/global_rulestack/_delete.py | 148 ---- .../global_rulestack/_get_change_log.py | 161 ----- .../cloudngfw/global_rulestack/_list.py | 253 ------- .../_list_advanced_security_object.py | 191 ----- .../global_rulestack/_list_app_id.py | 182 ----- .../global_rulestack/_list_country.py | 176 ----- .../global_rulestack/_list_firewall.py | 158 ----- .../_list_predefined_url_category.py | 178 ----- .../_list_security_service.py | 191 ----- .../cloudngfw/global_rulestack/_revert.py | 118 ---- .../cloudngfw/global_rulestack/_show.py | 270 ------- .../cloudngfw/global_rulestack/_update.py | 495 ------------- .../cloudngfw/global_rulestack/_wait.py | 269 ------- .../certificate/__cmd_group.py | 23 - .../global_rulestack/certificate/__init__.py | 16 - .../global_rulestack/certificate/_create.py | 281 -------- .../global_rulestack/certificate/_delete.py | 157 ----- .../global_rulestack/certificate/_list.py | 213 ------ .../global_rulestack/certificate/_show.py | 211 ------ .../global_rulestack/certificate/_wait.py | 210 ------ .../global_rulestack/fqdnlist/__cmd_group.py | 23 - .../global_rulestack/fqdnlist/__init__.py | 16 - .../global_rulestack/fqdnlist/_create.py | 281 -------- .../global_rulestack/fqdnlist/_delete.py | 157 ----- .../global_rulestack/fqdnlist/_list.py | 213 ------ .../global_rulestack/fqdnlist/_show.py | 211 ------ .../global_rulestack/fqdnlist/_wait.py | 210 ------ .../global_rulestack/post_rule/__cmd_group.py | 23 - .../global_rulestack/post_rule/__init__.py | 19 - .../global_rulestack/post_rule/_create.py | 660 ------------------ .../global_rulestack/post_rule/_delete.py | 157 ----- .../post_rule/_get_counter.py | 230 ------ .../global_rulestack/post_rule/_list.py | 321 --------- .../post_rule/_refresh_counter.py | 133 ---- .../post_rule/_reset_counter.py | 179 ----- .../global_rulestack/post_rule/_show.py | 319 --------- .../global_rulestack/post_rule/_wait.py | 318 --------- .../global_rulestack/pre_rule/__cmd_group.py | 23 - .../global_rulestack/pre_rule/__init__.py | 19 - .../global_rulestack/pre_rule/_create.py | 660 ------------------ .../global_rulestack/pre_rule/_delete.py | 157 ----- .../global_rulestack/pre_rule/_get_counter.py | 230 ------ .../global_rulestack/pre_rule/_list.py | 321 --------- .../pre_rule/_refresh_counter.py | 133 ---- .../pre_rule/_reset_counter.py | 179 ----- .../global_rulestack/pre_rule/_show.py | 319 --------- .../global_rulestack/pre_rule/_wait.py | 318 --------- .../prefixlist/__cmd_group.py | 23 - .../global_rulestack/prefixlist/__init__.py | 16 - .../global_rulestack/prefixlist/_create.py | 281 -------- .../global_rulestack/prefixlist/_delete.py | 157 ----- .../global_rulestack/prefixlist/_list.py | 213 ------ .../global_rulestack/prefixlist/_show.py | 211 ------ .../global_rulestack/prefixlist/_wait.py | 210 ------ .../cloudngfw/local_rulestack/_delete.py | 1 - .../local_rulestack/_get_change_log.py | 2 +- .../local_rulestack/_get_support_info.py | 2 +- .../_list_advanced_security_object.py | 2 +- .../cloudngfw/local_rulestack/_list_app_id.py | 2 +- .../local_rulestack/_list_country.py | 2 +- .../local_rulestack/_list_firewall.py | 2 +- .../_list_predefined_url_category.py | 2 +- .../local_rulestack/_list_security_service.py | 2 +- .../cloudngfw/local_rulestack/_revert.py | 2 +- .../local_rulestack/certificate/_delete.py | 1 - .../local_rulestack/fqdnlist/_delete.py | 1 - .../local_rulestack/local_rule/_create.py | 2 +- .../local_rulestack/local_rule/_delete.py | 1 - .../local_rulestack/prefixlist/_delete.py | 1 - .../tests/latest/test_palo_alto_networks.py | 135 ++-- 74 files changed, 98 insertions(+), 11540 deletions(-) delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__cmd_group.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__init__.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_commit.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_create.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_delete.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_get_change_log.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_advanced_security_object.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_app_id.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_country.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_firewall.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_predefined_url_category.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_security_service.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_revert.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_show.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_update.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_wait.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__cmd_group.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__init__.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_create.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_delete.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_list.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_show.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_wait.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__cmd_group.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__init__.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_create.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_delete.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_list.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_show.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_wait.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__cmd_group.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__init__.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_create.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_delete.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_get_counter.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_list.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_refresh_counter.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_reset_counter.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_show.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_wait.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__cmd_group.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__init__.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_create.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_delete.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_get_counter.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_list.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_refresh_counter.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_reset_counter.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_show.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_wait.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__cmd_group.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__init__.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_create.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_delete.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_list.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_show.py delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_wait.py diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__cmd_group.py deleted file mode 100644 index ece352db63c..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "palo-alto cloudngfw global-rulestack", -) -class __CMDGroup(AAZCommandGroup): - """Manage global-rulestack resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__init__.py deleted file mode 100644 index 0ac4cc75aad..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/__init__.py +++ /dev/null @@ -1,26 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._commit import * -from ._create import * -from ._delete import * -from ._get_change_log import * -from ._list import * -from ._list_advanced_security_object import * -from ._list_app_id import * -from ._list_country import * -from ._list_firewall import * -from ._list_predefined_url_category import * -from ._list_security_service import * -from ._revert import * -from ._show import * -from ._update import * -from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_commit.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_commit.py deleted file mode 100644 index 94d8f347740..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_commit.py +++ /dev/null @@ -1,123 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack commit", -) -class Commit(AAZCommand): - """Commit rulestack configuration - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/commit", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.GlobalRulestackCommit(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class GlobalRulestackCommit(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - None, - self.on_error, - lro_options={"final-state-via": "location"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/commit", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - -class _CommitHelper: - """Helper class for Commit""" - - -__all__ = ["Commit"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_create.py deleted file mode 100644 index 5df24e17ff4..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_create.py +++ /dev/null @@ -1,465 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack create", -) -class Create(AAZCommand): - """Create a GlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.associated_subscriptions = AAZListArg( - options=["--associated-subscriptions"], - arg_group="Properties", - help="subscription scope of global rulestack", - ) - _args_schema.default_mode = AAZStrArg( - options=["--default-mode"], - arg_group="Properties", - help="Mode for default rules creation", - enum={"FIREWALL": "FIREWALL", "IPS": "IPS", "NONE": "NONE"}, - ) - _args_schema.description = AAZStrArg( - options=["--description"], - arg_group="Properties", - help="rulestack description", - ) - _args_schema.min_app_id_version = AAZStrArg( - options=["--min-app-id-version"], - arg_group="Properties", - help="minimum version", - ) - _args_schema.pan_etag = AAZStrArg( - options=["--pan-etag"], - arg_group="Properties", - help="PanEtag info", - ) - _args_schema.pan_location = AAZStrArg( - options=["--pan-location"], - arg_group="Properties", - help="Rulestack Location, Required for GlobalRulestacks, Not for LocalRulestacks", - ) - _args_schema.scope = AAZStrArg( - options=["--scope"], - arg_group="Properties", - help="Rulestack Type", - enum={"GLOBAL": "GLOBAL", "LOCAL": "LOCAL"}, - ) - _args_schema.security_services = AAZObjectArg( - options=["--security-services"], - arg_group="Properties", - help="Security Profile", - ) - - associated_subscriptions = cls._args_schema.associated_subscriptions - associated_subscriptions.Element = AAZStrArg() - - security_services = cls._args_schema.security_services - security_services.anti_spyware_profile = AAZStrArg( - options=["anti-spyware-profile"], - help="Anti spyware Profile data", - ) - security_services.anti_virus_profile = AAZStrArg( - options=["anti-virus-profile"], - help="anti virus profile data", - ) - security_services.dns_subscription = AAZStrArg( - options=["dns-subscription"], - help="DNS Subscription profile data", - ) - security_services.file_blocking_profile = AAZStrArg( - options=["file-blocking-profile"], - help="File blocking profile data", - ) - security_services.outbound_trust_certificate = AAZStrArg( - options=["outbound-trust-certificate"], - help="Trusted Egress Decryption profile data", - ) - security_services.outbound_un_trust_certificate = AAZStrArg( - options=["outbound-un-trust-certificate"], - help="Untrusted Egress Decryption profile data", - ) - security_services.url_filtering_profile = AAZStrArg( - options=["url-filtering-profile"], - help="URL filtering profile data", - ) - security_services.vulnerability_profile = AAZStrArg( - options=["vulnerability-profile"], - help="IPs Vulnerability Profile Data", - ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.identity = AAZObjectArg( - options=["--identity"], - arg_group="Resource", - help="The managed service identities assigned to this resource.", - ) - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="Global Location", - required=True, - ) - - identity = cls._args_schema.identity - identity.type = AAZStrArg( - options=["type"], - help="The type of managed identity assigned to this resource.", - required=True, - enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"}, - ) - identity.user_assigned_identities = AAZDictArg( - options=["user-assigned-identities"], - help="The identities assigned to this resource by the user.", - ) - - user_assigned_identities = cls._args_schema.identity.user_assigned_identities - user_assigned_identities.Element = AAZObjectArg() - - _element = cls._args_schema.identity.user_assigned_identities.Element - _element.client_id = AAZStrArg( - options=["client-id"], - help="The active directory client identifier for this principal.", - ) - _element.principal_id = AAZStrArg( - options=["principal-id"], - help="The active directory identifier for this principal.", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.GlobalRulestackCreateOrUpdate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackCreateOrUpdate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("identity", AAZObjectType, ".identity") - _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) - - identity = _builder.get(".identity") - if identity is not None: - identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) - identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") - - user_assigned_identities = _builder.get(".identity.userAssignedIdentities") - if user_assigned_identities is not None: - user_assigned_identities.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".identity.userAssignedIdentities{}") - if _elements is not None: - _elements.set_prop("clientId", AAZStrType, ".client_id") - _elements.set_prop("principalId", AAZStrType, ".principal_id") - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("associatedSubscriptions", AAZListType, ".associated_subscriptions") - properties.set_prop("defaultMode", AAZStrType, ".default_mode") - properties.set_prop("description", AAZStrType, ".description") - properties.set_prop("minAppIdVersion", AAZStrType, ".min_app_id_version") - properties.set_prop("panEtag", AAZStrType, ".pan_etag") - properties.set_prop("panLocation", AAZStrType, ".pan_location") - properties.set_prop("scope", AAZStrType, ".scope") - properties.set_prop("securityServices", AAZObjectType, ".security_services") - - associated_subscriptions = _builder.get(".properties.associatedSubscriptions") - if associated_subscriptions is not None: - associated_subscriptions.set_elements(AAZStrType, ".") - - security_services = _builder.get(".properties.securityServices") - if security_services is not None: - security_services.set_prop("antiSpywareProfile", AAZStrType, ".anti_spyware_profile") - security_services.set_prop("antiVirusProfile", AAZStrType, ".anti_virus_profile") - security_services.set_prop("dnsSubscription", AAZStrType, ".dns_subscription") - security_services.set_prop("fileBlockingProfile", AAZStrType, ".file_blocking_profile") - security_services.set_prop("outboundTrustCertificate", AAZStrType, ".outbound_trust_certificate") - security_services.set_prop("outboundUnTrustCertificate", AAZStrType, ".outbound_un_trust_certificate") - security_services.set_prop("urlFilteringProfile", AAZStrType, ".url_filtering_profile") - security_services.set_prop("vulnerabilityProfile", AAZStrType, ".vulnerability_profile") - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - - _schema_on_200_201 = cls._schema_on_200_201 - _schema_on_200_201.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.identity = AAZObjectType() - _schema_on_200_201.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - identity = cls._schema_on_200_201.identity - identity.principal_id = AAZStrType( - serialized_name="principalId", - flags={"read_only": True}, - ) - identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"read_only": True}, - ) - identity.type = AAZStrType( - flags={"required": True}, - ) - identity.user_assigned_identities = AAZDictType( - serialized_name="userAssignedIdentities", - ) - - user_assigned_identities = cls._schema_on_200_201.identity.user_assigned_identities - user_assigned_identities.Element = AAZObjectType() - - _element = cls._schema_on_200_201.identity.user_assigned_identities.Element - _element.client_id = AAZStrType( - serialized_name="clientId", - ) - _element.principal_id = AAZStrType( - serialized_name="principalId", - ) - - properties = cls._schema_on_200_201.properties - properties.associated_subscriptions = AAZListType( - serialized_name="associatedSubscriptions", - ) - properties.default_mode = AAZStrType( - serialized_name="defaultMode", - ) - properties.description = AAZStrType() - properties.min_app_id_version = AAZStrType( - serialized_name="minAppIdVersion", - ) - properties.pan_etag = AAZStrType( - serialized_name="panEtag", - ) - properties.pan_location = AAZStrType( - serialized_name="panLocation", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.scope = AAZStrType() - properties.security_services = AAZObjectType( - serialized_name="securityServices", - ) - - associated_subscriptions = cls._schema_on_200_201.properties.associated_subscriptions - associated_subscriptions.Element = AAZStrType() - - security_services = cls._schema_on_200_201.properties.security_services - security_services.anti_spyware_profile = AAZStrType( - serialized_name="antiSpywareProfile", - ) - security_services.anti_virus_profile = AAZStrType( - serialized_name="antiVirusProfile", - ) - security_services.dns_subscription = AAZStrType( - serialized_name="dnsSubscription", - ) - security_services.file_blocking_profile = AAZStrType( - serialized_name="fileBlockingProfile", - ) - security_services.outbound_trust_certificate = AAZStrType( - serialized_name="outboundTrustCertificate", - ) - security_services.outbound_un_trust_certificate = AAZStrType( - serialized_name="outboundUnTrustCertificate", - ) - security_services.url_filtering_profile = AAZStrType( - serialized_name="urlFilteringProfile", - ) - security_services.vulnerability_profile = AAZStrType( - serialized_name="vulnerabilityProfile", - ) - - system_data = cls._schema_on_200_201.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_delete.py deleted file mode 100644 index b1b6999ff49..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_delete.py +++ /dev/null @@ -1,148 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete a GlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.GlobalRulestackDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class GlobalRulestackDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_200(self, session): - pass - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_get_change_log.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_get_change_log.py deleted file mode 100644 index 4539586612c..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_get_change_log.py +++ /dev/null @@ -1,161 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack get-change-log", -) -class GetChangeLog(AAZCommand): - """Get changelog - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/getchangelog", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackGetChangeLog(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackGetChangeLog(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/getChangeLog", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.changes = AAZListType( - flags={"required": True}, - ) - _schema_on_200.last_committed = AAZStrType( - serialized_name="lastCommitted", - ) - _schema_on_200.last_modified = AAZStrType( - serialized_name="lastModified", - ) - - changes = cls._schema_on_200.changes - changes.Element = AAZStrType() - - return cls._schema_on_200 - - -class _GetChangeLogHelper: - """Helper class for GetChangeLog""" - - -__all__ = ["GetChangeLog"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list.py deleted file mode 100644 index e289c505ead..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list.py +++ /dev/null @@ -1,253 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack list", -) -class List(AAZCommand): - """List GlobalRulestackResource resources by Tenant - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackList(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class GlobalRulestackList(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.identity = AAZObjectType() - _element.location = AAZStrType( - flags={"required": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - identity = cls._schema_on_200.value.Element.identity - identity.principal_id = AAZStrType( - serialized_name="principalId", - flags={"read_only": True}, - ) - identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"read_only": True}, - ) - identity.type = AAZStrType( - flags={"required": True}, - ) - identity.user_assigned_identities = AAZDictType( - serialized_name="userAssignedIdentities", - ) - - user_assigned_identities = cls._schema_on_200.value.Element.identity.user_assigned_identities - user_assigned_identities.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.identity.user_assigned_identities.Element - _element.client_id = AAZStrType( - serialized_name="clientId", - ) - _element.principal_id = AAZStrType( - serialized_name="principalId", - ) - - properties = cls._schema_on_200.value.Element.properties - properties.associated_subscriptions = AAZListType( - serialized_name="associatedSubscriptions", - ) - properties.default_mode = AAZStrType( - serialized_name="defaultMode", - ) - properties.description = AAZStrType() - properties.min_app_id_version = AAZStrType( - serialized_name="minAppIdVersion", - ) - properties.pan_etag = AAZStrType( - serialized_name="panEtag", - ) - properties.pan_location = AAZStrType( - serialized_name="panLocation", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.scope = AAZStrType() - properties.security_services = AAZObjectType( - serialized_name="securityServices", - ) - - associated_subscriptions = cls._schema_on_200.value.Element.properties.associated_subscriptions - associated_subscriptions.Element = AAZStrType() - - security_services = cls._schema_on_200.value.Element.properties.security_services - security_services.anti_spyware_profile = AAZStrType( - serialized_name="antiSpywareProfile", - ) - security_services.anti_virus_profile = AAZStrType( - serialized_name="antiVirusProfile", - ) - security_services.dns_subscription = AAZStrType( - serialized_name="dnsSubscription", - ) - security_services.file_blocking_profile = AAZStrType( - serialized_name="fileBlockingProfile", - ) - security_services.outbound_trust_certificate = AAZStrType( - serialized_name="outboundTrustCertificate", - ) - security_services.outbound_un_trust_certificate = AAZStrType( - serialized_name="outboundUnTrustCertificate", - ) - security_services.url_filtering_profile = AAZStrType( - serialized_name="urlFilteringProfile", - ) - security_services.vulnerability_profile = AAZStrType( - serialized_name="vulnerabilityProfile", - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_advanced_security_object.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_advanced_security_object.py deleted file mode 100644 index ae0a9f68c20..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_advanced_security_object.py +++ /dev/null @@ -1,191 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack list-advanced-security-object", -) -class ListAdvancedSecurityObject(AAZCommand): - """Get the list of advanced security objects - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listadvancedsecurityobjects", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.skip = AAZStrArg( - options=["--skip"], - ) - _args_schema.top = AAZIntArg( - options=["--top"], - ) - _args_schema.type = AAZStrArg( - options=["--type"], - required=True, - enum={"feeds": "feeds", "urlCustom": "urlCustom"}, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackListAdvancedSecurityObjects(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackListAdvancedSecurityObjects(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listAdvancedSecurityObjects", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "skip", self.ctx.args.skip, - ), - **self.serialize_query_param( - "top", self.ctx.args.top, - ), - **self.serialize_query_param( - "type", self.ctx.args.type, - required=True, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZObjectType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.entry = AAZListType( - flags={"required": True}, - ) - value.type = AAZStrType() - - entry = cls._schema_on_200.value.entry - entry.Element = AAZObjectType() - - _element = cls._schema_on_200.value.entry.Element - _element.description = AAZStrType() - _element.name = AAZStrType( - flags={"required": True}, - ) - - return cls._schema_on_200 - - -class _ListAdvancedSecurityObjectHelper: - """Helper class for ListAdvancedSecurityObject""" - - -__all__ = ["ListAdvancedSecurityObject"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_app_id.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_app_id.py deleted file mode 100644 index 0047c641880..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_app_id.py +++ /dev/null @@ -1,182 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack list-app-id", -) -class ListAppId(AAZCommand): - """List of AppIds for GlobalRulestack ApiVersion - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listappids", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.app_id_version = AAZStrArg( - options=["--app-id-version"], - ) - _args_schema.app_prefix = AAZStrArg( - options=["--app-prefix"], - ) - _args_schema.skip = AAZStrArg( - options=["--skip"], - ) - _args_schema.top = AAZIntArg( - options=["--top"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackListAppIds(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackListAppIds(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listAppIds", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "appIdVersion", self.ctx.args.app_id_version, - ), - **self.serialize_query_param( - "appPrefix", self.ctx.args.app_prefix, - ), - **self.serialize_query_param( - "skip", self.ctx.args.skip, - ), - **self.serialize_query_param( - "top", self.ctx.args.top, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ListAppIdHelper: - """Helper class for ListAppId""" - - -__all__ = ["ListAppId"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_country.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_country.py deleted file mode 100644 index 45c1e65da26..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_country.py +++ /dev/null @@ -1,176 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack list-country", -) -class ListCountry(AAZCommand): - """List of countries for Rulestack - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listcountries", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.skip = AAZStrArg( - options=["--skip"], - ) - _args_schema.top = AAZIntArg( - options=["--top"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackListCountries(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackListCountries(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listCountries", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "skip", self.ctx.args.skip, - ), - **self.serialize_query_param( - "top", self.ctx.args.top, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.code = AAZStrType( - flags={"required": True}, - ) - _element.description = AAZStrType() - - return cls._schema_on_200 - - -class _ListCountryHelper: - """Helper class for ListCountry""" - - -__all__ = ["ListCountry"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_firewall.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_firewall.py deleted file mode 100644 index c0ae6230631..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_firewall.py +++ /dev/null @@ -1,158 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack list-firewall", -) -class ListFirewall(AAZCommand): - """List of Firewalls associated with Rulestack - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listfirewalls", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackListFirewalls(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackListFirewalls(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listFirewalls", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZStrType() - - return cls._schema_on_200 - - -class _ListFirewallHelper: - """Helper class for ListFirewall""" - - -__all__ = ["ListFirewall"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_predefined_url_category.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_predefined_url_category.py deleted file mode 100644 index 6b682d556ea..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_predefined_url_category.py +++ /dev/null @@ -1,178 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack list-predefined-url-category", -) -class ListPredefinedUrlCategory(AAZCommand): - """List predefined URL categories for rulestack - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listpredefinedurlcategories", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.skip = AAZStrArg( - options=["--skip"], - ) - _args_schema.top = AAZIntArg( - options=["--top"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackListPredefinedUrlCategories(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackListPredefinedUrlCategories(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listPredefinedUrlCategories", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "skip", self.ctx.args.skip, - ), - **self.serialize_query_param( - "top", self.ctx.args.top, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.action = AAZStrType( - flags={"required": True}, - ) - _element.name = AAZStrType( - flags={"required": True}, - ) - - return cls._schema_on_200 - - -class _ListPredefinedUrlCategoryHelper: - """Helper class for ListPredefinedUrlCategory""" - - -__all__ = ["ListPredefinedUrlCategory"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_security_service.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_security_service.py deleted file mode 100644 index dec4f6761fa..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_list_security_service.py +++ /dev/null @@ -1,191 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack list-security-service", -) -class ListSecurityService(AAZCommand): - """List the security services for rulestack - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/listsecurityservices", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.skip = AAZStrArg( - options=["--skip"], - ) - _args_schema.top = AAZIntArg( - options=["--top"], - ) - _args_schema.type = AAZStrArg( - options=["--type"], - required=True, - enum={"antiSpyware": "antiSpyware", "antiVirus": "antiVirus", "dnsSubscription": "dnsSubscription", "fileBlocking": "fileBlocking", "ipsVulnerability": "ipsVulnerability", "urlFiltering": "urlFiltering"}, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackListSecurityServices(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackListSecurityServices(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/listSecurityServices", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "skip", self.ctx.args.skip, - ), - **self.serialize_query_param( - "top", self.ctx.args.top, - ), - **self.serialize_query_param( - "type", self.ctx.args.type, - required=True, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZObjectType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.entry = AAZListType( - flags={"required": True}, - ) - value.type = AAZStrType() - - entry = cls._schema_on_200.value.entry - entry.Element = AAZObjectType() - - _element = cls._schema_on_200.value.entry.Element - _element.description = AAZStrType() - _element.name = AAZStrType( - flags={"required": True}, - ) - - return cls._schema_on_200 - - -class _ListSecurityServiceHelper: - """Helper class for ListSecurityService""" - - -__all__ = ["ListSecurityService"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_revert.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_revert.py deleted file mode 100644 index 855581bb289..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_revert.py +++ /dev/null @@ -1,118 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack revert", -) -class Revert(AAZCommand): - """Revert rulestack configuration - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/revert", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return None - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackRevert(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class GlobalRulestackRevert(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [204]: - return self.on_204(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/revert", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_204(self, session): - pass - - -class _RevertHelper: - """Helper class for Revert""" - - -__all__ = ["Revert"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_show.py deleted file mode 100644 index 49cc1fb1f51..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_show.py +++ /dev/null @@ -1,270 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack show", -) -class Show(AAZCommand): - """Get a GlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.identity = AAZObjectType() - _schema_on_200.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - identity = cls._schema_on_200.identity - identity.principal_id = AAZStrType( - serialized_name="principalId", - flags={"read_only": True}, - ) - identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"read_only": True}, - ) - identity.type = AAZStrType( - flags={"required": True}, - ) - identity.user_assigned_identities = AAZDictType( - serialized_name="userAssignedIdentities", - ) - - user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities - user_assigned_identities.Element = AAZObjectType() - - _element = cls._schema_on_200.identity.user_assigned_identities.Element - _element.client_id = AAZStrType( - serialized_name="clientId", - ) - _element.principal_id = AAZStrType( - serialized_name="principalId", - ) - - properties = cls._schema_on_200.properties - properties.associated_subscriptions = AAZListType( - serialized_name="associatedSubscriptions", - ) - properties.default_mode = AAZStrType( - serialized_name="defaultMode", - ) - properties.description = AAZStrType() - properties.min_app_id_version = AAZStrType( - serialized_name="minAppIdVersion", - ) - properties.pan_etag = AAZStrType( - serialized_name="panEtag", - ) - properties.pan_location = AAZStrType( - serialized_name="panLocation", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.scope = AAZStrType() - properties.security_services = AAZObjectType( - serialized_name="securityServices", - ) - - associated_subscriptions = cls._schema_on_200.properties.associated_subscriptions - associated_subscriptions.Element = AAZStrType() - - security_services = cls._schema_on_200.properties.security_services - security_services.anti_spyware_profile = AAZStrType( - serialized_name="antiSpywareProfile", - ) - security_services.anti_virus_profile = AAZStrType( - serialized_name="antiVirusProfile", - ) - security_services.dns_subscription = AAZStrType( - serialized_name="dnsSubscription", - ) - security_services.file_blocking_profile = AAZStrType( - serialized_name="fileBlockingProfile", - ) - security_services.outbound_trust_certificate = AAZStrType( - serialized_name="outboundTrustCertificate", - ) - security_services.outbound_un_trust_certificate = AAZStrType( - serialized_name="outboundUnTrustCertificate", - ) - security_services.url_filtering_profile = AAZStrType( - serialized_name="urlFilteringProfile", - ) - security_services.vulnerability_profile = AAZStrType( - serialized_name="vulnerabilityProfile", - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_update.py deleted file mode 100644 index 881a2dce803..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_update.py +++ /dev/null @@ -1,495 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack update", -) -class Update(AAZCommand): - """Update a GlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - AZ_SUPPORT_GENERIC_UPDATE = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - - # define Arg Group "Resource" - - _args_schema = cls._args_schema - _args_schema.identity = AAZObjectArg( - options=["--identity"], - arg_group="Resource", - help="The managed service identities assigned to this resource.", - nullable=True, - ) - _args_schema.location = AAZResourceLocationArg( - arg_group="Resource", - help="Global Location", - ) - - identity = cls._args_schema.identity - identity.type = AAZStrArg( - options=["type"], - help="The type of managed identity assigned to this resource.", - enum={"None": "None", "SystemAssigned": "SystemAssigned", "SystemAssigned,UserAssigned": "SystemAssigned,UserAssigned", "UserAssigned": "UserAssigned"}, - ) - identity.user_assigned_identities = AAZDictArg( - options=["user-assigned-identities"], - help="The identities assigned to this resource by the user.", - nullable=True, - ) - - user_assigned_identities = cls._args_schema.identity.user_assigned_identities - user_assigned_identities.Element = AAZObjectArg( - nullable=True, - ) - - _element = cls._args_schema.identity.user_assigned_identities.Element - _element.client_id = AAZStrArg( - options=["client-id"], - help="The active directory client identifier for this principal.", - nullable=True, - ) - _element.principal_id = AAZStrArg( - options=["principal-id"], - help="The active directory identifier for this principal.", - nullable=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackGet(ctx=self.ctx)() - self.pre_instance_update(self.ctx.vars.instance) - self.InstanceUpdateByJson(ctx=self.ctx)() - self.InstanceUpdateByGeneric(ctx=self.ctx)() - self.post_instance_update(self.ctx.vars.instance) - yield self.GlobalRulestackCreateOrUpdate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - @register_callback - def pre_instance_update(self, instance): - pass - - @register_callback - def post_instance_update(self, instance): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class GlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_global_rulestack_resource_read(cls._schema_on_200) - - return cls._schema_on_200 - - class GlobalRulestackCreateOrUpdate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - value=self.ctx.vars.instance, - ) - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - _UpdateHelper._build_schema_global_rulestack_resource_read(cls._schema_on_200_201) - - return cls._schema_on_200_201 - - class InstanceUpdateByJson(AAZJsonInstanceUpdateOperation): - - def __call__(self, *args, **kwargs): - self._update_instance(self.ctx.vars.instance) - - def _update_instance(self, instance): - _instance_value, _builder = self.new_content_builder( - self.ctx.args, - value=instance, - typ=AAZObjectType - ) - _builder.set_prop("identity", AAZObjectType, ".identity") - _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - - identity = _builder.get(".identity") - if identity is not None: - identity.set_prop("type", AAZStrType, ".type", typ_kwargs={"flags": {"required": True}}) - identity.set_prop("userAssignedIdentities", AAZDictType, ".user_assigned_identities") - - user_assigned_identities = _builder.get(".identity.userAssignedIdentities") - if user_assigned_identities is not None: - user_assigned_identities.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".identity.userAssignedIdentities{}") - if _elements is not None: - _elements.set_prop("clientId", AAZStrType, ".client_id") - _elements.set_prop("principalId", AAZStrType, ".principal_id") - - return _instance_value - - class InstanceUpdateByGeneric(AAZGenericInstanceUpdateOperation): - - def __call__(self, *args, **kwargs): - self._update_instance_by_generic( - self.ctx.vars.instance, - self.ctx.generic_update_args - ) - - -class _UpdateHelper: - """Helper class for Update""" - - _schema_global_rulestack_resource_read = None - - @classmethod - def _build_schema_global_rulestack_resource_read(cls, _schema): - if cls._schema_global_rulestack_resource_read is not None: - _schema.id = cls._schema_global_rulestack_resource_read.id - _schema.identity = cls._schema_global_rulestack_resource_read.identity - _schema.location = cls._schema_global_rulestack_resource_read.location - _schema.name = cls._schema_global_rulestack_resource_read.name - _schema.properties = cls._schema_global_rulestack_resource_read.properties - _schema.system_data = cls._schema_global_rulestack_resource_read.system_data - _schema.type = cls._schema_global_rulestack_resource_read.type - return - - cls._schema_global_rulestack_resource_read = _schema_global_rulestack_resource_read = AAZObjectType() - - global_rulestack_resource_read = _schema_global_rulestack_resource_read - global_rulestack_resource_read.id = AAZStrType( - flags={"read_only": True}, - ) - global_rulestack_resource_read.identity = AAZObjectType() - global_rulestack_resource_read.location = AAZStrType( - flags={"required": True}, - ) - global_rulestack_resource_read.name = AAZStrType( - flags={"read_only": True}, - ) - global_rulestack_resource_read.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - global_rulestack_resource_read.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - global_rulestack_resource_read.type = AAZStrType( - flags={"read_only": True}, - ) - - identity = _schema_global_rulestack_resource_read.identity - identity.principal_id = AAZStrType( - serialized_name="principalId", - flags={"read_only": True}, - ) - identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"read_only": True}, - ) - identity.type = AAZStrType( - flags={"required": True}, - ) - identity.user_assigned_identities = AAZDictType( - serialized_name="userAssignedIdentities", - ) - - user_assigned_identities = _schema_global_rulestack_resource_read.identity.user_assigned_identities - user_assigned_identities.Element = AAZObjectType() - - _element = _schema_global_rulestack_resource_read.identity.user_assigned_identities.Element - _element.client_id = AAZStrType( - serialized_name="clientId", - ) - _element.principal_id = AAZStrType( - serialized_name="principalId", - ) - - properties = _schema_global_rulestack_resource_read.properties - properties.associated_subscriptions = AAZListType( - serialized_name="associatedSubscriptions", - ) - properties.default_mode = AAZStrType( - serialized_name="defaultMode", - ) - properties.description = AAZStrType() - properties.min_app_id_version = AAZStrType( - serialized_name="minAppIdVersion", - ) - properties.pan_etag = AAZStrType( - serialized_name="panEtag", - ) - properties.pan_location = AAZStrType( - serialized_name="panLocation", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.scope = AAZStrType() - properties.security_services = AAZObjectType( - serialized_name="securityServices", - ) - - associated_subscriptions = _schema_global_rulestack_resource_read.properties.associated_subscriptions - associated_subscriptions.Element = AAZStrType() - - security_services = _schema_global_rulestack_resource_read.properties.security_services - security_services.anti_spyware_profile = AAZStrType( - serialized_name="antiSpywareProfile", - ) - security_services.anti_virus_profile = AAZStrType( - serialized_name="antiVirusProfile", - ) - security_services.dns_subscription = AAZStrType( - serialized_name="dnsSubscription", - ) - security_services.file_blocking_profile = AAZStrType( - serialized_name="fileBlockingProfile", - ) - security_services.outbound_trust_certificate = AAZStrType( - serialized_name="outboundTrustCertificate", - ) - security_services.outbound_un_trust_certificate = AAZStrType( - serialized_name="outboundUnTrustCertificate", - ) - security_services.url_filtering_profile = AAZStrType( - serialized_name="urlFilteringProfile", - ) - security_services.vulnerability_profile = AAZStrType( - serialized_name="vulnerabilityProfile", - ) - - system_data = _schema_global_rulestack_resource_read.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - _schema.id = cls._schema_global_rulestack_resource_read.id - _schema.identity = cls._schema_global_rulestack_resource_read.identity - _schema.location = cls._schema_global_rulestack_resource_read.location - _schema.name = cls._schema_global_rulestack_resource_read.name - _schema.properties = cls._schema_global_rulestack_resource_read.properties - _schema.system_data = cls._schema_global_rulestack_resource_read.system_data - _schema.type = cls._schema_global_rulestack_resource_read.type - - -__all__ = ["Update"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_wait.py deleted file mode 100644 index 3c05f48b79b..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/_wait.py +++ /dev/null @@ -1,269 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.GlobalRulestackGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) - return result - - class GlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.identity = AAZObjectType() - _schema_on_200.location = AAZStrType( - flags={"required": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - identity = cls._schema_on_200.identity - identity.principal_id = AAZStrType( - serialized_name="principalId", - flags={"read_only": True}, - ) - identity.tenant_id = AAZStrType( - serialized_name="tenantId", - flags={"read_only": True}, - ) - identity.type = AAZStrType( - flags={"required": True}, - ) - identity.user_assigned_identities = AAZDictType( - serialized_name="userAssignedIdentities", - ) - - user_assigned_identities = cls._schema_on_200.identity.user_assigned_identities - user_assigned_identities.Element = AAZObjectType() - - _element = cls._schema_on_200.identity.user_assigned_identities.Element - _element.client_id = AAZStrType( - serialized_name="clientId", - ) - _element.principal_id = AAZStrType( - serialized_name="principalId", - ) - - properties = cls._schema_on_200.properties - properties.associated_subscriptions = AAZListType( - serialized_name="associatedSubscriptions", - ) - properties.default_mode = AAZStrType( - serialized_name="defaultMode", - ) - properties.description = AAZStrType() - properties.min_app_id_version = AAZStrType( - serialized_name="minAppIdVersion", - ) - properties.pan_etag = AAZStrType( - serialized_name="panEtag", - ) - properties.pan_location = AAZStrType( - serialized_name="panLocation", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.scope = AAZStrType() - properties.security_services = AAZObjectType( - serialized_name="securityServices", - ) - - associated_subscriptions = cls._schema_on_200.properties.associated_subscriptions - associated_subscriptions.Element = AAZStrType() - - security_services = cls._schema_on_200.properties.security_services - security_services.anti_spyware_profile = AAZStrType( - serialized_name="antiSpywareProfile", - ) - security_services.anti_virus_profile = AAZStrType( - serialized_name="antiVirusProfile", - ) - security_services.dns_subscription = AAZStrType( - serialized_name="dnsSubscription", - ) - security_services.file_blocking_profile = AAZStrType( - serialized_name="fileBlockingProfile", - ) - security_services.outbound_trust_certificate = AAZStrType( - serialized_name="outboundTrustCertificate", - ) - security_services.outbound_un_trust_certificate = AAZStrType( - serialized_name="outboundUnTrustCertificate", - ) - security_services.url_filtering_profile = AAZStrType( - serialized_name="urlFilteringProfile", - ) - security_services.vulnerability_profile = AAZStrType( - serialized_name="vulnerabilityProfile", - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__cmd_group.py deleted file mode 100644 index b730dd4a6d6..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "palo-alto cloudngfw global-rulestack certificate", -) -class __CMDGroup(AAZCommandGroup): - """Manage global-rulestack certificate resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__init__.py deleted file mode 100644 index 2d1a2078686..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._create import * -from ._delete import * -from ._list import * -from ._show import * -from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_create.py deleted file mode 100644 index d68e01b8b92..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_create.py +++ /dev/null @@ -1,281 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack certificate create", -) -class Create(AAZCommand): - """Create a CertificateObjectGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="certificate name", - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.audit_comment = AAZStrArg( - options=["--audit-comment"], - arg_group="Properties", - help="comment for this object", - ) - _args_schema.certificate_self_signed = AAZStrArg( - options=["--certificate-self-signed"], - arg_group="Properties", - help="use certificate self signed", - required=True, - enum={"FALSE": "FALSE", "TRUE": "TRUE"}, - ) - _args_schema.certificate_signer_resource_id = AAZStrArg( - options=["--certificate-signer-resource-id"], - arg_group="Properties", - help="Resource Id of certificate signer, to be populated only when certificateSelfSigned is false", - ) - _args_schema.description = AAZStrArg( - options=["--description"], - arg_group="Properties", - help="user description for this object", - ) - _args_schema.etag = AAZStrArg( - options=["--etag"], - arg_group="Properties", - help="read only string representing last create or update", - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.CertificateObjectGlobalRulestackCreateOrUpdate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class CertificateObjectGlobalRulestackCreateOrUpdate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("auditComment", AAZStrType, ".audit_comment") - properties.set_prop("certificateSelfSigned", AAZStrType, ".certificate_self_signed", typ_kwargs={"flags": {"required": True}}) - properties.set_prop("certificateSignerResourceId", AAZStrType, ".certificate_signer_resource_id") - properties.set_prop("description", AAZStrType, ".description") - properties.set_prop("etag", AAZStrType, ".etag") - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - - _schema_on_200_201 = cls._schema_on_200_201 - _schema_on_200_201.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.certificate_self_signed = AAZStrType( - serialized_name="certificateSelfSigned", - flags={"required": True}, - ) - properties.certificate_signer_resource_id = AAZStrType( - serialized_name="certificateSignerResourceId", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - system_data = cls._schema_on_200_201.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_delete.py deleted file mode 100644 index 291bc34bace..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_delete.py +++ /dev/null @@ -1,157 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack certificate delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete a CertificateObjectGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="certificate name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.CertificateObjectGlobalRulestackDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class CertificateObjectGlobalRulestackDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_200(self, session): - pass - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_list.py deleted file mode 100644 index d13c27ab76b..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_list.py +++ /dev/null @@ -1,213 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack certificate list", -) -class List(AAZCommand): - """List CertificateObjectGlobalRulestackResource resources by Tenant - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.CertificateObjectGlobalRulestackList(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class CertificateObjectGlobalRulestackList(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.certificate_self_signed = AAZStrType( - serialized_name="certificateSelfSigned", - flags={"required": True}, - ) - properties.certificate_signer_resource_id = AAZStrType( - serialized_name="certificateSignerResourceId", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_show.py deleted file mode 100644 index e58b3a7fe5a..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_show.py +++ /dev/null @@ -1,211 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack certificate show", -) -class Show(AAZCommand): - """Get a CertificateObjectGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="certificate name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.CertificateObjectGlobalRulestackGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class CertificateObjectGlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.certificate_self_signed = AAZStrType( - serialized_name="certificateSelfSigned", - flags={"required": True}, - ) - properties.certificate_signer_resource_id = AAZStrType( - serialized_name="certificateSignerResourceId", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_wait.py deleted file mode 100644 index b8efef0d126..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/certificate/_wait.py +++ /dev/null @@ -1,210 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack certificate wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/certificates/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="certificate name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.CertificateObjectGlobalRulestackGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) - return result - - class CertificateObjectGlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/certificates/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.certificate_self_signed = AAZStrType( - serialized_name="certificateSelfSigned", - flags={"required": True}, - ) - properties.certificate_signer_resource_id = AAZStrType( - serialized_name="certificateSignerResourceId", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__cmd_group.py deleted file mode 100644 index 5e64488bdd5..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "palo-alto cloudngfw global-rulestack fqdnlist", -) -class __CMDGroup(AAZCommandGroup): - """Manage global-rulestack fqdnlist resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__init__.py deleted file mode 100644 index 2d1a2078686..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._create import * -from ._delete import * -from ._list import * -from ._show import * -from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_create.py deleted file mode 100644 index cdc297a091c..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_create.py +++ /dev/null @@ -1,281 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack fqdnlist create", -) -class Create(AAZCommand): - """Create a FqdnListGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="fqdn list name", - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.audit_comment = AAZStrArg( - options=["--audit-comment"], - arg_group="Properties", - help="comment for this object", - ) - _args_schema.description = AAZStrArg( - options=["--description"], - arg_group="Properties", - help="fqdn object description", - ) - _args_schema.etag = AAZStrArg( - options=["--etag"], - arg_group="Properties", - help="etag info", - ) - _args_schema.fqdn_list = AAZListArg( - options=["--fqdn-list"], - arg_group="Properties", - help="fqdn list", - required=True, - ) - - fqdn_list = cls._args_schema.fqdn_list - fqdn_list.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.FqdnListGlobalRulestackCreateOrUpdate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class FqdnListGlobalRulestackCreateOrUpdate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("auditComment", AAZStrType, ".audit_comment") - properties.set_prop("description", AAZStrType, ".description") - properties.set_prop("etag", AAZStrType, ".etag") - properties.set_prop("fqdnList", AAZListType, ".fqdn_list", typ_kwargs={"flags": {"required": True}}) - - fqdn_list = _builder.get(".properties.fqdnList") - if fqdn_list is not None: - fqdn_list.set_elements(AAZStrType, ".") - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - - _schema_on_200_201 = cls._schema_on_200_201 - _schema_on_200_201.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.fqdn_list = AAZListType( - serialized_name="fqdnList", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - fqdn_list = cls._schema_on_200_201.properties.fqdn_list - fqdn_list.Element = AAZStrType() - - system_data = cls._schema_on_200_201.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_delete.py deleted file mode 100644 index c66b05fac41..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_delete.py +++ /dev/null @@ -1,157 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack fqdnlist delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete a FqdnListGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="fqdn list name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.FqdnListGlobalRulestackDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class FqdnListGlobalRulestackDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_200(self, session): - pass - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_list.py deleted file mode 100644 index c6218b74ac9..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_list.py +++ /dev/null @@ -1,213 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack fqdnlist list", -) -class List(AAZCommand): - """List FqdnListGlobalRulestackResource resources by Tenant - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.FqdnListGlobalRulestackList(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class FqdnListGlobalRulestackList(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.fqdn_list = AAZListType( - serialized_name="fqdnList", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - fqdn_list = cls._schema_on_200.value.Element.properties.fqdn_list - fqdn_list.Element = AAZStrType() - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_show.py deleted file mode 100644 index 66cd3f6546e..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_show.py +++ /dev/null @@ -1,211 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack fqdnlist show", -) -class Show(AAZCommand): - """Get a FqdnListGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="fqdn list name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.FqdnListGlobalRulestackGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class FqdnListGlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.fqdn_list = AAZListType( - serialized_name="fqdnList", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - fqdn_list = cls._schema_on_200.properties.fqdn_list - fqdn_list.Element = AAZStrType() - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_wait.py deleted file mode 100644 index c4b833a8a27..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/fqdnlist/_wait.py +++ /dev/null @@ -1,210 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack fqdnlist wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/fqdnlists/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="fqdn list name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.FqdnListGlobalRulestackGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) - return result - - class FqdnListGlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/fqdnlists/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.fqdn_list = AAZListType( - serialized_name="fqdnList", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - fqdn_list = cls._schema_on_200.properties.fqdn_list - fqdn_list.Element = AAZStrType() - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__cmd_group.py deleted file mode 100644 index 7224378a974..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "palo-alto cloudngfw global-rulestack post-rule", -) -class __CMDGroup(AAZCommandGroup): - """Manage global-rulestack fqdnlist resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__init__.py deleted file mode 100644 index 060f7aff0e8..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._create import * -from ._delete import * -from ._get_counter import * -from ._list import * -from ._refresh_counter import * -from ._reset_counter import * -from ._show import * -from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_create.py deleted file mode 100644 index fbef92a974a..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_create.py +++ /dev/null @@ -1,660 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack post-rule create", -) -class Create(AAZCommand): - """Create a PostRulesResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Post Rule priority", - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.action_type = AAZStrArg( - options=["--action-type"], - arg_group="Properties", - help="rule action", - enum={"Allow": "Allow", "DenyResetBoth": "DenyResetBoth", "DenyResetServer": "DenyResetServer", "DenySilent": "DenySilent"}, - ) - _args_schema.applications = AAZListArg( - options=["--applications"], - arg_group="Properties", - help="array of rule applications", - ) - _args_schema.audit_comment = AAZStrArg( - options=["--audit-comment"], - arg_group="Properties", - help="rule comment", - ) - _args_schema.category = AAZObjectArg( - options=["--category"], - arg_group="Properties", - help="rule category", - ) - _args_schema.decryption_rule_type = AAZStrArg( - options=["--decryption-rule-type"], - arg_group="Properties", - help="enable or disable decryption", - enum={"None": "None", "SSLInboundInspection": "SSLInboundInspection", "SSLOutboundInspection": "SSLOutboundInspection"}, - ) - _args_schema.description = AAZStrArg( - options=["--description"], - arg_group="Properties", - help="rule description", - ) - _args_schema.destination = AAZObjectArg( - options=["--destination"], - arg_group="Properties", - help="destination address", - ) - _args_schema.enable_logging = AAZStrArg( - options=["--enable-logging"], - arg_group="Properties", - help="enable or disable logging", - enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, - ) - _args_schema.etag = AAZStrArg( - options=["--etag"], - arg_group="Properties", - help="etag info", - ) - _args_schema.inbound_inspection_certificate = AAZStrArg( - options=["--inbound-inspection-certificate"], - arg_group="Properties", - help="inbound Inspection Certificate", - ) - _args_schema.negate_destination = AAZStrArg( - options=["--negate-destination"], - arg_group="Properties", - help="cidr should not be 'any'", - enum={"FALSE": "FALSE", "TRUE": "TRUE"}, - ) - _args_schema.negate_source = AAZStrArg( - options=["--negate-source"], - arg_group="Properties", - help="cidr should not be 'any'", - enum={"FALSE": "FALSE", "TRUE": "TRUE"}, - ) - _args_schema.protocol = AAZStrArg( - options=["--protocol"], - arg_group="Properties", - help="any, application-default, TCP:number, UDP:number", - default="application-default", - ) - _args_schema.protocol_port_list = AAZListArg( - options=["--protocol-port-list"], - arg_group="Properties", - help="prot port list", - ) - _args_schema.rule_name = AAZStrArg( - options=["--rule-name"], - arg_group="Properties", - help="rule name", - required=True, - ) - _args_schema.rule_state = AAZStrArg( - options=["--rule-state"], - arg_group="Properties", - help="state of this rule", - enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, - ) - _args_schema.source = AAZObjectArg( - options=["--source"], - arg_group="Properties", - help="source address", - ) - _args_schema.tags = AAZListArg( - options=["--tags"], - arg_group="Properties", - help="tag for rule", - ) - - applications = cls._args_schema.applications - applications.Element = AAZStrArg() - - category = cls._args_schema.category - category.feeds = AAZListArg( - options=["feeds"], - help="feed list", - required=True, - ) - category.url_custom = AAZListArg( - options=["url-custom"], - help="custom URL", - required=True, - ) - - feeds = cls._args_schema.category.feeds - feeds.Element = AAZStrArg() - - url_custom = cls._args_schema.category.url_custom - url_custom.Element = AAZStrArg() - - destination = cls._args_schema.destination - destination.cidrs = AAZListArg( - options=["cidrs"], - help="special value 'any'", - ) - destination.countries = AAZListArg( - options=["countries"], - help="list of countries", - ) - destination.feeds = AAZListArg( - options=["feeds"], - help="list of feeds", - ) - destination.fqdn_lists = AAZListArg( - options=["fqdn-lists"], - help="fqdn list", - ) - destination.prefix_lists = AAZListArg( - options=["prefix-lists"], - help="prefix list", - ) - - cidrs = cls._args_schema.destination.cidrs - cidrs.Element = AAZStrArg() - - countries = cls._args_schema.destination.countries - countries.Element = AAZStrArg() - - feeds = cls._args_schema.destination.feeds - feeds.Element = AAZStrArg() - - fqdn_lists = cls._args_schema.destination.fqdn_lists - fqdn_lists.Element = AAZStrArg() - - prefix_lists = cls._args_schema.destination.prefix_lists - prefix_lists.Element = AAZStrArg() - - protocol_port_list = cls._args_schema.protocol_port_list - protocol_port_list.Element = AAZStrArg() - - source = cls._args_schema.source - source.cidrs = AAZListArg( - options=["cidrs"], - help="special value 'any'", - ) - source.countries = AAZListArg( - options=["countries"], - help="list of countries", - ) - source.feeds = AAZListArg( - options=["feeds"], - help="list of feeds", - ) - source.prefix_lists = AAZListArg( - options=["prefix-lists"], - help="prefix list", - ) - - cidrs = cls._args_schema.source.cidrs - cidrs.Element = AAZStrArg() - - countries = cls._args_schema.source.countries - countries.Element = AAZStrArg() - - feeds = cls._args_schema.source.feeds - feeds.Element = AAZStrArg() - - prefix_lists = cls._args_schema.source.prefix_lists - prefix_lists.Element = AAZStrArg() - - tags = cls._args_schema.tags - tags.Element = AAZObjectArg() - - _element = cls._args_schema.tags.Element - _element.key = AAZStrArg( - options=["key"], - help="tag name", - required=True, - ) - _element.value = AAZStrArg( - options=["value"], - help="tag value", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PostRulesCreateOrUpdate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PostRulesCreateOrUpdate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("actionType", AAZStrType, ".action_type") - properties.set_prop("applications", AAZListType, ".applications") - properties.set_prop("auditComment", AAZStrType, ".audit_comment") - properties.set_prop("category", AAZObjectType, ".category") - properties.set_prop("decryptionRuleType", AAZStrType, ".decryption_rule_type") - properties.set_prop("description", AAZStrType, ".description") - properties.set_prop("destination", AAZObjectType, ".destination") - properties.set_prop("enableLogging", AAZStrType, ".enable_logging") - properties.set_prop("etag", AAZStrType, ".etag") - properties.set_prop("inboundInspectionCertificate", AAZStrType, ".inbound_inspection_certificate") - properties.set_prop("negateDestination", AAZStrType, ".negate_destination") - properties.set_prop("negateSource", AAZStrType, ".negate_source") - properties.set_prop("protocol", AAZStrType, ".protocol") - properties.set_prop("protocolPortList", AAZListType, ".protocol_port_list") - properties.set_prop("ruleName", AAZStrType, ".rule_name", typ_kwargs={"flags": {"required": True}}) - properties.set_prop("ruleState", AAZStrType, ".rule_state") - properties.set_prop("source", AAZObjectType, ".source") - properties.set_prop("tags", AAZListType, ".tags") - - applications = _builder.get(".properties.applications") - if applications is not None: - applications.set_elements(AAZStrType, ".") - - category = _builder.get(".properties.category") - if category is not None: - category.set_prop("feeds", AAZListType, ".feeds", typ_kwargs={"flags": {"required": True}}) - category.set_prop("urlCustom", AAZListType, ".url_custom", typ_kwargs={"flags": {"required": True}}) - - feeds = _builder.get(".properties.category.feeds") - if feeds is not None: - feeds.set_elements(AAZStrType, ".") - - url_custom = _builder.get(".properties.category.urlCustom") - if url_custom is not None: - url_custom.set_elements(AAZStrType, ".") - - destination = _builder.get(".properties.destination") - if destination is not None: - destination.set_prop("cidrs", AAZListType, ".cidrs") - destination.set_prop("countries", AAZListType, ".countries") - destination.set_prop("feeds", AAZListType, ".feeds") - destination.set_prop("fqdnLists", AAZListType, ".fqdn_lists") - destination.set_prop("prefixLists", AAZListType, ".prefix_lists") - - cidrs = _builder.get(".properties.destination.cidrs") - if cidrs is not None: - cidrs.set_elements(AAZStrType, ".") - - countries = _builder.get(".properties.destination.countries") - if countries is not None: - countries.set_elements(AAZStrType, ".") - - feeds = _builder.get(".properties.destination.feeds") - if feeds is not None: - feeds.set_elements(AAZStrType, ".") - - fqdn_lists = _builder.get(".properties.destination.fqdnLists") - if fqdn_lists is not None: - fqdn_lists.set_elements(AAZStrType, ".") - - prefix_lists = _builder.get(".properties.destination.prefixLists") - if prefix_lists is not None: - prefix_lists.set_elements(AAZStrType, ".") - - protocol_port_list = _builder.get(".properties.protocolPortList") - if protocol_port_list is not None: - protocol_port_list.set_elements(AAZStrType, ".") - - source = _builder.get(".properties.source") - if source is not None: - source.set_prop("cidrs", AAZListType, ".cidrs") - source.set_prop("countries", AAZListType, ".countries") - source.set_prop("feeds", AAZListType, ".feeds") - source.set_prop("prefixLists", AAZListType, ".prefix_lists") - - cidrs = _builder.get(".properties.source.cidrs") - if cidrs is not None: - cidrs.set_elements(AAZStrType, ".") - - countries = _builder.get(".properties.source.countries") - if countries is not None: - countries.set_elements(AAZStrType, ".") - - feeds = _builder.get(".properties.source.feeds") - if feeds is not None: - feeds.set_elements(AAZStrType, ".") - - prefix_lists = _builder.get(".properties.source.prefixLists") - if prefix_lists is not None: - prefix_lists.set_elements(AAZStrType, ".") - - tags = _builder.get(".properties.tags") - if tags is not None: - tags.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".properties.tags[]") - if _elements is not None: - _elements.set_prop("key", AAZStrType, ".key", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - - _schema_on_200_201 = cls._schema_on_200_201 - _schema_on_200_201.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.action_type = AAZStrType( - serialized_name="actionType", - ) - properties.applications = AAZListType() - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.category = AAZObjectType() - properties.decryption_rule_type = AAZStrType( - serialized_name="decryptionRuleType", - ) - properties.description = AAZStrType() - properties.destination = AAZObjectType() - properties.enable_logging = AAZStrType( - serialized_name="enableLogging", - ) - properties.etag = AAZStrType() - properties.inbound_inspection_certificate = AAZStrType( - serialized_name="inboundInspectionCertificate", - ) - properties.negate_destination = AAZStrType( - serialized_name="negateDestination", - ) - properties.negate_source = AAZStrType( - serialized_name="negateSource", - ) - properties.priority = AAZIntType( - flags={"read_only": True}, - ) - properties.protocol = AAZStrType() - properties.protocol_port_list = AAZListType( - serialized_name="protocolPortList", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - properties.rule_state = AAZStrType( - serialized_name="ruleState", - ) - properties.source = AAZObjectType() - properties.tags = AAZListType() - - applications = cls._schema_on_200_201.properties.applications - applications.Element = AAZStrType() - - category = cls._schema_on_200_201.properties.category - category.feeds = AAZListType( - flags={"required": True}, - ) - category.url_custom = AAZListType( - serialized_name="urlCustom", - flags={"required": True}, - ) - - feeds = cls._schema_on_200_201.properties.category.feeds - feeds.Element = AAZStrType() - - url_custom = cls._schema_on_200_201.properties.category.url_custom - url_custom.Element = AAZStrType() - - destination = cls._schema_on_200_201.properties.destination - destination.cidrs = AAZListType() - destination.countries = AAZListType() - destination.feeds = AAZListType() - destination.fqdn_lists = AAZListType( - serialized_name="fqdnLists", - ) - destination.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200_201.properties.destination.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200_201.properties.destination.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200_201.properties.destination.feeds - feeds.Element = AAZStrType() - - fqdn_lists = cls._schema_on_200_201.properties.destination.fqdn_lists - fqdn_lists.Element = AAZStrType() - - prefix_lists = cls._schema_on_200_201.properties.destination.prefix_lists - prefix_lists.Element = AAZStrType() - - protocol_port_list = cls._schema_on_200_201.properties.protocol_port_list - protocol_port_list.Element = AAZStrType() - - source = cls._schema_on_200_201.properties.source - source.cidrs = AAZListType() - source.countries = AAZListType() - source.feeds = AAZListType() - source.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200_201.properties.source.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200_201.properties.source.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200_201.properties.source.feeds - feeds.Element = AAZStrType() - - prefix_lists = cls._schema_on_200_201.properties.source.prefix_lists - prefix_lists.Element = AAZStrType() - - tags = cls._schema_on_200_201.properties.tags - tags.Element = AAZObjectType() - - _element = cls._schema_on_200_201.properties.tags.Element - _element.key = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200_201.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_delete.py deleted file mode 100644 index 0ce4c449c5a..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_delete.py +++ /dev/null @@ -1,157 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack post-rule delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete a PostRulesResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Post Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PostRulesDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class PostRulesDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_200(self, session): - pass - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_get_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_get_counter.py deleted file mode 100644 index 334b4e2601a..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_get_counter.py +++ /dev/null @@ -1,230 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack post-rule get-counter", -) -class GetCounter(AAZCommand): - """Get counters - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}/getcounters", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Post Rule priority", - required=True, - ) - _args_schema.firewall_name = AAZStrArg( - options=["--firewall-name"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PostRulesGetCounters(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PostRulesGetCounters(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/getCounters", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "firewallName", self.ctx.args.firewall_name, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.app_seen = AAZObjectType( - serialized_name="appSeen", - ) - _schema_on_200.firewall_name = AAZStrType( - serialized_name="firewallName", - ) - _schema_on_200.hit_count = AAZIntType( - serialized_name="hitCount", - ) - _schema_on_200.last_updated_timestamp = AAZStrType( - serialized_name="lastUpdatedTimestamp", - ) - _schema_on_200.priority = AAZStrType( - flags={"required": True}, - ) - _schema_on_200.request_timestamp = AAZStrType( - serialized_name="requestTimestamp", - ) - _schema_on_200.rule_list_name = AAZStrType( - serialized_name="ruleListName", - ) - _schema_on_200.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - _schema_on_200.rule_stack_name = AAZStrType( - serialized_name="ruleStackName", - ) - _schema_on_200.timestamp = AAZStrType() - - app_seen = cls._schema_on_200.app_seen - app_seen.app_seen_list = AAZListType( - serialized_name="appSeenList", - flags={"required": True}, - ) - app_seen.count = AAZIntType( - flags={"required": True}, - ) - - app_seen_list = cls._schema_on_200.app_seen.app_seen_list - app_seen_list.Element = AAZObjectType() - - _element = cls._schema_on_200.app_seen.app_seen_list.Element - _element.category = AAZStrType( - flags={"required": True}, - ) - _element.risk = AAZStrType( - flags={"required": True}, - ) - _element.standard_ports = AAZStrType( - serialized_name="standardPorts", - flags={"required": True}, - ) - _element.sub_category = AAZStrType( - serialized_name="subCategory", - flags={"required": True}, - ) - _element.tag = AAZStrType( - flags={"required": True}, - ) - _element.technology = AAZStrType( - flags={"required": True}, - ) - _element.title = AAZStrType( - flags={"required": True}, - ) - - return cls._schema_on_200 - - -class _GetCounterHelper: - """Helper class for GetCounter""" - - -__all__ = ["GetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_list.py deleted file mode 100644 index 2ebb8695aed..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_list.py +++ /dev/null @@ -1,321 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack post-rule list", -) -class List(AAZCommand): - """List PostRulesResource resources by Tenant - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PostRulesList(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class PostRulesList(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.action_type = AAZStrType( - serialized_name="actionType", - ) - properties.applications = AAZListType() - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.category = AAZObjectType() - properties.decryption_rule_type = AAZStrType( - serialized_name="decryptionRuleType", - ) - properties.description = AAZStrType() - properties.destination = AAZObjectType() - properties.enable_logging = AAZStrType( - serialized_name="enableLogging", - ) - properties.etag = AAZStrType() - properties.inbound_inspection_certificate = AAZStrType( - serialized_name="inboundInspectionCertificate", - ) - properties.negate_destination = AAZStrType( - serialized_name="negateDestination", - ) - properties.negate_source = AAZStrType( - serialized_name="negateSource", - ) - properties.priority = AAZIntType( - flags={"read_only": True}, - ) - properties.protocol = AAZStrType() - properties.protocol_port_list = AAZListType( - serialized_name="protocolPortList", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - properties.rule_state = AAZStrType( - serialized_name="ruleState", - ) - properties.source = AAZObjectType() - properties.tags = AAZListType() - - applications = cls._schema_on_200.value.Element.properties.applications - applications.Element = AAZStrType() - - category = cls._schema_on_200.value.Element.properties.category - category.feeds = AAZListType( - flags={"required": True}, - ) - category.url_custom = AAZListType( - serialized_name="urlCustom", - flags={"required": True}, - ) - - feeds = cls._schema_on_200.value.Element.properties.category.feeds - feeds.Element = AAZStrType() - - url_custom = cls._schema_on_200.value.Element.properties.category.url_custom - url_custom.Element = AAZStrType() - - destination = cls._schema_on_200.value.Element.properties.destination - destination.cidrs = AAZListType() - destination.countries = AAZListType() - destination.feeds = AAZListType() - destination.fqdn_lists = AAZListType( - serialized_name="fqdnLists", - ) - destination.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.value.Element.properties.destination.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.value.Element.properties.destination.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.value.Element.properties.destination.feeds - feeds.Element = AAZStrType() - - fqdn_lists = cls._schema_on_200.value.Element.properties.destination.fqdn_lists - fqdn_lists.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.value.Element.properties.destination.prefix_lists - prefix_lists.Element = AAZStrType() - - protocol_port_list = cls._schema_on_200.value.Element.properties.protocol_port_list - protocol_port_list.Element = AAZStrType() - - source = cls._schema_on_200.value.Element.properties.source - source.cidrs = AAZListType() - source.countries = AAZListType() - source.feeds = AAZListType() - source.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.value.Element.properties.source.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.value.Element.properties.source.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.value.Element.properties.source.feeds - feeds.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.value.Element.properties.source.prefix_lists - prefix_lists.Element = AAZStrType() - - tags = cls._schema_on_200.value.Element.properties.tags - tags.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.tags.Element - _element.key = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_refresh_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_refresh_counter.py deleted file mode 100644 index ec7bbae20b3..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_refresh_counter.py +++ /dev/null @@ -1,133 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack post-rule refresh-counter", -) -class RefreshCounter(AAZCommand): - """Refresh counters - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}/refreshcounters", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return None - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Post Rule priority", - required=True, - ) - _args_schema.firewall_name = AAZStrArg( - options=["--firewall-name"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PostRulesRefreshCounters(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class PostRulesRefreshCounters(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [204]: - return self.on_204(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/refreshCounters", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "firewallName", self.ctx.args.firewall_name, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_204(self, session): - pass - - -class _RefreshCounterHelper: - """Helper class for RefreshCounter""" - - -__all__ = ["RefreshCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_reset_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_reset_counter.py deleted file mode 100644 index d505c88dc0c..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_reset_counter.py +++ /dev/null @@ -1,179 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack post-rule reset-counter", -) -class ResetCounter(AAZCommand): - """Reset counters - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}/resetcounters", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Post Rule priority", - required=True, - ) - _args_schema.firewall_name = AAZStrArg( - options=["--firewall-name"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PostRulesResetCounters(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PostRulesResetCounters(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}/resetCounters", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "firewallName", self.ctx.args.firewall_name, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.firewall_name = AAZStrType( - serialized_name="firewallName", - ) - _schema_on_200.priority = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.rule_list_name = AAZStrType( - serialized_name="ruleListName", - ) - _schema_on_200.rule_name = AAZStrType( - serialized_name="ruleName", - ) - _schema_on_200.rule_stack_name = AAZStrType( - serialized_name="ruleStackName", - ) - - return cls._schema_on_200 - - -class _ResetCounterHelper: - """Helper class for ResetCounter""" - - -__all__ = ["ResetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_show.py deleted file mode 100644 index 2bae3320b19..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_show.py +++ /dev/null @@ -1,319 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack post-rule show", -) -class Show(AAZCommand): - """Get a PostRulesResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Post Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PostRulesGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PostRulesGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.action_type = AAZStrType( - serialized_name="actionType", - ) - properties.applications = AAZListType() - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.category = AAZObjectType() - properties.decryption_rule_type = AAZStrType( - serialized_name="decryptionRuleType", - ) - properties.description = AAZStrType() - properties.destination = AAZObjectType() - properties.enable_logging = AAZStrType( - serialized_name="enableLogging", - ) - properties.etag = AAZStrType() - properties.inbound_inspection_certificate = AAZStrType( - serialized_name="inboundInspectionCertificate", - ) - properties.negate_destination = AAZStrType( - serialized_name="negateDestination", - ) - properties.negate_source = AAZStrType( - serialized_name="negateSource", - ) - properties.priority = AAZIntType( - flags={"read_only": True}, - ) - properties.protocol = AAZStrType() - properties.protocol_port_list = AAZListType( - serialized_name="protocolPortList", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - properties.rule_state = AAZStrType( - serialized_name="ruleState", - ) - properties.source = AAZObjectType() - properties.tags = AAZListType() - - applications = cls._schema_on_200.properties.applications - applications.Element = AAZStrType() - - category = cls._schema_on_200.properties.category - category.feeds = AAZListType( - flags={"required": True}, - ) - category.url_custom = AAZListType( - serialized_name="urlCustom", - flags={"required": True}, - ) - - feeds = cls._schema_on_200.properties.category.feeds - feeds.Element = AAZStrType() - - url_custom = cls._schema_on_200.properties.category.url_custom - url_custom.Element = AAZStrType() - - destination = cls._schema_on_200.properties.destination - destination.cidrs = AAZListType() - destination.countries = AAZListType() - destination.feeds = AAZListType() - destination.fqdn_lists = AAZListType( - serialized_name="fqdnLists", - ) - destination.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.properties.destination.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.properties.destination.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.properties.destination.feeds - feeds.Element = AAZStrType() - - fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists - fqdn_lists.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.properties.destination.prefix_lists - prefix_lists.Element = AAZStrType() - - protocol_port_list = cls._schema_on_200.properties.protocol_port_list - protocol_port_list.Element = AAZStrType() - - source = cls._schema_on_200.properties.source - source.cidrs = AAZListType() - source.countries = AAZListType() - source.feeds = AAZListType() - source.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.properties.source.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.properties.source.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.properties.source.feeds - feeds.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.properties.source.prefix_lists - prefix_lists.Element = AAZStrType() - - tags = cls._schema_on_200.properties.tags - tags.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.tags.Element - _element.key = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_wait.py deleted file mode 100644 index 49de866bd17..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/post_rule/_wait.py +++ /dev/null @@ -1,318 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack post-rule wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/postrules/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Post Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PostRulesGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) - return result - - class PostRulesGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/postRules/{priority}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.action_type = AAZStrType( - serialized_name="actionType", - ) - properties.applications = AAZListType() - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.category = AAZObjectType() - properties.decryption_rule_type = AAZStrType( - serialized_name="decryptionRuleType", - ) - properties.description = AAZStrType() - properties.destination = AAZObjectType() - properties.enable_logging = AAZStrType( - serialized_name="enableLogging", - ) - properties.etag = AAZStrType() - properties.inbound_inspection_certificate = AAZStrType( - serialized_name="inboundInspectionCertificate", - ) - properties.negate_destination = AAZStrType( - serialized_name="negateDestination", - ) - properties.negate_source = AAZStrType( - serialized_name="negateSource", - ) - properties.priority = AAZIntType( - flags={"read_only": True}, - ) - properties.protocol = AAZStrType() - properties.protocol_port_list = AAZListType( - serialized_name="protocolPortList", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - properties.rule_state = AAZStrType( - serialized_name="ruleState", - ) - properties.source = AAZObjectType() - properties.tags = AAZListType() - - applications = cls._schema_on_200.properties.applications - applications.Element = AAZStrType() - - category = cls._schema_on_200.properties.category - category.feeds = AAZListType( - flags={"required": True}, - ) - category.url_custom = AAZListType( - serialized_name="urlCustom", - flags={"required": True}, - ) - - feeds = cls._schema_on_200.properties.category.feeds - feeds.Element = AAZStrType() - - url_custom = cls._schema_on_200.properties.category.url_custom - url_custom.Element = AAZStrType() - - destination = cls._schema_on_200.properties.destination - destination.cidrs = AAZListType() - destination.countries = AAZListType() - destination.feeds = AAZListType() - destination.fqdn_lists = AAZListType( - serialized_name="fqdnLists", - ) - destination.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.properties.destination.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.properties.destination.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.properties.destination.feeds - feeds.Element = AAZStrType() - - fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists - fqdn_lists.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.properties.destination.prefix_lists - prefix_lists.Element = AAZStrType() - - protocol_port_list = cls._schema_on_200.properties.protocol_port_list - protocol_port_list.Element = AAZStrType() - - source = cls._schema_on_200.properties.source - source.cidrs = AAZListType() - source.countries = AAZListType() - source.feeds = AAZListType() - source.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.properties.source.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.properties.source.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.properties.source.feeds - feeds.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.properties.source.prefix_lists - prefix_lists.Element = AAZStrType() - - tags = cls._schema_on_200.properties.tags - tags.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.tags.Element - _element.key = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__cmd_group.py deleted file mode 100644 index 77c35a46d8b..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "palo-alto cloudngfw global-rulestack pre-rule", -) -class __CMDGroup(AAZCommandGroup): - """Manage global-rulestack pre-rule resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__init__.py deleted file mode 100644 index 060f7aff0e8..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/__init__.py +++ /dev/null @@ -1,19 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._create import * -from ._delete import * -from ._get_counter import * -from ._list import * -from ._refresh_counter import * -from ._reset_counter import * -from ._show import * -from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_create.py deleted file mode 100644 index e99f05131f6..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_create.py +++ /dev/null @@ -1,660 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack pre-rule create", -) -class Create(AAZCommand): - """Create a PreRulesResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Pre Rule priority", - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.action_type = AAZStrArg( - options=["--action-type"], - arg_group="Properties", - help="rule action", - enum={"Allow": "Allow", "DenyResetBoth": "DenyResetBoth", "DenyResetServer": "DenyResetServer", "DenySilent": "DenySilent"}, - ) - _args_schema.applications = AAZListArg( - options=["--applications"], - arg_group="Properties", - help="array of rule applications", - ) - _args_schema.audit_comment = AAZStrArg( - options=["--audit-comment"], - arg_group="Properties", - help="rule comment", - ) - _args_schema.category = AAZObjectArg( - options=["--category"], - arg_group="Properties", - help="rule category", - ) - _args_schema.decryption_rule_type = AAZStrArg( - options=["--decryption-rule-type"], - arg_group="Properties", - help="enable or disable decryption", - enum={"None": "None", "SSLInboundInspection": "SSLInboundInspection", "SSLOutboundInspection": "SSLOutboundInspection"}, - ) - _args_schema.description = AAZStrArg( - options=["--description"], - arg_group="Properties", - help="rule description", - ) - _args_schema.destination = AAZObjectArg( - options=["--destination"], - arg_group="Properties", - help="destination address", - ) - _args_schema.enable_logging = AAZStrArg( - options=["--enable-logging"], - arg_group="Properties", - help="enable or disable logging", - enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, - ) - _args_schema.etag = AAZStrArg( - options=["--etag"], - arg_group="Properties", - help="etag info", - ) - _args_schema.inbound_inspection_certificate = AAZStrArg( - options=["--inbound-inspection-certificate"], - arg_group="Properties", - help="inbound Inspection Certificate", - ) - _args_schema.negate_destination = AAZStrArg( - options=["--negate-destination"], - arg_group="Properties", - help="cidr should not be 'any'", - enum={"FALSE": "FALSE", "TRUE": "TRUE"}, - ) - _args_schema.negate_source = AAZStrArg( - options=["--negate-source"], - arg_group="Properties", - help="cidr should not be 'any'", - enum={"FALSE": "FALSE", "TRUE": "TRUE"}, - ) - _args_schema.protocol = AAZStrArg( - options=["--protocol"], - arg_group="Properties", - help="any, application-default, TCP:number, UDP:number", - default="application-default", - ) - _args_schema.protocol_port_list = AAZListArg( - options=["--protocol-port-list"], - arg_group="Properties", - help="prot port list", - ) - _args_schema.rule_name = AAZStrArg( - options=["--rule-name"], - arg_group="Properties", - help="rule name", - required=True, - ) - _args_schema.rule_state = AAZStrArg( - options=["--rule-state"], - arg_group="Properties", - help="state of this rule", - enum={"DISABLED": "DISABLED", "ENABLED": "ENABLED"}, - ) - _args_schema.source = AAZObjectArg( - options=["--source"], - arg_group="Properties", - help="source address", - ) - _args_schema.tags = AAZListArg( - options=["--tags"], - arg_group="Properties", - help="tag for rule", - ) - - applications = cls._args_schema.applications - applications.Element = AAZStrArg() - - category = cls._args_schema.category - category.feeds = AAZListArg( - options=["feeds"], - help="feed list", - required=True, - ) - category.url_custom = AAZListArg( - options=["url-custom"], - help="custom URL", - required=True, - ) - - feeds = cls._args_schema.category.feeds - feeds.Element = AAZStrArg() - - url_custom = cls._args_schema.category.url_custom - url_custom.Element = AAZStrArg() - - destination = cls._args_schema.destination - destination.cidrs = AAZListArg( - options=["cidrs"], - help="special value 'any'", - ) - destination.countries = AAZListArg( - options=["countries"], - help="list of countries", - ) - destination.feeds = AAZListArg( - options=["feeds"], - help="list of feeds", - ) - destination.fqdn_lists = AAZListArg( - options=["fqdn-lists"], - help="fqdn list", - ) - destination.prefix_lists = AAZListArg( - options=["prefix-lists"], - help="prefix list", - ) - - cidrs = cls._args_schema.destination.cidrs - cidrs.Element = AAZStrArg() - - countries = cls._args_schema.destination.countries - countries.Element = AAZStrArg() - - feeds = cls._args_schema.destination.feeds - feeds.Element = AAZStrArg() - - fqdn_lists = cls._args_schema.destination.fqdn_lists - fqdn_lists.Element = AAZStrArg() - - prefix_lists = cls._args_schema.destination.prefix_lists - prefix_lists.Element = AAZStrArg() - - protocol_port_list = cls._args_schema.protocol_port_list - protocol_port_list.Element = AAZStrArg() - - source = cls._args_schema.source - source.cidrs = AAZListArg( - options=["cidrs"], - help="special value 'any'", - ) - source.countries = AAZListArg( - options=["countries"], - help="list of countries", - ) - source.feeds = AAZListArg( - options=["feeds"], - help="list of feeds", - ) - source.prefix_lists = AAZListArg( - options=["prefix-lists"], - help="prefix list", - ) - - cidrs = cls._args_schema.source.cidrs - cidrs.Element = AAZStrArg() - - countries = cls._args_schema.source.countries - countries.Element = AAZStrArg() - - feeds = cls._args_schema.source.feeds - feeds.Element = AAZStrArg() - - prefix_lists = cls._args_schema.source.prefix_lists - prefix_lists.Element = AAZStrArg() - - tags = cls._args_schema.tags - tags.Element = AAZObjectArg() - - _element = cls._args_schema.tags.Element - _element.key = AAZStrArg( - options=["key"], - help="tag name", - required=True, - ) - _element.value = AAZStrArg( - options=["value"], - help="tag value", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PreRulesCreateOrUpdate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PreRulesCreateOrUpdate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("actionType", AAZStrType, ".action_type") - properties.set_prop("applications", AAZListType, ".applications") - properties.set_prop("auditComment", AAZStrType, ".audit_comment") - properties.set_prop("category", AAZObjectType, ".category") - properties.set_prop("decryptionRuleType", AAZStrType, ".decryption_rule_type") - properties.set_prop("description", AAZStrType, ".description") - properties.set_prop("destination", AAZObjectType, ".destination") - properties.set_prop("enableLogging", AAZStrType, ".enable_logging") - properties.set_prop("etag", AAZStrType, ".etag") - properties.set_prop("inboundInspectionCertificate", AAZStrType, ".inbound_inspection_certificate") - properties.set_prop("negateDestination", AAZStrType, ".negate_destination") - properties.set_prop("negateSource", AAZStrType, ".negate_source") - properties.set_prop("protocol", AAZStrType, ".protocol") - properties.set_prop("protocolPortList", AAZListType, ".protocol_port_list") - properties.set_prop("ruleName", AAZStrType, ".rule_name", typ_kwargs={"flags": {"required": True}}) - properties.set_prop("ruleState", AAZStrType, ".rule_state") - properties.set_prop("source", AAZObjectType, ".source") - properties.set_prop("tags", AAZListType, ".tags") - - applications = _builder.get(".properties.applications") - if applications is not None: - applications.set_elements(AAZStrType, ".") - - category = _builder.get(".properties.category") - if category is not None: - category.set_prop("feeds", AAZListType, ".feeds", typ_kwargs={"flags": {"required": True}}) - category.set_prop("urlCustom", AAZListType, ".url_custom", typ_kwargs={"flags": {"required": True}}) - - feeds = _builder.get(".properties.category.feeds") - if feeds is not None: - feeds.set_elements(AAZStrType, ".") - - url_custom = _builder.get(".properties.category.urlCustom") - if url_custom is not None: - url_custom.set_elements(AAZStrType, ".") - - destination = _builder.get(".properties.destination") - if destination is not None: - destination.set_prop("cidrs", AAZListType, ".cidrs") - destination.set_prop("countries", AAZListType, ".countries") - destination.set_prop("feeds", AAZListType, ".feeds") - destination.set_prop("fqdnLists", AAZListType, ".fqdn_lists") - destination.set_prop("prefixLists", AAZListType, ".prefix_lists") - - cidrs = _builder.get(".properties.destination.cidrs") - if cidrs is not None: - cidrs.set_elements(AAZStrType, ".") - - countries = _builder.get(".properties.destination.countries") - if countries is not None: - countries.set_elements(AAZStrType, ".") - - feeds = _builder.get(".properties.destination.feeds") - if feeds is not None: - feeds.set_elements(AAZStrType, ".") - - fqdn_lists = _builder.get(".properties.destination.fqdnLists") - if fqdn_lists is not None: - fqdn_lists.set_elements(AAZStrType, ".") - - prefix_lists = _builder.get(".properties.destination.prefixLists") - if prefix_lists is not None: - prefix_lists.set_elements(AAZStrType, ".") - - protocol_port_list = _builder.get(".properties.protocolPortList") - if protocol_port_list is not None: - protocol_port_list.set_elements(AAZStrType, ".") - - source = _builder.get(".properties.source") - if source is not None: - source.set_prop("cidrs", AAZListType, ".cidrs") - source.set_prop("countries", AAZListType, ".countries") - source.set_prop("feeds", AAZListType, ".feeds") - source.set_prop("prefixLists", AAZListType, ".prefix_lists") - - cidrs = _builder.get(".properties.source.cidrs") - if cidrs is not None: - cidrs.set_elements(AAZStrType, ".") - - countries = _builder.get(".properties.source.countries") - if countries is not None: - countries.set_elements(AAZStrType, ".") - - feeds = _builder.get(".properties.source.feeds") - if feeds is not None: - feeds.set_elements(AAZStrType, ".") - - prefix_lists = _builder.get(".properties.source.prefixLists") - if prefix_lists is not None: - prefix_lists.set_elements(AAZStrType, ".") - - tags = _builder.get(".properties.tags") - if tags is not None: - tags.set_elements(AAZObjectType, ".") - - _elements = _builder.get(".properties.tags[]") - if _elements is not None: - _elements.set_prop("key", AAZStrType, ".key", typ_kwargs={"flags": {"required": True}}) - _elements.set_prop("value", AAZStrType, ".value", typ_kwargs={"flags": {"required": True}}) - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - - _schema_on_200_201 = cls._schema_on_200_201 - _schema_on_200_201.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.action_type = AAZStrType( - serialized_name="actionType", - ) - properties.applications = AAZListType() - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.category = AAZObjectType() - properties.decryption_rule_type = AAZStrType( - serialized_name="decryptionRuleType", - ) - properties.description = AAZStrType() - properties.destination = AAZObjectType() - properties.enable_logging = AAZStrType( - serialized_name="enableLogging", - ) - properties.etag = AAZStrType() - properties.inbound_inspection_certificate = AAZStrType( - serialized_name="inboundInspectionCertificate", - ) - properties.negate_destination = AAZStrType( - serialized_name="negateDestination", - ) - properties.negate_source = AAZStrType( - serialized_name="negateSource", - ) - properties.priority = AAZIntType( - flags={"read_only": True}, - ) - properties.protocol = AAZStrType() - properties.protocol_port_list = AAZListType( - serialized_name="protocolPortList", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - properties.rule_state = AAZStrType( - serialized_name="ruleState", - ) - properties.source = AAZObjectType() - properties.tags = AAZListType() - - applications = cls._schema_on_200_201.properties.applications - applications.Element = AAZStrType() - - category = cls._schema_on_200_201.properties.category - category.feeds = AAZListType( - flags={"required": True}, - ) - category.url_custom = AAZListType( - serialized_name="urlCustom", - flags={"required": True}, - ) - - feeds = cls._schema_on_200_201.properties.category.feeds - feeds.Element = AAZStrType() - - url_custom = cls._schema_on_200_201.properties.category.url_custom - url_custom.Element = AAZStrType() - - destination = cls._schema_on_200_201.properties.destination - destination.cidrs = AAZListType() - destination.countries = AAZListType() - destination.feeds = AAZListType() - destination.fqdn_lists = AAZListType( - serialized_name="fqdnLists", - ) - destination.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200_201.properties.destination.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200_201.properties.destination.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200_201.properties.destination.feeds - feeds.Element = AAZStrType() - - fqdn_lists = cls._schema_on_200_201.properties.destination.fqdn_lists - fqdn_lists.Element = AAZStrType() - - prefix_lists = cls._schema_on_200_201.properties.destination.prefix_lists - prefix_lists.Element = AAZStrType() - - protocol_port_list = cls._schema_on_200_201.properties.protocol_port_list - protocol_port_list.Element = AAZStrType() - - source = cls._schema_on_200_201.properties.source - source.cidrs = AAZListType() - source.countries = AAZListType() - source.feeds = AAZListType() - source.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200_201.properties.source.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200_201.properties.source.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200_201.properties.source.feeds - feeds.Element = AAZStrType() - - prefix_lists = cls._schema_on_200_201.properties.source.prefix_lists - prefix_lists.Element = AAZStrType() - - tags = cls._schema_on_200_201.properties.tags - tags.Element = AAZObjectType() - - _element = cls._schema_on_200_201.properties.tags.Element - _element.key = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200_201.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_delete.py deleted file mode 100644 index 0c5ceeb4f7e..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_delete.py +++ /dev/null @@ -1,157 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack pre-rule delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete a PreRulesResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Pre Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PreRulesDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class PreRulesDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_200(self, session): - pass - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_get_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_get_counter.py deleted file mode 100644 index 4d7d729f167..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_get_counter.py +++ /dev/null @@ -1,230 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack pre-rule get-counter", -) -class GetCounter(AAZCommand): - """Get counters - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}/getcounters", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Pre Rule priority", - required=True, - ) - _args_schema.firewall_name = AAZStrArg( - options=["--firewall-name"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PreRulesGetCounters(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PreRulesGetCounters(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/getCounters", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "firewallName", self.ctx.args.firewall_name, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.app_seen = AAZObjectType( - serialized_name="appSeen", - ) - _schema_on_200.firewall_name = AAZStrType( - serialized_name="firewallName", - ) - _schema_on_200.hit_count = AAZIntType( - serialized_name="hitCount", - ) - _schema_on_200.last_updated_timestamp = AAZStrType( - serialized_name="lastUpdatedTimestamp", - ) - _schema_on_200.priority = AAZStrType( - flags={"required": True}, - ) - _schema_on_200.request_timestamp = AAZStrType( - serialized_name="requestTimestamp", - ) - _schema_on_200.rule_list_name = AAZStrType( - serialized_name="ruleListName", - ) - _schema_on_200.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - _schema_on_200.rule_stack_name = AAZStrType( - serialized_name="ruleStackName", - ) - _schema_on_200.timestamp = AAZStrType() - - app_seen = cls._schema_on_200.app_seen - app_seen.app_seen_list = AAZListType( - serialized_name="appSeenList", - flags={"required": True}, - ) - app_seen.count = AAZIntType( - flags={"required": True}, - ) - - app_seen_list = cls._schema_on_200.app_seen.app_seen_list - app_seen_list.Element = AAZObjectType() - - _element = cls._schema_on_200.app_seen.app_seen_list.Element - _element.category = AAZStrType( - flags={"required": True}, - ) - _element.risk = AAZStrType( - flags={"required": True}, - ) - _element.standard_ports = AAZStrType( - serialized_name="standardPorts", - flags={"required": True}, - ) - _element.sub_category = AAZStrType( - serialized_name="subCategory", - flags={"required": True}, - ) - _element.tag = AAZStrType( - flags={"required": True}, - ) - _element.technology = AAZStrType( - flags={"required": True}, - ) - _element.title = AAZStrType( - flags={"required": True}, - ) - - return cls._schema_on_200 - - -class _GetCounterHelper: - """Helper class for GetCounter""" - - -__all__ = ["GetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_list.py deleted file mode 100644 index 7fd0d7c9cd0..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_list.py +++ /dev/null @@ -1,321 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack pre-rule list", -) -class List(AAZCommand): - """List PreRulesResource resources by Tenant - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PreRulesList(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class PreRulesList(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.action_type = AAZStrType( - serialized_name="actionType", - ) - properties.applications = AAZListType() - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.category = AAZObjectType() - properties.decryption_rule_type = AAZStrType( - serialized_name="decryptionRuleType", - ) - properties.description = AAZStrType() - properties.destination = AAZObjectType() - properties.enable_logging = AAZStrType( - serialized_name="enableLogging", - ) - properties.etag = AAZStrType() - properties.inbound_inspection_certificate = AAZStrType( - serialized_name="inboundInspectionCertificate", - ) - properties.negate_destination = AAZStrType( - serialized_name="negateDestination", - ) - properties.negate_source = AAZStrType( - serialized_name="negateSource", - ) - properties.priority = AAZIntType( - flags={"read_only": True}, - ) - properties.protocol = AAZStrType() - properties.protocol_port_list = AAZListType( - serialized_name="protocolPortList", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - properties.rule_state = AAZStrType( - serialized_name="ruleState", - ) - properties.source = AAZObjectType() - properties.tags = AAZListType() - - applications = cls._schema_on_200.value.Element.properties.applications - applications.Element = AAZStrType() - - category = cls._schema_on_200.value.Element.properties.category - category.feeds = AAZListType( - flags={"required": True}, - ) - category.url_custom = AAZListType( - serialized_name="urlCustom", - flags={"required": True}, - ) - - feeds = cls._schema_on_200.value.Element.properties.category.feeds - feeds.Element = AAZStrType() - - url_custom = cls._schema_on_200.value.Element.properties.category.url_custom - url_custom.Element = AAZStrType() - - destination = cls._schema_on_200.value.Element.properties.destination - destination.cidrs = AAZListType() - destination.countries = AAZListType() - destination.feeds = AAZListType() - destination.fqdn_lists = AAZListType( - serialized_name="fqdnLists", - ) - destination.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.value.Element.properties.destination.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.value.Element.properties.destination.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.value.Element.properties.destination.feeds - feeds.Element = AAZStrType() - - fqdn_lists = cls._schema_on_200.value.Element.properties.destination.fqdn_lists - fqdn_lists.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.value.Element.properties.destination.prefix_lists - prefix_lists.Element = AAZStrType() - - protocol_port_list = cls._schema_on_200.value.Element.properties.protocol_port_list - protocol_port_list.Element = AAZStrType() - - source = cls._schema_on_200.value.Element.properties.source - source.cidrs = AAZListType() - source.countries = AAZListType() - source.feeds = AAZListType() - source.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.value.Element.properties.source.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.value.Element.properties.source.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.value.Element.properties.source.feeds - feeds.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.value.Element.properties.source.prefix_lists - prefix_lists.Element = AAZStrType() - - tags = cls._schema_on_200.value.Element.properties.tags - tags.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.tags.Element - _element.key = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_refresh_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_refresh_counter.py deleted file mode 100644 index 92e86bcbf83..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_refresh_counter.py +++ /dev/null @@ -1,133 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack pre-rule refresh-counter", -) -class RefreshCounter(AAZCommand): - """Refresh counters - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}/refreshcounters", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return None - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Pre Rule priority", - required=True, - ) - _args_schema.firewall_name = AAZStrArg( - options=["--firewall-name"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PreRulesRefreshCounters(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class PreRulesRefreshCounters(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [204]: - return self.on_204(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/refreshCounters", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "firewallName", self.ctx.args.firewall_name, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_204(self, session): - pass - - -class _RefreshCounterHelper: - """Helper class for RefreshCounter""" - - -__all__ = ["RefreshCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_reset_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_reset_counter.py deleted file mode 100644 index 7beb1a260e3..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_reset_counter.py +++ /dev/null @@ -1,179 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack pre-rule reset-counter", -) -class ResetCounter(AAZCommand): - """Reset counters - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}/resetcounters", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Pre Rule priority", - required=True, - ) - _args_schema.firewall_name = AAZStrArg( - options=["--firewall-name"], - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PreRulesResetCounters(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PreRulesResetCounters(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}/resetCounters", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "firewallName", self.ctx.args.firewall_name, - ), - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.firewall_name = AAZStrType( - serialized_name="firewallName", - ) - _schema_on_200.priority = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.rule_list_name = AAZStrType( - serialized_name="ruleListName", - ) - _schema_on_200.rule_name = AAZStrType( - serialized_name="ruleName", - ) - _schema_on_200.rule_stack_name = AAZStrType( - serialized_name="ruleStackName", - ) - - return cls._schema_on_200 - - -class _ResetCounterHelper: - """Helper class for ResetCounter""" - - -__all__ = ["ResetCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_show.py deleted file mode 100644 index 447e592442b..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_show.py +++ /dev/null @@ -1,319 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack pre-rule show", -) -class Show(AAZCommand): - """Get a PreRulesResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Pre Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PreRulesGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PreRulesGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.action_type = AAZStrType( - serialized_name="actionType", - ) - properties.applications = AAZListType() - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.category = AAZObjectType() - properties.decryption_rule_type = AAZStrType( - serialized_name="decryptionRuleType", - ) - properties.description = AAZStrType() - properties.destination = AAZObjectType() - properties.enable_logging = AAZStrType( - serialized_name="enableLogging", - ) - properties.etag = AAZStrType() - properties.inbound_inspection_certificate = AAZStrType( - serialized_name="inboundInspectionCertificate", - ) - properties.negate_destination = AAZStrType( - serialized_name="negateDestination", - ) - properties.negate_source = AAZStrType( - serialized_name="negateSource", - ) - properties.priority = AAZIntType( - flags={"read_only": True}, - ) - properties.protocol = AAZStrType() - properties.protocol_port_list = AAZListType( - serialized_name="protocolPortList", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - properties.rule_state = AAZStrType( - serialized_name="ruleState", - ) - properties.source = AAZObjectType() - properties.tags = AAZListType() - - applications = cls._schema_on_200.properties.applications - applications.Element = AAZStrType() - - category = cls._schema_on_200.properties.category - category.feeds = AAZListType( - flags={"required": True}, - ) - category.url_custom = AAZListType( - serialized_name="urlCustom", - flags={"required": True}, - ) - - feeds = cls._schema_on_200.properties.category.feeds - feeds.Element = AAZStrType() - - url_custom = cls._schema_on_200.properties.category.url_custom - url_custom.Element = AAZStrType() - - destination = cls._schema_on_200.properties.destination - destination.cidrs = AAZListType() - destination.countries = AAZListType() - destination.feeds = AAZListType() - destination.fqdn_lists = AAZListType( - serialized_name="fqdnLists", - ) - destination.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.properties.destination.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.properties.destination.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.properties.destination.feeds - feeds.Element = AAZStrType() - - fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists - fqdn_lists.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.properties.destination.prefix_lists - prefix_lists.Element = AAZStrType() - - protocol_port_list = cls._schema_on_200.properties.protocol_port_list - protocol_port_list.Element = AAZStrType() - - source = cls._schema_on_200.properties.source - source.cidrs = AAZListType() - source.countries = AAZListType() - source.feeds = AAZListType() - source.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.properties.source.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.properties.source.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.properties.source.feeds - feeds.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.properties.source.prefix_lists - prefix_lists.Element = AAZStrType() - - tags = cls._schema_on_200.properties.tags - tags.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.tags.Element - _element.key = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_wait.py deleted file mode 100644 index 412749e23b9..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/pre_rule/_wait.py +++ /dev/null @@ -1,318 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack pre-rule wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prerules/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.priority = AAZStrArg( - options=["--priority"], - help="Pre Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PreRulesGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) - return result - - class PreRulesGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/preRules/{priority}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "priority", self.ctx.args.priority, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.action_type = AAZStrType( - serialized_name="actionType", - ) - properties.applications = AAZListType() - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.category = AAZObjectType() - properties.decryption_rule_type = AAZStrType( - serialized_name="decryptionRuleType", - ) - properties.description = AAZStrType() - properties.destination = AAZObjectType() - properties.enable_logging = AAZStrType( - serialized_name="enableLogging", - ) - properties.etag = AAZStrType() - properties.inbound_inspection_certificate = AAZStrType( - serialized_name="inboundInspectionCertificate", - ) - properties.negate_destination = AAZStrType( - serialized_name="negateDestination", - ) - properties.negate_source = AAZStrType( - serialized_name="negateSource", - ) - properties.priority = AAZIntType( - flags={"read_only": True}, - ) - properties.protocol = AAZStrType() - properties.protocol_port_list = AAZListType( - serialized_name="protocolPortList", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - properties.rule_name = AAZStrType( - serialized_name="ruleName", - flags={"required": True}, - ) - properties.rule_state = AAZStrType( - serialized_name="ruleState", - ) - properties.source = AAZObjectType() - properties.tags = AAZListType() - - applications = cls._schema_on_200.properties.applications - applications.Element = AAZStrType() - - category = cls._schema_on_200.properties.category - category.feeds = AAZListType( - flags={"required": True}, - ) - category.url_custom = AAZListType( - serialized_name="urlCustom", - flags={"required": True}, - ) - - feeds = cls._schema_on_200.properties.category.feeds - feeds.Element = AAZStrType() - - url_custom = cls._schema_on_200.properties.category.url_custom - url_custom.Element = AAZStrType() - - destination = cls._schema_on_200.properties.destination - destination.cidrs = AAZListType() - destination.countries = AAZListType() - destination.feeds = AAZListType() - destination.fqdn_lists = AAZListType( - serialized_name="fqdnLists", - ) - destination.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.properties.destination.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.properties.destination.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.properties.destination.feeds - feeds.Element = AAZStrType() - - fqdn_lists = cls._schema_on_200.properties.destination.fqdn_lists - fqdn_lists.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.properties.destination.prefix_lists - prefix_lists.Element = AAZStrType() - - protocol_port_list = cls._schema_on_200.properties.protocol_port_list - protocol_port_list.Element = AAZStrType() - - source = cls._schema_on_200.properties.source - source.cidrs = AAZListType() - source.countries = AAZListType() - source.feeds = AAZListType() - source.prefix_lists = AAZListType( - serialized_name="prefixLists", - ) - - cidrs = cls._schema_on_200.properties.source.cidrs - cidrs.Element = AAZStrType() - - countries = cls._schema_on_200.properties.source.countries - countries.Element = AAZStrType() - - feeds = cls._schema_on_200.properties.source.feeds - feeds.Element = AAZStrType() - - prefix_lists = cls._schema_on_200.properties.source.prefix_lists - prefix_lists.Element = AAZStrType() - - tags = cls._schema_on_200.properties.tags - tags.Element = AAZObjectType() - - _element = cls._schema_on_200.properties.tags.Element - _element.key = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__cmd_group.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__cmd_group.py deleted file mode 100644 index b5b7a122120..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "palo-alto cloudngfw global-rulestack prefixlist", -) -class __CMDGroup(AAZCommandGroup): - """Manage global-rulestack pre-rule resource - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__init__.py deleted file mode 100644 index 2d1a2078686..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._create import * -from ._delete import * -from ._list import * -from ._show import * -from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_create.py deleted file mode 100644 index 6fb23808743..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_create.py +++ /dev/null @@ -1,281 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack prefixlist create", -) -class Create(AAZCommand): - """Create a PrefixListGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="Local Rule priority", - required=True, - ) - - # define Arg Group "Properties" - - _args_schema = cls._args_schema - _args_schema.audit_comment = AAZStrArg( - options=["--audit-comment"], - arg_group="Properties", - help="comment for this object", - ) - _args_schema.description = AAZStrArg( - options=["--description"], - arg_group="Properties", - help="prefix description", - ) - _args_schema.etag = AAZStrArg( - options=["--etag"], - arg_group="Properties", - help="etag info", - ) - _args_schema.prefix_list = AAZListArg( - options=["--prefix-list"], - arg_group="Properties", - help="prefix list", - required=True, - ) - - prefix_list = cls._args_schema.prefix_list - prefix_list.Element = AAZStrArg() - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PrefixListGlobalRulestackCreateOrUpdate(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PrefixListGlobalRulestackCreateOrUpdate(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200, 201]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200_201, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "PUT" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Content-Type", "application/json", - ), - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - @property - def content(self): - _content_value, _builder = self.new_content_builder( - self.ctx.args, - typ=AAZObjectType, - typ_kwargs={"flags": {"required": True, "client_flatten": True}} - ) - _builder.set_prop("properties", AAZObjectType, ".", typ_kwargs={"flags": {"required": True, "client_flatten": True}}) - - properties = _builder.get(".properties") - if properties is not None: - properties.set_prop("auditComment", AAZStrType, ".audit_comment") - properties.set_prop("description", AAZStrType, ".description") - properties.set_prop("etag", AAZStrType, ".etag") - properties.set_prop("prefixList", AAZListType, ".prefix_list", typ_kwargs={"flags": {"required": True}}) - - prefix_list = _builder.get(".properties.prefixList") - if prefix_list is not None: - prefix_list.set_elements(AAZStrType, ".") - - return self.serialize_content(_content_value) - - def on_200_201(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200_201 - ) - - _schema_on_200_201 = None - - @classmethod - def _build_schema_on_200_201(cls): - if cls._schema_on_200_201 is not None: - return cls._schema_on_200_201 - - cls._schema_on_200_201 = AAZObjectType() - - _schema_on_200_201 = cls._schema_on_200_201 - _schema_on_200_201.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200_201.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200_201.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200_201.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200_201.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.prefix_list = AAZListType( - serialized_name="prefixList", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - prefix_list = cls._schema_on_200_201.properties.prefix_list - prefix_list.Element = AAZStrType() - - system_data = cls._schema_on_200_201.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200_201 - - -class _CreateHelper: - """Helper class for Create""" - - -__all__ = ["Create"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_delete.py deleted file mode 100644 index 90e62b9a5e8..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_delete.py +++ /dev/null @@ -1,157 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack prefixlist delete", - confirmation="Are you sure you want to perform this operation?", -) -class Delete(AAZCommand): - """Delete a PrefixListGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists/{}", "2022-08-29"], - ] - } - - AZ_SUPPORT_NO_WAIT = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_lro_poller(self._execute_operations, None) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="Local Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - yield self.PrefixListGlobalRulestackDelete(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - class PrefixListGlobalRulestackDelete(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [202]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [200]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_200, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - if session.http_response.status_code in [204]: - return self.client.build_lro_polling( - self.ctx.args.no_wait, - session, - self.on_204, - self.on_error, - lro_options={"final-state-via": "azure-async-operation"}, - path_format_arguments=self.url_parameters, - ) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "DELETE" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - def on_200(self, session): - pass - - def on_204(self, session): - pass - - -class _DeleteHelper: - """Helper class for Delete""" - - -__all__ = ["Delete"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_list.py deleted file mode 100644 index 4ffab5c9a87..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_list.py +++ /dev/null @@ -1,213 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack prefixlist list", -) -class List(AAZCommand): - """List PrefixListGlobalRulestackResource resources by Tenant - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PrefixListGlobalRulestackList(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class PrefixListGlobalRulestackList(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.prefix_list = AAZListType( - serialized_name="prefixList", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - prefix_list = cls._schema_on_200.value.Element.properties.prefix_list - prefix_list.Element = AAZStrType() - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_show.py deleted file mode 100644 index cdf272dceba..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_show.py +++ /dev/null @@ -1,211 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack prefixlist show", -) -class Show(AAZCommand): - """Get a PrefixListGlobalRulestackResource - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="Local Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PrefixListGlobalRulestackGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class PrefixListGlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.prefix_list = AAZListType( - serialized_name="prefixList", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - prefix_list = cls._schema_on_200.properties.prefix_list - prefix_list.Element = AAZStrType() - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ShowHelper: - """Helper class for Show""" - - -__all__ = ["Show"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_wait.py deleted file mode 100644 index 5fdf233e907..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/global_rulestack/prefixlist/_wait.py +++ /dev/null @@ -1,210 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw global-rulestack prefixlist wait", -) -class Wait(AAZWaitCommand): - """Place the CLI in a waiting state until a condition is met. - """ - - _aaz_info = { - "resources": [ - ["mgmt-plane", "/providers/paloaltonetworks.cloudngfw/globalrulestacks/{}/prefixlists/{}", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.global_rulestack_name = AAZStrArg( - options=["--global-rulestack-name"], - help="GlobalRulestack resource name", - required=True, - ) - _args_schema.name = AAZStrArg( - options=["--name"], - help="Local Rule priority", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.PrefixListGlobalRulestackGet(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=False) - return result - - class PrefixListGlobalRulestackGet(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/providers/PaloAltoNetworks.Cloudngfw/globalRulestacks/{globalRulestackName}/prefixlists/{name}", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "globalRulestackName", self.ctx.args.global_rulestack_name, - required=True, - ), - **self.serialize_url_param( - "name", self.ctx.args.name, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.id = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.name = AAZStrType( - flags={"read_only": True}, - ) - _schema_on_200.properties = AAZObjectType( - flags={"required": True, "client_flatten": True}, - ) - _schema_on_200.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _schema_on_200.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.properties - properties.audit_comment = AAZStrType( - serialized_name="auditComment", - ) - properties.description = AAZStrType() - properties.etag = AAZStrType() - properties.prefix_list = AAZListType( - serialized_name="prefixList", - flags={"required": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - ) - - prefix_list = cls._schema_on_200.properties.prefix_list - prefix_list.Element = AAZStrType() - - system_data = cls._schema_on_200.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _WaitHelper: - """Helper class for Wait""" - - -__all__ = ["Wait"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py index 94b731888a4..07eb6eda06f 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py @@ -13,7 +13,6 @@ @register_command( "palo-alto cloudngfw local-rulestack delete", - confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete a LocalRulestackResource diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py index 87490cc0462..a0c62f29be4 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py index e2166392650..94f767dfcf2 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py index 88897af06d5..71b0a4a9945 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py index 26a22475a24..c754ccf7288 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py index f4d746b7f2b..398b7411eac 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py index 4180f0bd2b7..8d7147598c3 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py index 2e9792e2463..6b367979c9d 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py index ca237b4a9a8..0738dae1542 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py index 27fa9e7b8c5..9c3c38a0094 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py @@ -42,7 +42,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.local_rulestack_name = AAZStrArg( - options=["--local-rulestack-name"], + options=["-n", "--name", "--local-rulestack-name"], help="LocalRulestack resource name", required=True, id_part="name", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py index 91fe4acd0b1..25f8aaf2a5e 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py @@ -13,7 +13,6 @@ @register_command( "palo-alto cloudngfw local-rulestack certificate delete", - confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete a CertificateObjectLocalRulestackResource diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py index 28f80df436e..c80e2a180d1 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py @@ -13,7 +13,6 @@ @register_command( "palo-alto cloudngfw local-rulestack fqdnlist delete", - confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete a FqdnListLocalRulestackResource diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py index c2ed6ce8dc7..e4e27a4b84c 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py @@ -48,7 +48,7 @@ def _build_arguments_schema(cls, *args, **kwargs): required=True, ) _args_schema.priority = AAZStrArg( - options=["-n", "--name", "--priority"], + options=["--priority"], help="Local Rule priority", required=True, ) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py index 11ea1a68aae..73014d65dc8 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py @@ -13,7 +13,6 @@ @register_command( "palo-alto cloudngfw local-rulestack local-rule delete", - confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete a LocalRulesResource diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py index 46345675337..0b3d3ed40be 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py @@ -13,7 +13,6 @@ @register_command( "palo-alto cloudngfw local-rulestack prefixlist delete", - confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete a PrefixListResource diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py index d7e8e38c9e0..2a3558b50df 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py @@ -117,6 +117,22 @@ def test_palo_alto_firewall_update(self, resource_group): self.cmd('az palo-alto cloudngfw firewall status list --resource-group {rg} -n {cloudngfw_firewall_name}') self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {rg} -n {cloudngfw_firewall_name}') + @AllowLargeResponse(size_kb=10240) + @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_firewall') + def test_palo_alto_firewall(self, resource_group): + self.kwargs.update({ + 'loc': 'eastus', + 'resource_group': 'CUSEUAP', + 'firewall_name': 'OsamaV3', + }) + + self.cmd('az palo-alto cloudngfw firewall save-log-profile --resource-group {resource_group} -n {firewall_name}') + self.cmd('az palo-alto cloudngfw firewall get-log-profile --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall get-support-info --resource-group {rg} -n {cloudngfw_firewall_name}') + + self.cmd('az palo-alto cloudngfw firewall status list --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {rg} -n {cloudngfw_firewall_name}') + @AllowLargeResponse(size_kb=10240) @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_networks_cloudngfw_global_rulestack') def test_palo_alto_networks_cloudngfw_global_rulestack(self, resource_group): @@ -220,62 +236,87 @@ def test_palo_alto_networks_cloudngfw_global_rulestack(self, resource_group): @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_networks_cloudngfw_local_rulestack') def test_palo_alto_networks_cloudngfw_local_rulestack(self, resource_group): self.kwargs.update({ - 'global_rulestack_name': 'test-cloudngfw-global-rulestack', - 'public_ip_name': 'test-public-ip', - 'local_rulestack_name': 'test-local-rulestack', - 'user_email': 'v-taoxuzeng@microsoft.com', - 'prefix': 'test-publicip-prefix', + 'local_rulestack_name': self.create_random_name('local_rulestack', 20), + 'certificate_name': self.create_random_name('certificate', 15), + 'fqdnlist_name': self.create_random_name('fqdnlist', 15), + 'local_rule_name': self.create_random_name('local_rule', 15), + 'prefixlist_name': self.create_random_name('prefixlist', 15), 'loc': 'eastus' }) - self.cmd('az palo-alto cloudngfw global-rulestack create -g {rg} -n {global_rulestack_name} ' + self.cmd('az palo-alto cloudngfw local-rulestack create -g {rg} -n {local_rulestack_name} ' '--identity {{"type":None}} ' '--location {loc} ' - '--associated-subscriptions [""] ' + '--associated-subscriptions ["2bf4a339-294d-4c25-b0b2-ef649e9f5c27"] ' '--default-mode IPS ' - '--description "global rulestacks" ' + '--description "local rulestacks" ' '--min-app-id-version "8.5.3" ' - '--pan-etag ' - '--pan-location {loc} ' - '--scope "GLOBAL" ' - '--security-services {{"anti-spyware-profile":"default","anti-virus-profile":"default","dns-subscription":"default","file-blocking-profile":"default","outbound-trust-certificate":"default","outbound-un-trust-certificate":"default","url-filtering-profile":"default","vulnerability-profile":"default"}}') - self.cmd('az palo-alto cloudngfw global-rulestack get-change-log') - self.cmd('az palo-alto cloudngfw global-rulestack list-advanced-security-object') - self.cmd('az palo-alto cloudngfw global-rulestack list-app-id') - self.cmd('az palo-alto cloudngfw global-rulestack list-country') - self.cmd('az palo-alto cloudngfw global-rulestack list-firewall') - self.cmd('az palo-alto cloudngfw global-rulestack list-predefined-url-category') - self.cmd('az palo-alto cloudngfw global-rulestack list-security-service') - self.cmd('az palo-alto cloudngfw global-rulestack revert') - - self.cmd('az palo-alto cloudngfw global-rulestack certificate create') - self.cmd('az palo-alto cloudngfw global-rulestack certificate list') - self.cmd('az palo-alto cloudngfw global-rulestack certificate show') - self.cmd('az palo-alto cloudngfw global-rulestack certificate delete') + '--scope "LOCAL" ' + '--security-services {{"vulnerability-profile":"BestPractice","anti-spyware-profile":"BestPractice","anti-virus-profile":"BestPractice","url-filtering-profile":"BestPractice","file-blocking-profile":"BestPractice","dns-subscription":"BestPractice"}}') + self.cmd('az palo-alto cloudngfw local-rulestack update -g {rg} -n {local_rulestack_name} --tags {{"tag-name":"value"}}') + self.cmd('az palo-alto cloudngfw local-rulestack get-change-log -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack get-support-info -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack list-advanced-security-object -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack list-app-id -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack list-country -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack list-firewall -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack list-predefined-url-category -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack list-security-service -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack revert -g {rg} -n {local_rulestack_name}') - self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist create') - self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist list') - self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist show') - self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist delete') + self.cmd('az palo-alto cloudngfw local-rulestack certificate create -g {rg} ' + '--local-rulestack-name {local_rulestack_name} ' + '--name {certificate_name} ' + '--audit-comment "comment" ' + '--certificate-self-signed "TRUE" ' + '--certificate-signer-resource-id "" ' + '--description "description" ') + self.cmd('az palo-alto cloudngfw local-rulestack certificate list -g {rg} --local-rulestack-name {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack certificate show -g {rg} --local-rulestack-name {local_rulestack_name} --name {certificate_name}') + self.cmd('az palo-alto cloudngfw local-rulestack certificate delete -g {rg} --local-rulestack-name {local_rulestack_name} --name {certificate_name}') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule create') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule list') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule show') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule get-counter') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule refresh-counter') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule reset-counter') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule delete') + self.cmd('az palo-alto cloudngfw local-rulestack fqdnlist create -g {rg} ' + '--local-rulestack-name {local_rulestack_name} ' + '--name {fqdnlist_name} ' + '--audit-comment "string" ' + '--description "description" ' + '--fqdn-list ["string1","string2"]') + self.cmd('az palo-alto cloudngfw local-rulestack fqdnlist list -g {rg} --local-rulestack-name {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack fqdnlist show -g {rg} --local-rulestack-name {local_rulestack_name} --name {fqdnlist_name}') + self.cmd('az palo-alto cloudngfw local-rulestack fqdnlist delete -g {rg} --local-rulestack-name {local_rulestack_name} --name {fqdnlist_name}') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule create') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule list') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule show') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule get-counter') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule refresh-counter') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule reset-counter') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule delete') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule create -g {rg} ' + '--local-rulestack-name {local_rulestack_name} ' + '--rule-name {local_rule_name} ' + '--priority "1" ' + '--action-type "Allow" ' + '--applications ["app1"] ' + '--audit-comment "example comment" ' + '--category {{"feeds":["feed"],"url-custom":["https://microsoft.com"]}} ' + '--decryption-rule-type "SSLOutboundInspection" ' + '--description "description of local rule" ' + '--destination {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"fqdn-lists":"FQDN1","prefix-lists": ["PL1"]}} ' + '--enable-logging "DISABLED" ' + '--inbound-inspection-certificate "cert1" ' + '--negate-destination "TRUE" ' + '--negate-source "TRUE" ' + '--rule-state "DISABLED" ' + '--source {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"prefix-lists": ["PL1"]}} ') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule list -g {rg} --local-rulestack-name {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule show -g {rg} --local-rulestack-name {local_rulestack_name} --rule-name {local_rule_name}') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule get-counter -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1"') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule refresh-counter -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1"') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule reset-counter -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1"') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule delete -g {rg} --local-rulestack-name {local_rulestack_name} --rule-name {local_rule_name}') - self.cmd('az palo-alto cloudngfw global-rulestack prefixlist create') - self.cmd('az palo-alto cloudngfw global-rulestack prefixlist list') - self.cmd('az palo-alto cloudngfw global-rulestack prefixlist show') - self.cmd('az palo-alto cloudngfw global-rulestack prefixlist delete') + self.cmd('az palo-alto cloudngfw local-rulestack prefixlist create -g {rg} ' + '--local-rulestack-name {local_rulestack_name} ' + '--name {prefixlist_name} ' + '--audit-comment "comment" ' + '--description "string" ' + '--etag "" ' + '--prefix-list ["1.0.0.0/24"]') + self.cmd('az palo-alto cloudngfw local-rulestack prefixlist list -g {rg} --local-rulestack-name {local_rulestack_name} ') + self.cmd('az palo-alto cloudngfw local-rulestack prefixlist show -g {rg} --local-rulestack-name {local_rulestack_name} --name {prefixlist_name}') + self.cmd('az palo-alto cloudngfw local-rulestack prefixlist delete -g {rg} --local-rulestack-name {local_rulestack_name} --name {prefixlist_name}') From f43dce7aae9b4370510d37aa78dcd81614fb1771 Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Tue, 25 Jul 2023 22:08:07 +0800 Subject: [PATCH 03/10] update --- ...loudngfw_local_rulestack_with_counter.yaml | 205 ++ .../test_palo_alto_firewall_v2.yaml | 266 +++ ...to_networks_cloudngfw_local_rulestack.yaml | 2067 +++++++++++++++++ .../tests/latest/test_palo_alto_networks.py | 276 +-- 4 files changed, 2610 insertions(+), 204 deletions(-) create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_cloudngfw_local_rulestack_with_counter.yaml create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_v2.yaml create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_cloudngfw_local_rulestack_with_counter.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_cloudngfw_local_rulestack_with_counter.yaml new file mode 100644 index 00000000000..7d916116b2f --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_cloudngfw_local_rulestack_with_counter.yaml @@ -0,0 +1,205 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule get-counter + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --priority + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/fw0718-lrs/localRules/1000000/getCounters?api-version=2022-08-29 + response: + body: + string: '{"priority":"1000000","ruleStackName":"fw0718-lrs","ruleListName":"LocalRule","ruleName":"cloud-ngfw-default-rule","hitCount":0,"timestamp":"2023-07-25T09:25:29.057606+00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '175' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:25:28 GMT + expires: + - '-1' + mise-correlation-id: + - c0c7a0e8-5423-41b6-897e-d37ded72b0b2 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule refresh-counter + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --priority + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/fw0718-lrs/localRules/1000000/refreshCounters?api-version=2022-08-29 + response: + body: + string: '{"error":{"code":"GatewayTimeout","message":"The gateway did not receive + a response from ''PaloAltoNetworks.Cloudngfw'' within the specified time period."}}' + headers: + cache-control: + - no-cache + connection: + - close + content-length: + - '154' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:26:20 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - service + status: + code: 504 + message: Gateway Timeout +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule refresh-counter + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --priority + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/fw0718-lrs/localRules/1000000/refreshCounters?api-version=2022-08-29 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:26:25 GMT + expires: + - '-1' + mise-correlation-id: + - 20b1c49a-998b-41ad-a07f-9d7aa6e8645b + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule reset-counter + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --priority + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/fw0718-lrs/localRules/1000000/resetCounters?api-version=2022-08-29 + response: + body: + string: '{"priority":"1000000","ruleStackName":"fw0718-lrs","ruleListName":"LocalRule","ruleName":"cloud-ngfw-default-rule"}' + headers: + cache-control: + - no-cache + content-length: + - '115' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:26:29 GMT + expires: + - '-1' + mise-correlation-id: + - 82897f78-fa9d-41a0-bd0d-096cefc056f3 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +version: 1 diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_v2.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_v2.yaml new file mode 100644 index 00000000000..5449a0f058a --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_v2.yaml @@ -0,0 +1,266 @@ +interactions: +- request: + body: '{"commonDestination": {"monitorConfigurations": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sudh_fire_test/providers/Microsoft.OperationalInsights/workspaces/testAnalyticsX", + "primaryKey": "7R5uguOLkTF6zByLV9ef5402y4dQnhiSlNMTKNSpEbjZoBrGrNnM2rD4E7+0v1yFg5y6h3RlrIa7th7qJnoHcQ==", + "secondaryKey": "7lmsLYTVizgkstJpno4fY6u36qmVw4rkaIfzhx82ymLIdYDy0wbq7Tdydkje3z50KbKsQnzhg8KAPFpEki/Buw==", + "subscriptionId": "2bf4a339-294d-4c25-b0b2-ef649e9f5c27", "workspace": "63e674d3-cc87-48c6-94cb-2d28a0b245fc"}}, + "logOption": "SAME_DESTINATION", "logType": "TRAFFIC"}' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall save-log-profile + Connection: + - keep-alive + Content-Length: + - '587' + Content-Type: + - application/json + ParameterSetName: + - --resource-group -n --log-option --log-type --common-destination + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/saveLogProfile?api-version=2022-08-29 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:10:07 GMT + expires: + - '-1' + mise-correlation-id: + - 5a7b3898-166e-4061-a76c-029801e655b8 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall get-log-profile + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/getLogProfile?api-version=2022-08-29 + response: + body: + string: '{"logType":"TRAFFIC","logOption":"SAME_DESTINATION","applicationInsights":{"id":null,"key":null},"commonDestination":{"storageConfigurations":null,"eventHubConfigurations":null,"monitorConfigurations":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sudh_fire_test/providers/Microsoft.OperationalInsights/workspaces/testAnalyticsX","subscriptionId":null,"workspace":"63e674d3-cc87-48c6-94cb-2d28a0b245fc","primaryKey":"7R5uguOLkTF6zByLV9ef5402y4dQnhiSlNMTKNSpEbjZoBrGrNnM2rD4E7+0v1yFg5y6h3RlrIa7th7qJnoHcQ==","secondaryKey":"7lmsLYTVizgkstJpno4fY6u36qmVw4rkaIfzhx82ymLIdYDy0wbq7Tdydkje3z50KbKsQnzhg8KAPFpEki/Buw=="}},"trafficLogDestination":null,"threatLogDestination":null,"decryptLogDestination":null}' + headers: + cache-control: + - no-cache + content-length: + - '728' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:10:11 GMT + expires: + - '-1' + mise-correlation-id: + - 35722f54-7038-41a1-92c6-c843f8412bab + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall get-support-info + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/getSupportInfo?api-version=2022-08-29 + response: + body: + string: '{"productSku":"PAN-CLOUD-NGFW-AZURE-PAYG","productSerial":null,"accountRegistered":"FALSE","accountId":null,"userDomainSupported":"TRUE","userRegistered":"FALSE","freeTrial":"TRUE","freeTrialDaysLeft":30,"freeTrialCreditLeft":0,"helpURL":"https://live.paloaltonetworks.com?productSku=PAN-CLOUD-NGFW-AZURE-PAYG","supportURL":"https://support.paloaltonetworks.com?productSku=PAN-CLOUD-NGFW-AZURE-PAYG&userEmail=v-taoxuzeng@microsoft.com","registerURL":"https://support.paloaltonetworks.com/Home/Register?tenantId=888d76fa-54b2-4ced-8ee5-aac1585adee7&productSku=PAN-CLOUD-NGFW-AZURE-PAYG&userEmail=v-taoxuzeng@microsoft.com"}' + headers: + cache-control: + - no-cache + content-length: + - '622' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:10:16 GMT + expires: + - '-1' + mise-correlation-id: + - 0d12eaa5-9401-4457-8f96-fe0a5f5d9761 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall status list + Connection: + - keep-alive + ParameterSetName: + - --resource-group -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/statuses?api-version=2022-08-29 + response: + body: + string: '{"value":[{"properties":{"isPanoramaManaged":"FALSE","healthStatus":"RED","healthReason":"Server + side error. You may file a ticket with CorrelationId: 41a6c8cf-a0b4-4efb-928d-648bc9d37413","provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '224' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:10:20 GMT + expires: + - '-1' + mise-correlation-id: + - f30469df-f77d-45c4-bcb7-9e608639bd54 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall status default show + Connection: + - keep-alive + ParameterSetName: + - --resource-group -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/statuses/default?api-version=2022-08-29 + response: + body: + string: '{"properties":{"isPanoramaManaged":"FALSE","healthStatus":"RED","healthReason":"Server + side error. You may file a ticket with CorrelationId: 69682620-895b-4923-bbe4-0665af468870","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '212' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:10:23 GMT + expires: + - '-1' + mise-correlation-id: + - a9664b56-4529-4036-8c81-ef95f75f8236 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +version: 1 diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml new file mode 100644 index 00000000000..602e3c0dc6d --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml @@ -0,0 +1,2067 @@ +interactions: +- request: + body: '{"identity": {"type": "None"}, "location": "eastus", "properties": {"defaultMode": + "IPS", "description": "local rulestacks", "minAppIdVersion": "8595-7473", "scope": + "LOCAL", "securityServices": {"antiSpywareProfile": "BestPractice", "antiVirusProfile": + "BestPractice", "dnsSubscription": "BestPractice", "fileBlockingProfile": "BestPractice", + "urlFilteringProfile": "BestPractice", "vulnerabilityProfile": "BestPractice"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + Content-Length: + - '424' + Content-Type: + - application/json + ParameterSetName: + - -g -n --identity --location --default-mode --description --min-app-id-version + --scope --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:49:50.5335203Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Accepted","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice","outboundUnTrustCertificate":null,"outboundTrustCertificate":null},"defaultMode":"IPS"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '1027' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:49:52 GMT + etag: + - '"0b00ad81-0000-0100-0000-64bf9ac00000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + mise-correlation-id: + - dcd68115-ca1d-49fc-b57a-809123f01300 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + ParameterSetName: + - -g -n --identity --location --default-mode --description --min-app-id-version + --scope --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-25T09:49:51.6325617Z"}' + headers: + cache-control: + - no-cache + content-length: + - '573' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:49:52 GMT + etag: + - '"6e00df70-0000-0100-0000-64bf9abf0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + ParameterSetName: + - -g -n --identity --location --default-mode --description --min-app-id-version + --scope --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-25T09:49:51.6325617Z"}' + headers: + cache-control: + - no-cache + content-length: + - '573' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:50:24 GMT + etag: + - '"6e00df70-0000-0100-0000-64bf9abf0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + ParameterSetName: + - -g -n --identity --location --default-mode --description --min-app-id-version + --scope --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-25T09:49:51.6325617Z","endTime":"2023-07-25T09:50:31.3669459Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '644' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:50:54 GMT + etag: + - '"6e002871-0000-0100-0000-64bf9ae70000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + ParameterSetName: + - -g -n --identity --location --default-mode --description --min-app-id-version + --scope --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:49:50.5335203Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"a51dad40-2ad0-11ee-9b89-e69a6f85f08a"}}' + headers: + cache-control: + - no-cache + content-length: + - '1011' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:50:54 GMT + etag: + - '"0b00ba81-0000-0100-0000-64bf9ae70000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack update + Connection: + - keep-alive + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:49:50.5335203Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"a51dad40-2ad0-11ee-9b89-e69a6f85f08a"}}' + headers: + cache-control: + - no-cache + content-length: + - '1011' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:50:57 GMT + etag: + - '"0b00ba81-0000-0100-0000-64bf9ae70000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"identity": {"type": "None"}, "location": "eastus", "properties": {"defaultMode": + "IPS", "description": "local rulestacks", "minAppIdVersion": "8595-7473", "panEtag": + "a51dad40-2ad0-11ee-9b89-e69a6f85f08a", "provisioningState": "Succeeded", "scope": + "LOCAL", "securityServices": {"antiSpywareProfile": "BestPractice", "antiVirusProfile": + "BestPractice", "dnsSubscription": "BestPractice", "fileBlockingProfile": "BestPractice", + "urlFilteringProfile": "BestPractice", "vulnerabilityProfile": "BestPractice"}}, + "tags": {"tag-name": "value"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack update + Connection: + - keep-alive + Content-Length: + - '540' + Content-Type: + - application/json + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:50:58.3131395Z"},"identity":{"type":"None"},"properties":{"panEtag":"a51dad40-2ad0-11ee-9b89-e69a6f85f08a","scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Accepted","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice","outboundUnTrustCertificate":null,"outboundTrustCertificate":null},"defaultMode":"IPS"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '1104' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:01 GMT + etag: + - '"0b00c181-0000-0100-0000-64bf9b020000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + mise-correlation-id: + - c6e70550-fa87-4d1d-bfb2-3bd650772377 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack update + Connection: + - keep-alive + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-25T09:50:58.7374602Z"}' + headers: + cache-control: + - no-cache + content-length: + - '573' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:01 GMT + etag: + - '"6e002e71-0000-0100-0000-64bf9b020000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack update + Connection: + - keep-alive + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-25T09:50:58.7374602Z","endTime":"2023-07-25T09:51:06.1976595Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '644' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:31 GMT + etag: + - '"6e002f71-0000-0100-0000-64bf9b0a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack update + Connection: + - keep-alive + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:50:58.3131395Z"},"identity":{"type":"None"},"properties":{"panEtag":"c523f018-2ad0-11ee-9b70-4ad68220d447","scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS"}}' + headers: + cache-control: + - no-cache + content-length: + - '1039' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:32 GMT + etag: + - '"0b00c681-0000-0100-0000-64bf9b0a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack get-change-log + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/getChangeLog?api-version=2022-08-29 + response: + body: + string: '{"changes":["Rulestack"],"lastCommitted":"2023-07-25T09:50:10.761900+00:00","lastModified":"2023-07-25T09:51:04.463988+00:00"}' + headers: + cache-control: + - no-cache + content-length: + - '126' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:35 GMT + expires: + - '-1' + mise-correlation-id: + - 4ca2cabe-cac6-4636-a073-fc87d0ffb542 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack get-support-info + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/getSupportInfo?api-version=2022-08-29 + response: + body: + string: '{"productSku":"PAN-CLOUD-NGFW-AZURE-PAYG","productSerial":null,"accountRegistered":"FALSE","accountId":null,"userDomainSupported":"TRUE","userRegistered":"FALSE","freeTrial":"TRUE","freeTrialDaysLeft":30,"freeTrialCreditLeft":0,"helpURL":"https://live.paloaltonetworks.com?productSku=PAN-CLOUD-NGFW-AZURE-PAYG","supportURL":"https://support.paloaltonetworks.com?productSku=PAN-CLOUD-NGFW-AZURE-PAYG&userEmail=v-taoxuzeng@microsoft.com","registerURL":"https://support.paloaltonetworks.com/Home/Register?tenantId=888d76fa-54b2-4ced-8ee5-aac1585adee7&productSku=PAN-CLOUD-NGFW-AZURE-PAYG&userEmail=v-taoxuzeng@microsoft.com"}' + headers: + cache-control: + - no-cache + content-length: + - '622' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:42 GMT + expires: + - '-1' + mise-correlation-id: + - ca08d2ef-81ab-4d5a-9295-28401ac051f8 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack list-app-id + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listAppIds?api-version=2022-08-29 + response: + body: + string: '{"value":["100bao","104apci-supervisory","104apci-unnumbered","104apci-unnumbered-startdt-act","104apci-unnumbered-startdt-con","104apci-unnumbered-stopdt-act","104apci-unnumbered-stopdt-con","104apci-unnumbered-test-act","104apci-unnumbered-test-con","104asdu-file-transfer","104asdu-file-transfer-type120","104asdu-file-transfer-type121","104asdu-file-transfer-type122","104asdu-file-transfer-type123","104asdu-file-transfer-type124","104asdu-file-transfer-type125","104asdu-file-transfer-type126","104asdu-file-transfer-type127","104asdu-param-control","104asdu-param-control-type110","104asdu-param-control-type111","104asdu-param-control-type112","104asdu-param-control-type113","104asdu-process-control","104asdu-process-control-type45","104asdu-process-control-type46","104asdu-process-control-type47","104asdu-process-control-type48","104asdu-process-control-type49","104asdu-process-control-type50","104asdu-process-control-type51","104asdu-process-control-type58","104asdu-process-control-type59","104asdu-process-control-type60","104asdu-process-control-type61","104asdu-process-control-type62","104asdu-process-control-type63","104asdu-process-control-type64","104asdu-process-monitor","104asdu-process-monitor-type1","104asdu-process-monitor-type10","104asdu-process-monitor-type11","104asdu-process-monitor-type12","104asdu-process-monitor-type13","104asdu-process-monitor-type14","104asdu-process-monitor-type15","104asdu-process-monitor-type16","104asdu-process-monitor-type17","104asdu-process-monitor-type18","104asdu-process-monitor-type19","104asdu-process-monitor-type2","104asdu-process-monitor-type20","104asdu-process-monitor-type21","104asdu-process-monitor-type3","104asdu-process-monitor-type30","104asdu-process-monitor-type31","104asdu-process-monitor-type32","104asdu-process-monitor-type33","104asdu-process-monitor-type34","104asdu-process-monitor-type35","104asdu-process-monitor-type36","104asdu-process-monitor-type37","104asdu-process-monitor-type38","104asdu-process-monitor-type39","104asdu-process-monitor-type4","104asdu-process-monitor-type40","104asdu-process-monitor-type5","104asdu-process-monitor-type6","104asdu-process-monitor-type7","104asdu-process-monitor-type8","104asdu-process-monitor-type9","104asdu-system-control","104asdu-system-control-type100","104asdu-system-control-type101","104asdu-system-control-type102","104asdu-system-control-type103","104asdu-system-control-type104","104asdu-system-control-type105","104asdu-system-control-type106","104asdu-system-control-type107","104asdu-system-monitor","104asdu-system-monitor-type70","1c-enterprise","1und1-mail","24sevenoffice","2ch-base","2ch-posting","360-safeguard-update","3pc","4shared","4sync","51.com-base","51.com-bbs","51.com-games","51.com-mail","51.com-music","51.com-posting","51.com-webdisk","7shifts","8x8"],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listAppIds?api-version=2022-08-29&$skipToken=Im5leHQtdG9rZW46ZXlKd2F5STZJQ0pCVUZCSlJGOU1TVk5VSXpnMU9UVXROelEzTXlJc0lDSnpheUk2SUNJNGVEZ2lmUT09XG4i"}' + headers: + cache-control: + - no-cache + content-length: + - '3218' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:44 GMT + expires: + - '-1' + mise-correlation-id: + - f263a4fa-9667-4740-a5cb-2ebc1f101e92 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1197' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack list-country + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listCountries?api-version=2022-08-29 + response: + body: + string: '{"value":[{"code":"A1","description":"Anonymous Proxy"},{"code":"A2","description":"Satellite + Provider"},{"code":"AD","description":"Andorra"},{"code":"AE","description":"United + Arab Emirates"},{"code":"AF","description":"Afghanistan"},{"code":"AG","description":"Antigua + And Barbuda"},{"code":"AI","description":"Anguilla"},{"code":"AL","description":"Albania"},{"code":"AM","description":"Armenia"},{"code":"AN","description":"Netherlands + Antilles"},{"code":"AO","description":"Angola"},{"code":"AP","description":"Asia + Pacific Region"},{"code":"AQ","description":"Antarctica"},{"code":"AR","description":"Argentina"},{"code":"AS","description":"American + Samoa"},{"code":"AT","description":"Austria"},{"code":"AU","description":"Australia"},{"code":"AW","description":"Aruba"},{"code":"AX","description":"Land + Islands"},{"code":"AZ","description":"Azerbaijan"},{"code":"BA","description":"Bosnia + And Herzegovina"},{"code":"BB","description":"Barbados"},{"code":"BD","description":"Bangladesh"},{"code":"BE","description":"Belgium"},{"code":"BF","description":"Burkina + Faso"},{"code":"BG","description":"Bulgaria"},{"code":"BH","description":"Bahrain"},{"code":"BI","description":"Burundi"},{"code":"BJ","description":"Benin"},{"code":"BL","description":"Saint + BarthLemy"},{"code":"BM","description":"Bermuda"},{"code":"BN","description":"Brunei + Darussalam"},{"code":"BO","description":"Bolivia Plurinational State Of"},{"code":"BQ","description":"Bonaire + Saint Eustatius And Saba"},{"code":"BR","description":"Brazil"},{"code":"BS","description":"Bahamas"},{"code":"BT","description":"Bhutan"},{"code":"BV","description":"Bouvet + Island"},{"code":"BW","description":"Botswana"},{"code":"BY","description":"Belarus"},{"code":"BZ","description":"Belize"},{"code":"CA","description":"Canada"},{"code":"CC","description":"Cocos + Islands"},{"code":"CD","description":"Congo The Democratic Republic Of The"},{"code":"CE","description":"Crimea"},{"code":"CF","description":"Central + African Republic"},{"code":"CG","description":"Congo"},{"code":"CH","description":"Switzerland"},{"code":"CI","description":"CTe + D Ivoire"},{"code":"CK","description":"Cook Islands"},{"code":"CL","description":"Chile"},{"code":"CM","description":"Cameroon"},{"code":"CN","description":"China"},{"code":"CO","description":"Colombia"},{"code":"CR","description":"Costa + Rica"},{"code":"CU","description":"Cuba"},{"code":"CV","description":"Cape + Verde"},{"code":"CW","description":"Curacao"},{"code":"CX","description":"Christmas + Island"},{"code":"CY","description":"Cyprus"},{"code":"CZ","description":"Czech + Republic"},{"code":"DE","description":"Germany"},{"code":"DJ","description":"Djibouti"},{"code":"DK","description":"Denmark"},{"code":"DM","description":"Dominica"},{"code":"DO","description":"Dominican + Republic"},{"code":"DZ","description":"Algeria"},{"code":"EC","description":"Ecuador"},{"code":"EE","description":"Estonia"},{"code":"EG","description":"Egypt"},{"code":"EH","description":"Western + Sahara"},{"code":"ER","description":"Eritrea"},{"code":"ES","description":"Spain"},{"code":"ET","description":"Ethiopia"},{"code":"EU","description":"European + Union"},{"code":"FI","description":"Finland"},{"code":"FJ","description":"Fiji"},{"code":"FK","description":"Falkland + Islands (Malvinas)"},{"code":"FM","description":"Micronesia Federated States + Of"},{"code":"FO","description":"Faroe Islands"},{"code":"FR","description":"France"},{"code":"GA","description":"Gabon"},{"code":"GB","description":"United + Kingdom"},{"code":"GD","description":"Grenada"},{"code":"GE","description":"Georgia"},{"code":"GF","description":"French + Guiana"},{"code":"GG","description":"Guernsey"},{"code":"GH","description":"Ghana"},{"code":"GI","description":"Gibraltar"},{"code":"GL","description":"Greenland"},{"code":"GM","description":"Gambia"},{"code":"GN","description":"Guinea"},{"code":"GP","description":"Guadeloupe"},{"code":"GQ","description":"Equatorial + Guinea"},{"code":"GR","description":"Greece"},{"code":"GS","description":"South + Georgia And The South Sandwich Islands"},{"code":"GT","description":"Guatemala"},{"code":"GU","description":"Guam"},{"code":"GW","description":"Guinea-Bissau"},{"code":"GY","description":"Guyana"}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listCountries?api-version=2022-08-29&$skipToken=Im5leHQtdG9rZW46ZXlKd2F5STZJQ0pIUlU5SlVGOURUMVZPVkZKWkl5SXNJQ0p6YXlJNklDSkhXU0o5XG4i"}' + headers: + cache-control: + - no-cache + content-length: + - '4584' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:45 GMT + expires: + - '-1' + mise-correlation-id: + - 71421fa7-2db7-4f69-9cc3-f94cd45c86fc + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack list-firewall + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listFirewalls?api-version=2022-08-29 + response: + body: + string: '{"value":[],"nextLink":null}' + headers: + cache-control: + - no-cache + content-length: + - '28' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:47 GMT + expires: + - '-1' + mise-correlation-id: + - cd5373ff-bea8-462d-911a-34cf7a995aec + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack list-predefined-url-category + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listPredefinedUrlCategories?api-version=2022-08-29 + response: + body: + string: '{"value":[{"action":"allow","name":"abortion"},{"action":"block","name":"abused-drugs"},{"action":"block","name":"adult"},{"action":"allow","name":"alcohol-and-tobacco"},{"action":"allow","name":"auctions"},{"action":"allow","name":"business-and-economy"},{"action":"block","name":"command-and-control"},{"action":"allow","name":"computer-and-internet-info"},{"action":"allow","name":"content-delivery-networks"},{"action":"allow","name":"copyright-infringement"},{"action":"alert","name":"cryptocurrency"},{"action":"allow","name":"dating"},{"action":"allow","name":"dynamic-dns"},{"action":"allow","name":"educational-institutions"},{"action":"allow","name":"entertainment-and-arts"},{"action":"allow","name":"extremism"},{"action":"allow","name":"financial-services"},{"action":"block","name":"gambling"},{"action":"allow","name":"games"},{"action":"allow","name":"government"},{"action":"block","name":"grayware"},{"action":"block","name":"hacking"},{"action":"allow","name":"health-and-medicine"},{"action":"alert","name":"high-risk"},{"action":"allow","name":"home-and-garden"},{"action":"allow","name":"hunting-and-fishing"},{"action":"allow","name":"insufficient-content"},{"action":"allow","name":"internet-communications-and-telephony"},{"action":"allow","name":"internet-portals"},{"action":"allow","name":"job-search"},{"action":"allow","name":"legal"},{"action":"allow","name":"low-risk"},{"action":"block","name":"malware"},{"action":"alert","name":"medium-risk"},{"action":"allow","name":"military"},{"action":"allow","name":"motor-vehicles"},{"action":"allow","name":"music"},{"action":"alert","name":"newly-registered-domain"},{"action":"allow","name":"news"},{"action":"allow","name":"not-resolved"},{"action":"allow","name":"nudity"},{"action":"allow","name":"online-storage-and-backup"},{"action":"allow","name":"parked"},{"action":"allow","name":"peer-to-peer"},{"action":"allow","name":"personal-sites-and-blogs"},{"action":"allow","name":"philosophy-and-political-advocacy"},{"action":"block","name":"phishing"},{"action":"allow","name":"private-ip-addresses"},{"action":"allow","name":"proxy-avoidance-and-anonymizers"},{"action":"block","name":"questionable"},{"action":"allow","name":"real-estate"},{"action":"alert","name":"real-time-detection"},{"action":"allow","name":"recreation-and-hobbies"},{"action":"allow","name":"reference-and-research"},{"action":"allow","name":"religion"},{"action":"allow","name":"search-engines"},{"action":"allow","name":"sex-education"},{"action":"allow","name":"shareware-and-freeware"},{"action":"allow","name":"shopping"},{"action":"allow","name":"social-networking"},{"action":"allow","name":"society"},{"action":"allow","name":"sports"},{"action":"allow","name":"stock-advice-and-tools"},{"action":"allow","name":"streaming-media"},{"action":"allow","name":"swimsuits-and-intimate-apparel"},{"action":"allow","name":"training-and-tools"},{"action":"allow","name":"translation"},{"action":"allow","name":"travel"},{"action":"allow","name":"unknown"},{"action":"block","name":"weapons"},{"action":"allow","name":"web-advertisements"},{"action":"allow","name":"web-based-email"},{"action":"allow","name":"web-hosting"}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listPredefinedUrlCategories?api-version=2022-08-29&$skipToken="}' + headers: + cache-control: + - no-cache + content-length: + - '3487' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:49 GMT + expires: + - '-1' + mise-correlation-id: + - 981da6e9-0096-4d9b-a47e-a2784920be9a + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack revert + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/revert?api-version=2022-08-29 + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:51:53 GMT + expires: + - '-1' + mise-correlation-id: + - 00ed642e-a9eb-4780-aa6c-70a86009f6f5 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack list-advanced-security-object + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --type + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listAdvancedSecurityObjects?type=feeds&api-version=2022-08-29 + response: + body: + string: '{"error":{"code":"ResourcePostActionFailed","message":"ResourcePostActionFailed: + Not Found"}}' + headers: + cache-control: + - no-cache + content-length: + - '93' + content-type: + - application/json + date: + - Tue, 25 Jul 2023 09:51:55 GMT + expires: + - '-1' + mise-correlation-id: + - 9209363a-58ae-4861-9bc3-14822960a5a8 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - service + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1198' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack list-security-service + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n --type + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/listSecurityServices?type=antiSpyware&api-version=2022-08-29 + response: + body: + string: '{"error":{"code":"ResourcePostActionFailed","message":"ResourcePostActionFailed: + Not Found"}}' + headers: + cache-control: + - no-cache + content-length: + - '93' + content-type: + - application/json + date: + - Tue, 25 Jul 2023 09:51:56 GMT + expires: + - '-1' + mise-correlation-id: + - 29222911-88f5-48d8-9e04-7b50ac93fa89 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-failure-cause: + - service + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 404 + message: Not Found +- request: + body: '{"properties": {"auditComment": "comment", "certificateSelfSigned": "TRUE", + "description": "description"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack certificate create + Connection: + - keep-alive + Content-Length: + - '106' + Content-Type: + - application/json + ParameterSetName: + - -g --local-rulestack-name --name --audit-comment --certificate-self-signed + --description + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"paloaltonetworks.cloudngfw/localrulestacks/certificates","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:51:57.8286612Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:51:57.8286612Z"},"properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"e64cecae-2ad0-11ee-991c-4ad68220d447","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '751' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:00 GMT + expires: + - '-1' + mise-correlation-id: + - 07b27ab3-4068-4cf4-9265-c911cd7b11b8 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack certificate list + Connection: + - keep-alive + ParameterSetName: + - -g --local-rulestack-name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates?api-version=2022-08-29 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"e64cecae-2ad0-11ee-991c-4ad68220d447","provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '494' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:04 GMT + expires: + - '-1' + mise-correlation-id: + - fb398093-d9c7-4489-9406-58155bf1aaaf + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack certificate show + Connection: + - keep-alive + ParameterSetName: + - -g --local-rulestack-name --name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"e64cecae-2ad0-11ee-991c-4ad68220d447","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '482' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:07 GMT + expires: + - '-1' + mise-correlation-id: + - 3f13b9f7-9c8c-4f49-a6d4-bf370de53039 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack certificate delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003?api-version=2022-08-29 + response: + body: + string: 'null' + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:11 GMT + expires: + - '-1' + mise-correlation-id: + - 9b83185b-392f-4bda-af74-b3357c0874dc + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"auditComment": "string", "description": "description", + "fqdnList": ["string1", "string2"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack fqdnlist create + Connection: + - keep-alive + Content-Length: + - '108' + Content-Type: + - application/json + ParameterSetName: + - -g --local-rulestack-name --name --audit-comment --description --fqdn-list + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"paloaltonetworks.cloudngfw/localrulestacks/fqdnlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:52:13.00251Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:52:13.00251Z"},"properties":{"description":"description","fqdnList":["string1","string2"],"etag":"ef2f5ece-2ad0-11ee-9b70-4ad68220d447","auditComment":"string","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '736' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:15 GMT + expires: + - '-1' + mise-correlation-id: + - 4b872071-c83f-4388-a60a-28e800185daa + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack fqdnlist list + Connection: + - keep-alive + ParameterSetName: + - -g --local-rulestack-name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists?api-version=2022-08-29 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"ef2f5ece-2ad0-11ee-9b70-4ad68220d447","auditComment":"string","provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '485' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:17 GMT + expires: + - '-1' + mise-correlation-id: + - c006bda2-9f77-4eca-a023-4962efa3f758 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack fqdnlist show + Connection: + - keep-alive + ParameterSetName: + - -g --local-rulestack-name --name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"ef2f5ece-2ad0-11ee-9b70-4ad68220d447","auditComment":"string","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '473' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:19 GMT + expires: + - '-1' + mise-correlation-id: + - b4a12c61-603d-48c0-b6d9-b352c8b1c2d4 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack fqdnlist delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004?api-version=2022-08-29 + response: + body: + string: 'null' + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:22 GMT + expires: + - '-1' + mise-correlation-id: + - 958f3393-4ce1-4a9a-b8a2-d0799d2428af + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"auditComment": "comment", "description": "string", "prefixList": + ["1.0.0.0/24"]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack prefixlist create + Connection: + - keep-alive + Content-Length: + - '98' + Content-Type: + - application/json + ParameterSetName: + - -g --local-rulestack-name --name --audit-comment --description --prefix-list + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"paloaltonetworks.cloudngfw/localrulestacks/prefixlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:52:23.8004361Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:52:23.8004361Z"},"properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"f5bd992c-2ad0-11ee-b95a-4ad68220d447","auditComment":"comment","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '739' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:26 GMT + expires: + - '-1' + mise-correlation-id: + - adca6e67-e074-4b3e-adf8-23fe60ee2842 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack prefixlist list + Connection: + - keep-alive + ParameterSetName: + - -g --local-rulestack-name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists?api-version=2022-08-29 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"f5bd992c-2ad0-11ee-b95a-4ad68220d447","auditComment":"comment","provisioningState":"Succeeded"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '482' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:28 GMT + expires: + - '-1' + mise-correlation-id: + - cd0325be-fdce-497a-991b-2784f986cf5d + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack prefixlist show + Connection: + - keep-alive + ParameterSetName: + - -g --local-rulestack-name --name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"f5bd992c-2ad0-11ee-b95a-4ad68220d447","auditComment":"comment","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '470' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:31 GMT + expires: + - '-1' + mise-correlation-id: + - 3c55be9b-1018-4779-aeed-6b092cbab081 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack prefixlist delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006?api-version=2022-08-29 + response: + body: + string: 'null' + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:33 GMT + expires: + - '-1' + mise-correlation-id: + - c68b678d-bed4-4c91-83fa-09efbbd27cf9 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: '{"properties": {"actionType": "Allow", "enableLogging": "DISABLED", "protocol": + "application-default", "ruleName": "local_rule000005", "ruleState": "DISABLED"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule create + Connection: + - keep-alive + Content-Length: + - '160' + Content-Type: + - application/json + ParameterSetName: + - -g --local-rulestack-name --rule-name --priority --action-type --enable-logging + --rule-state + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"paloaltonetworks.cloudngfw/localrulestacks/localrules","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:52:35.2212247Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:52:35.2212247Z"},"properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"fcb298a4-2ad0-11ee-9c46-4ad68220d447","provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '1054' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:37 GMT + expires: + - '-1' + mise-correlation-id: + - d7211e96-6934-4826-b3d7-9908a708cdf3 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule list + Connection: + - keep-alive + ParameterSetName: + - -g --local-rulestack-name + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules?api-version=2022-08-29 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"fcb298a4-2ad0-11ee-9c46-4ad68220d447"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1000000","name":"1000000","type":"localRulestacks/localRules","properties":{"ruleName":"cloud-ngfw-default-rule","priority":1000000,"ruleState":"ENABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"any","actionType":"Allow","enableLogging":"ENABLED","decryptionRuleType":"None","etag":"a500beec-2ad0-11ee-9b89-e69a6f85f08a"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1526' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:40 GMT + expires: + - '-1' + mise-correlation-id: + - 8db253f5-dcba-484a-8bba-d4f8dee78c33 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule show + Connection: + - keep-alive + ParameterSetName: + - -g --local-rulestack-name --priority + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"fcb298a4-2ad0-11ee-9c46-4ad68220d447"}}' + headers: + cache-control: + - no-cache + content-length: + - '753' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:42 GMT + expires: + - '-1' + mise-correlation-id: + - 5104e654-f30a-4c07-b250-59d26628b456 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --priority + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1?api-version=2022-08-29 + response: + body: + string: 'null' + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:45 GMT + expires: + - '-1' + mise-correlation-id: + - 08dd9ec4-d372-4593-a48b-4fdb53f25b14 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack local-rule delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g --local-rulestack-name --priority + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1000000?api-version=2022-08-29 + response: + body: + string: 'null' + headers: + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:48 GMT + expires: + - '-1' + mise-correlation-id: + - 4b857d0d-3023-4d6e-b39c-a34f44e71747 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:52 GMT + etag: + - '"0b00d481-0000-0100-0000-64bf9b740000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + mise-correlation-id: + - 45f31d0f-be2d-40b3-b49f-e536fae6ec08 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14998' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack delete + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Deleting","startTime":"2023-07-25T09:52:52.082905Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '572' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:52:52 GMT + etag: + - '"6e006271-0000-0100-0000-64bf9b740000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack delete + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-25T09:52:52.082905Z","endTime":"2023-07-25T09:52:54.1589364Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '643' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 25 Jul 2023 09:53:22 GMT + etag: + - '"6e006471-0000-0100-0000-64bf9b760000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py index 2a3558b50df..dca5ba21347 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py @@ -4,6 +4,7 @@ # # Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- +from azure.core.exceptions import HttpResponseError from azure.cli.testsdk.scenario_tests import AllowLargeResponse from azure.cli.testsdk import (ScenarioTest, ResourceGroupPreparer) @@ -15,32 +16,39 @@ class PaloAltoNetworksScenario(ScenarioTest): @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_networks_cloudngfw_firewall') def test_palo_alto_networks_cloudngfw_firewall(self, resource_group): self.kwargs.update({ - 'cloudngfw_firewall_name': self.create_random_name('firewall', 10), - 'public_ip_name': 'test-public-ip', + 'cloudngfw_firewall_name': self.create_random_name('firewall', 15), + # 'public_ip_name': 'test-public-ip', + 'public_ip_name': 'fw0718-public-ip', 'local_rulestack_name': 'test-local-rulestack', - 'user_email': 'v-taoxuzeng@microsoft.com', 'prefix': 'test-publicip-prefix', - 'loc': 'eastus' + 'subnet1': self.create_random_name('subnet1', 12), + 'subnet2': self.create_random_name('subnet2', 12), + 'loc': 'centraluseuap' }) - ip_prefix = self.cmd('az network public-ip prefix create -g {rg} -n {prefix} --length 28').get_output_in_json()['ipPrefix'] - self.kwargs.update({'ip_address': ip_prefix.split('/')[0]}) - public_ip = self.cmd('az network public-ip create -g {rg} -n {public_ip_name} --ip-address {ip_address} --public-ip-prefix {prefix}').get_output_in_json()['publicIp'] + # ip_prefix = self.cmd('az network public-ip prefix create -g {rg} -n {prefix} --length 28').get_output_in_json()['ipPrefix'] + # self.kwargs.update({'ip_address': ip_prefix.split('/')[0]}) + # public_ip = self.cmd('az network public-ip create -g {rg} -n {public_ip_name} --ip-address {ip_address} --public-ip-prefix {prefix}').get_output_in_json()['publicIp'] vnet = self.cmd('az network vnet create -g {rg} -n testvnet --address-prefix 10.0.0.0/16').get_output_in_json()['newVNet'] + subnet1 = self.cmd('az network vnet subnet create -g {rg} --vnet-name testvnet -n {subnet1}').get_output_in_json() + subnet2 = self.cmd('az network vnet subnet create -g {rg} --vnet-name testvnet -n {subnet2}').get_output_in_json() local_rulestack = self.cmd('az palo-alto cloudngfw local-rulestack create --local-rulestack-name testlrs -g {rg} -l eastus --default-mode "IPS" --scope "LOCAL" --pan-etag "9fa4e2c6-1b0c-11ee-b587-3e4c117c6534" --min-app-id-version "8595-7473" --security-services {{"vulnerability-profile":"BestPractice","anti-spyware-profile":"BestPractice","anti-virus-profile":"BestPractice","url-filtering-profile":"BestPractice","file-blocking-profile":"BestPractice","dns-subscription":"BestPractice"}}').get_output_in_json() - self.kwargs.update({'public_ip_id': public_ip['id'], 'vnet_id': vnet['id'], 'rulestack_id': local_rulestack['id']}) + self.kwargs.update({ + 'public_ip_id': "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/fw0718-public-ip", + 'vnet_id': vnet['id'], + 'rulestack_id': local_rulestack['id'], + 'trust_subnet': subnet1['id'], + 'un_trust_subnet': subnet2['id'] + }) self.cmd('az palo-alto cloudngfw firewall create ' '--name {cloudngfw_firewall_name} ' '-g {rg} ' - '--identity {{"type":None}} ' '--location eastus ' '--associated-rulestack {{"location":eastus,"resource-id":{rulestack_id}}} ' - '--dns-settings {{"dns-servers":[{{"address":{ip_address},"resource-id":{public_ip_id}}}],"enable-dns-proxy":DISABLED,"enabled-dns-type":CUSTOM}} ' - '--front-end-settings [{{"backend-configuration":{{"address":{{"address":{ip_address},"resource-id":{public_ip_id}}},"port":80}},"frontend-configuration":{{"address":{{"address":{ip_address},"resource-id":{public_ip_id}}},"port":80}},"name":frontendsetting1,"protocol":TCP}}] ' - '--is-panorama-managed True ' - '--marketplace-details {{"marketplace-subscription-status":NotStarted,"offer-id":pan_swfw_cloud_ngfw,"publisher-id":paloaltonetworks}} ' - '--network-profile {{"egress-nat-ip":[{{"address":{ip_address},"resource-id":{public_ip_id}}}],"enable-egress-nat":ENABLED,"network-type":VNET,"public-ips":[{{"address":{ip_address},"resource-id":{public_ip_id}}}],' - '"vnet-configuration":{{"ip-of-trust-subnet-for-udr":{{"address":10.0.0.0/16,"resource-id":{vnet_id}}},"trust-subnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"un-trust-subnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"vnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}}}},' - '"vwan-configuration":{{"ip-of-trust-subnet-for-udr":{{"address":10.0.0.0/16,"resource-id":{vnet_id}}},"trust-subnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"un-trust-subnet":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"vHub":{{"address-space":10.0.0.0/16,"resource-id":{vnet_id}}},"network-virtual-appliance-id":2bf4a339-294d-4c25-b0b2-ef649e9f5c12}}}} ' + '--dns-settings {{"enable-dns-proxy":DISABLED,"enabled-dns-type":CUSTOM}} ' + '--is-panorama-managed FALSE ' + '--marketplace-details {{"marketplace-subscription-status":Subscribed,"offer-id":pan_swfw_cloud_ngfw,"publisher-id":paloaltonetworks}} ' + '--network-profile {{"egress-nat-ip":[],"enable-egress-nat":DISABLED,"network-type":VNET,"public-ips":[{{"address":"20.112.141.94","resource-id":{public_ip_id}}}],' + '"vnet-configuration":{{"ip-of-trust-subnet-for-udr":{{"address":10.0.0.0/16}},"trust-subnet":{{"resource-id":{trust_subnet}}},"un-trust-subnet":{{"resource-id":{un_trust_subnet}}},"vnet":{{"resource-id":{vnet_id}}}}}}} ' '--panorama-config {{"config-string":bas64EncodedString}} --plan-data {{"billing-cycle":MONTHLY,"plan-id":panw-cloud-ngfw-payg,"usage-type":PAYG}} --no-wait') self.cmd('az palo-alto cloudngfw firewall wait --resource-group {rg} --name {cloudngfw_firewall_name} --created') self.cmd('az palo-alto cloudngfw firewall list --resource-group {rg}', @@ -52,8 +60,7 @@ def test_palo_alto_networks_cloudngfw_firewall(self, resource_group): self.check('associatedRulestack.resourceId', '{rulestack_id}'), self.check('dnsSettings.enableDnsProxy', 'DISABLED'), self.check('length(frontEndSettings)', 1), - self.check('identity.type', "None"), - self.check('isPanoramaManaged', "TRUE"), + self.check('isPanoramaManaged', "FALSE"), self.check('location', "eastus"), self.check('marketplaceDetails.marketplaceSubscriptionStatus', "NotStarted"), self.check('marketplaceDetails.offerId', "pan_swfw_cloud_ngfw"), @@ -62,214 +69,75 @@ def test_palo_alto_networks_cloudngfw_firewall(self, resource_group): self.check('length(networkProfile.egressNatIp)', 1), self.check('networkProfile.enableEgressNat', "ENABLED"), self.check('panoramaConfig.configString', "bas64EncodedString"), - self.check('planData.billingCycle', "MONTHLY") + self.check('planData.billingCycle', "MONTHLY"), + self.check('provisioningState', "Succeeded") ]) - # self.cmd('az palo-alto cloudngfw firewall update --name {cloudngfw_firewall_name} -g {rg} --tags {{"tagName":"value"}}') - # self.cmd('az palo-alto cloudngfw firewall show --name {cloudngfw_firewall_name} -g {rg}', self.check('tags.tagName', "value")) - - self.cmd('az palo-alto cloudngfw firewall save-log-profile --resource-group {rg} -n {cloudngfw_firewall_name} --log-option "SAME_DESTINATION" --log-type "TRAFFIC"') - self.cmd('az palo-alto cloudngfw firewall get-global-rulestack --resource-group {rg} -n {cloudngfw_firewall_name}') - self.cmd('az palo-alto cloudngfw firewall get-log-profile --resource-group {rg} -n {cloudngfw_firewall_name}') - self.cmd('az palo-alto cloudngfw firewall get-support-info --resource-group {rg} -n {cloudngfw_firewall_name}') - - self.cmd('az palo-alto cloudngfw firewall status list --resource-group {rg} -n {cloudngfw_firewall_name}') - self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {rg} -n {cloudngfw_firewall_name}') @AllowLargeResponse(size_kb=10240) @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_firewall_update') def test_palo_alto_firewall_update(self, resource_group): self.kwargs.update({ - 'cloudngfw_firewall_name': self.create_random_name('firewall', 15), - 'public_ip_name': 'test-public-ip', - 'local_rulestack_name': 'test-local-rulestack', - 'user_email': 'v-taoxuzeng@microsoft.com', - 'prefix': 'test-publicip-prefix', - 'loc': 'eastus', 'resource_group': 'CUSEUAP', 'firewall_name': 'OsamaV3', }) - ip_prefix = self.cmd('az network public-ip prefix create -g {rg} -n {prefix} --length 28').get_output_in_json()['ipPrefix'] - self.kwargs.update({'ip_address': ip_prefix.split('/')[0]}) - public_ip = self.cmd('az network public-ip create -g {rg} -n {public_ip_name} --ip-address {ip_address} --public-ip-prefix {prefix}').get_output_in_json()['publicIp'] - self.kwargs.update({'public_ip_id': public_ip['id']}) - self.cmd('az palo-alto cloudngfw firewall create ' - '--name {cloudngfw_firewall_name} ' - '-g {rg} ' - '--location {loc} ' - '--dns-settings {{}} ' - '--marketplace-details {{"offer-id":pan_swfw_cloud_ngfw,"publisher-id":paloaltonetworks}} ' - '--network-profile {{"enable-egress-nat":"ENABLED","network-type":"VNET","public-ips":[{{"address":{ip_address},"resource-id":{public_ip_id}}}]}} ' - '--plan-data {{"billing-cycle":MONTHLY,"plan-id":panw-cloud-ngfw-payg,"usage-type":PAYG}} --no-wait') - self.cmd('az palo-alto cloudngfw firewall wait --resource-group {rg} --name {cloudngfw_firewall_name} --created') - self.cmd('az palo-alto cloudngfw firewall list --resource-group {rg}', - checks=[ - self.check('length(@)', 1), - ]) - - self.cmd('az palo-alto cloudngfw firewall update --name {cloudngfw_firewall_name} -g {rg} --tags {{"tagName":"value"}}') - self.cmd('az palo-alto cloudngfw firewall show --name {cloudngfw_firewall_name} -g {rg}', self.check('tags.tagName', "value")) - - self.cmd('az palo-alto cloudngfw firewall save-log-profile --resource-group {resource_group} -n {firewall_name}') - self.cmd('az palo-alto cloudngfw firewall get-global-rulestack --resource-group {rg} -n {cloudngfw_firewall_name}') - self.cmd('az palo-alto cloudngfw firewall get-log-profile --resource-group {rg} -n {cloudngfw_firewall_name}') - self.cmd('az palo-alto cloudngfw firewall get-support-info --resource-group {rg} -n {cloudngfw_firewall_name}') - - self.cmd('az palo-alto cloudngfw firewall status list --resource-group {rg} -n {cloudngfw_firewall_name}') - self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {rg} -n {cloudngfw_firewall_name}') + self.cmd('az palo-alto cloudngfw firewall update --name {firewall_name} -g {rg} --tags {{"tagName":"value"}}') + self.cmd('az palo-alto cloudngfw firewall show --name {firewall_name} -g {rg}', self.check('tags.tagName', "value")) @AllowLargeResponse(size_kb=10240) - @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_firewall') - def test_palo_alto_firewall(self, resource_group): + @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_firewall_v2') + def test_palo_alto_firewall_v2(self, resource_group): self.kwargs.update({ 'loc': 'eastus', - 'resource_group': 'CUSEUAP', - 'firewall_name': 'OsamaV3', + 'resource_group': 'rheaTerraformTest', + 'firewall_name': 'fw0718', + 'workspace': self.create_random_name('workspace', 15), }) + self.cmd('az palo-alto cloudngfw firewall save-log-profile --resource-group {resource_group} -n {firewall_name} ' + '--log-option "SAME_DESTINATION" --log-type "TRAFFIC" ' + '--common-destination {{"monitor-configurations":{{"id":"/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/sudh_fire_test/providers/Microsoft.OperationalInsights/workspaces/testAnalyticsX","primary-key":"7R5uguOLkTF6zByLV9ef5402y4dQnhiSlNMTKNSpEbjZoBrGrNnM2rD4E7+0v1yFg5y6h3RlrIa7th7qJnoHcQ==","secondary-key":"7lmsLYTVizgkstJpno4fY6u36qmVw4rkaIfzhx82ymLIdYDy0wbq7Tdydkje3z50KbKsQnzhg8KAPFpEki/Buw==","subscription-id":"2bf4a339-294d-4c25-b0b2-ef649e9f5c27","workspace":"63e674d3-cc87-48c6-94cb-2d28a0b245fc"}}}}') + self.cmd('az palo-alto cloudngfw firewall get-log-profile --resource-group {resource_group} -n {firewall_name}') + self.cmd('az palo-alto cloudngfw firewall get-support-info --resource-group {resource_group} -n {firewall_name}') - self.cmd('az palo-alto cloudngfw firewall save-log-profile --resource-group {resource_group} -n {firewall_name}') - self.cmd('az palo-alto cloudngfw firewall get-log-profile --resource-group {rg} -n {cloudngfw_firewall_name}') - self.cmd('az palo-alto cloudngfw firewall get-support-info --resource-group {rg} -n {cloudngfw_firewall_name}') - - self.cmd('az palo-alto cloudngfw firewall status list --resource-group {rg} -n {cloudngfw_firewall_name}') - self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {rg} -n {cloudngfw_firewall_name}') - - @AllowLargeResponse(size_kb=10240) - @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_networks_cloudngfw_global_rulestack') - def test_palo_alto_networks_cloudngfw_global_rulestack(self, resource_group): - self.kwargs.update({ - 'global_rulestack_name': 'test-cloudngfw-global-rulestack', - 'public_ip_name': 'test-public-ip', - 'local_rulestack_name': 'test-local-rulestack', - 'user_email': 'v-taoxuzeng@microsoft.com', - 'prefix': 'test-publicip-prefix', - 'loc': 'eastus' - }) - - self.cmd('az palo-alto cloudngfw global-rulestack create -g {rg} -n {global_rulestack_name} ' - '--identity {{"type":None}} ' - '--location {loc} ' - '--associated-subscriptions [""] ' - '--default-mode IPS ' - '--description "global rulestacks" ' - '--min-app-id-version "8.5.3" ' - '--pan-etag ' - '--pan-location {loc} ' - '--scope "GLOBAL" ' - '--security-services {{"anti-spyware-profile":"default","anti-virus-profile":"default","dns-subscription":"default","file-blocking-profile":"default","outbound-trust-certificate":"default","outbound-un-trust-certificate":"default","url-filtering-profile":"default","vulnerability-profile":"default"}}') - self.cmd('az palo-alto cloudngfw global-rulestack get-change-log') - self.cmd('az palo-alto cloudngfw global-rulestack list-advanced-security-object') - self.cmd('az palo-alto cloudngfw global-rulestack list-app-id') - self.cmd('az palo-alto cloudngfw global-rulestack list-country') - self.cmd('az palo-alto cloudngfw global-rulestack list-firewall') - self.cmd('az palo-alto cloudngfw global-rulestack list-predefined-url-category') - self.cmd('az palo-alto cloudngfw global-rulestack list-security-service') - self.cmd('az palo-alto cloudngfw global-rulestack revert') - - self.cmd('az palo-alto cloudngfw global-rulestack certificate create -g {rg} -n {global_rulestack_name} ' - '--audit-comment comment ' - '--certificate-self-signed "TRUE" ' - '--description "description" ' - '--etag "2bf4a339-294d-4c25-b0b2-ef649e9f5c27"') - self.cmd('az palo-alto cloudngfw global-rulestack certificate list') - self.cmd('az palo-alto cloudngfw global-rulestack certificate show') - self.cmd('az palo-alto cloudngfw global-rulestack certificate delete') - - self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist create -g {rg} -n {global_rulestack_name} ' - '--audit-comment "string" ' - '--description "description" ' - '--etag "2bf4a339-294d-4c25-b0b2-ef649e9f5c27" ' - '--fqdn-list ["string1","string2"]') - self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist list') - self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist show') - self.cmd('az palo-alto cloudngfw global-rulestack fqdnlist delete') - - self.cmd('az palo-alto cloudngfw global-rulestack post-rule create ' - '--priority "1" ' - '--action-type Allow ' - '--applications ["app1"] ' - '--audit-comment "example comment" ' - '--category {{"feeds":["feed"],"url-custom":["https://microsoft.com"]}} ' - '--decryption-rule-type SSLOutboundInspection ' - '--description "" ' - '--destination {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"prefix-lists": ["PL1"]}} ' - '--tags [{{"key":"keyName","value":"value"}}]') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule list') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule show') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule get-counter') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule refresh-counter') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule reset-counter') - self.cmd('az palo-alto cloudngfw global-rulestack post-rule delete') - - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule create ' - '--action-type "Allow" ' - '--applications ["app1"] ' - '--audit-comment "example comment" ' - '--category {{"feeds":["feed"],"url-custom":["https://microsoft.com"]}} ' - '--decryption-rule-type SSLOutboundInspection ' - '--description "" ' - '--destination {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"fqdn-lists":"FQDN1","prefix-lists": ["PL1"]}} ' - '--enable-logging "DISABLED" ' - '--etag "" ' - '--inbound-inspection-certificate "cert1" ' - '--negate-destination "TRUE" ' - '--negate-source "TRUE" ' - '--rule-state "DISABLED" ' - '--source {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"prefix-lists": ["PL1"]}} ' - '') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule list') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule show') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule get-counter') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule refresh-counter') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule reset-counter') - self.cmd('az palo-alto cloudngfw global-rulestack pre-rule delete') - - self.cmd('az palo-alto cloudngfw global-rulestack prefixlist create ' - '--audit-comment "comment" ' - '--description "string" ' - '--etag "" ' - '--prefix-list ["1.0.0.0/24"]') - self.cmd('az palo-alto cloudngfw global-rulestack prefixlist list') - self.cmd('az palo-alto cloudngfw global-rulestack prefixlist show') - self.cmd('az palo-alto cloudngfw global-rulestack prefixlist delete') + self.cmd('az palo-alto cloudngfw firewall status list --resource-group {resource_group} -n {firewall_name}') + self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {resource_group} -n {firewall_name}') @AllowLargeResponse(size_kb=10240) @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_networks_cloudngfw_local_rulestack') def test_palo_alto_networks_cloudngfw_local_rulestack(self, resource_group): self.kwargs.update({ - 'local_rulestack_name': self.create_random_name('local_rulestack', 20), + 'local_rulestack_name': self.create_random_name('localrulestack', 20), 'certificate_name': self.create_random_name('certificate', 15), 'fqdnlist_name': self.create_random_name('fqdnlist', 15), 'local_rule_name': self.create_random_name('local_rule', 15), 'prefixlist_name': self.create_random_name('prefixlist', 15), 'loc': 'eastus' }) - self.cmd('az palo-alto cloudngfw local-rulestack create -g {rg} -n {local_rulestack_name} ' '--identity {{"type":None}} ' '--location {loc} ' - '--associated-subscriptions ["2bf4a339-294d-4c25-b0b2-ef649e9f5c27"] ' '--default-mode IPS ' '--description "local rulestacks" ' - '--min-app-id-version "8.5.3" ' + '--min-app-id-version "8595-7473" ' '--scope "LOCAL" ' '--security-services {{"vulnerability-profile":"BestPractice","anti-spyware-profile":"BestPractice","anti-virus-profile":"BestPractice","url-filtering-profile":"BestPractice","file-blocking-profile":"BestPractice","dns-subscription":"BestPractice"}}') self.cmd('az palo-alto cloudngfw local-rulestack update -g {rg} -n {local_rulestack_name} --tags {{"tag-name":"value"}}') self.cmd('az palo-alto cloudngfw local-rulestack get-change-log -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack get-support-info -g {rg} -n {local_rulestack_name}') - self.cmd('az palo-alto cloudngfw local-rulestack list-advanced-security-object -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack list-app-id -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack list-country -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack list-firewall -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack list-predefined-url-category -g {rg} -n {local_rulestack_name}') - self.cmd('az palo-alto cloudngfw local-rulestack list-security-service -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack revert -g {rg} -n {local_rulestack_name}') + with self.assertRaisesRegex(HttpResponseError, 'ResourcePostActionFailed: Not Found'): + self.cmd('az palo-alto cloudngfw local-rulestack list-advanced-security-object -g {rg} -n {local_rulestack_name} --type feeds') + with self.assertRaisesRegex(HttpResponseError, 'ResourcePostActionFailed: Not Found'): + self.cmd('az palo-alto cloudngfw local-rulestack list-security-service -g {rg} -n {local_rulestack_name} --type antiSpyware') self.cmd('az palo-alto cloudngfw local-rulestack certificate create -g {rg} ' '--local-rulestack-name {local_rulestack_name} ' '--name {certificate_name} ' '--audit-comment "comment" ' '--certificate-self-signed "TRUE" ' - '--certificate-signer-resource-id "" ' '--description "description" ') self.cmd('az palo-alto cloudngfw local-rulestack certificate list -g {rg} --local-rulestack-name {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack certificate show -g {rg} --local-rulestack-name {local_rulestack_name} --name {certificate_name}') @@ -285,38 +153,38 @@ def test_palo_alto_networks_cloudngfw_local_rulestack(self, resource_group): self.cmd('az palo-alto cloudngfw local-rulestack fqdnlist show -g {rg} --local-rulestack-name {local_rulestack_name} --name {fqdnlist_name}') self.cmd('az palo-alto cloudngfw local-rulestack fqdnlist delete -g {rg} --local-rulestack-name {local_rulestack_name} --name {fqdnlist_name}') - self.cmd('az palo-alto cloudngfw local-rulestack local-rule create -g {rg} ' - '--local-rulestack-name {local_rulestack_name} ' - '--rule-name {local_rule_name} ' - '--priority "1" ' - '--action-type "Allow" ' - '--applications ["app1"] ' - '--audit-comment "example comment" ' - '--category {{"feeds":["feed"],"url-custom":["https://microsoft.com"]}} ' - '--decryption-rule-type "SSLOutboundInspection" ' - '--description "description of local rule" ' - '--destination {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"fqdn-lists":"FQDN1","prefix-lists": ["PL1"]}} ' - '--enable-logging "DISABLED" ' - '--inbound-inspection-certificate "cert1" ' - '--negate-destination "TRUE" ' - '--negate-source "TRUE" ' - '--rule-state "DISABLED" ' - '--source {{"cidrs":["1.0.0.1/10"],"countries":["abcde"],"feeds":["feed"],"prefix-lists": ["PL1"]}} ') - self.cmd('az palo-alto cloudngfw local-rulestack local-rule list -g {rg} --local-rulestack-name {local_rulestack_name}') - self.cmd('az palo-alto cloudngfw local-rulestack local-rule show -g {rg} --local-rulestack-name {local_rulestack_name} --rule-name {local_rule_name}') - self.cmd('az palo-alto cloudngfw local-rulestack local-rule get-counter -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1"') - self.cmd('az palo-alto cloudngfw local-rulestack local-rule refresh-counter -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1"') - self.cmd('az palo-alto cloudngfw local-rulestack local-rule reset-counter -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1"') - self.cmd('az palo-alto cloudngfw local-rulestack local-rule delete -g {rg} --local-rulestack-name {local_rulestack_name} --rule-name {local_rule_name}') - self.cmd('az palo-alto cloudngfw local-rulestack prefixlist create -g {rg} ' '--local-rulestack-name {local_rulestack_name} ' '--name {prefixlist_name} ' '--audit-comment "comment" ' '--description "string" ' - '--etag "" ' '--prefix-list ["1.0.0.0/24"]') self.cmd('az palo-alto cloudngfw local-rulestack prefixlist list -g {rg} --local-rulestack-name {local_rulestack_name} ') self.cmd('az palo-alto cloudngfw local-rulestack prefixlist show -g {rg} --local-rulestack-name {local_rulestack_name} --name {prefixlist_name}') self.cmd('az palo-alto cloudngfw local-rulestack prefixlist delete -g {rg} --local-rulestack-name {local_rulestack_name} --name {prefixlist_name}') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule create -g {rg} ' + '--local-rulestack-name {local_rulestack_name} ' + '--rule-name {local_rule_name} ' + '--priority "1" ' + '--action-type "Allow" ' + '--enable-logging "DISABLED" ' + '--rule-state "DISABLED" ') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule list -g {rg} --local-rulestack-name {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule show -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1"') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule delete -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1"') + + self.cmd('az palo-alto cloudngfw local-rulestack local-rule delete -g {rg} --local-rulestack-name {local_rulestack_name} --priority "1000000"') + self.cmd('az palo-alto cloudngfw local-rulestack delete -g {rg} -n {local_rulestack_name}') + + @AllowLargeResponse(size_kb=10240) + @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_cloudngfw_local_rulestack_with_counter') + def test_palo_alto_cloudngfw_local_rulestack_with_counter(self, resource_group): + self.kwargs.update({ + 'resource_group': "rheaTerraformTest", + 'local_rulestack_name': "fw0718-lrs", + 'priority': "1000000" + }) + self.cmd('az palo-alto cloudngfw local-rulestack local-rule get-counter -g {resource_group} --local-rulestack-name {local_rulestack_name} --priority {priority}') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule refresh-counter -g {resource_group} --local-rulestack-name {local_rulestack_name} --priority {priority}') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule reset-counter -g {resource_group} --local-rulestack-name {local_rulestack_name} --priority {priority}') From a7df26e36a0eaf7ec10bdba90a79b693caf2be15 Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Wed, 26 Jul 2023 15:16:27 +0800 Subject: [PATCH 04/10] update --- .../palo_alto/cloudngfw/firewall/__init__.py | 1 - .../firewall/_get_global_rulestack.py | 165 -- .../local_rulestack/local_rule/_delete.py | 2 +- .../local_rulestack/local_rule/_list.py | 2 + .../local_rulestack/local_rule/_show.py | 2 +- .../local_rulestack/local_rule/_wait.py | 2 +- .../azext_metadata.json | 2 +- .../test_palo_alto_firewall_update.yaml | 586 +++++++ ...palo_alto_networks_cloudngfw_firewall.yaml | 1405 +++++++++++++++++ .../tests/latest/test_palo_alto_networks.py | 41 +- 10 files changed, 2015 insertions(+), 193 deletions(-) delete mode 100644 src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_global_rulestack.py create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_update.yaml create mode 100644 src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_firewall.yaml diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py index 5fa2f09d223..cae8c3bcee9 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py @@ -11,7 +11,6 @@ from .__cmd_group import * from ._create import * from ._delete import * -from ._get_global_rulestack import * from ._get_log_profile import * from ._get_support_info import * from ._list import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_global_rulestack.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_global_rulestack.py deleted file mode 100644 index 527a8fda089..00000000000 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_global_rulestack.py +++ /dev/null @@ -1,165 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "palo-alto cloudngfw firewall get-global-rulestack", -) -class GetGlobalRulestack(AAZCommand): - """Get Global Rulestack associated with the Firewall - """ - - _aaz_info = { - "version": "2022-08-29", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/paloaltonetworks.cloudngfw/firewalls/{}/getglobalrulestack", "2022-08-29"], - ] - } - - def _handler(self, command_args): - super()._handler(command_args) - self._execute_operations() - return self._output() - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.firewall_name = AAZStrArg( - options=["-n", "--name", "--firewall-name"], - help="Firewall resource name", - required=True, - id_part="name", - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.FirewallsGetGlobalRulestack(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance, client_flatten=True) - return result - - class FirewallsGetGlobalRulestack(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/PaloAltoNetworks.Cloudngfw/firewalls/{firewallName}/getGlobalRulestack", - **self.url_parameters - ) - - @property - def method(self): - return "POST" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "firewallName", self.ctx.args.firewall_name, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2022-08-29", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.azure_id = AAZStrType( - serialized_name="azureId", - flags={"required": True}, - ) - - return cls._schema_on_200 - - -class _GetGlobalRulestackHelper: - """Helper class for GetGlobalRulestack""" - - -__all__ = ["GetGlobalRulestack"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py index 73014d65dc8..d63046cbc2b 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py @@ -49,7 +49,7 @@ def _build_arguments_schema(cls, *args, **kwargs): id_part="name", ) _args_schema.priority = AAZStrArg( - options=["-n", "--name", "--priority"], + options=["--priority"], help="Local Rule priority", required=True, id_part="child_name_1", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py index 47e77f46131..91a11ff1641 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py @@ -25,6 +25,8 @@ class List(AAZCommand): ] } + AZ_SUPPORT_PAGINATION = True + def _handler(self, command_args): super()._handler(command_args) return self.build_paging(self._execute_operations, self._output) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py index b3bbc293237..471727bdbeb 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py @@ -48,7 +48,7 @@ def _build_arguments_schema(cls, *args, **kwargs): id_part="name", ) _args_schema.priority = AAZStrArg( - options=["-n", "--name", "--priority"], + options=["--priority"], help="Local Rule priority", required=True, id_part="child_name_1", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_wait.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_wait.py index 7970d755f8e..74ee58bf8d2 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_wait.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_wait.py @@ -47,7 +47,7 @@ def _build_arguments_schema(cls, *args, **kwargs): id_part="name", ) _args_schema.priority = AAZStrArg( - options=["-n", "--name", "--priority"], + options=["--priority"], help="Local Rule priority", required=True, id_part="child_name_1", diff --git a/src/palo-alto-networks/azext_palo_alto_networks/azext_metadata.json b/src/palo-alto-networks/azext_palo_alto_networks/azext_metadata.json index 7923ce3c67b..8138e860821 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/azext_metadata.json +++ b/src/palo-alto-networks/azext_palo_alto_networks/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.49.0" + "azext.minCliCoreVersion": "2.50.0" } \ No newline at end of file diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_update.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_update.yaml new file mode 100644 index 00000000000..a811d1894c8 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_update.yaml @@ -0,0 +1,586 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","name":"prodStabilityTest","type":"paloaltonetworks.cloudngfw/firewalls","location":"eastus","tags":{},"systemData":{"createdBy":"rhjai@microsoft.com","createdByType":"User","createdAt":"2023-07-17T13:23:42.0882273Z","lastModifiedBy":"54a2195e-8365-444c-8f50-4a5de4be1e2b","lastModifiedByType":"Application","lastModifiedAt":"2023-07-17T13:51:06.3647044Z"},"properties":{"networkProfile":{"vnetConfiguration":{"vnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet"},"trustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet1"},"unTrustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet2"},"ipOfTrustSubnetForUdr":{"address":"10.91.0.4"}},"networkType":"VNET","publicIps":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/prodStabilityTest-public-ip","address":"104.211.12.22"}],"enableEgressNat":"DISABLED","egressNatIp":[]},"associatedRulestack":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/prodStabilityTest-lrs","location":"eastus","rulestackId":"SUBSCRIPTION~2bf4a339-294d-4c25-b0b2-ef649e9f5c27~RG~rheaTerraformTest~STACK~prodStabilityTest-lrs"},"dnsSettings":{"enableDnsProxy":"DISABLED","enabledDnsType":"CUSTOM"},"isPanoramaManaged":"FALSE","provisioningState":"Succeeded","planData":{"usageType":"PAYG","billingCycle":"MONTHLY","planId":"panw-cloud-ngfw-payg","effectiveDate":"0001-01-01T00:00:00Z"},"marketplaceDetails":{"offerId":"pan_swfw_cloud_ngfw","publisherId":"paloaltonetworks","marketplaceSubscriptionStatus":"Subscribed","marketplaceSubscriptionId":"f4f32169-d209-4da4-ca0d-e27fcbeacabd"},"panEtag":"f35bb154-24a5-11ee-9ea7-a6fe76bfa289"}}' + headers: + cache-control: + - no-cache + content-length: + - '2319' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:06:53 GMT + etag: + - '"7003ea25-0000-0100-0000-64b5474a0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"associatedRulestack": {"location": + "eastus", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/prodStabilityTest-lrs", + "rulestackId": "SUBSCRIPTION~2bf4a339-294d-4c25-b0b2-ef649e9f5c27~RG~rheaTerraformTest~STACK~prodStabilityTest-lrs"}, + "dnsSettings": {"enableDnsProxy": "DISABLED", "enabledDnsType": "CUSTOM"}, "isPanoramaManaged": + "FALSE", "marketplaceDetails": {"marketplaceSubscriptionStatus": "Subscribed", + "offerId": "pan_swfw_cloud_ngfw", "publisherId": "paloaltonetworks"}, "networkProfile": + {"egressNatIp": [], "enableEgressNat": "DISABLED", "networkType": "VNET", "publicIps": + [{"address": "104.211.12.22", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/prodStabilityTest-public-ip"}], + "vnetConfiguration": {"ipOfTrustSubnetForUdr": {"address": "10.91.0.4"}, "trustSubnet": + {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet1"}, + "unTrustSubnet": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet2"}, + "vnet": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet"}}}, + "panEtag": "f35bb154-24a5-11ee-9ea7-a6fe76bfa289", "planData": {"billingCycle": + "MONTHLY", "planId": "panw-cloud-ngfw-payg", "usageType": "PAYG"}, "provisioningState": + "Succeeded"}, "tags": {"tagName": "value"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + Content-Length: + - '1808' + Content-Type: + - application/json + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","name":"prodStabilityTest","type":"paloaltonetworks.cloudngfw/firewalls","location":"eastus","tags":{"tagName":"value"},"systemData":{"createdBy":"rhjai@microsoft.com","createdByType":"User","createdAt":"2023-07-17T13:23:42.0882273Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T07:06:54.6624971Z"},"properties":{"panEtag":"f35bb154-24a5-11ee-9ea7-a6fe76bfa289","networkProfile":{"vnetConfiguration":{"vnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet"},"trustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet1"},"unTrustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet2"},"ipOfTrustSubnetForUdr":{"address":"10.91.0.4"}},"networkType":"VNET","publicIps":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/prodStabilityTest-public-ip","address":"104.211.12.22"}],"enableEgressNat":"DISABLED","egressNatIp":[]},"associatedRulestack":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/prodStabilityTest-lrs","rulestackId":"SUBSCRIPTION~2bf4a339-294d-4c25-b0b2-ef649e9f5c27~RG~rheaTerraformTest~STACK~prodStabilityTest-lrs","location":"eastus"},"dnsSettings":{"enableDnsProxy":"DISABLED","enabledDnsType":"CUSTOM"},"isPanoramaManaged":"FALSE","provisioningState":"Accepted","planData":{"usageType":"PAYG","billingCycle":"MONTHLY","planId":"panw-cloud-ngfw-payg","effectiveDate":"0001-01-01T00:00:00Z"},"marketplaceDetails":{"marketplaceSubscriptionId":"f4f32169-d209-4da4-ca0d-e27fcbeacabd","offerId":"pan_swfw_cloud_ngfw","publisherId":"paloaltonetworks","marketplaceSubscriptionStatus":"Subscribed"}}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '2317' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:06:56 GMT + etag: + - '"0d00b47f-0000-0100-0000-64c0c60f0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + mise-correlation-id: + - 28c323f9-7a9a-46b1-ba90-b5475c48bb09 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","name":"c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","status":"Accepted","startTime":"2023-07-26T07:06:54.8973301Z"}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:06:56 GMT + etag: + - '"0b002ea7-0000-0100-0000-64c0c60e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","name":"c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","status":"Accepted","startTime":"2023-07-26T07:06:54.8973301Z"}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:07:26 GMT + etag: + - '"0b002ea7-0000-0100-0000-64c0c60e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","name":"c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","status":"Accepted","startTime":"2023-07-26T07:06:54.8973301Z"}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:07:58 GMT + etag: + - '"0b002ea7-0000-0100-0000-64c0c60e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","name":"c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","status":"Accepted","startTime":"2023-07-26T07:06:54.8973301Z"}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:08:28 GMT + etag: + - '"0b002ea7-0000-0100-0000-64c0c60e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","name":"c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","status":"Accepted","startTime":"2023-07-26T07:06:54.8973301Z"}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:08:59 GMT + etag: + - '"0b002ea7-0000-0100-0000-64c0c60e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","name":"c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","status":"Accepted","startTime":"2023-07-26T07:06:54.8973301Z"}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:09:30 GMT + etag: + - '"0b002ea7-0000-0100-0000-64c0c60e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","name":"c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","status":"Accepted","startTime":"2023-07-26T07:06:54.8973301Z"}' + headers: + cache-control: + - no-cache + content-length: + - '522' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:10:01 GMT + etag: + - '"0b002ea7-0000-0100-0000-64c0c60e0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","name":"c50f5516-e719-4842-a6b0-55db52f42a54*4BFDCC6C8030BD15623A89BEF8E6CC6F9D53C5183344AA8F80E16EAFDAA32CA9","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","status":"Succeeded","startTime":"2023-07-26T07:06:54.8973301Z","endTime":"2023-07-26T07:10:13.4690317Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '593' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:10:32 GMT + etag: + - '"0b00ffc9-0000-0100-0000-64c0c6d50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall update + Connection: + - keep-alive + ParameterSetName: + - --name -g --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","name":"prodStabilityTest","type":"paloaltonetworks.cloudngfw/firewalls","location":"eastus","tags":{"tagName":"value"},"systemData":{"createdBy":"rhjai@microsoft.com","createdByType":"User","createdAt":"2023-07-17T13:23:42.0882273Z","lastModifiedBy":"54a2195e-8365-444c-8f50-4a5de4be1e2b","lastModifiedByType":"Application","lastModifiedAt":"2023-07-26T07:10:13.5375363Z"},"properties":{"panEtag":"0432c7fe-2b83-11ee-9c77-5609b716d297","networkProfile":{"vnetConfiguration":{"vnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet"},"trustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet1"},"unTrustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet2"},"ipOfTrustSubnetForUdr":{"address":"10.91.0.4"}},"networkType":"VNET","publicIps":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/prodStabilityTest-public-ip","address":"104.211.12.22"}],"enableEgressNat":"DISABLED","egressNatIp":[]},"associatedRulestack":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/prodStabilityTest-lrs","rulestackId":"SUBSCRIPTION~2bf4a339-294d-4c25-b0b2-ef649e9f5c27~RG~rheaTerraformTest~STACK~prodStabilityTest-lrs","location":"eastus"},"dnsSettings":{"enableDnsProxy":"DISABLED","enabledDnsType":"CUSTOM"},"isPanoramaManaged":"FALSE","provisioningState":"Succeeded","planData":{"usageType":"PAYG","billingCycle":"MONTHLY","planId":"panw-cloud-ngfw-payg","effectiveDate":"0001-01-01T00:00:00Z"},"marketplaceDetails":{"marketplaceSubscriptionId":"f4f32169-d209-4da4-ca0d-e27fcbeacabd","offerId":"pan_swfw_cloud_ngfw","publisherId":"paloaltonetworks","marketplaceSubscriptionStatus":"Subscribed"}}}' + headers: + cache-control: + - no-cache + content-length: + - '2336' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:10:32 GMT + etag: + - '"0d00f49e-0000-0100-0000-64c0c6d50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall show + Connection: + - keep-alive + ParameterSetName: + - --name -g + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest","name":"prodStabilityTest","type":"paloaltonetworks.cloudngfw/firewalls","location":"eastus","tags":{"tagName":"value"},"systemData":{"createdBy":"rhjai@microsoft.com","createdByType":"User","createdAt":"2023-07-17T13:23:42.0882273Z","lastModifiedBy":"54a2195e-8365-444c-8f50-4a5de4be1e2b","lastModifiedByType":"Application","lastModifiedAt":"2023-07-26T07:10:13.5375363Z"},"properties":{"panEtag":"0432c7fe-2b83-11ee-9c77-5609b716d297","networkProfile":{"vnetConfiguration":{"vnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet"},"trustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet1"},"unTrustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/virtualNetworks/prodStabilityTest-vnet/subnets/subnet2"},"ipOfTrustSubnetForUdr":{"address":"10.91.0.4"}},"networkType":"VNET","publicIps":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/prodStabilityTest-public-ip","address":"104.211.12.22"}],"enableEgressNat":"DISABLED","egressNatIp":[]},"associatedRulestack":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/prodStabilityTest-lrs","rulestackId":"SUBSCRIPTION~2bf4a339-294d-4c25-b0b2-ef649e9f5c27~RG~rheaTerraformTest~STACK~prodStabilityTest-lrs","location":"eastus"},"dnsSettings":{"enableDnsProxy":"DISABLED","enabledDnsType":"CUSTOM"},"isPanoramaManaged":"FALSE","provisioningState":"Succeeded","planData":{"usageType":"PAYG","billingCycle":"MONTHLY","planId":"panw-cloud-ngfw-payg","effectiveDate":"0001-01-01T00:00:00Z"},"marketplaceDetails":{"marketplaceSubscriptionId":"f4f32169-d209-4da4-ca0d-e27fcbeacabd","offerId":"pan_swfw_cloud_ngfw","publisherId":"paloaltonetworks","marketplaceSubscriptionStatus":"Subscribed"}}}' + headers: + cache-control: + - no-cache + content-length: + - '2336' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 07:10:35 GMT + etag: + - '"0d00f49e-0000-0100-0000-64c0c6d50000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +version: 1 diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_firewall.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_firewall.yaml new file mode 100644 index 00000000000..03172691756 --- /dev/null +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_firewall.yaml @@ -0,0 +1,1405 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network nsg create + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_palo_alto_networks_cloudngfw_firewall000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001","name":"cli_test_palo_alto_networks_cloudngfw_firewall000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_palo_alto_networks_cloudngfw_firewall","date":"2023-07-26T06:52:07Z","module":"palo-alto-networks"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '464' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:11 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network nsg create + Connection: + - keep-alive + Content-Length: + - '22' + Content-Type: + - application/json + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"nsg000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003\",\r\n + \ \"etag\": \"W/\\\"ee5aab9b-fc65-48db-8071-801a76067aca\\\"\",\r\n \"type\": + \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"d7163e7d-8ccb-43b1-9a8e-aa789127c218\",\r\n \"securityRules\": [],\r\n + \ \"defaultSecurityRules\": [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/AllowVnetInBound\",\r\n + \ \"etag\": \"W/\\\"ee5aab9b-fc65-48db-8071-801a76067aca\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"description\": \"Allow inbound traffic from all VMs in VNET\",\r\n + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\": + \"VirtualNetwork\",\r\n \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n + \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n \"direction\": + \"Inbound\",\r\n \"sourcePortRanges\": [],\r\n \"destinationPortRanges\": + [],\r\n \"sourceAddressPrefixes\": [],\r\n \"destinationAddressPrefixes\": + []\r\n }\r\n },\r\n {\r\n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/AllowAzureLoadBalancerInBound\",\r\n + \ \"etag\": \"W/\\\"ee5aab9b-fc65-48db-8071-801a76067aca\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"description\": \"Allow inbound traffic from azure load balancer\",\r\n + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\": + \"AzureLoadBalancer\",\r\n \"destinationAddressPrefix\": \"*\",\r\n + \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\": + \"Inbound\",\r\n \"sourcePortRanges\": [],\r\n \"destinationPortRanges\": + [],\r\n \"sourceAddressPrefixes\": [],\r\n \"destinationAddressPrefixes\": + []\r\n }\r\n },\r\n {\r\n \"name\": \"DenyAllInBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/DenyAllInBound\",\r\n + \ \"etag\": \"W/\\\"ee5aab9b-fc65-48db-8071-801a76067aca\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"description\": \"Deny all inbound traffic\",\r\n \"protocol\": + \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\": + \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\": + \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\": 65500,\r\n + \ \"direction\": \"Inbound\",\r\n \"sourcePortRanges\": [],\r\n + \ \"destinationPortRanges\": [],\r\n \"sourceAddressPrefixes\": + [],\r\n \"destinationAddressPrefixes\": []\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/AllowVnetOutBound\",\r\n + \ \"etag\": \"W/\\\"ee5aab9b-fc65-48db-8071-801a76067aca\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"description\": \"Allow outbound traffic from all VMs to all VMs + in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": + \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\": + \"VirtualNetwork\",\r\n \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n + \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n \"direction\": + \"Outbound\",\r\n \"sourcePortRanges\": [],\r\n \"destinationPortRanges\": + [],\r\n \"sourceAddressPrefixes\": [],\r\n \"destinationAddressPrefixes\": + []\r\n }\r\n },\r\n {\r\n \"name\": \"AllowInternetOutBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/AllowInternetOutBound\",\r\n + \ \"etag\": \"W/\\\"ee5aab9b-fc65-48db-8071-801a76067aca\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"description\": \"Allow outbound traffic from all VMs to Internet\",\r\n + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\": + \"*\",\r\n \"destinationAddressPrefix\": \"Internet\",\r\n \"access\": + \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\": \"Outbound\",\r\n + \ \"sourcePortRanges\": [],\r\n \"destinationPortRanges\": + [],\r\n \"sourceAddressPrefixes\": [],\r\n \"destinationAddressPrefixes\": + []\r\n }\r\n },\r\n {\r\n \"name\": \"DenyAllOutBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/DenyAllOutBound\",\r\n + \ \"etag\": \"W/\\\"ee5aab9b-fc65-48db-8071-801a76067aca\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"description\": \"Deny all outbound traffic\",\r\n \"protocol\": + \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\": + \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\": + \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\": 65500,\r\n + \ \"direction\": \"Outbound\",\r\n \"sourcePortRanges\": + [],\r\n \"destinationPortRanges\": [],\r\n \"sourceAddressPrefixes\": + [],\r\n \"destinationAddressPrefixes\": []\r\n }\r\n }\r\n + \ ]\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a8d9ad1a-83b9-49e6-a72f-305fc287f1ca?api-version=2022-01-01 + cache-control: + - no-cache + content-length: + - '6804' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - da8998ac-9417-4f73-94e8-f5e13957f82b + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network nsg create + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/a8d9ad1a-83b9-49e6-a72f-305fc287f1ca?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:14 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 962a48af-dc7b-4464-93e3-358fa7378ae8 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network nsg create + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"nsg000003\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003\",\r\n + \ \"etag\": \"W/\\\"ffd651aa-127c-4af1-8428-a2243440af29\\\"\",\r\n \"type\": + \"Microsoft.Network/networkSecurityGroups\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"d7163e7d-8ccb-43b1-9a8e-aa789127c218\",\r\n \"securityRules\": [],\r\n + \ \"defaultSecurityRules\": [\r\n {\r\n \"name\": \"AllowVnetInBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/AllowVnetInBound\",\r\n + \ \"etag\": \"W/\\\"ffd651aa-127c-4af1-8428-a2243440af29\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"description\": \"Allow inbound traffic from all VMs in VNET\",\r\n + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\": + \"VirtualNetwork\",\r\n \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n + \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n \"direction\": + \"Inbound\",\r\n \"sourcePortRanges\": [],\r\n \"destinationPortRanges\": + [],\r\n \"sourceAddressPrefixes\": [],\r\n \"destinationAddressPrefixes\": + []\r\n }\r\n },\r\n {\r\n \"name\": \"AllowAzureLoadBalancerInBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/AllowAzureLoadBalancerInBound\",\r\n + \ \"etag\": \"W/\\\"ffd651aa-127c-4af1-8428-a2243440af29\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"description\": \"Allow inbound traffic from azure load balancer\",\r\n + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\": + \"AzureLoadBalancer\",\r\n \"destinationAddressPrefix\": \"*\",\r\n + \ \"access\": \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\": + \"Inbound\",\r\n \"sourcePortRanges\": [],\r\n \"destinationPortRanges\": + [],\r\n \"sourceAddressPrefixes\": [],\r\n \"destinationAddressPrefixes\": + []\r\n }\r\n },\r\n {\r\n \"name\": \"DenyAllInBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/DenyAllInBound\",\r\n + \ \"etag\": \"W/\\\"ffd651aa-127c-4af1-8428-a2243440af29\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"description\": \"Deny all inbound traffic\",\r\n \"protocol\": + \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\": + \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\": + \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\": 65500,\r\n + \ \"direction\": \"Inbound\",\r\n \"sourcePortRanges\": [],\r\n + \ \"destinationPortRanges\": [],\r\n \"sourceAddressPrefixes\": + [],\r\n \"destinationAddressPrefixes\": []\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AllowVnetOutBound\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/AllowVnetOutBound\",\r\n + \ \"etag\": \"W/\\\"ffd651aa-127c-4af1-8428-a2243440af29\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"description\": \"Allow outbound traffic from all VMs to all VMs + in VNET\",\r\n \"protocol\": \"*\",\r\n \"sourcePortRange\": + \"*\",\r\n \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\": + \"VirtualNetwork\",\r\n \"destinationAddressPrefix\": \"VirtualNetwork\",\r\n + \ \"access\": \"Allow\",\r\n \"priority\": 65000,\r\n \"direction\": + \"Outbound\",\r\n \"sourcePortRanges\": [],\r\n \"destinationPortRanges\": + [],\r\n \"sourceAddressPrefixes\": [],\r\n \"destinationAddressPrefixes\": + []\r\n }\r\n },\r\n {\r\n \"name\": \"AllowInternetOutBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/AllowInternetOutBound\",\r\n + \ \"etag\": \"W/\\\"ffd651aa-127c-4af1-8428-a2243440af29\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"description\": \"Allow outbound traffic from all VMs to Internet\",\r\n + \ \"protocol\": \"*\",\r\n \"sourcePortRange\": \"*\",\r\n + \ \"destinationPortRange\": \"*\",\r\n \"sourceAddressPrefix\": + \"*\",\r\n \"destinationAddressPrefix\": \"Internet\",\r\n \"access\": + \"Allow\",\r\n \"priority\": 65001,\r\n \"direction\": \"Outbound\",\r\n + \ \"sourcePortRanges\": [],\r\n \"destinationPortRanges\": + [],\r\n \"sourceAddressPrefixes\": [],\r\n \"destinationAddressPrefixes\": + []\r\n }\r\n },\r\n {\r\n \"name\": \"DenyAllOutBound\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003/defaultSecurityRules/DenyAllOutBound\",\r\n + \ \"etag\": \"W/\\\"ffd651aa-127c-4af1-8428-a2243440af29\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkSecurityGroups/defaultSecurityRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"description\": \"Deny all outbound traffic\",\r\n \"protocol\": + \"*\",\r\n \"sourcePortRange\": \"*\",\r\n \"destinationPortRange\": + \"*\",\r\n \"sourceAddressPrefix\": \"*\",\r\n \"destinationAddressPrefix\": + \"*\",\r\n \"access\": \"Deny\",\r\n \"priority\": 65500,\r\n + \ \"direction\": \"Outbound\",\r\n \"sourcePortRanges\": + [],\r\n \"destinationPortRanges\": [],\r\n \"sourceAddressPrefixes\": + [],\r\n \"destinationAddressPrefixes\": []\r\n }\r\n }\r\n + \ ]\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '6811' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:15 GMT + etag: + - W/"ffd651aa-127c-4af1-8428-a2243440af29" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - db461f65-6606-4570-b309-e1853ea55424 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -g -n --address-prefix --nsg --subnet-name --subnet-prefixes + User-Agent: + - AZURECLI/2.50.0 azsdk-python-azure-mgmt-resource/23.1.0b2 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_test_palo_alto_networks_cloudngfw_firewall000001?api-version=2022-09-01 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001","name":"cli_test_palo_alto_networks_cloudngfw_firewall000001","type":"Microsoft.Resources/resourceGroups","location":"westus","tags":{"product":"azurecli","cause":"automation","test":"test_palo_alto_networks_cloudngfw_firewall","date":"2023-07-26T06:52:07Z","module":"palo-alto-networks"},"properties":{"provisioningState":"Succeeded"}}' + headers: + cache-control: + - no-cache + content-length: + - '464' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:16 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"location": "westus", "properties": {"addressSpace": {"addressPrefixes": + ["10.0.0.0/16"]}, "enableDdosProtection": false, "enableVmProtection": false, + "subnets": [{"name": "subnet1000005", "properties": {"addressPrefix": "10.0.0.0/26", + "networkSecurityGroup": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003"}}}]}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + Content-Length: + - '455' + Content-Type: + - application/json + ParameterSetName: + - -g -n --address-prefix --nsg --subnet-name --subnet-prefixes + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n + \ \"etag\": \"W/\\\"bfe6b994-ec8d-46d3-96cd-772616ca6a0b\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"a272d34c-80b7-4dc6-aad8-bf1164d92866\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n + \ {\r\n \"name\": \"subnet1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet1000005\",\r\n + \ \"etag\": \"W/\\\"bfe6b994-ec8d-46d3-96cd-772616ca6a0b\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"addressPrefix\": \"10.0.0.0/26\",\r\n \"networkSecurityGroup\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003\"\r\n + \ },\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e92bb010-c004-411b-8b3c-a8b3e8999126?api-version=2022-01-01 + cache-control: + - no-cache + content-length: + - '1568' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 8151c5df-31af-407f-a319-c7bd89cbf06d + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -g -n --address-prefix --nsg --subnet-name --subnet-prefixes + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e92bb010-c004-411b-8b3c-a8b3e8999126?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:19 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 4c35bb17-3471-406a-aff8-384d4c64d776 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -g -n --address-prefix --nsg --subnet-name --subnet-prefixes + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e92bb010-c004-411b-8b3c-a8b3e8999126?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:30 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 33a19436-e761-48ca-a447-c4219b4450d0 + status: + code: 200 + message: '' +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet create + Connection: + - keep-alive + ParameterSetName: + - -g -n --address-prefix --nsg --subnet-name --subnet-prefixes + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n + \ \"etag\": \"W/\\\"57d8513a-7ce6-4654-a5ec-996a043e9a33\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"a272d34c-80b7-4dc6-aad8-bf1164d92866\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n + \ {\r\n \"name\": \"subnet1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet1000005\",\r\n + \ \"etag\": \"W/\\\"57d8513a-7ce6-4654-a5ec-996a043e9a33\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/26\",\r\n \"networkSecurityGroup\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003\"\r\n + \ },\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1570' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:31 GMT + etag: + - W/"57d8513a-7ce6-4654-a5ec-996a043e9a33" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - bc6b441a-1e1f-45b7-bf65-da91add6a1ae + status: + code: 200 + message: '' +- request: + body: '{"name": "subnet2000006", "properties": {"addressPrefix": "10.0.1.0/26"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + Content-Length: + - '73' + Content-Type: + - application/json + ParameterSetName: + - -g --vnet-name -n --address-prefixes + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"subnet2000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006\",\r\n + \ \"etag\": \"W/\\\"4bc90d26-1897-45a3-baa3-3318e16103db\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.1.0/26\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/93afdc34-f83e-4fe2-94c2-f8e316b5d011?api-version=2022-01-01 + cache-control: + - no-cache + content-length: + - '580' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - ca16c5eb-b4ee-4f6b-8ca5-a3d55cf2da00 + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -g --vnet-name -n --address-prefixes + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/93afdc34-f83e-4fe2-94c2-f8e316b5d011?api-version=2022-01-01 + response: + body: + string: "{\r\n \"status\": \"Succeeded\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '29' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:32 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - eeb12058-074c-40ea-8391-40c8a1ac8e3b + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet subnet create + Connection: + - keep-alive + ParameterSetName: + - -g --vnet-name -n --address-prefixes + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"subnet2000006\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006\",\r\n + \ \"etag\": \"W/\\\"b9b9b176-019d-40de-a950-880714e75073\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/26\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '581' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:33 GMT + etag: + - W/"b9b9b176-019d-40de-a950-880714e75073" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 228b1022-86ef-464b-95af-51a8413face1 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - network vnet show + Connection: + - keep-alive + ParameterSetName: + - -g -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004?api-version=2022-01-01 + response: + body: + string: "{\r\n \"name\": \"vnet000004\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004\",\r\n + \ \"etag\": \"W/\\\"b9b9b176-019d-40de-a950-880714e75073\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"a272d34c-80b7-4dc6-aad8-bf1164d92866\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n + \ {\r\n \"name\": \"subnet1000005\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet1000005\",\r\n + \ \"etag\": \"W/\\\"b9b9b176-019d-40de-a950-880714e75073\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/26\",\r\n \"networkSecurityGroup\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/networkSecurityGroups/nsg000003\"\r\n + \ },\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"subnet2000006\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006\",\r\n + \ \"etag\": \"W/\\\"b9b9b176-019d-40de-a950-880714e75073\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.1.0/26\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '2232' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:34 GMT + etag: + - W/"b9b9b176-019d-40de-a950-880714e75073" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - e24da17c-7c6e-4162-a67f-2a0434070dee + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"defaultMode": "IPS", "minAppIdVersion": + "8595-7473", "panEtag": "9fa4e2c6-1b0c-11ee-b587-3e4c117c6534", "scope": "LOCAL", + "securityServices": {"antiSpywareProfile": "BestPractice", "antiVirusProfile": + "BestPractice", "dnsSubscription": "BestPractice", "fileBlockingProfile": "BestPractice", + "urlFilteringProfile": "BestPractice", "vulnerabilityProfile": "BestPractice"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + Content-Length: + - '410' + Content-Type: + - application/json + ParameterSetName: + - --local-rulestack-name -g -l --default-mode --scope --pan-etag --min-app-id-version + --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs","name":"testlrs","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-26T06:52:38.0259095Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T06:52:38.0259095Z"},"properties":{"scope":"LOCAL","minAppIdVersion":"8595-7473","provisioningState":"Accepted","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice","outboundUnTrustCertificate":null,"outboundTrustCertificate":null},"defaultMode":"IPS"}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/9c2a4046-37b7-444d-87cb-9ceec281bbd2*1B5F312EF1A9E589CE5361E11E8C1384086165357FFC5BB45A074F3AAE2D273E?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '934' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:39 GMT + etag: + - '"060094a0-0000-0100-0000-64c0c2b70000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/9c2a4046-37b7-444d-87cb-9ceec281bbd2*1B5F312EF1A9E589CE5361E11E8C1384086165357FFC5BB45A074F3AAE2D273E?api-version=2022-08-29 + mise-correlation-id: + - 4a5bd644-b41c-43c5-8d79-28b24c2f8c91 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + ParameterSetName: + - --local-rulestack-name -g -l --default-mode --scope --pan-etag --min-app-id-version + --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/9c2a4046-37b7-444d-87cb-9ceec281bbd2*1B5F312EF1A9E589CE5361E11E8C1384086165357FFC5BB45A074F3AAE2D273E?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/9c2a4046-37b7-444d-87cb-9ceec281bbd2*1B5F312EF1A9E589CE5361E11E8C1384086165357FFC5BB45A074F3AAE2D273E","name":"9c2a4046-37b7-444d-87cb-9ceec281bbd2*1B5F312EF1A9E589CE5361E11E8C1384086165357FFC5BB45A074F3AAE2D273E","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs","status":"Accepted","startTime":"2023-07-26T06:52:38.8342817Z"}' + headers: + cache-control: + - no-cache + content-length: + - '553' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:52:39 GMT + etag: + - '"0a00d7ff-0000-0100-0000-64c0c2b60000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + ParameterSetName: + - --local-rulestack-name -g -l --default-mode --scope --pan-etag --min-app-id-version + --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/9c2a4046-37b7-444d-87cb-9ceec281bbd2*1B5F312EF1A9E589CE5361E11E8C1384086165357FFC5BB45A074F3AAE2D273E?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/9c2a4046-37b7-444d-87cb-9ceec281bbd2*1B5F312EF1A9E589CE5361E11E8C1384086165357FFC5BB45A074F3AAE2D273E","name":"9c2a4046-37b7-444d-87cb-9ceec281bbd2*1B5F312EF1A9E589CE5361E11E8C1384086165357FFC5BB45A074F3AAE2D273E","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs","status":"Succeeded","startTime":"2023-07-26T06:52:38.8342817Z","endTime":"2023-07-26T06:53:06.4225377Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '624' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:53:10 GMT + etag: + - '"0b001505-0000-0100-0000-64c0c2d20000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack create + Connection: + - keep-alive + ParameterSetName: + - --local-rulestack-name -g -l --default-mode --scope --pan-etag --min-app-id-version + --security-services + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs","name":"testlrs","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-26T06:52:38.0259095Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T06:52:38.0259095Z"},"properties":{"scope":"LOCAL","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"09763ebe-2b81-11ee-86fa-4ad68220d447"}}' + headers: + cache-control: + - no-cache + content-length: + - '918' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:53:10 GMT + etag: + - '"06002fa5-0000-0100-0000-64c0c2d20000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: '{"location": "eastus", "properties": {"associatedRulestack": {"location": + "eastus", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs"}, + "dnsSettings": {"enableDnsProxy": "DISABLED", "enabledDnsType": "CUSTOM"}, "isPanoramaManaged": + "FALSE", "marketplaceDetails": {"marketplaceSubscriptionStatus": "Subscribed", + "offerId": "pan_swfw_cloud_ngfw", "publisherId": "paloaltonetworks"}, "networkProfile": + {"egressNatIp": [], "enableEgressNat": "DISABLED", "networkType": "VNET", "publicIps": + [{"address": "20.112.141.94", "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/fw0718-public-ip"}], + "vnetConfiguration": {"ipOfTrustSubnetForUdr": {"address": "10.0.0.0/16"}, "trustSubnet": + {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet1000005"}, + "unTrustSubnet": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006"}, + "vnet": {"resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004"}}}, + "panoramaConfig": {"configString": "bas64EncodedString"}, "planData": {"billingCycle": + "MONTHLY", "planId": "panw-cloud-ngfw-payg", "usageType": "PAYG"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall create + Connection: + - keep-alive + Content-Length: + - '1727' + Content-Type: + - application/json + ParameterSetName: + - --name -g --location --associated-rulestack --dns-settings --is-panorama-managed + --marketplace-details --network-profile --panorama-config --plan-data --no-wait + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall000002?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall000002","name":"firewall000002","type":"paloaltonetworks.cloudngfw/firewalls","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-26T06:53:14.601121Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T06:53:14.601121Z"},"properties":{"networkProfile":{"vnetConfiguration":{"vnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004"},"trustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet1000005"},"unTrustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006"},"ipOfTrustSubnetForUdr":{"address":"10.0.0.0/16"}},"networkType":"VNET","publicIps":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/fw0718-public-ip","address":"20.112.141.94"}],"enableEgressNat":"DISABLED","egressNatIp":[]},"associatedRulestack":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs","location":"eastus"},"dnsSettings":{"enableDnsProxy":"DISABLED","enabledDnsType":"CUSTOM"},"isPanoramaManaged":"FALSE","panoramaConfig":{"configString":"bas64EncodedString"},"provisioningState":"Accepted","planData":{"usageType":"PAYG","billingCycle":"MONTHLY","planId":"panw-cloud-ngfw-payg","effectiveDate":"0001-01-01T00:00:00"},"marketplaceDetails":{"offerId":"pan_swfw_cloud_ngfw","publisherId":"paloaltonetworks","marketplaceSubscriptionStatus":"Subscribed"}}}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/3f1ca0cd-0d06-4937-ae06-0c82c26d3dbd*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '2239' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:53:16 GMT + etag: + - '"0d00740c-0000-0100-0000-64c0c2dc0000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/3f1ca0cd-0d06-4937-ae06-0c82c26d3dbd*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530?api-version=2022-08-29 + mise-correlation-id: + - a39776f0-d7a2-44f0-a691-1a3f0aebb022 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-writes: + - '1199' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall list + Connection: + - keep-alive + ParameterSetName: + - --resource-group + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls?api-version=2022-08-29 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall000002","name":"firewall000002","type":"paloaltonetworks.cloudngfw/firewalls","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-26T06:53:14.601121Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T06:53:14.601121Z"},"properties":{"networkProfile":{"vnetConfiguration":{"vnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004"},"trustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet1000005"},"unTrustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006"},"ipOfTrustSubnetForUdr":{"address":"10.0.0.0/16"}},"networkType":"VNET","publicIps":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/fw0718-public-ip","address":"20.112.141.94"}],"enableEgressNat":"DISABLED","egressNatIp":[]},"associatedRulestack":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs","location":"eastus"},"dnsSettings":{"enableDnsProxy":"DISABLED","enabledDnsType":"CUSTOM"},"isPanoramaManaged":"FALSE","panoramaConfig":{"configString":"bas64EncodedString"},"provisioningState":"Accepted","planData":{"usageType":"PAYG","billingCycle":"MONTHLY","planId":"panw-cloud-ngfw-payg","effectiveDate":"0001-01-01T00:00:00Z"},"marketplaceDetails":{"offerId":"pan_swfw_cloud_ngfw","publisherId":"paloaltonetworks","marketplaceSubscriptionStatus":"Subscribed"}}}]}' + headers: + cache-control: + - no-cache + content-length: + - '2252' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:53:21 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - fd5942a9-4fa3-4a18-bf32-4ecd777b69ce + - 81721a04-0f7a-4245-b94e-3e39f87beb0a + - 26a3d4b1-a258-4605-9cf0-75b667995e30 + - 2a147538-dfce-4e67-b781-3b08c218574a + - 569712ee-331c-48b4-87cc-bce574a91b79 + - 0476bf5f-ea77-4de9-95c3-a813ef1d62f4 + - ccabb065-de1a-4975-9c6a-c1f9d7dc9e1b + - 35ee4d29-f660-4b04-aeb1-2fae67c0f1fb + - 488ab78f-a5da-4d88-aeda-4874b2d53fe1 + - 5b8994e8-8379-4569-a291-c698f2924812 + - 4fcca043-e3e5-410c-bd23-50e7593c0a6d + - ef1bd735-33e2-4a4d-a1f9-1f7496c95a27 + - 89d5704d-a4e3-4090-b03a-02437a516dc7 + - 0dcdb9f4-9c31-4785-810b-b7961271270d + - fe6395ed-fa23-44e9-9ca3-a73d331e9670 + - cec40019-7dc0-4b84-abdd-9cd959ed0a64 + - 12a053fb-1925-4532-ae84-409318a05bb2 + - 9983cfd3-a4b0-4e7b-b848-758972d2c20e + - e090f179-a1c0-4b2c-a825-47f078c82eba + - e98104cd-f5aa-4ed6-9f5b-7f8d7f089a5e + - 4aa6a944-037d-45ab-896d-ca4195d80405 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall show + Connection: + - keep-alive + ParameterSetName: + - --resource-group -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall000002?api-version=2022-08-29 + response: + body: + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall000002","name":"firewall000002","type":"paloaltonetworks.cloudngfw/firewalls","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-26T06:53:14.601121Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-26T06:53:14.601121Z"},"properties":{"networkProfile":{"vnetConfiguration":{"vnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004"},"trustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet1000005"},"unTrustSubnet":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/Microsoft.Network/virtualNetworks/vnet000004/subnets/subnet2000006"},"ipOfTrustSubnetForUdr":{"address":"10.0.0.0/16"}},"networkType":"VNET","publicIps":[{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/fw0718-public-ip","address":"20.112.141.94"}],"enableEgressNat":"DISABLED","egressNatIp":[]},"associatedRulestack":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/testlrs","location":"eastus"},"dnsSettings":{"enableDnsProxy":"DISABLED","enabledDnsType":"CUSTOM"},"isPanoramaManaged":"FALSE","panoramaConfig":{"configString":"bas64EncodedString"},"provisioningState":"Accepted","planData":{"usageType":"PAYG","billingCycle":"MONTHLY","planId":"panw-cloud-ngfw-payg","effectiveDate":"0001-01-01T00:00:00Z"},"marketplaceDetails":{"offerId":"pan_swfw_cloud_ngfw","publisherId":"paloaltonetworks","marketplaceSubscriptionStatus":"Subscribed"}}}' + headers: + cache-control: + - no-cache + content-length: + - '2240' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:53:23 GMT + etag: + - '"0d00740c-0000-0100-0000-64c0c2dc0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall delete + Connection: + - keep-alive + Content-Length: + - '0' + ParameterSetName: + - --resource-group -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall000002?api-version=2022-08-29 + response: + body: + string: 'null' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '4' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:53:24 GMT + etag: + - '"0d005b0d-0000-0100-0000-64c0c2e50000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530?api-version=2022-08-29 + mise-correlation-id: + - c8b6d8e6-21d1-46cd-a223-c04405b2aa40 + pragma: + - no-cache + request-context: + - appId=cid-v1:4aa06bd6-38f4-4944-9612-cd84d39b5e90 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + x-ms-ratelimit-remaining-subscription-deletes: + - '14999' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530","name":"fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall000002","status":"Deleting","startTime":"2023-07-26T06:53:24.9650302Z"}' + headers: + azure-asyncoperation: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530?api-version=2022-08-29 + cache-control: + - no-cache + content-length: + - '554' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:53:25 GMT + etag: + - '"0b00ab0a-0000-0100-0000-64c0c2e40000"' + expires: + - '-1' + location: + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530?api-version=2022-08-29 + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw firewall delete + Connection: + - keep-alive + ParameterSetName: + - --resource-group -n + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530","name":"fdc3bbe3-8250-4f2a-833a-1340c4ae9940*C7F11E7196DB82603105139BD5992EC5A20D61D50A4B4295022D539C565CD530","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_firewall000001/providers/PaloAltoNetworks.Cloudngfw/firewalls/firewall000002","status":"Succeeded","startTime":"2023-07-26T06:53:24.9650302Z","endTime":"2023-07-26T06:53:30.0188066Z","error":{},"properties":null}' + headers: + cache-control: + - no-cache + content-length: + - '625' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 26 Jul 2023 06:53:55 GMT + etag: + - '"0b00950b-0000-0100-0000-64c0c2ea0000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py index dca5ba21347..2614ec87889 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py @@ -17,27 +17,26 @@ class PaloAltoNetworksScenario(ScenarioTest): def test_palo_alto_networks_cloudngfw_firewall(self, resource_group): self.kwargs.update({ 'cloudngfw_firewall_name': self.create_random_name('firewall', 15), - # 'public_ip_name': 'test-public-ip', 'public_ip_name': 'fw0718-public-ip', 'local_rulestack_name': 'test-local-rulestack', 'prefix': 'test-publicip-prefix', + 'nsg': self.create_random_name('nsg', 10), + 'vnet': self.create_random_name('vnet', 10), 'subnet1': self.create_random_name('subnet1', 12), 'subnet2': self.create_random_name('subnet2', 12), 'loc': 'centraluseuap' }) - # ip_prefix = self.cmd('az network public-ip prefix create -g {rg} -n {prefix} --length 28').get_output_in_json()['ipPrefix'] - # self.kwargs.update({'ip_address': ip_prefix.split('/')[0]}) - # public_ip = self.cmd('az network public-ip create -g {rg} -n {public_ip_name} --ip-address {ip_address} --public-ip-prefix {prefix}').get_output_in_json()['publicIp'] - vnet = self.cmd('az network vnet create -g {rg} -n testvnet --address-prefix 10.0.0.0/16').get_output_in_json()['newVNet'] - subnet1 = self.cmd('az network vnet subnet create -g {rg} --vnet-name testvnet -n {subnet1}').get_output_in_json() - subnet2 = self.cmd('az network vnet subnet create -g {rg} --vnet-name testvnet -n {subnet2}').get_output_in_json() + self.cmd('az network nsg create -g {rg} -n {nsg}') + self.cmd('az network vnet create -g {rg} -n {vnet} --address-prefix 10.0.0.0/16 --nsg {nsg} --subnet-name {subnet1} --subnet-prefixes 10.0.0.0/26') + self.cmd('az network vnet subnet create -g {rg} --vnet-name {vnet} -n {subnet2} --address-prefixes 10.0.1.0/26') + vnet = self.cmd('az network vnet show -g {rg} -n {vnet}').get_output_in_json() local_rulestack = self.cmd('az palo-alto cloudngfw local-rulestack create --local-rulestack-name testlrs -g {rg} -l eastus --default-mode "IPS" --scope "LOCAL" --pan-etag "9fa4e2c6-1b0c-11ee-b587-3e4c117c6534" --min-app-id-version "8595-7473" --security-services {{"vulnerability-profile":"BestPractice","anti-spyware-profile":"BestPractice","anti-virus-profile":"BestPractice","url-filtering-profile":"BestPractice","file-blocking-profile":"BestPractice","dns-subscription":"BestPractice"}}').get_output_in_json() self.kwargs.update({ 'public_ip_id': "/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/rheaTerraformTest/providers/Microsoft.Network/publicIPAddresses/fw0718-public-ip", 'vnet_id': vnet['id'], 'rulestack_id': local_rulestack['id'], - 'trust_subnet': subnet1['id'], - 'un_trust_subnet': subnet2['id'] + 'trust_subnet': vnet['subnets'][0]['id'], + 'un_trust_subnet': vnet['subnets'][1]['id'] }) self.cmd('az palo-alto cloudngfw firewall create ' '--name {cloudngfw_firewall_name} ' @@ -50,7 +49,6 @@ def test_palo_alto_networks_cloudngfw_firewall(self, resource_group): '--network-profile {{"egress-nat-ip":[],"enable-egress-nat":DISABLED,"network-type":VNET,"public-ips":[{{"address":"20.112.141.94","resource-id":{public_ip_id}}}],' '"vnet-configuration":{{"ip-of-trust-subnet-for-udr":{{"address":10.0.0.0/16}},"trust-subnet":{{"resource-id":{trust_subnet}}},"un-trust-subnet":{{"resource-id":{un_trust_subnet}}},"vnet":{{"resource-id":{vnet_id}}}}}}} ' '--panorama-config {{"config-string":bas64EncodedString}} --plan-data {{"billing-cycle":MONTHLY,"plan-id":panw-cloud-ngfw-payg,"usage-type":PAYG}} --no-wait') - self.cmd('az palo-alto cloudngfw firewall wait --resource-group {rg} --name {cloudngfw_firewall_name} --created') self.cmd('az palo-alto cloudngfw firewall list --resource-group {rg}', checks=[ self.check('length(@)', 1), @@ -59,33 +57,30 @@ def test_palo_alto_networks_cloudngfw_firewall(self, resource_group): checks=[ self.check('associatedRulestack.resourceId', '{rulestack_id}'), self.check('dnsSettings.enableDnsProxy', 'DISABLED'), - self.check('length(frontEndSettings)', 1), self.check('isPanoramaManaged', "FALSE"), self.check('location', "eastus"), - self.check('marketplaceDetails.marketplaceSubscriptionStatus', "NotStarted"), + self.check('marketplaceDetails.marketplaceSubscriptionStatus', "Subscribed"), self.check('marketplaceDetails.offerId', "pan_swfw_cloud_ngfw"), self.check('marketplaceDetails.publisherId', "paloaltonetworks"), self.check('name', '{cloudngfw_firewall_name}'), - self.check('length(networkProfile.egressNatIp)', 1), - self.check('networkProfile.enableEgressNat', "ENABLED"), + self.check('networkProfile.enableEgressNat', "DISABLED"), self.check('panoramaConfig.configString', "bas64EncodedString"), - self.check('planData.billingCycle', "MONTHLY"), - self.check('provisioningState', "Succeeded") + self.check('planData.billingCycle', "MONTHLY") ]) + self.cmd('az palo-alto cloudngfw firewall delete --resource-group {rg} -n {cloudngfw_firewall_name}') @AllowLargeResponse(size_kb=10240) - @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_firewall_update') - def test_palo_alto_firewall_update(self, resource_group): + def test_palo_alto_firewall_update(self): self.kwargs.update({ - 'resource_group': 'CUSEUAP', - 'firewall_name': 'OsamaV3', + 'resource_group': 'rheaTerraformTest', + 'firewall_name': 'prodStabilityTest', }) - self.cmd('az palo-alto cloudngfw firewall update --name {firewall_name} -g {rg} --tags {{"tagName":"value"}}') - self.cmd('az palo-alto cloudngfw firewall show --name {firewall_name} -g {rg}', self.check('tags.tagName', "value")) + self.cmd('az palo-alto cloudngfw firewall update --name {firewall_name} -g {resource_group} --tags {{"tagName":"value"}}') + self.cmd('az palo-alto cloudngfw firewall show --name {firewall_name} -g {resource_group}', self.check('tags.tagName', "value")) @AllowLargeResponse(size_kb=10240) @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_firewall_v2') - def test_palo_alto_firewall_v2(self, resource_group): + def test_palo_alto_firewall_v2(self): self.kwargs.update({ 'loc': 'eastus', 'resource_group': 'rheaTerraformTest', From 41008fd38b79c65243f832a74fd9ecba4eb22357 Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Wed, 26 Jul 2023 15:32:35 +0800 Subject: [PATCH 05/10] update --- .github/CODEOWNERS | 2 ++ src/service_name.json | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4409ffb4fa8..351390fd5a5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -128,6 +128,8 @@ /src/timeseriesinsights/ @jiasli +/src/palo-alto-networks/ @kairu-ms @necusjz @ZengTaoxu + /src/portal/ @YalinLi0312 /src/import-export/ @xfz11 diff --git a/src/service_name.json b/src/service_name.json index 50f1a0ab743..62eb261c42f 100644 --- a/src/service_name.json +++ b/src/service_name.json @@ -414,6 +414,11 @@ "AzureServiceName": "Migrate", "URL": "https://learn.microsoft.com/azure/migrate" }, + { + "Command": "az palo-alto", + "AzureServiceName": "Palo Alto Networks", + "URL": "https://learn.microsoft.com/en-us/azure/partner-solutions/palo-alto/" + }, { "Command": "az peering", "AzureServiceName": "Networking", From adec29bfdbe28c7d3682d2e16bc9c09061d7478c Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Wed, 26 Jul 2023 15:35:38 +0800 Subject: [PATCH 06/10] Update CODEOWNERS --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 351390fd5a5..c868513f035 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -128,7 +128,7 @@ /src/timeseriesinsights/ @jiasli -/src/palo-alto-networks/ @kairu-ms @necusjz @ZengTaoxu +/src/palo-alto-networks/ @kairu-ms @ZengTaoxu /src/portal/ @YalinLi0312 From d746e331d874239dcd6cbaef987da32c493fdd96 Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Fri, 28 Jul 2023 10:23:46 +0800 Subject: [PATCH 07/10] update --- .../palo_alto/cloudngfw/firewall/_create.py | 3 + .../palo_alto/cloudngfw/firewall/_delete.py | 3 + .../cloudngfw/firewall/_get_log_profile.py | 5 +- .../cloudngfw/firewall/_get_support_info.py | 5 +- .../palo_alto/cloudngfw/firewall/_list.py | 5 + .../cloudngfw/firewall/_save_log_profile.py | 11 +- .../palo_alto/cloudngfw/firewall/_show.py | 3 + .../palo_alto/cloudngfw/firewall/_update.py | 3 + .../cloudngfw/firewall/status/_list.py | 5 + .../firewall/status/default/_show.py | 3 + .../cloudngfw/local_rulestack/_create.py | 5 +- .../cloudngfw/local_rulestack/_delete.py | 3 + .../local_rulestack/_get_change_log.py | 3 + .../local_rulestack/_get_support_info.py | 5 +- .../cloudngfw/local_rulestack/_list.py | 5 + .../_list_advanced_security_object.py | 6 + .../cloudngfw/local_rulestack/_list_app_id.py | 7 + .../local_rulestack/_list_country.py | 5 + .../local_rulestack/_list_firewall.py | 3 + .../_list_predefined_url_category.py | 5 + .../local_rulestack/_list_security_service.py | 6 + .../cloudngfw/local_rulestack/_revert.py | 3 + .../cloudngfw/local_rulestack/_show.py | 3 + .../cloudngfw/local_rulestack/_update.py | 3 + .../local_rulestack/certificate/_create.py | 11 +- .../local_rulestack/certificate/_delete.py | 3 + .../local_rulestack/certificate/_list.py | 5 + .../local_rulestack/certificate/_show.py | 3 + .../local_rulestack/fqdnlist/_create.py | 3 + .../local_rulestack/fqdnlist/_delete.py | 3 + .../local_rulestack/fqdnlist/_list.py | 5 + .../local_rulestack/fqdnlist/_show.py | 3 + .../local_rulestack/local_rule/_create.py | 5 +- .../local_rulestack/local_rule/_delete.py | 3 + .../local_rule/_get_counter.py | 4 + .../local_rulestack/local_rule/_list.py | 3 + .../local_rule/_refresh_counter.py | 4 + .../local_rule/_reset_counter.py | 4 + .../local_rulestack/local_rule/_show.py | 3 + .../local_rulestack/prefixlist/_create.py | 3 + .../local_rulestack/prefixlist/_delete.py | 3 + .../local_rulestack/prefixlist/_list.py | 5 + .../local_rulestack/prefixlist/_show.py | 3 + ...to_networks_cloudngfw_local_rulestack.yaml | 383 +++++++++--------- .../tests/latest/test_palo_alto_networks.py | 2 + 45 files changed, 375 insertions(+), 194 deletions(-) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py index 97da402b39e..91fe6f355e7 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py @@ -16,6 +16,9 @@ ) class Create(AAZCommand): """Create a FirewallResource + + :example: Create a FirewallResource + az palo-alto cloudngfw firewall create --name MyCloudngfwFirewall -g MyResourceGroup --location eastus --associated-rulestack {"location":eastus,"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/MyLocalRulestacks} --dns-settings {"enable-dns-proxy":DISABLED,"enabled-dns-type":CUSTOM} --is-panorama-managed FALSE --marketplace-details {"marketplace-subscription-status":Subscribed,"offer-id":offer-id,"publisher-id":publisher-id} --network-profile {"egress-nat-ip":[],"enable-egress-nat":DISABLED,"network-type":VNET,"public-ips":[{"address":"10.0.0.0/16","resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/publicIPAddresses/MypublicIP}],"vnet-configuration":{"ip-of-trust-subnet-for-udr":{"address":10.0.0.0/16},"trust-subnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},"un-trust-subnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},"vnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet}}} --panorama-config {"config-string":bas64EncodedString} --plan-data {"billing-cycle":MONTHLY,"plan-id":plan-id,"usage-type":PAYG} """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py index 2a410a4ebcc..21e1793107e 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_delete.py @@ -16,6 +16,9 @@ ) class Delete(AAZCommand): """Delete a FirewallResource + + :example: Delete a FirewallResource + az palo-alto cloudngfw firewall delete --resource-group MyResourceGroup -n MyCloudngfwFirewall """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py index c244e770be7..89201594621 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py @@ -15,7 +15,10 @@ "palo-alto cloudngfw firewall get-log-profile", ) class GetLogProfile(AAZCommand): - """Log Profile for Firewall + """Get Log Profile for Firewall + + :example: Get Log Profile for Firewall + az palo-alto cloudngfw firewall get-log-profile --resource-group MyResourceGroup -n MyCloudngfwFirewall """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py index fc85fa70821..ff67e9fdc27 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py @@ -15,7 +15,10 @@ "palo-alto cloudngfw firewall get-support-info", ) class GetSupportInfo(AAZCommand): - """support info for firewall. + """Support info for firewall. + + :example: Get support info for firewall. + az palo-alto cloudngfw firewall get-support-info --resource-group MyResourceGroup -n MyCloudngfwFirewall """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py index 439f2fd93cb..729d643eef8 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_list.py @@ -16,6 +16,9 @@ ) class List(AAZCommand): """List FirewallResource resources by subscription ID + + :example: List FirewallResource resources by subscription ID + az palo-alto cloudngfw firewall list --resource-group MyResourceGroup """ _aaz_info = { @@ -26,6 +29,8 @@ class List(AAZCommand): ] } + AZ_SUPPORT_PAGINATION = True + def _handler(self, command_args): super()._handler(command_args) return self.build_paging(self._execute_operations, self._output) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py index 85b43f52fd9..5b732a815c7 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_save_log_profile.py @@ -15,7 +15,10 @@ "palo-alto cloudngfw firewall save-log-profile", ) class SaveLogProfile(AAZCommand): - """Log Profile for Firewall + """Save Log Profile for Firewall + + :example: Save Log Profile for Firewall + az palo-alto cloudngfw firewall save-log-profile --resource-group MyResourceGroup -n MyCloudngfwFirewall --log-option "SAME_DESTINATION" --log-type "TRAFFIC" """ _aaz_info = { @@ -66,7 +69,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) cls._build_args_log_destination_create(_args_schema.common_destination) _args_schema.decrypt_log_destination = AAZObjectArg( - options=["--decrypt-log-destination"], + options=["--decrypt-destination", "--decrypt-log-destination"], arg_group="LogSettings", help="Decrypt destination configurations", ) @@ -84,13 +87,13 @@ def _build_arguments_schema(cls, *args, **kwargs): enum={"AUDIT": "AUDIT", "DECRYPTION": "DECRYPTION", "DLP": "DLP", "THREAT": "THREAT", "TRAFFIC": "TRAFFIC", "WILDFIRE": "WILDFIRE"}, ) _args_schema.threat_log_destination = AAZObjectArg( - options=["--threat-log-destination"], + options=["--threat-destination", "--threat-log-destination"], arg_group="LogSettings", help="Threat destination configurations", ) cls._build_args_log_destination_create(_args_schema.threat_log_destination) _args_schema.traffic_log_destination = AAZObjectArg( - options=["--traffic-log-destination"], + options=["--traffic-destination", "--traffic-log-destination"], arg_group="LogSettings", help="Traffic destination configurations", ) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py index aecd4256496..123e9bcc2b1 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show.py @@ -16,6 +16,9 @@ ) class Show(AAZCommand): """Get a FirewallResource + + :example: Get a FirewallResource + az palo-alto cloudngfw firewall show --name MyCloudngfwFirewall -g MyResourceGroup """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py index 7f1d00aabea..9f77aa9ac68 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py @@ -16,6 +16,9 @@ ) class Update(AAZCommand): """Update a FirewallResource + + :example: Update a FirewallResource + az palo-alto cloudngfw firewall update --name MyCloudngfwFirewall -g MyResourceGroup --tags {"tagName":"value"} """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py index 2478256a5bb..97aa1fccfbb 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/_list.py @@ -16,6 +16,9 @@ ) class List(AAZCommand): """List FirewallStatusResource resources by Firewalls + + :example: List FirewallStatusResource resources by Firewalls + az palo-alto cloudngfw firewall status list --resource-group MyResourceGroup -n MyCloudngfwFirewall """ _aaz_info = { @@ -25,6 +28,8 @@ class List(AAZCommand): ] } + AZ_SUPPORT_PAGINATION = True + def _handler(self, command_args): super()._handler(command_args) return self.build_paging(self._execute_operations, self._output) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py index a90ad16f785..808b2e9140f 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/status/default/_show.py @@ -16,6 +16,9 @@ ) class Show(AAZCommand): """Get a FirewallStatusResource + + :example: Get a FirewallStatusResource + az palo-alto cloudngfw firewall status default show --resource-group MyResourceGroup -n MyCloudngfwFirewall """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py index c1a72bbe8f3..4dd98b75c55 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py @@ -16,6 +16,9 @@ ) class Create(AAZCommand): """Create a LocalRulestackResource + + :example: Create a LocalRulestackResource + az palo-alto cloudngfw local-rulestack create -g MyResourceGroup -n MyLocalRulestacks --identity {"type":None} --location eastus --default-mode IPS --description "local rulestacks" --min-app-id-version "8595-7473" --scope "LOCAL" --security-services {"vulnerability-profile":"BestPractice","anti-spyware-profile":"BestPractice","anti-virus-profile":"BestPractice","url-filtering-profile":"BestPractice","file-blocking-profile":"BestPractice","dns-subscription":"BestPractice"} """ _aaz_info = { @@ -55,7 +58,7 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema = cls._args_schema _args_schema.associated_subscriptions = AAZListArg( - options=["--associated-subscriptions"], + options=["--associated-subs", "--associated-subscriptions"], arg_group="Properties", help="subscription scope of global rulestack", ) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py index 07eb6eda06f..c0c038798ee 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_delete.py @@ -16,6 +16,9 @@ ) class Delete(AAZCommand): """Delete a LocalRulestackResource + + :example: Delete a LocalRulestackResource + az palo-alto cloudngfw local-rulestack delete -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py index a0c62f29be4..51b4a6e3019 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py @@ -16,6 +16,9 @@ ) class GetChangeLog(AAZCommand): """Get changelog + + :example: Get changelog + az palo-alto cloudngfw local-rulestack get-change-log -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py index 94f767dfcf2..eff360be6a9 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py @@ -15,7 +15,10 @@ "palo-alto cloudngfw local-rulestack get-support-info", ) class GetSupportInfo(AAZCommand): - """support info for rulestack. + """Support info for rulestack. + + :example: Support info for rulestack. + az palo-alto cloudngfw local-rulestack get-support-info -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py index aed9d1a4dfe..2ce1a883d99 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list.py @@ -16,6 +16,9 @@ ) class List(AAZCommand): """List LocalRulestackResource resources by subscription ID + + :example: List LocalRulestackResource resources by subscription ID + az palo-alto cloudngfw local-rulestack list -g MyResourceGroup """ _aaz_info = { @@ -26,6 +29,8 @@ class List(AAZCommand): ] } + AZ_SUPPORT_PAGINATION = True + def _handler(self, command_args): super()._handler(command_args) return self.build_paging(self._execute_operations, self._output) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py index 71b0a4a9945..dce542356b5 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_advanced_security_object.py @@ -16,6 +16,9 @@ ) class ListAdvancedSecurityObject(AAZCommand): """Get the list of advanced security objects + + :example: Get the list of advanced security objects + az palo-alto cloudngfw local-rulestack list-advanced-security-object -g MyResourceGroup -n MyLocalRulestacks --type feeds """ _aaz_info = { @@ -52,12 +55,15 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.skip = AAZStrArg( options=["--skip"], + help="LocalRulestack resource skip", ) _args_schema.top = AAZIntArg( options=["--top"], + help="LocalRulestack resource top", ) _args_schema.type = AAZStrArg( options=["--type"], + help="LocalRulestack resource type", required=True, enum={"feeds": "feeds", "urlCustom": "urlCustom"}, ) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py index c754ccf7288..94b10911d88 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_app_id.py @@ -16,6 +16,9 @@ ) class ListAppId(AAZCommand): """List of AppIds for LocalRulestack ApiVersion + + :example: List of AppIds for LocalRulestack ApiVersion + az palo-alto cloudngfw local-rulestack list-app-id -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { @@ -52,15 +55,19 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.app_id_version = AAZStrArg( options=["--app-id-version"], + help="LocalRulestack resource app-id-version", ) _args_schema.app_prefix = AAZStrArg( options=["--app-prefix"], + help="LocalRulestack resource app-prefix", ) _args_schema.skip = AAZStrArg( options=["--skip"], + help="LocalRulestack resource skip", ) _args_schema.top = AAZIntArg( options=["--top"], + help="LocalRulestack resource top", ) return cls._args_schema diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py index 398b7411eac..30fba0e7ea7 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_country.py @@ -16,6 +16,9 @@ ) class ListCountry(AAZCommand): """List of countries for Rulestack + + :example: List of countries for Rulestack + az palo-alto cloudngfw local-rulestack list-country -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { @@ -52,9 +55,11 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.skip = AAZStrArg( options=["--skip"], + help="LocalRulestack resource skip", ) _args_schema.top = AAZIntArg( options=["--top"], + help="LocalRulestack resource top", ) return cls._args_schema diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py index 8d7147598c3..bf35ed18dd1 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_firewall.py @@ -16,6 +16,9 @@ ) class ListFirewall(AAZCommand): """List of Firewalls associated with Rulestack + + :example: List of Firewalls associated with Rulestack + az palo-alto cloudngfw local-rulestack list-firewall -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py index 6b367979c9d..a6cf8149b27 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_predefined_url_category.py @@ -16,6 +16,9 @@ ) class ListPredefinedUrlCategory(AAZCommand): """List predefined URL categories for rulestack + + :example: List predefined URL categories for rulestack + az palo-alto cloudngfw local-rulestack list-predefined-url-category -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { @@ -52,9 +55,11 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.skip = AAZStrArg( options=["--skip"], + help="LocalRulestack resource skip", ) _args_schema.top = AAZIntArg( options=["--top"], + help="LocalRulestack resource top", ) return cls._args_schema diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py index 0738dae1542..92f85a60dc9 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_list_security_service.py @@ -16,6 +16,9 @@ ) class ListSecurityService(AAZCommand): """List the security services for rulestack + + :example: List the security services for rulestack + az palo-alto cloudngfw local-rulestack list-security-service -g MyResourceGroup -n MyLocalRulestacks --type antiSpyware """ _aaz_info = { @@ -52,12 +55,15 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.skip = AAZStrArg( options=["--skip"], + help="LocalRulestack resource skip", ) _args_schema.top = AAZIntArg( options=["--top"], + help="LocalRulestack resource top", ) _args_schema.type = AAZStrArg( options=["--type"], + help="LocalRulestack resource type", required=True, enum={"antiSpyware": "antiSpyware", "antiVirus": "antiVirus", "dnsSubscription": "dnsSubscription", "fileBlocking": "fileBlocking", "ipsVulnerability": "ipsVulnerability", "urlFiltering": "urlFiltering"}, ) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py index 9c3c38a0094..a1b780dfeef 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_revert.py @@ -16,6 +16,9 @@ ) class Revert(AAZCommand): """Revert rulestack configuration + + :example: Revert rulestack configuration + az palo-alto cloudngfw local-rulestack revert -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show.py index 6c8720902d6..61382f3bc21 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show.py @@ -16,6 +16,9 @@ ) class Show(AAZCommand): """Get a LocalRulestackResource + + :example: Get a LocalRulestackResource + az palo-alto cloudngfw local-rulestack show -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py index edb7c966ab6..00d4951ecc2 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py @@ -16,6 +16,9 @@ ) class Update(AAZCommand): """Update a LocalRulestackResource + + :example: Update a LocalRulestackResource + az palo-alto cloudngfw local-rulestack update -g MyResourceGroup -n MyLocalRulestacks --tags {"tag-name":"value"} """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py index 16fe2514085..8e3b7da049e 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_create.py @@ -16,6 +16,9 @@ ) class Create(AAZCommand): """Create a CertificateObjectLocalRulestackResource + + :example: Create a CertificateObjectLocalRulestackResource + az palo-alto cloudngfw local-rulestack certificate create -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyCertificate --audit-comment "comment" --certificate-self-signed "TRUE" --description "description" """ _aaz_info = { @@ -65,14 +68,14 @@ def _build_arguments_schema(cls, *args, **kwargs): help="comment for this object", ) _args_schema.certificate_self_signed = AAZStrArg( - options=["--certificate-self-signed"], + options=["--certificate-signed", "--certificate-self-signed"], arg_group="Properties", help="use certificate self signed", required=True, enum={"FALSE": "FALSE", "TRUE": "TRUE"}, ) - _args_schema.certificate_signer_resource_id = AAZStrArg( - options=["--certificate-signer-resource-id"], + _args_schema.certificate_signer_id = AAZStrArg( + options=["--certificate-signer-id"], arg_group="Properties", help="Resource Id of certificate signer, to be populated only when certificateSelfSigned is false", ) @@ -204,7 +207,7 @@ def content(self): if properties is not None: properties.set_prop("auditComment", AAZStrType, ".audit_comment") properties.set_prop("certificateSelfSigned", AAZStrType, ".certificate_self_signed", typ_kwargs={"flags": {"required": True}}) - properties.set_prop("certificateSignerResourceId", AAZStrType, ".certificate_signer_resource_id") + properties.set_prop("certificateSignerResourceId", AAZStrType, ".certificate_signer_id") properties.set_prop("description", AAZStrType, ".description") properties.set_prop("etag", AAZStrType, ".etag") diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py index 25f8aaf2a5e..fd85210afcc 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_delete.py @@ -16,6 +16,9 @@ ) class Delete(AAZCommand): """Delete a CertificateObjectLocalRulestackResource + + :example: Delete a CertificateObjectLocalRulestackResource + az palo-alto cloudngfw local-rulestack certificate delete -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyCertificate """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py index fafe7588f03..40fe9717566 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_list.py @@ -16,6 +16,9 @@ ) class List(AAZCommand): """List CertificateObjectLocalRulestackResource resources by LocalRulestacks + + :example: List CertificateObjectLocalRulestackResource resources by LocalRulestacks + az palo-alto cloudngfw local-rulestack certificate list -g MyResourceGroup --local-rulestack-name MyLocalRulestacks """ _aaz_info = { @@ -25,6 +28,8 @@ class List(AAZCommand): ] } + AZ_SUPPORT_PAGINATION = True + def _handler(self, command_args): super()._handler(command_args) return self.build_paging(self._execute_operations, self._output) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_show.py index 81540b0cf78..47622e9c025 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_show.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/certificate/_show.py @@ -16,6 +16,9 @@ ) class Show(AAZCommand): """Get a CertificateObjectLocalRulestackResource + + :example: Get a CertificateObjectLocalRulestackResource + az palo-alto cloudngfw local-rulestack certificate show -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyCertificate """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py index b9d96acfed9..999ad6ee1c7 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py @@ -16,6 +16,9 @@ ) class Create(AAZCommand): """Create a FqdnListLocalRulestackResource + + :example: Create a FqdnListLocalRulestackResource + az palo-alto cloudngfw local-rulestack fqdnlist create -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyFqdnlist --audit-comment "string" --description "description" --fqdn-list ["string1","string2"] """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py index c80e2a180d1..ca45cf4b85c 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_delete.py @@ -16,6 +16,9 @@ ) class Delete(AAZCommand): """Delete a FqdnListLocalRulestackResource + + :example: Delete a FqdnListLocalRulestackResource + az palo-alto cloudngfw local-rulestack fqdnlist delete -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyFqdnlist """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py index 88eec87140f..b4dfbb2bb53 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_list.py @@ -16,6 +16,9 @@ ) class List(AAZCommand): """List FqdnListLocalRulestackResource resources by LocalRulestacks + + :example: List FqdnListLocalRulestackResource resources by LocalRulestacks + az palo-alto cloudngfw local-rulestack fqdnlist list -g MyResourceGroup --local-rulestack-name MyLocalRulestacks """ _aaz_info = { @@ -25,6 +28,8 @@ class List(AAZCommand): ] } + AZ_SUPPORT_PAGINATION = True + def _handler(self, command_args): super()._handler(command_args) return self.build_paging(self._execute_operations, self._output) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_show.py index a754364f6f2..fc2f15f489a 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_show.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_show.py @@ -16,6 +16,9 @@ ) class Show(AAZCommand): """Get a FqdnListLocalRulestackResource + + :example: Get a FqdnListLocalRulestackResource + az palo-alto cloudngfw local-rulestack fqdnlist show -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyFqdnlist """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py index e4e27a4b84c..1a365d8f88a 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_create.py @@ -16,6 +16,9 @@ ) class Create(AAZCommand): """Create a LocalRulesResource + + :example: Create a LocalRulesResource + az palo-alto cloudngfw local-rulestack local-rule create -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --rule-name MyLocalRule --priority "1" --action-type "Allow" --enable-logging "DISABLED" --rule-state "DISABLED" """ _aaz_info = { @@ -108,7 +111,7 @@ def _build_arguments_schema(cls, *args, **kwargs): help="etag info", ) _args_schema.inbound_inspection_certificate = AAZStrArg( - options=["--inbound-inspection-certificate"], + options=["--inbound-certificate", "--inbound-inspection-certificate"], arg_group="Properties", help="inbound Inspection Certificate", ) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py index d63046cbc2b..f65c09c0ddc 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_delete.py @@ -16,6 +16,9 @@ ) class Delete(AAZCommand): """Delete a LocalRulesResource + + :example: Delete a LocalRulesResource + az palo-alto cloudngfw local-rulestack local-rule delete -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --priority "1" """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py index da54ded476d..62ac0b3ad38 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py @@ -16,6 +16,9 @@ ) class GetCounter(AAZCommand): """Get counters + + :example: Get counters + az palo-alto cloudngfw local-rulestack local-rule get-counter -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --priority "1" """ _aaz_info = { @@ -58,6 +61,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.firewall_name = AAZStrArg( options=["--firewall-name"], + help="Firewall resource name", ) return cls._args_schema diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py index 91a11ff1641..f9ab79a76ca 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_list.py @@ -16,6 +16,9 @@ ) class List(AAZCommand): """List LocalRulesResource resources by LocalRulestacks + + :example: List LocalRulesResource resources by LocalRulestacks + az palo-alto cloudngfw local-rulestack local-rule list -g MyResourceGroup --local-rulestack-name MyLocalRulestacks """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py index 2f7228f0bb6..220af9fc027 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_refresh_counter.py @@ -16,6 +16,9 @@ ) class RefreshCounter(AAZCommand): """Refresh counters + + :example: Refresh counters + az palo-alto cloudngfw local-rulestack local-rule refresh-counter -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --priority "1" """ _aaz_info = { @@ -58,6 +61,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.firewall_name = AAZStrArg( options=["--firewall-name"], + help="Firewall resource name", ) return cls._args_schema diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py index c2783969f85..f5a894d8be9 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_reset_counter.py @@ -16,6 +16,9 @@ ) class ResetCounter(AAZCommand): """Reset counters + + :example: Reset counters + az palo-alto cloudngfw local-rulestack local-rule reset-counter -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --priority "1" """ _aaz_info = { @@ -58,6 +61,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ) _args_schema.firewall_name = AAZStrArg( options=["--firewall-name"], + help="Firewall resource name", ) return cls._args_schema diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py index 471727bdbeb..3f7a1880b16 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show.py @@ -16,6 +16,9 @@ ) class Show(AAZCommand): """Get a LocalRulesResource + + :example: Get a LocalRulesResource + az palo-alto cloudngfw local-rulestack local-rule show -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --priority "1" """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py index 5f80ff28f1f..ab4c5744ba6 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py @@ -16,6 +16,9 @@ ) class Create(AAZCommand): """Create a PrefixListResource + + :example: Create a PrefixListResource + az palo-alto cloudngfw local-rulestack prefixlist create -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyPrefixlist --audit-comment "comment" --description "string" --prefix-list ["1.0.0.0/24"] """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py index 0b3d3ed40be..d0719b36956 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_delete.py @@ -16,6 +16,9 @@ ) class Delete(AAZCommand): """Delete a PrefixListResource + + :example: Delete a PrefixListResource + az palo-alto cloudngfw local-rulestack prefixlist delete -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyPrefixlist """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_list.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_list.py index 7c4a892e6fd..b1f10463566 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_list.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_list.py @@ -16,6 +16,9 @@ ) class List(AAZCommand): """List PrefixListResource resources by LocalRulestacks + + :example: List PrefixListResource resources by LocalRulestacks + az palo-alto cloudngfw local-rulestack prefixlist list -g MyResourceGroup --local-rulestack-name MyLocalRulestacks """ _aaz_info = { @@ -25,6 +28,8 @@ class List(AAZCommand): ] } + AZ_SUPPORT_PAGINATION = True + def _handler(self, command_args): super()._handler(command_args) return self.build_paging(self._execute_operations, self._output) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_show.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_show.py index 7b5eacb3837..58dd9cb15cf 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_show.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_show.py @@ -16,6 +16,9 @@ ) class Show(AAZCommand): """Get a PrefixListResource + + :example: Get a PrefixListResource + az palo-alto cloudngfw local-rulestack prefixlist show -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyPrefixlist """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml index 602e3c0dc6d..95289a868dd 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml @@ -27,11 +27,11 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:49:50.5335203Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:15:25.5732058Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Accepted","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice","outboundUnTrustCertificate":null,"outboundTrustCertificate":null},"defaultMode":"IPS"}}' headers: azure-asyncoperation: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 cache-control: - no-cache content-length: @@ -39,15 +39,15 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:49:52 GMT + - Fri, 28 Jul 2023 02:15:27 GMT etag: - - '"0b00ad81-0000-0100-0000-64bf9ac00000"' + - '"39004321-0000-0100-0000-64c324be0000"' expires: - '-1' location: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 mise-correlation-id: - - dcd68115-ca1d-49fc-b57a-809123f01300 + - 83ce4f18-829c-4555-8801-b2fd94b5dc1a pragma: - no-cache request-context: @@ -80,10 +80,10 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-25T09:49:51.6325617Z"}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-28T02:15:26.6333959Z"}' headers: cache-control: - no-cache @@ -92,9 +92,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:49:52 GMT + - Fri, 28 Jul 2023 02:15:28 GMT etag: - - '"6e00df70-0000-0100-0000-64bf9abf0000"' + - '"04002a27-0000-0100-0000-64c324be0000"' expires: - '-1' pragma: @@ -127,57 +127,10 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-25T09:49:51.6325617Z"}' - headers: - cache-control: - - no-cache - content-length: - - '573' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 25 Jul 2023 09:50:24 GMT - etag: - - '"6e00df70-0000-0100-0000-64bf9abf0000"' - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - palo-alto cloudngfw local-rulestack create - Connection: - - keep-alive - ParameterSetName: - - -g -n --identity --location --default-mode --description --min-app-id-version - --scope --security-services - User-Agent: - - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) - method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 - response: - body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"c0bc8973-7df5-41ba-b095-83b013e60bab*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-25T09:49:51.6325617Z","endTime":"2023-07-25T09:50:31.3669459Z","error":{},"properties":null}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:15:26.6333959Z","endTime":"2023-07-28T02:16:00.8592909Z","error":{},"properties":null}' headers: cache-control: - no-cache @@ -186,9 +139,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:50:54 GMT + - Fri, 28 Jul 2023 02:17:11 GMT etag: - - '"6e002871-0000-0100-0000-64bf9ae70000"' + - '"0400ad27-0000-0100-0000-64c324e00000"' expires: - '-1' pragma: @@ -224,8 +177,8 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:49:50.5335203Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local - rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"a51dad40-2ad0-11ee-9b89-e69a6f85f08a"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:15:25.5732058Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"a7647476-2cec-11ee-9669-6eecfc0ae1a7"}}' headers: cache-control: - no-cache @@ -234,9 +187,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:50:54 GMT + - Fri, 28 Jul 2023 02:17:14 GMT etag: - - '"0b00ba81-0000-0100-0000-64bf9ae70000"' + - '"3900b622-0000-0100-0000-64c324e00000"' expires: - '-1' pragma: @@ -273,8 +226,8 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:49:50.5335203Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local - rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"a51dad40-2ad0-11ee-9b89-e69a6f85f08a"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:15:25.5732058Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"a7647476-2cec-11ee-9669-6eecfc0ae1a7"}}' headers: cache-control: - no-cache @@ -283,9 +236,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:50:57 GMT + - Fri, 28 Jul 2023 02:17:22 GMT etag: - - '"0b00ba81-0000-0100-0000-64bf9ae70000"' + - '"3900b622-0000-0100-0000-64c324e00000"' expires: - '-1' pragma: @@ -306,7 +259,7 @@ interactions: - request: body: '{"identity": {"type": "None"}, "location": "eastus", "properties": {"defaultMode": "IPS", "description": "local rulestacks", "minAppIdVersion": "8595-7473", "panEtag": - "a51dad40-2ad0-11ee-9b89-e69a6f85f08a", "provisioningState": "Succeeded", "scope": + "a7647476-2cec-11ee-9669-6eecfc0ae1a7", "provisioningState": "Succeeded", "scope": "LOCAL", "securityServices": {"antiSpywareProfile": "BestPractice", "antiVirusProfile": "BestPractice", "dnsSubscription": "BestPractice", "fileBlockingProfile": "BestPractice", "urlFilteringProfile": "BestPractice", "vulnerabilityProfile": "BestPractice"}}, @@ -332,11 +285,11 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:50:58.3131395Z"},"identity":{"type":"None"},"properties":{"panEtag":"a51dad40-2ad0-11ee-9b89-e69a6f85f08a","scope":"LOCAL","description":"local + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:17:23.2387765Z"},"identity":{"type":"None"},"properties":{"panEtag":"a7647476-2cec-11ee-9669-6eecfc0ae1a7","scope":"LOCAL","description":"local rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Accepted","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice","outboundUnTrustCertificate":null,"outboundTrustCertificate":null},"defaultMode":"IPS"}}' headers: azure-asyncoperation: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 cache-control: - no-cache content-length: @@ -344,15 +297,15 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:01 GMT + - Fri, 28 Jul 2023 02:17:27 GMT etag: - - '"0b00c181-0000-0100-0000-64bf9b020000"' + - '"3900c223-0000-0100-0000-64c325330000"' expires: - '-1' location: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 mise-correlation-id: - - c6e70550-fa87-4d1d-bfb2-3bd650772377 + - 6fbe9467-fe99-41ab-9180-bbd2984817c8 pragma: - no-cache request-context: @@ -384,21 +337,21 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-25T09:50:58.7374602Z"}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:17:23.5740999Z","endTime":"2023-07-28T02:17:26.9100619Z","error":{},"properties":null}' headers: cache-control: - no-cache content-length: - - '573' + - '644' content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:01 GMT + - Fri, 28 Jul 2023 02:17:28 GMT etag: - - '"6e002e71-0000-0100-0000-64bf9b020000"' + - '"04003429-0000-0100-0000-64c325360000"' expires: - '-1' pragma: @@ -430,21 +383,22 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"1909c3f4-7902-4893-8f38-8d08dba224c3*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-25T09:50:58.7374602Z","endTime":"2023-07-25T09:51:06.1976595Z","error":{},"properties":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:17:23.2387765Z"},"identity":{"type":"None"},"properties":{"panEtag":"e4683fba-2cec-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS"}}' headers: cache-control: - no-cache content-length: - - '644' + - '1039' content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:31 GMT + - Fri, 28 Jul 2023 02:17:29 GMT etag: - - '"6e002f71-0000-0100-0000-64bf9b0a0000"' + - '"3900c723-0000-0100-0000-64c325360000"' expires: - '-1' pragma: @@ -457,6 +411,73 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks?api-version=2022-08-29 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:17:23.2387765Z"},"identity":{"type":"None"},"properties":{"panEtag":"e4683fba-2cec-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '1051' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 28 Jul 2023 02:17:39 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-original-request-ids: + - c91effec-a848-4bcd-80e2-85954c4238e6 + - 74f106eb-5adf-4b4f-9978-b24e2043e743 + - b97e67c5-9fd8-4fdb-8633-f595cc0db69e + - c0a51a91-9c3f-4f46-98ab-0607b8fb5d30 + - 9895a3c7-450e-44fd-ad9e-dce18875abc3 + - 5c8cdab2-b648-4f5b-8b79-857245af95d8 + - 3b391b5d-58b5-4017-9196-29e5bf10ef02 + - a8f3e6c2-6cca-4b29-84f8-ea1b9e8aa610 + - ee88693f-27a4-48e7-a21a-4cd7d4483f91 + - 4105369e-2e00-4ee0-a1a9-c79ca9c4a2e2 + - 058e3e71-178d-4cce-951d-1cd9a938dc56 + - 64a18ac5-81f6-48bb-8310-03e5f85be42b + - 14157b9c-7759-47ca-904d-9a92d2da6ef9 + - 8abb04eb-ae2d-4046-afcb-2bb1725bc59a + - e49ba2bd-ca6d-40ec-8249-adf9391c0774 + - 84f6098d-bf59-45bd-b42a-f88aa4c4a4db + - b65f0f02-6f26-4a6e-a453-00a5bbcdb3b1 + - 1cff3fda-6a86-4c6a-b058-7eb0368ffb95 + - 05db3b69-6eef-4172-9ae0-326bc28fca7d + - e1499319-b495-43c1-914a-d57a4899b7e3 + - 96dac8c1-8eac-4bb7-a7ed-038fc699243e status: code: 200 message: OK @@ -464,22 +485,22 @@ interactions: body: null headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate CommandName: - - palo-alto cloudngfw local-rulestack update + - palo-alto cloudngfw local-rulestack show Connection: - keep-alive ParameterSetName: - - -g -n --tags + - -g -n User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:49:50.5335203Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:50:58.3131395Z"},"identity":{"type":"None"},"properties":{"panEtag":"c523f018-2ad0-11ee-9b70-4ad68220d447","scope":"LOCAL","description":"local + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:17:23.2387765Z"},"identity":{"type":"None"},"properties":{"panEtag":"e4683fba-2cec-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS"}}' headers: cache-control: @@ -489,9 +510,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:32 GMT + - Fri, 28 Jul 2023 02:17:50 GMT etag: - - '"0b00c681-0000-0100-0000-64bf9b0a0000"' + - '"3900c723-0000-0100-0000-64c325360000"' expires: - '-1' pragma: @@ -530,7 +551,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/getChangeLog?api-version=2022-08-29 response: body: - string: '{"changes":["Rulestack"],"lastCommitted":"2023-07-25T09:50:10.761900+00:00","lastModified":"2023-07-25T09:51:04.463988+00:00"}' + string: '{"changes":["Rulestack"],"lastCommitted":"2023-07-28T02:15:42.833877+00:00","lastModified":"2023-07-28T02:17:25.203436+00:00"}' headers: cache-control: - no-cache @@ -539,11 +560,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:35 GMT + - Fri, 28 Jul 2023 02:17:57 GMT expires: - '-1' mise-correlation-id: - - 4ca2cabe-cac6-4636-a073-fc87d0ffb542 + - e4c0e5fd-3366-43db-b8e1-500a1585f25a pragma: - no-cache request-context: @@ -593,11 +614,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:42 GMT + - Fri, 28 Jul 2023 02:18:14 GMT expires: - '-1' mise-correlation-id: - - ca08d2ef-81ab-4d5a-9295-28401ac051f8 + - 166f137f-8a13-4077-9b5e-e0bd6026aebc pragma: - no-cache request-context: @@ -647,11 +668,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:44 GMT + - Fri, 28 Jul 2023 02:18:27 GMT expires: - '-1' mise-correlation-id: - - f263a4fa-9667-4740-a5cb-2ebc1f101e92 + - 258eeb03-84fa-4b27-a010-7913b7c39831 pragma: - no-cache request-context: @@ -667,7 +688,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' status: code: 200 message: OK @@ -730,11 +751,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:45 GMT + - Fri, 28 Jul 2023 02:18:35 GMT expires: - '-1' mise-correlation-id: - - 71421fa7-2db7-4f69-9cc3-f94cd45c86fc + - 012d5226-b410-4c83-9eea-7fd1557e1deb pragma: - no-cache request-context: @@ -784,11 +805,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:47 GMT + - Fri, 28 Jul 2023 02:18:41 GMT expires: - '-1' mise-correlation-id: - - cd5373ff-bea8-462d-911a-34cf7a995aec + - 04540d9b-cb5d-4d7e-a1e5-48fb609de909 pragma: - no-cache request-context: @@ -804,7 +825,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -838,11 +859,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:49 GMT + - Fri, 28 Jul 2023 02:18:56 GMT expires: - '-1' mise-correlation-id: - - 981da6e9-0096-4d9b-a47e-a2784920be9a + - 45c62da9-3f8d-4dfd-8d12-1e9713ee6bbb pragma: - no-cache request-context: @@ -858,7 +879,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 200 message: OK @@ -890,11 +911,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:51:53 GMT + - Fri, 28 Jul 2023 02:19:08 GMT expires: - '-1' mise-correlation-id: - - 00ed642e-a9eb-4780-aa6c-70a86009f6f5 + - 3e660622-554e-4ef8-a290-f2544c93110a pragma: - no-cache request-context: @@ -941,11 +962,11 @@ interactions: content-type: - application/json date: - - Tue, 25 Jul 2023 09:51:55 GMT + - Fri, 28 Jul 2023 02:19:18 GMT expires: - '-1' mise-correlation-id: - - 9209363a-58ae-4861-9bc3-14822960a5a8 + - 6cbb75b3-84e2-4cfc-aedb-f9c595769d41 pragma: - no-cache request-context: @@ -959,7 +980,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1199' status: code: 404 message: Not Found @@ -994,11 +1015,11 @@ interactions: content-type: - application/json date: - - Tue, 25 Jul 2023 09:51:56 GMT + - Fri, 28 Jul 2023 02:19:35 GMT expires: - '-1' mise-correlation-id: - - 29222911-88f5-48d8-9e04-7b50ac93fa89 + - 29574bc3-e128-4e9d-844c-0dd9e56b70bf pragma: - no-cache request-context: @@ -1041,20 +1062,20 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"paloaltonetworks.cloudngfw/localrulestacks/certificates","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:51:57.8286612Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:51:57.8286612Z"},"properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"e64cecae-2ad0-11ee-991c-4ad68220d447","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"paloaltonetworks.cloudngfw/localrulestacks/certificates","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:19:48.429347Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:19:48.429347Z"},"properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"3afd94b0-2ced-11ee-a545-a655c221ae57","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '751' + - '749' content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:00 GMT + - Fri, 28 Jul 2023 02:19:51 GMT expires: - '-1' mise-correlation-id: - - 07b27ab3-4068-4cf4-9265-c911cd7b11b8 + - d8a5c1dc-5cd1-413a-8c6b-9509e620960e pragma: - no-cache request-context: @@ -1093,7 +1114,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"e64cecae-2ad0-11ee-991c-4ad68220d447","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"3afd94b0-2ced-11ee-a545-a655c221ae57","provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache @@ -1102,11 +1123,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:04 GMT + - Fri, 28 Jul 2023 02:20:03 GMT expires: - '-1' mise-correlation-id: - - fb398093-d9c7-4489-9406-58155bf1aaaf + - 54a980a0-0c7e-4693-a8c5-103920ca039f pragma: - no-cache request-context: @@ -1143,7 +1164,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"e64cecae-2ad0-11ee-991c-4ad68220d447","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"3afd94b0-2ced-11ee-a545-a655c221ae57","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1152,11 +1173,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:07 GMT + - Fri, 28 Jul 2023 02:20:13 GMT expires: - '-1' mise-correlation-id: - - 3f13b9f7-9c8c-4f49-a6d4-bf370de53039 + - c7e45cf2-bbca-4a06-b061-268f5de0cbca pragma: - no-cache request-context: @@ -1204,11 +1225,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:11 GMT + - Fri, 28 Jul 2023 02:20:30 GMT expires: - '-1' mise-correlation-id: - - 9b83185b-392f-4bda-af74-b3357c0874dc + - 2e02c65a-4272-4fcb-a3ec-ab744549a130 pragma: - no-cache request-context: @@ -1252,20 +1273,20 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"paloaltonetworks.cloudngfw/localrulestacks/fqdnlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:52:13.00251Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:52:13.00251Z"},"properties":{"description":"description","fqdnList":["string1","string2"],"etag":"ef2f5ece-2ad0-11ee-9b70-4ad68220d447","auditComment":"string","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"paloaltonetworks.cloudngfw/localrulestacks/fqdnlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:20:35.2981106Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:20:35.2981106Z"},"properties":{"description":"description","fqdnList":["string1","string2"],"etag":"56c5b146-2ced-11ee-9d61-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '736' + - '740' content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:15 GMT + - Fri, 28 Jul 2023 02:20:36 GMT expires: - '-1' mise-correlation-id: - - 4b872071-c83f-4388-a60a-28e800185daa + - 09464cac-609a-43a2-ae69-a19fb27421a5 pragma: - no-cache request-context: @@ -1304,7 +1325,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"ef2f5ece-2ad0-11ee-9b70-4ad68220d447","auditComment":"string","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"56c5b146-2ced-11ee-9d61-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache @@ -1313,11 +1334,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:17 GMT + - Fri, 28 Jul 2023 02:20:46 GMT expires: - '-1' mise-correlation-id: - - c006bda2-9f77-4eca-a023-4962efa3f758 + - 242d714e-6c36-4c69-9de3-a92c2866fdf0 pragma: - no-cache request-context: @@ -1354,7 +1375,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"ef2f5ece-2ad0-11ee-9b70-4ad68220d447","auditComment":"string","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"56c5b146-2ced-11ee-9d61-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1363,11 +1384,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:19 GMT + - Fri, 28 Jul 2023 02:21:08 GMT expires: - '-1' mise-correlation-id: - - b4a12c61-603d-48c0-b6d9-b352c8b1c2d4 + - 13baeea5-8f7d-4a52-a846-f53ddccf0ded pragma: - no-cache request-context: @@ -1415,11 +1436,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:22 GMT + - Fri, 28 Jul 2023 02:21:17 GMT expires: - '-1' mise-correlation-id: - - 958f3393-4ce1-4a9a-b8a2-d0799d2428af + - 32da6d1b-5ae9-4b80-82fe-2e1e2efe8a52 pragma: - no-cache request-context: @@ -1463,7 +1484,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"paloaltonetworks.cloudngfw/localrulestacks/prefixlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:52:23.8004361Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:52:23.8004361Z"},"properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"f5bd992c-2ad0-11ee-b95a-4ad68220d447","auditComment":"comment","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"paloaltonetworks.cloudngfw/localrulestacks/prefixlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:21:27.4159137Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:21:27.4159137Z"},"properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"75c02a90-2ced-11ee-8c54-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1472,11 +1493,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:26 GMT + - Fri, 28 Jul 2023 02:21:29 GMT expires: - '-1' mise-correlation-id: - - adca6e67-e074-4b3e-adf8-23fe60ee2842 + - abc86ecd-85dd-4c36-b853-9346f548e5a8 pragma: - no-cache request-context: @@ -1515,7 +1536,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"f5bd992c-2ad0-11ee-b95a-4ad68220d447","auditComment":"comment","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"75c02a90-2ced-11ee-8c54-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache @@ -1524,11 +1545,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:28 GMT + - Fri, 28 Jul 2023 02:21:34 GMT expires: - '-1' mise-correlation-id: - - cd0325be-fdce-497a-991b-2784f986cf5d + - c34b1676-8dbe-4132-b4ce-0ba8fe556dd5 pragma: - no-cache request-context: @@ -1565,7 +1586,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"f5bd992c-2ad0-11ee-b95a-4ad68220d447","auditComment":"comment","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"75c02a90-2ced-11ee-8c54-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1574,11 +1595,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:31 GMT + - Fri, 28 Jul 2023 02:21:47 GMT expires: - '-1' mise-correlation-id: - - 3c55be9b-1018-4779-aeed-6b092cbab081 + - 1a449d23-97b9-4a3d-b831-100060541a27 pragma: - no-cache request-context: @@ -1626,11 +1647,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:33 GMT + - Fri, 28 Jul 2023 02:21:54 GMT expires: - '-1' mise-correlation-id: - - c68b678d-bed4-4c91-83fa-09efbbd27cf9 + - 728c9018-92a3-47ae-acd8-6f6617a689b0 pragma: - no-cache request-context: @@ -1675,7 +1696,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"paloaltonetworks.cloudngfw/localrulestacks/localrules","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-25T09:52:35.2212247Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-25T09:52:35.2212247Z"},"properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"fcb298a4-2ad0-11ee-9c46-4ad68220d447","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"paloaltonetworks.cloudngfw/localrulestacks/localrules","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:22:05.8234215Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:22:05.8234215Z"},"properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"8cde5ac6-2ced-11ee-9f58-a655c221ae57","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1684,11 +1705,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:37 GMT + - Fri, 28 Jul 2023 02:22:08 GMT expires: - '-1' mise-correlation-id: - - d7211e96-6934-4826-b3d7-9908a708cdf3 + - e2ddef2a-6a2b-4878-a80d-2beb447909fa pragma: - no-cache request-context: @@ -1727,7 +1748,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"fcb298a4-2ad0-11ee-9c46-4ad68220d447"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1000000","name":"1000000","type":"localRulestacks/localRules","properties":{"ruleName":"cloud-ngfw-default-rule","priority":1000000,"ruleState":"ENABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"any","actionType":"Allow","enableLogging":"ENABLED","decryptionRuleType":"None","etag":"a500beec-2ad0-11ee-9b89-e69a6f85f08a"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"8cde5ac6-2ced-11ee-9f58-a655c221ae57"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1000000","name":"1000000","type":"localRulestacks/localRules","properties":{"ruleName":"cloud-ngfw-default-rule","priority":1000000,"ruleState":"ENABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"any","actionType":"Allow","enableLogging":"ENABLED","decryptionRuleType":"None","etag":"a73d5daa-2cec-11ee-9669-6eecfc0ae1a7"}}]}' headers: cache-control: - no-cache @@ -1736,11 +1757,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:40 GMT + - Fri, 28 Jul 2023 02:22:19 GMT expires: - '-1' mise-correlation-id: - - 8db253f5-dcba-484a-8bba-d4f8dee78c33 + - a81501e6-d0af-41cf-b5a5-6ee241fe83be pragma: - no-cache request-context: @@ -1777,7 +1798,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"fcb298a4-2ad0-11ee-9c46-4ad68220d447"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"8cde5ac6-2ced-11ee-9f58-a655c221ae57"}}' headers: cache-control: - no-cache @@ -1786,11 +1807,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:42 GMT + - Fri, 28 Jul 2023 02:22:25 GMT expires: - '-1' mise-correlation-id: - - 5104e654-f30a-4c07-b250-59d26628b456 + - f7b63758-b433-4beb-a148-e7b9207cafcd pragma: - no-cache request-context: @@ -1838,11 +1859,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:45 GMT + - Fri, 28 Jul 2023 02:22:34 GMT expires: - '-1' mise-correlation-id: - - 08dd9ec4-d372-4593-a48b-4fdb53f25b14 + - 3ca1324c-2883-4122-8077-f8fe2fdc3a29 pragma: - no-cache request-context: @@ -1858,7 +1879,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' status: code: 200 message: OK @@ -1892,11 +1913,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:48 GMT + - Fri, 28 Jul 2023 02:22:41 GMT expires: - '-1' mise-correlation-id: - - 4b857d0d-3023-4d6e-b39c-a34f44e71747 + - 6ed96b58-c247-42b7-baa8-df0f736a3364 pragma: - no-cache request-context: @@ -1940,7 +1961,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 cache-control: - no-cache content-length: @@ -1948,15 +1969,15 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:52 GMT + - Fri, 28 Jul 2023 02:22:48 GMT etag: - - '"0b00d481-0000-0100-0000-64bf9b740000"' + - '"3900de27-0000-0100-0000-64c326780000"' expires: - '-1' location: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 mise-correlation-id: - - 45f31d0f-be2d-40b3-b49f-e536fae6ec08 + - f12da0d5-61e4-475f-b102-8b7c6d394012 pragma: - no-cache request-context: @@ -1988,27 +2009,27 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Deleting","startTime":"2023-07-25T09:52:52.082905Z"}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Deleting","startTime":"2023-07-28T02:22:48.1904459Z"}' headers: azure-asyncoperation: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 cache-control: - no-cache content-length: - - '572' + - '573' content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:52:52 GMT + - Fri, 28 Jul 2023 02:22:49 GMT etag: - - '"6e006271-0000-0100-0000-64bf9b740000"' + - '"04009b2c-0000-0100-0000-64c326780000"' expires: - '-1' location: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 pragma: - no-cache strict-transport-security: @@ -2034,21 +2055,21 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","name":"f72b7aef-efd0-4dc2-99d9-38beae5de45c*6CFC39AADC4004CFC3B320029A54C424754C962B42455F590E3E07F2F5C8C53D","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-25T09:52:52.082905Z","endTime":"2023-07-25T09:52:54.1589364Z","error":{},"properties":null}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:22:48.1904459Z","endTime":"2023-07-28T02:22:51.1442788Z","error":{},"properties":null}' headers: cache-control: - no-cache content-length: - - '643' + - '644' content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:53:22 GMT + - Fri, 28 Jul 2023 02:23:20 GMT etag: - - '"6e006471-0000-0100-0000-64bf9b760000"' + - '"04009c2c-0000-0100-0000-64c3267b0000"' expires: - '-1' pragma: diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py index 2614ec87889..bf3b363f070 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py @@ -116,6 +116,8 @@ def test_palo_alto_networks_cloudngfw_local_rulestack(self, resource_group): '--scope "LOCAL" ' '--security-services {{"vulnerability-profile":"BestPractice","anti-spyware-profile":"BestPractice","anti-virus-profile":"BestPractice","url-filtering-profile":"BestPractice","file-blocking-profile":"BestPractice","dns-subscription":"BestPractice"}}') self.cmd('az palo-alto cloudngfw local-rulestack update -g {rg} -n {local_rulestack_name} --tags {{"tag-name":"value"}}') + self.cmd('az palo-alto cloudngfw local-rulestack list -g {rg}') + self.cmd('az palo-alto cloudngfw local-rulestack show -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack get-change-log -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack get-support-info -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack list-app-id -g {rg} -n {local_rulestack_name}') From f23809ed25ea253a915f84a0a98b850d4f03903b Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Fri, 28 Jul 2023 11:02:12 +0800 Subject: [PATCH 08/10] update --- src/palo-alto-networks/HISTORY.rst | 2 +- .../palo_alto/cloudngfw/firewall/__init__.py | 4 +- ...et_log_profile.py => _show_log_profile.py} | 20 +- ..._support_info.py => _show_support_info.py} | 12 +- .../cloudngfw/local_rulestack/__init__.py | 4 +- ..._get_change_log.py => _show_change_log.py} | 12 +- ..._support_info.py => _show_support_info.py} | 12 +- .../local_rulestack/local_rule/__init__.py | 2 +- .../{_get_counter.py => _show_counter.py} | 10 +- ...loudngfw_local_rulestack_with_counter.yaml | 63 +-- .../test_palo_alto_firewall_v2.yaml | 44 +-- ...to_networks_cloudngfw_local_rulestack.yaml | 358 ++++++++++-------- .../tests/latest/test_palo_alto_networks.py | 13 +- src/palo-alto-networks/setup.py | 2 +- 14 files changed, 277 insertions(+), 281 deletions(-) rename src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/{_get_log_profile.py => _show_log_profile.py} (92%) rename src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/{_get_support_info.py => _show_support_info.py} (95%) rename src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/{_get_change_log.py => _show_change_log.py} (94%) rename src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/{_get_support_info.py => _show_support_info.py} (95%) rename src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/{_get_counter.py => _show_counter.py} (97%) diff --git a/src/palo-alto-networks/HISTORY.rst b/src/palo-alto-networks/HISTORY.rst index 8c34bccfff8..abbff5a61a7 100644 --- a/src/palo-alto-networks/HISTORY.rst +++ b/src/palo-alto-networks/HISTORY.rst @@ -3,6 +3,6 @@ Release History =============== -0.1.0 +1.0.0b1 ++++++ * Initial release. \ No newline at end of file diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py index cae8c3bcee9..881e5241064 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/__init__.py @@ -11,10 +11,10 @@ from .__cmd_group import * from ._create import * from ._delete import * -from ._get_log_profile import * -from ._get_support_info import * from ._list import * from ._save_log_profile import * from ._show import * +from ._show_log_profile import * +from ._show_support_info import * from ._update import * from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show_log_profile.py similarity index 92% rename from src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py rename to src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show_log_profile.py index 89201594621..cddbbb6ddaf 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_log_profile.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show_log_profile.py @@ -12,13 +12,13 @@ @register_command( - "palo-alto cloudngfw firewall get-log-profile", + "palo-alto cloudngfw firewall show-log-profile", ) -class GetLogProfile(AAZCommand): +class ShowLogProfile(AAZCommand): """Get Log Profile for Firewall :example: Get Log Profile for Firewall - az palo-alto cloudngfw firewall get-log-profile --resource-group MyResourceGroup -n MyCloudngfwFirewall + az palo-alto cloudngfw firewall show-log-profile --resource-group MyResourceGroup -n MyCloudngfwFirewall """ _aaz_info = { @@ -159,11 +159,11 @@ def _build_schema_on_200(cls): _schema_on_200.common_destination = AAZObjectType( serialized_name="commonDestination", ) - _GetLogProfileHelper._build_schema_log_destination_read(_schema_on_200.common_destination) + _ShowLogProfileHelper._build_schema_log_destination_read(_schema_on_200.common_destination) _schema_on_200.decrypt_log_destination = AAZObjectType( serialized_name="decryptLogDestination", ) - _GetLogProfileHelper._build_schema_log_destination_read(_schema_on_200.decrypt_log_destination) + _ShowLogProfileHelper._build_schema_log_destination_read(_schema_on_200.decrypt_log_destination) _schema_on_200.log_option = AAZStrType( serialized_name="logOption", ) @@ -173,11 +173,11 @@ def _build_schema_on_200(cls): _schema_on_200.threat_log_destination = AAZObjectType( serialized_name="threatLogDestination", ) - _GetLogProfileHelper._build_schema_log_destination_read(_schema_on_200.threat_log_destination) + _ShowLogProfileHelper._build_schema_log_destination_read(_schema_on_200.threat_log_destination) _schema_on_200.traffic_log_destination = AAZObjectType( serialized_name="trafficLogDestination", ) - _GetLogProfileHelper._build_schema_log_destination_read(_schema_on_200.traffic_log_destination) + _ShowLogProfileHelper._build_schema_log_destination_read(_schema_on_200.traffic_log_destination) application_insights = cls._schema_on_200.application_insights application_insights.id = AAZStrType() @@ -186,8 +186,8 @@ def _build_schema_on_200(cls): return cls._schema_on_200 -class _GetLogProfileHelper: - """Helper class for GetLogProfile""" +class _ShowLogProfileHelper: + """Helper class for ShowLogProfile""" _schema_log_destination_read = None @@ -252,4 +252,4 @@ def _build_schema_log_destination_read(cls, _schema): _schema.storage_configurations = cls._schema_log_destination_read.storage_configurations -__all__ = ["GetLogProfile"] +__all__ = ["ShowLogProfile"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show_support_info.py similarity index 95% rename from src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py rename to src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show_support_info.py index ff67e9fdc27..10bab7bad44 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_get_support_info.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_show_support_info.py @@ -12,13 +12,13 @@ @register_command( - "palo-alto cloudngfw firewall get-support-info", + "palo-alto cloudngfw firewall show-support-info", ) -class GetSupportInfo(AAZCommand): +class ShowSupportInfo(AAZCommand): """Support info for firewall. :example: Get support info for firewall. - az palo-alto cloudngfw firewall get-support-info --resource-group MyResourceGroup -n MyCloudngfwFirewall + az palo-alto cloudngfw firewall show-support-info --resource-group MyResourceGroup -n MyCloudngfwFirewall """ _aaz_info = { @@ -200,8 +200,8 @@ def _build_schema_on_200(cls): return cls._schema_on_200 -class _GetSupportInfoHelper: - """Helper class for GetSupportInfo""" +class _ShowSupportInfoHelper: + """Helper class for ShowSupportInfo""" -__all__ = ["GetSupportInfo"] +__all__ = ["ShowSupportInfo"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__init__.py index 50b3ca9c4e8..f1b727b4fe8 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__init__.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/__init__.py @@ -12,8 +12,6 @@ from ._commit import * from ._create import * from ._delete import * -from ._get_change_log import * -from ._get_support_info import * from ._list import * from ._list_advanced_security_object import * from ._list_app_id import * @@ -23,5 +21,7 @@ from ._list_security_service import * from ._revert import * from ._show import * +from ._show_change_log import * +from ._show_support_info import * from ._update import * from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show_change_log.py similarity index 94% rename from src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py rename to src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show_change_log.py index 51b4a6e3019..347551911f6 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_change_log.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show_change_log.py @@ -12,13 +12,13 @@ @register_command( - "palo-alto cloudngfw local-rulestack get-change-log", + "palo-alto cloudngfw local-rulestack show-change-log", ) -class GetChangeLog(AAZCommand): +class ShowChangeLog(AAZCommand): """Get changelog :example: Get changelog - az palo-alto cloudngfw local-rulestack get-change-log -g MyResourceGroup -n MyLocalRulestacks + az palo-alto cloudngfw local-rulestack show-change-log -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { @@ -169,8 +169,8 @@ def _build_schema_on_200(cls): return cls._schema_on_200 -class _GetChangeLogHelper: - """Helper class for GetChangeLog""" +class _ShowChangeLogHelper: + """Helper class for ShowChangeLog""" -__all__ = ["GetChangeLog"] +__all__ = ["ShowChangeLog"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show_support_info.py similarity index 95% rename from src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py rename to src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show_support_info.py index eff360be6a9..718d24f45a9 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_get_support_info.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_show_support_info.py @@ -12,13 +12,13 @@ @register_command( - "palo-alto cloudngfw local-rulestack get-support-info", + "palo-alto cloudngfw local-rulestack show-support-info", ) -class GetSupportInfo(AAZCommand): +class ShowSupportInfo(AAZCommand): """Support info for rulestack. :example: Support info for rulestack. - az palo-alto cloudngfw local-rulestack get-support-info -g MyResourceGroup -n MyLocalRulestacks + az palo-alto cloudngfw local-rulestack show-support-info -g MyResourceGroup -n MyLocalRulestacks """ _aaz_info = { @@ -200,8 +200,8 @@ def _build_schema_on_200(cls): return cls._schema_on_200 -class _GetSupportInfoHelper: - """Helper class for GetSupportInfo""" +class _ShowSupportInfoHelper: + """Helper class for ShowSupportInfo""" -__all__ = ["GetSupportInfo"] +__all__ = ["ShowSupportInfo"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__init__.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__init__.py index 060f7aff0e8..335f6db8dce 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__init__.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/__init__.py @@ -11,9 +11,9 @@ from .__cmd_group import * from ._create import * from ._delete import * -from ._get_counter import * from ._list import * from ._refresh_counter import * from ._reset_counter import * from ._show import * +from ._show_counter import * from ._wait import * diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show_counter.py similarity index 97% rename from src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py rename to src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show_counter.py index 62ac0b3ad38..035c543e0e8 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_get_counter.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/local_rule/_show_counter.py @@ -12,9 +12,9 @@ @register_command( - "palo-alto cloudngfw local-rulestack local-rule get-counter", + "palo-alto cloudngfw local-rulestack local-rule show-counter", ) -class GetCounter(AAZCommand): +class ShowCounter(AAZCommand): """Get counters :example: Get counters @@ -240,8 +240,8 @@ def _build_schema_on_200(cls): return cls._schema_on_200 -class _GetCounterHelper: - """Helper class for GetCounter""" +class _ShowCounterHelper: + """Helper class for ShowCounter""" -__all__ = ["GetCounter"] +__all__ = ["ShowCounter"] diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_cloudngfw_local_rulestack_with_counter.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_cloudngfw_local_rulestack_with_counter.yaml index 7d916116b2f..efabe77b0b2 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_cloudngfw_local_rulestack_with_counter.yaml +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_cloudngfw_local_rulestack_with_counter.yaml @@ -7,7 +7,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - palo-alto cloudngfw local-rulestack local-rule get-counter + - palo-alto cloudngfw local-rulestack local-rule show-counter Connection: - keep-alive Content-Length: @@ -20,7 +20,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/fw0718-lrs/localRules/1000000/getCounters?api-version=2022-08-29 response: body: - string: '{"priority":"1000000","ruleStackName":"fw0718-lrs","ruleListName":"LocalRule","ruleName":"cloud-ngfw-default-rule","hitCount":0,"timestamp":"2023-07-25T09:25:29.057606+00:00"}' + string: '{"priority":"1000000","ruleStackName":"fw0718-lrs","ruleListName":"LocalRule","ruleName":"cloud-ngfw-default-rule","hitCount":0,"timestamp":"2023-07-28T02:49:24.038509+00:00"}' headers: cache-control: - no-cache @@ -29,11 +29,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:25:28 GMT + - Fri, 28 Jul 2023 02:49:24 GMT expires: - '-1' mise-correlation-id: - - c0c7a0e8-5423-41b6-897e-d37ded72b0b2 + - 802be47b-3fe6-41d1-9b32-877e1c468f26 pragma: - no-cache request-context: @@ -53,53 +53,6 @@ interactions: status: code: 200 message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - CommandName: - - palo-alto cloudngfw local-rulestack local-rule refresh-counter - Connection: - - keep-alive - Content-Length: - - '0' - ParameterSetName: - - -g --local-rulestack-name --priority - User-Agent: - - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/fw0718-lrs/localRules/1000000/refreshCounters?api-version=2022-08-29 - response: - body: - string: '{"error":{"code":"GatewayTimeout","message":"The gateway did not receive - a response from ''PaloAltoNetworks.Cloudngfw'' within the specified time period."}}' - headers: - cache-control: - - no-cache - connection: - - close - content-length: - - '154' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 25 Jul 2023 09:26:20 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-failure-cause: - - service - status: - code: 504 - message: Gateway Timeout - request: body: null headers: @@ -128,11 +81,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:26:25 GMT + - Fri, 28 Jul 2023 02:49:36 GMT expires: - '-1' mise-correlation-id: - - 20b1c49a-998b-41ad-a07f-9d7aa6e8645b + - fef25fc4-3623-45e6-b744-18e61839f1f9 pragma: - no-cache request-context: @@ -178,11 +131,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:26:29 GMT + - Fri, 28 Jul 2023 02:49:53 GMT expires: - '-1' mise-correlation-id: - - 82897f78-fa9d-41a0-bd0d-096cefc056f3 + - c4bae129-d11b-4888-8dcf-64f61bfa4e45 pragma: - no-cache request-context: diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_v2.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_v2.yaml index 5449a0f058a..f5f44594e10 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_v2.yaml +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_firewall_v2.yaml @@ -23,7 +23,7 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/saveLogProfile?api-version=2022-08-29 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest/saveLogProfile?api-version=2022-08-29 response: body: string: '' @@ -33,11 +33,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:10:07 GMT + - Fri, 28 Jul 2023 03:01:19 GMT expires: - '-1' mise-correlation-id: - - 5a7b3898-166e-4061-a76c-029801e655b8 + - c20e1369-8f7e-4d1d-ad1d-5e812bd06cf7 pragma: - no-cache request-context: @@ -61,7 +61,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - palo-alto cloudngfw firewall get-log-profile + - palo-alto cloudngfw firewall show-log-profile Connection: - keep-alive Content-Length: @@ -71,7 +71,7 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/getLogProfile?api-version=2022-08-29 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest/getLogProfile?api-version=2022-08-29 response: body: string: '{"logType":"TRAFFIC","logOption":"SAME_DESTINATION","applicationInsights":{"id":null,"key":null},"commonDestination":{"storageConfigurations":null,"eventHubConfigurations":null,"monitorConfigurations":{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sudh_fire_test/providers/Microsoft.OperationalInsights/workspaces/testAnalyticsX","subscriptionId":null,"workspace":"63e674d3-cc87-48c6-94cb-2d28a0b245fc","primaryKey":"7R5uguOLkTF6zByLV9ef5402y4dQnhiSlNMTKNSpEbjZoBrGrNnM2rD4E7+0v1yFg5y6h3RlrIa7th7qJnoHcQ==","secondaryKey":"7lmsLYTVizgkstJpno4fY6u36qmVw4rkaIfzhx82ymLIdYDy0wbq7Tdydkje3z50KbKsQnzhg8KAPFpEki/Buw=="}},"trafficLogDestination":null,"threatLogDestination":null,"decryptLogDestination":null}' @@ -83,11 +83,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:10:11 GMT + - Fri, 28 Jul 2023 03:01:35 GMT expires: - '-1' mise-correlation-id: - - 35722f54-7038-41a1-92c6-c843f8412bab + - f68a43d4-6701-436f-9f81-baff072f2538 pragma: - no-cache request-context: @@ -115,7 +115,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - palo-alto cloudngfw firewall get-support-info + - palo-alto cloudngfw firewall show-support-info Connection: - keep-alive Content-Length: @@ -125,7 +125,7 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/getSupportInfo?api-version=2022-08-29 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest/getSupportInfo?api-version=2022-08-29 response: body: string: '{"productSku":"PAN-CLOUD-NGFW-AZURE-PAYG","productSerial":null,"accountRegistered":"FALSE","accountId":null,"userDomainSupported":"TRUE","userRegistered":"FALSE","freeTrial":"TRUE","freeTrialDaysLeft":30,"freeTrialCreditLeft":0,"helpURL":"https://live.paloaltonetworks.com?productSku=PAN-CLOUD-NGFW-AZURE-PAYG","supportURL":"https://support.paloaltonetworks.com?productSku=PAN-CLOUD-NGFW-AZURE-PAYG&userEmail=v-taoxuzeng@microsoft.com","registerURL":"https://support.paloaltonetworks.com/Home/Register?tenantId=888d76fa-54b2-4ced-8ee5-aac1585adee7&productSku=PAN-CLOUD-NGFW-AZURE-PAYG&userEmail=v-taoxuzeng@microsoft.com"}' @@ -137,11 +137,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:10:16 GMT + - Fri, 28 Jul 2023 03:01:45 GMT expires: - '-1' mise-correlation-id: - - 0d12eaa5-9401-4457-8f96-fe0a5f5d9761 + - 6d1a120f-0a29-4db1-a51e-b03df23c18bf pragma: - no-cache request-context: @@ -177,24 +177,23 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/statuses?api-version=2022-08-29 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest/statuses?api-version=2022-08-29 response: body: - string: '{"value":[{"properties":{"isPanoramaManaged":"FALSE","healthStatus":"RED","healthReason":"Server - side error. You may file a ticket with CorrelationId: 41a6c8cf-a0b4-4efb-928d-648bc9d37413","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"properties":{"isPanoramaManaged":"FALSE","healthStatus":"GREEN","provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache content-length: - - '224' + - '111' content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:10:20 GMT + - Fri, 28 Jul 2023 03:01:51 GMT expires: - '-1' mise-correlation-id: - - f30469df-f77d-45c4-bcb7-9e608639bd54 + - a94a273b-f18f-42d8-9934-73fc590e06c3 pragma: - no-cache request-context: @@ -228,24 +227,23 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/fw0718/statuses/default?api-version=2022-08-29 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rheaTerraformTest/providers/PaloAltoNetworks.Cloudngfw/firewalls/prodStabilityTest/statuses/default?api-version=2022-08-29 response: body: - string: '{"properties":{"isPanoramaManaged":"FALSE","healthStatus":"RED","healthReason":"Server - side error. You may file a ticket with CorrelationId: 69682620-895b-4923-bbe4-0665af468870","provisioningState":"Succeeded"}}' + string: '{"properties":{"isPanoramaManaged":"FALSE","healthStatus":"GREEN","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '212' + - '99' content-type: - application/json; charset=utf-8 date: - - Tue, 25 Jul 2023 09:10:23 GMT + - Fri, 28 Jul 2023 03:01:58 GMT expires: - '-1' mise-correlation-id: - - a9664b56-4529-4036-8c81-ef95f75f8236 + - 3bce174d-949f-4df9-a4ce-6292183246a0 pragma: - no-cache request-context: diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml index 95289a868dd..46fd69509f0 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/recordings/test_palo_alto_networks_cloudngfw_local_rulestack.yaml @@ -27,27 +27,27 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:15:25.5732058Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:50:46.666445Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:50:46.666445Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Accepted","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice","outboundUnTrustCertificate":null,"outboundTrustCertificate":null},"defaultMode":"IPS"}}' headers: azure-asyncoperation: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f955e068-38e3-4f56-a8a8-59d2097fea12*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 cache-control: - no-cache content-length: - - '1027' + - '1025' content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:15:27 GMT + - Fri, 28 Jul 2023 02:50:49 GMT etag: - - '"39004321-0000-0100-0000-64c324be0000"' + - '"39003ca3-0000-0100-0000-64c32d080000"' expires: - '-1' location: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f955e068-38e3-4f56-a8a8-59d2097fea12*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 mise-correlation-id: - - 83ce4f18-829c-4555-8801-b2fd94b5dc1a + - 1312a78f-a8b4-4f9c-bf2c-7df3ad33163e pragma: - no-cache request-context: @@ -80,10 +80,10 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f955e068-38e3-4f56-a8a8-59d2097fea12*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-28T02:15:26.6333959Z"}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f955e068-38e3-4f56-a8a8-59d2097fea12*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","name":"f955e068-38e3-4f56-a8a8-59d2097fea12*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-28T02:50:47.9384083Z"}' headers: cache-control: - no-cache @@ -92,9 +92,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:15:28 GMT + - Fri, 28 Jul 2023 02:50:53 GMT etag: - - '"04002a27-0000-0100-0000-64c324be0000"' + - '"0400724a-0000-0100-0000-64c32d080000"' expires: - '-1' pragma: @@ -127,10 +127,10 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f955e068-38e3-4f56-a8a8-59d2097fea12*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"4d0ddb58-1cf2-4789-b1dc-911149d914e2*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:15:26.6333959Z","endTime":"2023-07-28T02:16:00.8592909Z","error":{},"properties":null}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/f955e068-38e3-4f56-a8a8-59d2097fea12*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","name":"f955e068-38e3-4f56-a8a8-59d2097fea12*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:50:47.9384083Z","endTime":"2023-07-28T02:51:17.1695152Z","error":{},"properties":null}' headers: cache-control: - no-cache @@ -139,9 +139,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:11 GMT + - Fri, 28 Jul 2023 02:51:25 GMT etag: - - '"0400ad27-0000-0100-0000-64c324e00000"' + - '"0400b74a-0000-0100-0000-64c32d250000"' expires: - '-1' pragma: @@ -177,19 +177,19 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:15:25.5732058Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local - rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"a7647476-2cec-11ee-9669-6eecfc0ae1a7"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:50:46.666445Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:50:46.666445Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"950f9152-2cf1-11ee-9458-6eecfc0ae1a7"}}' headers: cache-control: - no-cache content-length: - - '1011' + - '1009' content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:14 GMT + - Fri, 28 Jul 2023 02:51:26 GMT etag: - - '"3900b622-0000-0100-0000-64c324e00000"' + - '"39002ca5-0000-0100-0000-64c32d250000"' expires: - '-1' pragma: @@ -226,19 +226,19 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:15:25.5732058Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local - rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"a7647476-2cec-11ee-9669-6eecfc0ae1a7"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:50:46.666445Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:50:46.666445Z"},"identity":{"type":"None"},"properties":{"scope":"LOCAL","description":"local + rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS","panEtag":"950f9152-2cf1-11ee-9458-6eecfc0ae1a7"}}' headers: cache-control: - no-cache content-length: - - '1011' + - '1009' content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:22 GMT + - Fri, 28 Jul 2023 02:51:32 GMT etag: - - '"3900b622-0000-0100-0000-64c324e00000"' + - '"39002ca5-0000-0100-0000-64c32d250000"' expires: - '-1' pragma: @@ -259,7 +259,7 @@ interactions: - request: body: '{"identity": {"type": "None"}, "location": "eastus", "properties": {"defaultMode": "IPS", "description": "local rulestacks", "minAppIdVersion": "8595-7473", "panEtag": - "a7647476-2cec-11ee-9669-6eecfc0ae1a7", "provisioningState": "Succeeded", "scope": + "950f9152-2cf1-11ee-9458-6eecfc0ae1a7", "provisioningState": "Succeeded", "scope": "LOCAL", "securityServices": {"antiSpywareProfile": "BestPractice", "antiVirusProfile": "BestPractice", "dnsSubscription": "BestPractice", "fileBlockingProfile": "BestPractice", "urlFilteringProfile": "BestPractice", "vulnerabilityProfile": "BestPractice"}}, @@ -285,27 +285,27 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:17:23.2387765Z"},"identity":{"type":"None"},"properties":{"panEtag":"a7647476-2cec-11ee-9669-6eecfc0ae1a7","scope":"LOCAL","description":"local + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:50:46.666445Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:51:34.0592132Z"},"identity":{"type":"None"},"properties":{"panEtag":"950f9152-2cf1-11ee-9458-6eecfc0ae1a7","scope":"LOCAL","description":"local rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Accepted","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice","outboundUnTrustCertificate":null,"outboundTrustCertificate":null},"defaultMode":"IPS"}}' headers: azure-asyncoperation: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/7715ddfe-d86b-43ba-a8bd-f2c1d5a480e0*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 cache-control: - no-cache content-length: - - '1104' + - '1103' content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:27 GMT + - Fri, 28 Jul 2023 02:51:36 GMT etag: - - '"3900c223-0000-0100-0000-64c325330000"' + - '"390034a5-0000-0100-0000-64c32d360000"' expires: - '-1' location: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/7715ddfe-d86b-43ba-a8bd-f2c1d5a480e0*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 mise-correlation-id: - - 6fbe9467-fe99-41ab-9180-bbd2984817c8 + - 970b3feb-1312-41db-9be7-a93ec16bcee3 pragma: - no-cache request-context: @@ -337,10 +337,56 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/7715ddfe-d86b-43ba-a8bd-f2c1d5a480e0*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"6465519d-2c86-4453-a203-7cc1f53f6a83*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:17:23.5740999Z","endTime":"2023-07-28T02:17:26.9100619Z","error":{},"properties":null}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/7715ddfe-d86b-43ba-a8bd-f2c1d5a480e0*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","name":"7715ddfe-d86b-43ba-a8bd-f2c1d5a480e0*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Accepted","startTime":"2023-07-28T02:51:34.3907825Z"}' + headers: + cache-control: + - no-cache + content-length: + - '573' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 28 Jul 2023 02:51:37 GMT + etag: + - '"0400e14a-0000-0100-0000-64c32d360000"' + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + CommandName: + - palo-alto cloudngfw local-rulestack update + Connection: + - keep-alive + ParameterSetName: + - -g -n --tags + User-Agent: + - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) + method: GET + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/7715ddfe-d86b-43ba-a8bd-f2c1d5a480e0*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 + response: + body: + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/7715ddfe-d86b-43ba-a8bd-f2c1d5a480e0*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","name":"7715ddfe-d86b-43ba-a8bd-f2c1d5a480e0*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:51:34.3907825Z","endTime":"2023-07-28T02:51:39.0627279Z","error":{},"properties":null}' headers: cache-control: - no-cache @@ -349,9 +395,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:28 GMT + - Fri, 28 Jul 2023 02:52:11 GMT etag: - - '"04003429-0000-0100-0000-64c325360000"' + - '"0400ed4a-0000-0100-0000-64c32d3b0000"' expires: - '-1' pragma: @@ -386,19 +432,19 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:17:23.2387765Z"},"identity":{"type":"None"},"properties":{"panEtag":"e4683fba-2cec-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:50:46.666445Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:51:34.0592132Z"},"identity":{"type":"None"},"properties":{"panEtag":"ab57e4c8-2cf1-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS"}}' headers: cache-control: - no-cache content-length: - - '1039' + - '1038' content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:29 GMT + - Fri, 28 Jul 2023 02:52:13 GMT etag: - - '"3900c723-0000-0100-0000-64c325360000"' + - '"390037a5-0000-0100-0000-64c32d3b0000"' expires: - '-1' pragma: @@ -435,17 +481,17 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:17:23.2387765Z"},"identity":{"type":"None"},"properties":{"panEtag":"e4683fba-2cec-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:50:46.666445Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:51:34.0592132Z"},"identity":{"type":"None"},"properties":{"panEtag":"ab57e4c8-2cf1-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS"}}]}' headers: cache-control: - no-cache content-length: - - '1051' + - '1050' content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:39 GMT + - Fri, 28 Jul 2023 02:52:22 GMT expires: - '-1' pragma: @@ -457,27 +503,27 @@ interactions: x-content-type-options: - nosniff x-ms-original-request-ids: - - c91effec-a848-4bcd-80e2-85954c4238e6 - - 74f106eb-5adf-4b4f-9978-b24e2043e743 - - b97e67c5-9fd8-4fdb-8633-f595cc0db69e - - c0a51a91-9c3f-4f46-98ab-0607b8fb5d30 - - 9895a3c7-450e-44fd-ad9e-dce18875abc3 - - 5c8cdab2-b648-4f5b-8b79-857245af95d8 - - 3b391b5d-58b5-4017-9196-29e5bf10ef02 - - a8f3e6c2-6cca-4b29-84f8-ea1b9e8aa610 - - ee88693f-27a4-48e7-a21a-4cd7d4483f91 - - 4105369e-2e00-4ee0-a1a9-c79ca9c4a2e2 - - 058e3e71-178d-4cce-951d-1cd9a938dc56 - - 64a18ac5-81f6-48bb-8310-03e5f85be42b - - 14157b9c-7759-47ca-904d-9a92d2da6ef9 - - 8abb04eb-ae2d-4046-afcb-2bb1725bc59a - - e49ba2bd-ca6d-40ec-8249-adf9391c0774 - - 84f6098d-bf59-45bd-b42a-f88aa4c4a4db - - b65f0f02-6f26-4a6e-a453-00a5bbcdb3b1 - - 1cff3fda-6a86-4c6a-b058-7eb0368ffb95 - - 05db3b69-6eef-4172-9ae0-326bc28fca7d - - e1499319-b495-43c1-914a-d57a4899b7e3 - - 96dac8c1-8eac-4bb7-a7ed-038fc699243e + - e442af1f-ded4-47f3-a9ee-f5826e23d9e3 + - b552b3f5-59fa-4fe8-a089-9e37c2f1b635 + - aa293119-feb2-4f5d-abcc-3242de3b5163 + - 5c9d449c-4f56-4d7c-ade9-fd4646dd812f + - 11532889-d378-4bef-a532-0e50cdec6147 + - 9c19bda9-3d51-438e-9a2c-543882f8303a + - 524c27ce-fff3-48db-b83a-606c0bf766c6 + - 440df2b8-1874-4bf4-8610-6b6b9cc31f5e + - 8ae73b74-0ea5-495a-baa0-fae3157f2f17 + - 61eeac28-abdf-44f8-acdb-f9d19632ab3b + - 171a1fb8-b9b3-428f-b57c-6254459b7b35 + - 9366c6d9-5723-4e0d-85f6-8d8d4973ba6b + - ef6d02a0-e27c-470a-869b-37f980feb70d + - 9b3d5e4d-4fed-4387-a57f-f446bc7e3f90 + - 64bc4e24-37b0-4364-bb00-f0aa34c2ee5c + - 978ff5bf-c5eb-4812-8e45-25ca6879ee46 + - 8464f527-1f01-46b8-8633-c282ce4ca4ea + - 4994f0f2-fa94-4908-958f-e29000563fd1 + - 13baee54-7559-4ffe-b622-6f34280e37d6 + - fe06a0b4-6d07-4968-89da-a2bc73295dd2 + - b5f22ec0-e59f-492e-bcbb-156214285322 status: code: 200 message: OK @@ -500,19 +546,19 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:15:25.5732058Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:17:23.2387765Z"},"identity":{"type":"None"},"properties":{"panEtag":"e4683fba-2cec-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","name":"localrulestack000002","type":"paloaltonetworks.cloudngfw/localrulestacks","location":"eastus","tags":{"tag-name":"value"},"systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:50:46.666445Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:51:34.0592132Z"},"identity":{"type":"None"},"properties":{"panEtag":"ab57e4c8-2cf1-11ee-a545-a655c221ae57","scope":"LOCAL","description":"local rulestacks","minAppIdVersion":"8595-7473","provisioningState":"Succeeded","securityServices":{"vulnerabilityProfile":"BestPractice","antiSpywareProfile":"BestPractice","antiVirusProfile":"BestPractice","urlFilteringProfile":"BestPractice","fileBlockingProfile":"BestPractice","dnsSubscription":"BestPractice"},"defaultMode":"IPS"}}' headers: cache-control: - no-cache content-length: - - '1039' + - '1038' content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:50 GMT + - Fri, 28 Jul 2023 02:52:30 GMT etag: - - '"3900c723-0000-0100-0000-64c325360000"' + - '"390037a5-0000-0100-0000-64c32d3b0000"' expires: - '-1' pragma: @@ -538,7 +584,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - palo-alto cloudngfw local-rulestack get-change-log + - palo-alto cloudngfw local-rulestack show-change-log Connection: - keep-alive Content-Length: @@ -551,7 +597,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/getChangeLog?api-version=2022-08-29 response: body: - string: '{"changes":["Rulestack"],"lastCommitted":"2023-07-28T02:15:42.833877+00:00","lastModified":"2023-07-28T02:17:25.203436+00:00"}' + string: '{"changes":["Rulestack"],"lastCommitted":"2023-07-28T02:50:59.542518+00:00","lastModified":"2023-07-28T02:51:36.943337+00:00"}' headers: cache-control: - no-cache @@ -560,11 +606,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:17:57 GMT + - Fri, 28 Jul 2023 02:52:40 GMT expires: - '-1' mise-correlation-id: - - e4c0e5fd-3366-43db-b8e1-500a1585f25a + - de53b4f2-e9ba-4a36-aaf4-13f9e1cb2a35 pragma: - no-cache request-context: @@ -592,7 +638,7 @@ interactions: Accept-Encoding: - gzip, deflate CommandName: - - palo-alto cloudngfw local-rulestack get-support-info + - palo-alto cloudngfw local-rulestack show-support-info Connection: - keep-alive Content-Length: @@ -614,11 +660,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:18:14 GMT + - Fri, 28 Jul 2023 02:52:53 GMT expires: - '-1' mise-correlation-id: - - 166f137f-8a13-4077-9b5e-e0bd6026aebc + - 332a77c3-b26e-4cb2-ac08-96c6f52c4eca pragma: - no-cache request-context: @@ -634,7 +680,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -668,11 +714,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:18:27 GMT + - Fri, 28 Jul 2023 02:53:05 GMT expires: - '-1' mise-correlation-id: - - 258eeb03-84fa-4b27-a010-7913b7c39831 + - 640b7d08-7cc9-46bf-9e56-1c9de64f166d pragma: - no-cache request-context: @@ -751,11 +797,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:18:35 GMT + - Fri, 28 Jul 2023 02:53:16 GMT expires: - '-1' mise-correlation-id: - - 012d5226-b410-4c83-9eea-7fd1557e1deb + - c72a9ffc-df4f-488d-b95c-a49f889641e5 pragma: - no-cache request-context: @@ -805,11 +851,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:18:41 GMT + - Fri, 28 Jul 2023 02:53:22 GMT expires: - '-1' mise-correlation-id: - - 04540d9b-cb5d-4d7e-a1e5-48fb609de909 + - 98bd05fe-4f3c-49a6-9b32-bae4650447ff pragma: - no-cache request-context: @@ -859,11 +905,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:18:56 GMT + - Fri, 28 Jul 2023 02:53:38 GMT expires: - '-1' mise-correlation-id: - - 45c62da9-3f8d-4dfd-8d12-1e9713ee6bbb + - 4ec13c4e-ce10-4b62-bcd8-8a150da9c336 pragma: - no-cache request-context: @@ -911,11 +957,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:19:08 GMT + - Fri, 28 Jul 2023 02:53:48 GMT expires: - '-1' mise-correlation-id: - - 3e660622-554e-4ef8-a290-f2544c93110a + - 1f71aeab-8dc5-4611-8af5-f0b8d270f3b6 pragma: - no-cache request-context: @@ -927,7 +973,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 204 message: No Content @@ -962,11 +1008,11 @@ interactions: content-type: - application/json date: - - Fri, 28 Jul 2023 02:19:18 GMT + - Fri, 28 Jul 2023 02:53:55 GMT expires: - '-1' mise-correlation-id: - - 6cbb75b3-84e2-4cfc-aedb-f9c595769d41 + - 926a95c7-c8c2-4906-8f86-173c3aa8d8d9 pragma: - no-cache request-context: @@ -1015,11 +1061,11 @@ interactions: content-type: - application/json date: - - Fri, 28 Jul 2023 02:19:35 GMT + - Fri, 28 Jul 2023 02:54:00 GMT expires: - '-1' mise-correlation-id: - - 29574bc3-e128-4e9d-844c-0dd9e56b70bf + - 3eabc68d-45cb-4dc1-8db0-d95442cd9d2e pragma: - no-cache request-context: @@ -1033,7 +1079,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 404 message: Not Found @@ -1062,20 +1108,20 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"paloaltonetworks.cloudngfw/localrulestacks/certificates","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:19:48.429347Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:19:48.429347Z"},"properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"3afd94b0-2ced-11ee-a545-a655c221ae57","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"paloaltonetworks.cloudngfw/localrulestacks/certificates","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:54:07.1109974Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:54:07.1109974Z"},"properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"0607d608-2cf2-11ee-8c54-a655c221ae57","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '749' + - '751' content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:19:51 GMT + - Fri, 28 Jul 2023 02:54:09 GMT expires: - '-1' mise-correlation-id: - - d8a5c1dc-5cd1-413a-8c6b-9509e620960e + - 4ce83a36-335e-4bc8-a956-32da39023ec7 pragma: - no-cache request-context: @@ -1114,7 +1160,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"3afd94b0-2ced-11ee-a545-a655c221ae57","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"0607d608-2cf2-11ee-8c54-a655c221ae57","provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache @@ -1123,11 +1169,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:20:03 GMT + - Fri, 28 Jul 2023 02:54:14 GMT expires: - '-1' mise-correlation-id: - - 54a980a0-0c7e-4693-a8c5-103920ca039f + - 1d998c5b-77db-4b67-b11d-ceb90a51877c pragma: - no-cache request-context: @@ -1164,7 +1210,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"3afd94b0-2ced-11ee-a545-a655c221ae57","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/certificates/certificate000003","name":"certificate000003","type":"localRulestacks/certificates","properties":{"certificateSelfSigned":"TRUE","auditComment":"comment","description":"description","etag":"0607d608-2cf2-11ee-8c54-a655c221ae57","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1173,11 +1219,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:20:13 GMT + - Fri, 28 Jul 2023 02:54:22 GMT expires: - '-1' mise-correlation-id: - - c7e45cf2-bbca-4a06-b061-268f5de0cbca + - e6171150-dc9a-41fe-b27b-4efe269022d6 pragma: - no-cache request-context: @@ -1225,11 +1271,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:20:30 GMT + - Fri, 28 Jul 2023 02:54:31 GMT expires: - '-1' mise-correlation-id: - - 2e02c65a-4272-4fcb-a3ec-ab744549a130 + - 7b2ebc80-4589-4e9d-a630-76adf390b730 pragma: - no-cache request-context: @@ -1273,7 +1319,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"paloaltonetworks.cloudngfw/localrulestacks/fqdnlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:20:35.2981106Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:20:35.2981106Z"},"properties":{"description":"description","fqdnList":["string1","string2"],"etag":"56c5b146-2ced-11ee-9d61-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"paloaltonetworks.cloudngfw/localrulestacks/fqdnlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:54:38.2452036Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:54:38.2452036Z"},"properties":{"description":"description","fqdnList":["string1","string2"],"etag":"18715f30-2cf2-11ee-9f58-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1282,11 +1328,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:20:36 GMT + - Fri, 28 Jul 2023 02:54:39 GMT expires: - '-1' mise-correlation-id: - - 09464cac-609a-43a2-ae69-a19fb27421a5 + - 986aeb85-947b-48bd-901f-710c1245ab6e pragma: - no-cache request-context: @@ -1325,7 +1371,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"56c5b146-2ced-11ee-9d61-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"18715f30-2cf2-11ee-9f58-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache @@ -1334,11 +1380,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:20:46 GMT + - Fri, 28 Jul 2023 02:54:47 GMT expires: - '-1' mise-correlation-id: - - 242d714e-6c36-4c69-9de3-a92c2866fdf0 + - ff6fc4c9-6a0d-4f09-a76e-fb6c151f9e04 pragma: - no-cache request-context: @@ -1375,7 +1421,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"56c5b146-2ced-11ee-9d61-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/fqdnlists/fqdnlist000004","name":"fqdnlist000004","type":"localRulestacks/prefixlists","properties":{"description":"description","fqdnList":["string1","string2"],"etag":"18715f30-2cf2-11ee-9f58-a655c221ae57","auditComment":"string","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1384,11 +1430,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:21:08 GMT + - Fri, 28 Jul 2023 02:54:55 GMT expires: - '-1' mise-correlation-id: - - 13baeea5-8f7d-4a52-a846-f53ddccf0ded + - a3bcd695-d6ff-4615-b9e5-9cfd6a59df4e pragma: - no-cache request-context: @@ -1436,11 +1482,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:21:17 GMT + - Fri, 28 Jul 2023 02:55:14 GMT expires: - '-1' mise-correlation-id: - - 32da6d1b-5ae9-4b80-82fe-2e1e2efe8a52 + - 4541a3ea-f4ad-488f-9676-4c48ef83d086 pragma: - no-cache request-context: @@ -1484,7 +1530,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"paloaltonetworks.cloudngfw/localrulestacks/prefixlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:21:27.4159137Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:21:27.4159137Z"},"properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"75c02a90-2ced-11ee-8c54-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"paloaltonetworks.cloudngfw/localrulestacks/prefixlists","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:55:24.3302216Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:55:24.3302216Z"},"properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"33ea3714-2cf2-11ee-8979-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1493,11 +1539,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:21:29 GMT + - Fri, 28 Jul 2023 02:55:25 GMT expires: - '-1' mise-correlation-id: - - abc86ecd-85dd-4c36-b853-9346f548e5a8 + - c05bfd51-fe66-4f46-bd7c-754eba19a9c3 pragma: - no-cache request-context: @@ -1536,7 +1582,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"75c02a90-2ced-11ee-8c54-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"33ea3714-2cf2-11ee-8979-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}]}' headers: cache-control: - no-cache @@ -1545,11 +1591,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:21:34 GMT + - Fri, 28 Jul 2023 02:55:32 GMT expires: - '-1' mise-correlation-id: - - c34b1676-8dbe-4132-b4ce-0ba8fe556dd5 + - 1ea77415-a889-4243-b903-e65121d9a3ef pragma: - no-cache request-context: @@ -1586,7 +1632,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"75c02a90-2ced-11ee-8c54-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/prefixlists/prefixlist000006","name":"prefixlist000006","type":"localRulestacks/prefixlists","properties":{"description":"string","prefixList":["1.0.0.0/24"],"etag":"33ea3714-2cf2-11ee-8979-a655c221ae57","auditComment":"comment","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1595,11 +1641,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:21:47 GMT + - Fri, 28 Jul 2023 02:55:47 GMT expires: - '-1' mise-correlation-id: - - 1a449d23-97b9-4a3d-b831-100060541a27 + - e6419faf-00d5-469b-afb7-7e58f26473cc pragma: - no-cache request-context: @@ -1647,11 +1693,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:21:54 GMT + - Fri, 28 Jul 2023 02:55:53 GMT expires: - '-1' mise-correlation-id: - - 728c9018-92a3-47ae-acd8-6f6617a689b0 + - e5675fab-9835-4a57-bbb0-ce8836d753e6 pragma: - no-cache request-context: @@ -1696,7 +1742,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"paloaltonetworks.cloudngfw/localrulestacks/localrules","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:22:05.8234215Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:22:05.8234215Z"},"properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"8cde5ac6-2ced-11ee-9f58-a655c221ae57","provisioningState":"Succeeded"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"paloaltonetworks.cloudngfw/localrulestacks/localrules","systemData":{"createdBy":"v-taoxuzeng@microsoft.com","createdByType":"User","createdAt":"2023-07-28T02:56:07.2047854Z","lastModifiedBy":"v-taoxuzeng@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2023-07-28T02:56:07.2047854Z"},"properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"4daa625a-2cf2-11ee-ab55-a655c221ae57","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache @@ -1705,11 +1751,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:22:08 GMT + - Fri, 28 Jul 2023 02:56:09 GMT expires: - '-1' mise-correlation-id: - - e2ddef2a-6a2b-4878-a80d-2beb447909fa + - 8aef9653-42b7-4828-b9f9-772621b65733 pragma: - no-cache request-context: @@ -1748,7 +1794,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules?api-version=2022-08-29 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"8cde5ac6-2ced-11ee-9f58-a655c221ae57"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1000000","name":"1000000","type":"localRulestacks/localRules","properties":{"ruleName":"cloud-ngfw-default-rule","priority":1000000,"ruleState":"ENABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"any","actionType":"Allow","enableLogging":"ENABLED","decryptionRuleType":"None","etag":"a73d5daa-2cec-11ee-9669-6eecfc0ae1a7"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"4daa625a-2cf2-11ee-ab55-a655c221ae57"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1000000","name":"1000000","type":"localRulestacks/localRules","properties":{"ruleName":"cloud-ngfw-default-rule","priority":1000000,"ruleState":"ENABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"any","actionType":"Allow","enableLogging":"ENABLED","decryptionRuleType":"None","etag":"94f3a60e-2cf1-11ee-9458-6eecfc0ae1a7"}}]}' headers: cache-control: - no-cache @@ -1757,11 +1803,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:22:19 GMT + - Fri, 28 Jul 2023 02:56:19 GMT expires: - '-1' mise-correlation-id: - - a81501e6-d0af-41cf-b5a5-6ee241fe83be + - 6b98ff2f-e63b-4187-bb95-7e8488210cb0 pragma: - no-cache request-context: @@ -1798,7 +1844,7 @@ interactions: uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1?api-version=2022-08-29 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"8cde5ac6-2ced-11ee-9f58-a655c221ae57"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002/localRules/1","name":"1","type":"localRulestacks/localRules","properties":{"ruleName":"local_rule000005","priority":1,"ruleState":"DISABLED","source":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null},"negateSource":"FALSE","destination":{"cidrs":["any"],"countries":null,"feeds":null,"prefixLists":null,"fqdnLists":null},"negateDestination":"FALSE","applications":["any"],"protocol":"application-default","actionType":"Allow","enableLogging":"DISABLED","decryptionRuleType":"None","etag":"4daa625a-2cf2-11ee-ab55-a655c221ae57"}}' headers: cache-control: - no-cache @@ -1807,11 +1853,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:22:25 GMT + - Fri, 28 Jul 2023 02:56:35 GMT expires: - '-1' mise-correlation-id: - - f7b63758-b433-4beb-a148-e7b9207cafcd + - 27550e1e-246b-46e2-98eb-6e0f2e1c6e9a pragma: - no-cache request-context: @@ -1859,11 +1905,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:22:34 GMT + - Fri, 28 Jul 2023 02:56:43 GMT expires: - '-1' mise-correlation-id: - - 3ca1324c-2883-4122-8077-f8fe2fdc3a29 + - d3b3bbc6-05c8-4eea-8dba-e01de2924440 pragma: - no-cache request-context: @@ -1913,11 +1959,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:22:41 GMT + - Fri, 28 Jul 2023 02:56:49 GMT expires: - '-1' mise-correlation-id: - - 6ed96b58-c247-42b7-baa8-df0f736a3364 + - cc002a48-0e1b-4df8-8d35-e5db31086d73 pragma: - no-cache request-context: @@ -1961,7 +2007,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 cache-control: - no-cache content-length: @@ -1969,15 +2015,15 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:22:48 GMT + - Fri, 28 Jul 2023 02:56:56 GMT etag: - - '"3900de27-0000-0100-0000-64c326780000"' + - '"390024be-0000-0100-0000-64c32e790000"' expires: - '-1' location: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 mise-correlation-id: - - f12da0d5-61e4-475f-b102-8b7c6d394012 + - 29e0ad0a-9426-4200-84e8-143669482afa pragma: - no-cache request-context: @@ -1989,7 +2035,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' status: code: 202 message: Accepted @@ -2009,13 +2055,13 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Deleting","startTime":"2023-07-28T02:22:48.1904459Z"}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","name":"54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Deleting","startTime":"2023-07-28T02:56:56.8730381Z"}' headers: azure-asyncoperation: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 cache-control: - no-cache content-length: @@ -2023,13 +2069,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:22:49 GMT + - Fri, 28 Jul 2023 02:56:58 GMT etag: - - '"04009b2c-0000-0100-0000-64c326780000"' + - '"0400c850-0000-0100-0000-64c32e780000"' expires: - '-1' location: - - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + - https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/eastus/operationStatuses/54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 pragma: - no-cache strict-transport-security: @@ -2055,10 +2101,10 @@ interactions: User-Agent: - AZURECLI/2.50.0 (AAZ) azsdk-python-core/1.26.0 Python/3.9.5 (Windows-10-10.0.22621-SP0) method: GET - uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2?api-version=2022-08-29 + uri: https://management.azure.com/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11?api-version=2022-08-29 response: body: - string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","name":"01bf3635-61ae-4b3c-9284-fccb0839a0b6*510641D9404D51637CE22BC46C64E28418C0A84A64202348F41688F1A0E0C6C2","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:22:48.1904459Z","endTime":"2023-07-28T02:22:51.1442788Z","error":{},"properties":null}' + string: '{"id":"/providers/PaloAltoNetworks.Cloudngfw/locations/EASTUS/operationStatuses/54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","name":"54ef4c78-9d34-420d-a1a8-ea208d2d9279*1366524D70C88C9A5858BF530AF1BC22332989B282A1963963335F4A8D75EE11","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_palo_alto_networks_cloudngfw_local_rulestack000001/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/localrulestack000002","status":"Succeeded","startTime":"2023-07-28T02:56:56.8730381Z","endTime":"2023-07-28T02:57:03.8499206Z","error":{},"properties":null}' headers: cache-control: - no-cache @@ -2067,9 +2113,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 28 Jul 2023 02:23:20 GMT + - Fri, 28 Jul 2023 02:57:31 GMT etag: - - '"04009c2c-0000-0100-0000-64c3267b0000"' + - '"0400da50-0000-0100-0000-64c32e7f0000"' expires: - '-1' pragma: diff --git a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py index bf3b363f070..fe8585d7bf6 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/tests/latest/test_palo_alto_networks.py @@ -79,19 +79,18 @@ def test_palo_alto_firewall_update(self): self.cmd('az palo-alto cloudngfw firewall show --name {firewall_name} -g {resource_group}', self.check('tags.tagName', "value")) @AllowLargeResponse(size_kb=10240) - @ResourceGroupPreparer(name_prefix='cli_test_palo_alto_firewall_v2') def test_palo_alto_firewall_v2(self): self.kwargs.update({ 'loc': 'eastus', 'resource_group': 'rheaTerraformTest', - 'firewall_name': 'fw0718', + 'firewall_name': 'prodStabilityTest', 'workspace': self.create_random_name('workspace', 15), }) self.cmd('az palo-alto cloudngfw firewall save-log-profile --resource-group {resource_group} -n {firewall_name} ' '--log-option "SAME_DESTINATION" --log-type "TRAFFIC" ' '--common-destination {{"monitor-configurations":{{"id":"/subscriptions/2bf4a339-294d-4c25-b0b2-ef649e9f5c27/resourceGroups/sudh_fire_test/providers/Microsoft.OperationalInsights/workspaces/testAnalyticsX","primary-key":"7R5uguOLkTF6zByLV9ef5402y4dQnhiSlNMTKNSpEbjZoBrGrNnM2rD4E7+0v1yFg5y6h3RlrIa7th7qJnoHcQ==","secondary-key":"7lmsLYTVizgkstJpno4fY6u36qmVw4rkaIfzhx82ymLIdYDy0wbq7Tdydkje3z50KbKsQnzhg8KAPFpEki/Buw==","subscription-id":"2bf4a339-294d-4c25-b0b2-ef649e9f5c27","workspace":"63e674d3-cc87-48c6-94cb-2d28a0b245fc"}}}}') - self.cmd('az palo-alto cloudngfw firewall get-log-profile --resource-group {resource_group} -n {firewall_name}') - self.cmd('az palo-alto cloudngfw firewall get-support-info --resource-group {resource_group} -n {firewall_name}') + self.cmd('az palo-alto cloudngfw firewall show-log-profile --resource-group {resource_group} -n {firewall_name} ', self.check('type(@)', 'object')) + self.cmd('az palo-alto cloudngfw firewall show-support-info --resource-group {resource_group} -n {firewall_name}') self.cmd('az palo-alto cloudngfw firewall status list --resource-group {resource_group} -n {firewall_name}') self.cmd('az palo-alto cloudngfw firewall status default show --resource-group {resource_group} -n {firewall_name}') @@ -118,8 +117,8 @@ def test_palo_alto_networks_cloudngfw_local_rulestack(self, resource_group): self.cmd('az palo-alto cloudngfw local-rulestack update -g {rg} -n {local_rulestack_name} --tags {{"tag-name":"value"}}') self.cmd('az palo-alto cloudngfw local-rulestack list -g {rg}') self.cmd('az palo-alto cloudngfw local-rulestack show -g {rg} -n {local_rulestack_name}') - self.cmd('az palo-alto cloudngfw local-rulestack get-change-log -g {rg} -n {local_rulestack_name}') - self.cmd('az palo-alto cloudngfw local-rulestack get-support-info -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack show-change-log -g {rg} -n {local_rulestack_name}') + self.cmd('az palo-alto cloudngfw local-rulestack show-support-info -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack list-app-id -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack list-country -g {rg} -n {local_rulestack_name}') self.cmd('az palo-alto cloudngfw local-rulestack list-firewall -g {rg} -n {local_rulestack_name}') @@ -182,6 +181,6 @@ def test_palo_alto_cloudngfw_local_rulestack_with_counter(self, resource_group): 'local_rulestack_name': "fw0718-lrs", 'priority': "1000000" }) - self.cmd('az palo-alto cloudngfw local-rulestack local-rule get-counter -g {resource_group} --local-rulestack-name {local_rulestack_name} --priority {priority}') + self.cmd('az palo-alto cloudngfw local-rulestack local-rule show-counter -g {resource_group} --local-rulestack-name {local_rulestack_name} --priority {priority}') self.cmd('az palo-alto cloudngfw local-rulestack local-rule refresh-counter -g {resource_group} --local-rulestack-name {local_rulestack_name} --priority {priority}') self.cmd('az palo-alto cloudngfw local-rulestack local-rule reset-counter -g {resource_group} --local-rulestack-name {local_rulestack_name} --priority {priority}') diff --git a/src/palo-alto-networks/setup.py b/src/palo-alto-networks/setup.py index de703d55eb2..32867129edd 100644 --- a/src/palo-alto-networks/setup.py +++ b/src/palo-alto-networks/setup.py @@ -10,7 +10,7 @@ # HISTORY.rst entry. -VERSION = '0.1.0' +VERSION = '1.0.0b1' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From f660db26242daf30525e74365ed1973cf7fe799c Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Fri, 28 Jul 2023 14:55:43 +0800 Subject: [PATCH 09/10] update --- .../aaz/latest/palo_alto/cloudngfw/firewall/_create.py | 2 +- .../aaz/latest/palo_alto/cloudngfw/firewall/_update.py | 2 +- .../aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py | 2 +- .../aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py | 2 +- .../palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py | 2 +- .../palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py index 91fe6f355e7..d6fa05369f4 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py @@ -18,7 +18,7 @@ class Create(AAZCommand): """Create a FirewallResource :example: Create a FirewallResource - az palo-alto cloudngfw firewall create --name MyCloudngfwFirewall -g MyResourceGroup --location eastus --associated-rulestack {"location":eastus,"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/MyLocalRulestacks} --dns-settings {"enable-dns-proxy":DISABLED,"enabled-dns-type":CUSTOM} --is-panorama-managed FALSE --marketplace-details {"marketplace-subscription-status":Subscribed,"offer-id":offer-id,"publisher-id":publisher-id} --network-profile {"egress-nat-ip":[],"enable-egress-nat":DISABLED,"network-type":VNET,"public-ips":[{"address":"10.0.0.0/16","resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/publicIPAddresses/MypublicIP}],"vnet-configuration":{"ip-of-trust-subnet-for-udr":{"address":10.0.0.0/16},"trust-subnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},"un-trust-subnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},"vnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet}}} --panorama-config {"config-string":bas64EncodedString} --plan-data {"billing-cycle":MONTHLY,"plan-id":plan-id,"usage-type":PAYG} + az palo-alto cloudngfw firewall create --name MyCloudngfwFirewall -g MyResourceGroup --location eastus --associated-rulestack location=eastus resource-id=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/MyLocalRulestacks} --dns-settings enable-dns-proxy=DISABLED enabled-dns-type=CUSTOM --is-panorama-managed FALSE --marketplace-details marketplace-subscription-status=Subscribed offer-id=offer-id publisher-id=publisher-id --network-profile egress-nat-ip=[] enable-egress-nat=DISABLED network-type=VNET public-ips=[{"address":"10.0.0.0/16","resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/publicIPAddresses/MypublicIP}] vnet-configuration={"ip-of-trust-subnet-for-udr":{"address":10.0.0.0/16},"trust-subnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},"un-trust-subnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},"vnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet}} --panorama-config config-string=bas64EncodedString --plan-data billing-cycle=MONTHLY plan-id=plan-id usage-type=PAYG """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py index 9f77aa9ac68..9741aec0b7b 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py @@ -18,7 +18,7 @@ class Update(AAZCommand): """Update a FirewallResource :example: Update a FirewallResource - az palo-alto cloudngfw firewall update --name MyCloudngfwFirewall -g MyResourceGroup --tags {"tagName":"value"} + az palo-alto cloudngfw firewall update --name MyCloudngfwFirewall -g MyResourceGroup --tags tagName=value """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py index 4dd98b75c55..fd94de7cb50 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py @@ -18,7 +18,7 @@ class Create(AAZCommand): """Create a LocalRulestackResource :example: Create a LocalRulestackResource - az palo-alto cloudngfw local-rulestack create -g MyResourceGroup -n MyLocalRulestacks --identity {"type":None} --location eastus --default-mode IPS --description "local rulestacks" --min-app-id-version "8595-7473" --scope "LOCAL" --security-services {"vulnerability-profile":"BestPractice","anti-spyware-profile":"BestPractice","anti-virus-profile":"BestPractice","url-filtering-profile":"BestPractice","file-blocking-profile":"BestPractice","dns-subscription":"BestPractice"} + az palo-alto cloudngfw local-rulestack create -g MyResourceGroup -n MyLocalRulestacks --identity type=None --location eastus --default-mode IPS --description "local rulestacks" --min-app-id-version "8595-7473" --scope "LOCAL" --security-services vulnerability-profile=BestPractice anti-spyware-profile=BestPractice anti-virus-profile=BestPractice url-filtering-profile=BestPractice file-blocking-profile=BestPractice dns-subscription=BestPractice """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py index 00d4951ecc2..fd44f60b095 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py @@ -18,7 +18,7 @@ class Update(AAZCommand): """Update a LocalRulestackResource :example: Update a LocalRulestackResource - az palo-alto cloudngfw local-rulestack update -g MyResourceGroup -n MyLocalRulestacks --tags {"tag-name":"value"} + az palo-alto cloudngfw local-rulestack update -g MyResourceGroup -n MyLocalRulestacks --tags tag-name=value """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py index 999ad6ee1c7..aa53d84e09e 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/fqdnlist/_create.py @@ -18,7 +18,7 @@ class Create(AAZCommand): """Create a FqdnListLocalRulestackResource :example: Create a FqdnListLocalRulestackResource - az palo-alto cloudngfw local-rulestack fqdnlist create -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyFqdnlist --audit-comment "string" --description "description" --fqdn-list ["string1","string2"] + az palo-alto cloudngfw local-rulestack fqdnlist create -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyFqdnlist --audit-comment "string" --description "description" --fqdn-list "string1" "string2" """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py index ab4c5744ba6..47e0c41088a 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/prefixlist/_create.py @@ -18,7 +18,7 @@ class Create(AAZCommand): """Create a PrefixListResource :example: Create a PrefixListResource - az palo-alto cloudngfw local-rulestack prefixlist create -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyPrefixlist --audit-comment "comment" --description "string" --prefix-list ["1.0.0.0/24"] + az palo-alto cloudngfw local-rulestack prefixlist create -g MyResourceGroup --local-rulestack-name MyLocalRulestacks --name MyPrefixlist --audit-comment "comment" --description "string" --prefix-list "1.0.0.0/24" """ _aaz_info = { From b959a80315a72c779fcab7819e747b4f6cfb4f24 Mon Sep 17 00:00:00 2001 From: Zeng Taoxu Date: Fri, 28 Jul 2023 15:22:17 +0800 Subject: [PATCH 10/10] update --- .../aaz/latest/palo_alto/cloudngfw/firewall/_create.py | 2 +- .../aaz/latest/palo_alto/cloudngfw/firewall/_update.py | 2 +- .../aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py | 2 +- .../aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py index d6fa05369f4..c5bf07ca976 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_create.py @@ -18,7 +18,7 @@ class Create(AAZCommand): """Create a FirewallResource :example: Create a FirewallResource - az palo-alto cloudngfw firewall create --name MyCloudngfwFirewall -g MyResourceGroup --location eastus --associated-rulestack location=eastus resource-id=/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/MyLocalRulestacks} --dns-settings enable-dns-proxy=DISABLED enabled-dns-type=CUSTOM --is-panorama-managed FALSE --marketplace-details marketplace-subscription-status=Subscribed offer-id=offer-id publisher-id=publisher-id --network-profile egress-nat-ip=[] enable-egress-nat=DISABLED network-type=VNET public-ips=[{"address":"10.0.0.0/16","resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/publicIPAddresses/MypublicIP}] vnet-configuration={"ip-of-trust-subnet-for-udr":{"address":10.0.0.0/16},"trust-subnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},"un-trust-subnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},"vnet":{"resource-id":/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet}} --panorama-config config-string=bas64EncodedString --plan-data billing-cycle=MONTHLY plan-id=plan-id usage-type=PAYG + az palo-alto cloudngfw firewall create --name MyCloudngfwFirewall -g MyResourceGroup --location eastus --associated-rulestack "{location:eastus,resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/MyLocalRulestacks}" --dns-settings "{enable-dns-proxy:DISABLED,enabled-dns-type:CUSTOM}" --is-panorama-managed FALSE --marketplace-details "{marketplace-subscription-status:Subscribed,offer-id:offer-id,publisher-id:publisher-id}" --network-profile "{egress-nat-ip:[],enable-egress-nat:DISABLED,network-type:VNET,public-ips:[{address:10.0.0.0/16,resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/publicIPAddresses/MypublicIP}],vnet-configuration:{ip-of-trust-subnet-for-udr:{address:10.0.0.0/16},trust-subnet:{resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},un-trust-subnet:{resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/subnet1},vnet:{resource-id:/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/Microsoft.Network/virtualNetworks/MyVnet}}}" --panorama-config "{config-string:bas64EncodedString}" --plan-data "{billing-cycle:MONTHLY,plan-id:plan-id,usage-type:PAYG}" """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py index 9741aec0b7b..9aa22f1e821 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/firewall/_update.py @@ -18,7 +18,7 @@ class Update(AAZCommand): """Update a FirewallResource :example: Update a FirewallResource - az palo-alto cloudngfw firewall update --name MyCloudngfwFirewall -g MyResourceGroup --tags tagName=value + az palo-alto cloudngfw firewall update --name MyCloudngfwFirewall -g MyResourceGroup --tags "{tagName:value}" """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py index fd94de7cb50..74dc3fb5a7a 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_create.py @@ -18,7 +18,7 @@ class Create(AAZCommand): """Create a LocalRulestackResource :example: Create a LocalRulestackResource - az palo-alto cloudngfw local-rulestack create -g MyResourceGroup -n MyLocalRulestacks --identity type=None --location eastus --default-mode IPS --description "local rulestacks" --min-app-id-version "8595-7473" --scope "LOCAL" --security-services vulnerability-profile=BestPractice anti-spyware-profile=BestPractice anti-virus-profile=BestPractice url-filtering-profile=BestPractice file-blocking-profile=BestPractice dns-subscription=BestPractice + az palo-alto cloudngfw local-rulestack create -g MyResourceGroup -n MyLocalRulestacks --identity "{type:None}" --location eastus --default-mode IPS --description "local rulestacks" --min-app-id-version "8595-7473" --scope "LOCAL" --security-services "{vulnerability-profile:BestPractice,anti-spyware-profile:BestPractice,anti-virus-profile:BestPractice,url-filtering-profile:BestPractice,file-blocking-profile:BestPractice,dns-subscription:BestPractice}" """ _aaz_info = { diff --git a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py index fd44f60b095..cb2242442fa 100644 --- a/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py +++ b/src/palo-alto-networks/azext_palo_alto_networks/aaz/latest/palo_alto/cloudngfw/local_rulestack/_update.py @@ -18,7 +18,7 @@ class Update(AAZCommand): """Update a LocalRulestackResource :example: Update a LocalRulestackResource - az palo-alto cloudngfw local-rulestack update -g MyResourceGroup -n MyLocalRulestacks --tags tag-name=value + az palo-alto cloudngfw local-rulestack update -g MyResourceGroup -n MyLocalRulestacks --tags "{tag-name:value}" """ _aaz_info = {