From ec3913450c3285f7b5ec1c0b8a1d34ae5bc465d1 Mon Sep 17 00:00:00 2001 From: mihret Date: Tue, 18 Nov 2025 10:58:44 -0600 Subject: [PATCH 1/2] new generated azure cli for oracle database --- .../autonomous_database/__init__.py | 4 + .../autonomous_database/_action.py | 719 ++++++++ ..._change_disaster_recovery_configuration.py | 736 ++++++++ .../autonomous_database/_create.py | 228 ++- .../autonomous_database/_delete.py | 6 +- .../autonomous_database/_failover.py | 93 +- .../autonomous_database/_generate_wallet.py | 216 +++ .../autonomous_database/_list.py | 190 +- .../autonomous_database/_restore.py | 81 +- .../autonomous_database/_show.py | 84 +- .../autonomous_database/_shrink.py | 697 ++++++++ .../autonomous_database/_switchover.py | 96 +- .../autonomous_database/_update.py | 1582 +++++++++++------ .../autonomous_database/_wait.py | 82 +- .../autonomous_database/backup/_create.py | 23 +- .../autonomous_database/backup/_delete.py | 6 +- .../autonomous_database/backup/_list.py | 21 +- .../autonomous_database/backup/_show.py | 17 +- .../autonomous_database/backup/_update.py | 330 ++-- .../autonomous_database/backup/_wait.py | 15 +- .../character_set/__init__.py | 1 + .../character_set/_list.py | 12 +- .../character_set/_show.py | 208 +++ .../national_character_set/__init__.py | 1 + .../national_character_set/_list.py | 12 +- .../national_character_set/_show.py | 208 +++ .../autonomous_database/version/__init__.py | 1 + .../autonomous_database/version/_list.py | 16 +- .../autonomous_database/version/_show.py | 222 +++ .../cloud_exadata_infrastructure/__init__.py | 2 + .../_add_storage_capacity.py | 468 +++++ .../_configure_exascale.py | 492 +++++ .../cloud_exadata_infrastructure/_create.py | 84 +- .../cloud_exadata_infrastructure/_delete.py | 6 +- .../cloud_exadata_infrastructure/_list.py | 146 +- .../cloud_exadata_infrastructure/_show.py | 62 +- .../cloud_exadata_infrastructure/_update.py | 857 ++++++--- .../cloud_exadata_infrastructure/_wait.py | 60 +- .../database_server/__init__.py | 1 + .../database_server/_list.py | 27 +- .../database_server/_show.py | 330 ++++ .../cloud_vm_cluster/__init__.py | 1 + .../cloud_vm_cluster/_add_vm.py | 46 +- .../cloud_vm_cluster/_create.py | 60 +- .../cloud_vm_cluster/_delete.py | 6 +- .../oracle_database/cloud_vm_cluster/_list.py | 114 +- .../_list_private_ip_address.py | 228 +++ .../cloud_vm_cluster/_remove_vm.py | 46 +- .../oracle_database/cloud_vm_cluster/_show.py | 46 +- .../cloud_vm_cluster/_update.py | 934 ++++++---- .../oracle_database/cloud_vm_cluster/_wait.py | 44 +- .../database_node/__init__.py | 1 + .../cloud_vm_cluster/database_node/_show.py | 290 +++ .../virtual_network_address/__cmd_group.py | 23 + .../virtual_network_address/__init__.py | 17 + .../virtual_network_address/_create.py | 297 ++++ .../virtual_network_address/_delete.py | 181 ++ .../virtual_network_address/_list.py | 242 +++ .../virtual_network_address/_show.py | 245 +++ .../virtual_network_address/_update.py | 419 +++++ .../virtual_network_address/_wait.py | 241 +++ .../database_system_shape/__init__.py | 1 + .../database_system_shape/_list.py | 64 +- .../database_system_shape/_show.py | 286 +++ .../oracle_database/db_system/__cmd_group.py | 23 + .../oracle_database/db_system/__init__.py | 17 + .../oracle_database/db_system/_create.py | 592 ++++++ .../oracle_database/db_system/_delete.py | 163 ++ .../latest/oracle_database/db_system/_list.py | 585 ++++++ .../latest/oracle_database/db_system/_show.py | 329 ++++ .../oracle_database/db_system/_update.py | 541 ++++++ .../latest/oracle_database/db_system/_wait.py | 328 ++++ .../db_system_db_version/__cmd_group.py | 23 + .../db_system_db_version/__init__.py | 13 + .../db_system_db_version/_list.py | 264 +++ .../db_system_db_version/_show.py | 216 +++ .../dns_private_view/__init__.py | 1 + .../oracle_database/dns_private_view/_list.py | 21 +- .../oracle_database/dns_private_view/_show.py | 236 +++ .../dns_private_zone/__init__.py | 1 + .../oracle_database/dns_private_zone/_list.py | 21 +- .../oracle_database/dns_private_zone/_show.py | 239 +++ .../exadb_vm_cluster/__cmd_group.py | 23 + .../exadb_vm_cluster/__init__.py | 18 + .../exadb_vm_cluster/_create.py | 806 +++++++++ .../exadb_vm_cluster/_delete.py | 163 ++ .../oracle_database/exadb_vm_cluster/_list.py | 815 +++++++++ .../exadb_vm_cluster/_remove_vm.py | 512 ++++++ .../oracle_database/exadb_vm_cluster/_show.py | 453 +++++ .../exadb_vm_cluster/_update.py | 924 ++++++++++ .../oracle_database/exadb_vm_cluster/_wait.py | 452 +++++ .../exadb_vm_cluster/db_node/__cmd_group.py | 23 + .../exadb_vm_cluster/db_node/__init__.py | 14 + .../exadb_vm_cluster/db_node/_action.py | 222 +++ .../exadb_vm_cluster/db_node/_list.py | 249 +++ .../exadb_vm_cluster/db_node/_show.py | 250 +++ .../exascale_db_storage_vault/__cmd_group.py | 23 + .../exascale_db_storage_vault/__init__.py | 17 + .../exascale_db_storage_vault/_create.py | 405 +++++ .../exascale_db_storage_vault/_delete.py | 163 ++ .../exascale_db_storage_vault/_list.py | 461 +++++ .../exascale_db_storage_vault/_show.py | 267 +++ .../exascale_db_storage_vault/_update.py | 556 ++++++ .../exascale_db_storage_vault/_wait.py | 266 +++ .../flex_component/__cmd_group.py | 23 + .../flex_component/__init__.py | 13 + .../oracle_database/flex_component/_list.py | 251 +++ .../oracle_database/flex_component/_show.py | 240 +++ .../gi_minor_version/__cmd_group.py | 23 + .../gi_minor_version/__init__.py | 13 + .../oracle_database/gi_minor_version/_list.py | 233 +++ .../oracle_database/gi_minor_version/_show.py | 220 +++ .../oracle_database/gi_version/__init__.py | 1 + .../oracle_database/gi_version/_list.py | 38 +- .../oracle_database/gi_version/_show.py | 207 +++ .../network_anchor/__cmd_group.py | 23 + .../network_anchor/__init__.py | 17 + .../oracle_database/network_anchor/_create.py | 431 +++++ .../oracle_database/network_anchor/_delete.py | 163 ++ .../oracle_database/network_anchor/_list.py | 475 +++++ .../oracle_database/network_anchor/_show.py | 274 +++ .../oracle_database/network_anchor/_update.py | 606 +++++++ .../oracle_database/network_anchor/_wait.py | 273 +++ .../oracle_subscription/__cmd_group.py | 23 + .../oracle_subscription/__init__.py | 21 + .../_add_azure_subscription.py | 153 ++ .../oracle_subscription/_create.py | 315 ++++ .../oracle_subscription/_delete.py | 141 ++ .../oracle_subscription/_list.py | 226 +++ .../_list_activation_link.py | 167 ++ .../_list_cloud_account_detail.py | 167 ++ .../_list_saas_subscription_detail.py | 206 +++ .../oracle_subscription/_show.py | 228 +++ .../oracle_subscription/_update.py | 522 ++++++ .../oracle_subscription/_wait.py | 227 +++ .../default/__cmd_group.py | 23 + .../oracle_subscription/default/__init__.py | 19 + .../oracle_subscription/default/_create.py | 300 ++++ .../oracle_subscription/default/_delete.py | 141 ++ .../default/_list_activation_link.py | 167 ++ .../default/_list_cloud_account_detail.py | 167 ++ .../default/_list_saas_subscription_detail.py | 206 +++ .../oracle_subscription/default/_show.py | 213 +++ .../oracle_subscription/default/_update.py | 443 +++++ .../oracle_subscription/default/_wait.py | 212 +++ .../resource_anchor/__cmd_group.py | 23 + .../resource_anchor/__init__.py | 17 + .../resource_anchor/_create.py | 270 +++ .../resource_anchor/_delete.py | 163 ++ .../oracle_database/resource_anchor/_list.py | 357 ++++ .../oracle_database/resource_anchor/_show.py | 215 +++ .../resource_anchor/_update.py | 436 +++++ .../oracle_database/resource_anchor/_wait.py | 214 +++ .../system_version/__cmd_group.py | 23 + .../system_version/__init__.py | 13 + .../oracle_database/system_version/_list.py | 206 +++ .../oracle_database/system_version/_show.py | 207 +++ .../virtual_network_address/__cmd_group.py | 23 + .../virtual_network_address/__init__.py | 17 + .../virtual_network_address/_create.py | 298 ++++ .../virtual_network_address/_delete.py | 181 ++ .../virtual_network_address/_list.py | 243 +++ .../virtual_network_address/_show.py | 246 +++ .../virtual_network_address/_update.py | 464 +++++ .../virtual_network_address/_wait.py | 242 +++ .../azext_oracle_database/azext_metadata.json | 2 +- .../test_oracledatabase_exadata.yaml | 129 +- .../tests/latest/test_oracle_database.py | 20 +- 168 files changed, 33106 insertions(+), 1683 deletions(-) create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_action.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_change_disaster_recovery_configuration.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_generate_wallet.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_shrink.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_add_storage_capacity.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_configure_exascale.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list_private_ip_address.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/database_node/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_wait.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_wait.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_remove_vm.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_wait.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_action.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_wait.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_wait.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_add_azure_subscription.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_activation_link.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_cloud_account_detail.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_saas_subscription_detail.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_wait.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_activation_link.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_cloud_account_detail.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_saas_subscription_detail.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_wait.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_wait.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/__cmd_group.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/__init__.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_create.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_delete.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_list.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_show.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_update.py create mode 100644 src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_wait.py diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/__init__.py index 47f95c66b77..c4544d3dd8b 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/__init__.py @@ -9,12 +9,16 @@ # flake8: noqa from .__cmd_group import * +from ._action import * +from ._change_disaster_recovery_configuration import * from ._create import * from ._delete import * from ._failover import * +from ._generate_wallet import * from ._list import * from ._restore import * from ._show import * +from ._shrink import * from ._switchover import * from ._update import * from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_action.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_action.py new file mode 100644 index 00000000000..d35bbcbd29c --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_action.py @@ -0,0 +1,719 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database autonomous-database action", +) +class Action(AAZCommand): + """Perform Lifecycle Management Action on Autonomous Database + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/action", "2025-09-01"], + ] + } + + 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.autonomousdatabasename = AAZStrArg( + options=["--autonomousdatabasename"], + help="The database name.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=30, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.action = AAZStrArg( + options=["--action"], + arg_group="Body", + help="Autonomous Database lifecycle action", + required=True, + enum={"Restart": "Restart", "Start": "Start", "Stop": "Stop"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.AutonomousDatabasesAction(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 AutonomousDatabasesAction(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": "location"}, + 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": "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/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/action", + **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( + "autonomousdatabasename", self.ctx.args.autonomousdatabasename, + 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", "2025-09-01", + 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("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200.properties + properties.actual_used_data_storage_size_in_tbs = AAZFloatType( + serialized_name="actualUsedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.allocated_storage_size_in_tbs = AAZFloatType( + serialized_name="allocatedStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.apex_details = AAZObjectType( + serialized_name="apexDetails", + flags={"read_only": True}, + ) + properties.autonomous_database_id = AAZStrType( + serialized_name="autonomousDatabaseId", + ) + properties.autonomous_maintenance_schedule_type = AAZStrType( + serialized_name="autonomousMaintenanceScheduleType", + ) + properties.available_upgrade_versions = AAZListType( + serialized_name="availableUpgradeVersions", + flags={"read_only": True}, + ) + properties.backup_retention_period_in_days = AAZIntType( + serialized_name="backupRetentionPeriodInDays", + ) + properties.character_set = AAZStrType( + serialized_name="characterSet", + ) + properties.compute_count = AAZFloatType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.connection_strings = AAZObjectType( + serialized_name="connectionStrings", + flags={"read_only": True}, + ) + properties.connection_urls = AAZObjectType( + serialized_name="connectionUrls", + flags={"read_only": True}, + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_safe_status = AAZStrType( + serialized_name="dataSafeStatus", + flags={"read_only": True}, + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + ) + properties.data_storage_size_in_tbs = AAZIntType( + serialized_name="dataStorageSizeInTbs", + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + ) + properties.db_workload = AAZStrType( + serialized_name="dbWorkload", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.failed_data_recovery_in_seconds = AAZIntType( + serialized_name="failedDataRecoveryInSeconds", + flags={"read_only": True}, + ) + properties.in_memory_area_in_gbs = AAZIntType( + serialized_name="inMemoryAreaInGbs", + flags={"read_only": True}, + ) + properties.is_auto_scaling_enabled = AAZBoolType( + serialized_name="isAutoScalingEnabled", + ) + properties.is_auto_scaling_for_storage_enabled = AAZBoolType( + serialized_name="isAutoScalingForStorageEnabled", + ) + properties.is_local_data_guard_enabled = AAZBoolType( + serialized_name="isLocalDataGuardEnabled", + ) + properties.is_mtls_connection_required = AAZBoolType( + serialized_name="isMtlsConnectionRequired", + ) + properties.is_preview = AAZBoolType( + serialized_name="isPreview", + flags={"read_only": True}, + ) + properties.is_remote_data_guard_enabled = AAZBoolType( + serialized_name="isRemoteDataGuardEnabled", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( + serialized_name="localAdgAutoFailoverMaxDataLossLimit", + ) + properties.local_disaster_recovery_type = AAZStrType( + serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, + ) + properties.local_standby_db = AAZObjectType( + serialized_name="localStandbyDb", + flags={"read_only": True}, + ) + properties.long_term_backup_schedule = AAZObjectType( + serialized_name="longTermBackupSchedule", + ) + properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType( + serialized_name="memoryPerOracleComputeUnitInGbs", + flags={"read_only": True}, + ) + properties.ncharacter_set = AAZStrType( + serialized_name="ncharacterSet", + ) + properties.next_long_term_backup_time_stamp = AAZStrType( + serialized_name="nextLongTermBackupTimeStamp", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.open_mode = AAZStrType( + serialized_name="openMode", + ) + properties.operations_insights_status = AAZStrType( + serialized_name="operationsInsightsStatus", + flags={"read_only": True}, + ) + properties.peer_db_ids = AAZListType( + serialized_name="peerDbIds", + flags={"read_only": True}, + ) + properties.permission_level = AAZStrType( + serialized_name="permissionLevel", + ) + properties.private_endpoint = AAZStrType( + serialized_name="privateEndpoint", + flags={"read_only": True}, + ) + properties.private_endpoint_ip = AAZStrType( + serialized_name="privateEndpointIp", + ) + properties.private_endpoint_label = AAZStrType( + serialized_name="privateEndpointLabel", + ) + properties.provisionable_cpus = AAZListType( + serialized_name="provisionableCpus", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) + properties.role = AAZStrType() + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", + ) + properties.service_console_url = AAZStrType( + serialized_name="serviceConsoleUrl", + flags={"read_only": True}, + ) + properties.sql_web_developer_url = AAZStrType( + serialized_name="sqlWebDeveloperUrl", + flags={"read_only": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + properties.supported_regions_to_clone_to = AAZListType( + serialized_name="supportedRegionsToCloneTo", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + flags={"read_only": True}, + ) + properties.time_deletion_of_free_autonomous_database = AAZStrType( + serialized_name="timeDeletionOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) + properties.time_local_data_guard_enabled = AAZStrType( + serialized_name="timeLocalDataGuardEnabled", + flags={"read_only": True}, + ) + properties.time_maintenance_begin = AAZStrType( + serialized_name="timeMaintenanceBegin", + flags={"read_only": True}, + ) + properties.time_maintenance_end = AAZStrType( + serialized_name="timeMaintenanceEnd", + flags={"read_only": True}, + ) + properties.time_of_last_failover = AAZStrType( + serialized_name="timeOfLastFailover", + flags={"read_only": True}, + ) + properties.time_of_last_refresh = AAZStrType( + serialized_name="timeOfLastRefresh", + flags={"read_only": True}, + ) + properties.time_of_last_refresh_point = AAZStrType( + serialized_name="timeOfLastRefreshPoint", + flags={"read_only": True}, + ) + properties.time_of_last_switchover = AAZStrType( + serialized_name="timeOfLastSwitchover", + flags={"read_only": True}, + ) + properties.time_reclamation_of_free_autonomous_database = AAZStrType( + serialized_name="timeReclamationOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_gbs = AAZIntType( + serialized_name="usedDataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_tbs = AAZIntType( + serialized_name="usedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + ) + properties.whitelisted_ips = AAZListType( + serialized_name="whitelistedIps", + ) + + apex_details = cls._schema_on_200.properties.apex_details + apex_details.apex_version = AAZStrType( + serialized_name="apexVersion", + ) + apex_details.ords_version = AAZStrType( + serialized_name="ordsVersion", + ) + + available_upgrade_versions = cls._schema_on_200.properties.available_upgrade_versions + available_upgrade_versions.Element = AAZStrType() + + connection_strings = cls._schema_on_200.properties.connection_strings + connection_strings.all_connection_strings = AAZObjectType( + serialized_name="allConnectionStrings", + ) + connection_strings.dedicated = AAZStrType() + connection_strings.high = AAZStrType() + connection_strings.low = AAZStrType() + connection_strings.medium = AAZStrType() + connection_strings.profiles = AAZListType() + + all_connection_strings = cls._schema_on_200.properties.connection_strings.all_connection_strings + all_connection_strings.high = AAZStrType() + all_connection_strings.low = AAZStrType() + all_connection_strings.medium = AAZStrType() + + profiles = cls._schema_on_200.properties.connection_strings.profiles + profiles.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.connection_strings.profiles.Element + _element.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.host_format = AAZStrType( + serialized_name="hostFormat", + flags={"required": True}, + ) + _element.is_regional = AAZBoolType( + serialized_name="isRegional", + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + _element.session_mode = AAZStrType( + serialized_name="sessionMode", + flags={"required": True}, + ) + _element.syntax_format = AAZStrType( + serialized_name="syntaxFormat", + flags={"required": True}, + ) + _element.tls_authentication = AAZStrType( + serialized_name="tlsAuthentication", + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + connection_urls = cls._schema_on_200.properties.connection_urls + connection_urls.apex_url = AAZStrType( + serialized_name="apexUrl", + ) + connection_urls.database_transforms_url = AAZStrType( + serialized_name="databaseTransformsUrl", + ) + connection_urls.graph_studio_url = AAZStrType( + serialized_name="graphStudioUrl", + ) + connection_urls.machine_learning_notebook_url = AAZStrType( + serialized_name="machineLearningNotebookUrl", + ) + connection_urls.mongo_db_url = AAZStrType( + serialized_name="mongoDbUrl", + ) + connection_urls.ords_url = AAZStrType( + serialized_name="ordsUrl", + ) + connection_urls.sql_dev_web_url = AAZStrType( + serialized_name="sqlDevWebUrl", + ) + + customer_contacts = cls._schema_on_200.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + local_standby_db = cls._schema_on_200.properties.local_standby_db + local_standby_db.lag_time_in_seconds = AAZIntType( + serialized_name="lagTimeInSeconds", + ) + local_standby_db.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + local_standby_db.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + local_standby_db.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + ) + local_standby_db.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + ) + + long_term_backup_schedule = cls._schema_on_200.properties.long_term_backup_schedule + long_term_backup_schedule.is_disabled = AAZBoolType( + serialized_name="isDisabled", + ) + long_term_backup_schedule.repeat_cadence = AAZStrType( + serialized_name="repeatCadence", + ) + long_term_backup_schedule.retention_period_in_days = AAZIntType( + serialized_name="retentionPeriodInDays", + ) + long_term_backup_schedule.time_of_backup = AAZStrType( + serialized_name="timeOfBackup", + ) + + peer_db_ids = cls._schema_on_200.properties.peer_db_ids + peer_db_ids.Element = AAZStrType() + + provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus + provisionable_cpus.Element = AAZIntType() + + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.scheduled_start_time = AAZStrType( + serialized_name="scheduledStartTime", + ) + _element.scheduled_stop_time = AAZStrType( + serialized_name="scheduledStopTime", + ) + + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week + day_of_week.name = AAZStrType( + flags={"required": True}, + ) + + supported_regions_to_clone_to = cls._schema_on_200.properties.supported_regions_to_clone_to + supported_regions_to_clone_to.Element = AAZStrType() + + whitelisted_ips = cls._schema_on_200.properties.whitelisted_ips + whitelisted_ips.Element = AAZStrType() + + disc_clone = cls._schema_on_200.properties.discriminate_by("data_base_type", "Clone") + disc_clone.is_reconnect_clone_enabled = AAZBoolType( + serialized_name="isReconnectCloneEnabled", + flags={"read_only": True}, + ) + disc_clone.is_refreshable_clone = AAZBoolType( + serialized_name="isRefreshableClone", + flags={"read_only": True}, + ) + disc_clone.refreshable_status = AAZStrType( + serialized_name="refreshableStatus", + flags={"read_only": True}, + ) + disc_clone.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + disc_clone.time_until_reconnect_clone_enabled = AAZStrType( + serialized_name="timeUntilReconnectCloneEnabled", + ) + + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ActionHelper: + """Helper class for Action""" + + +__all__ = ["Action"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_change_disaster_recovery_configuration.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_change_disaster_recovery_configuration.py new file mode 100644 index 00000000000..55bbc884b9f --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_change_disaster_recovery_configuration.py @@ -0,0 +1,736 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database autonomous-database change-disaster-recovery-configuration", +) +class ChangeDisasterRecoveryConfiguration(AAZCommand): + """Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/changedisasterrecoveryconfiguration", "2025-09-01"], + ] + } + + 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.autonomousdatabasename = AAZStrArg( + options=["--autonomousdatabasename"], + help="The database name.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=30, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.disaster_recovery_type = AAZStrArg( + options=["--disaster-recovery-type"], + arg_group="Body", + help="Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + enum={"Adg": "Adg", "BackupBased": "BackupBased"}, + ) + _args_schema.is_replicate_automatic_backups = AAZBoolArg( + options=["--is-replicate-automatic-backups"], + arg_group="Body", + help="If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.", + ) + _args_schema.is_snapshot_standby = AAZBoolArg( + options=["--is-snapshot-standby"], + arg_group="Body", + help="Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database.", + ) + _args_schema.time_snapshot_standby_enabled_till = AAZDateTimeArg( + options=["--time-snapshot-standby-enabled-till"], + arg_group="Body", + help="Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.AutonomousDatabasesChangeDisasterRecoveryConfiguration(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 AutonomousDatabasesChangeDisasterRecoveryConfiguration(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": "location"}, + 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": "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/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration", + **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( + "autonomousdatabasename", self.ctx.args.autonomousdatabasename, + 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", "2025-09-01", + 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("disasterRecoveryType", AAZStrType, ".disaster_recovery_type") + _builder.set_prop("isReplicateAutomaticBackups", AAZBoolType, ".is_replicate_automatic_backups") + _builder.set_prop("isSnapshotStandby", AAZBoolType, ".is_snapshot_standby") + _builder.set_prop("timeSnapshotStandbyEnabledTill", AAZStrType, ".time_snapshot_standby_enabled_till") + + return self.serialize_content(_content_value) + + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200.properties + properties.actual_used_data_storage_size_in_tbs = AAZFloatType( + serialized_name="actualUsedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.allocated_storage_size_in_tbs = AAZFloatType( + serialized_name="allocatedStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.apex_details = AAZObjectType( + serialized_name="apexDetails", + flags={"read_only": True}, + ) + properties.autonomous_database_id = AAZStrType( + serialized_name="autonomousDatabaseId", + ) + properties.autonomous_maintenance_schedule_type = AAZStrType( + serialized_name="autonomousMaintenanceScheduleType", + ) + properties.available_upgrade_versions = AAZListType( + serialized_name="availableUpgradeVersions", + flags={"read_only": True}, + ) + properties.backup_retention_period_in_days = AAZIntType( + serialized_name="backupRetentionPeriodInDays", + ) + properties.character_set = AAZStrType( + serialized_name="characterSet", + ) + properties.compute_count = AAZFloatType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.connection_strings = AAZObjectType( + serialized_name="connectionStrings", + flags={"read_only": True}, + ) + properties.connection_urls = AAZObjectType( + serialized_name="connectionUrls", + flags={"read_only": True}, + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_safe_status = AAZStrType( + serialized_name="dataSafeStatus", + flags={"read_only": True}, + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + ) + properties.data_storage_size_in_tbs = AAZIntType( + serialized_name="dataStorageSizeInTbs", + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + ) + properties.db_workload = AAZStrType( + serialized_name="dbWorkload", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.failed_data_recovery_in_seconds = AAZIntType( + serialized_name="failedDataRecoveryInSeconds", + flags={"read_only": True}, + ) + properties.in_memory_area_in_gbs = AAZIntType( + serialized_name="inMemoryAreaInGbs", + flags={"read_only": True}, + ) + properties.is_auto_scaling_enabled = AAZBoolType( + serialized_name="isAutoScalingEnabled", + ) + properties.is_auto_scaling_for_storage_enabled = AAZBoolType( + serialized_name="isAutoScalingForStorageEnabled", + ) + properties.is_local_data_guard_enabled = AAZBoolType( + serialized_name="isLocalDataGuardEnabled", + ) + properties.is_mtls_connection_required = AAZBoolType( + serialized_name="isMtlsConnectionRequired", + ) + properties.is_preview = AAZBoolType( + serialized_name="isPreview", + flags={"read_only": True}, + ) + properties.is_remote_data_guard_enabled = AAZBoolType( + serialized_name="isRemoteDataGuardEnabled", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( + serialized_name="localAdgAutoFailoverMaxDataLossLimit", + ) + properties.local_disaster_recovery_type = AAZStrType( + serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, + ) + properties.local_standby_db = AAZObjectType( + serialized_name="localStandbyDb", + flags={"read_only": True}, + ) + properties.long_term_backup_schedule = AAZObjectType( + serialized_name="longTermBackupSchedule", + ) + properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType( + serialized_name="memoryPerOracleComputeUnitInGbs", + flags={"read_only": True}, + ) + properties.ncharacter_set = AAZStrType( + serialized_name="ncharacterSet", + ) + properties.next_long_term_backup_time_stamp = AAZStrType( + serialized_name="nextLongTermBackupTimeStamp", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.open_mode = AAZStrType( + serialized_name="openMode", + ) + properties.operations_insights_status = AAZStrType( + serialized_name="operationsInsightsStatus", + flags={"read_only": True}, + ) + properties.peer_db_ids = AAZListType( + serialized_name="peerDbIds", + flags={"read_only": True}, + ) + properties.permission_level = AAZStrType( + serialized_name="permissionLevel", + ) + properties.private_endpoint = AAZStrType( + serialized_name="privateEndpoint", + flags={"read_only": True}, + ) + properties.private_endpoint_ip = AAZStrType( + serialized_name="privateEndpointIp", + ) + properties.private_endpoint_label = AAZStrType( + serialized_name="privateEndpointLabel", + ) + properties.provisionable_cpus = AAZListType( + serialized_name="provisionableCpus", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) + properties.role = AAZStrType() + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", + ) + properties.service_console_url = AAZStrType( + serialized_name="serviceConsoleUrl", + flags={"read_only": True}, + ) + properties.sql_web_developer_url = AAZStrType( + serialized_name="sqlWebDeveloperUrl", + flags={"read_only": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + properties.supported_regions_to_clone_to = AAZListType( + serialized_name="supportedRegionsToCloneTo", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + flags={"read_only": True}, + ) + properties.time_deletion_of_free_autonomous_database = AAZStrType( + serialized_name="timeDeletionOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) + properties.time_local_data_guard_enabled = AAZStrType( + serialized_name="timeLocalDataGuardEnabled", + flags={"read_only": True}, + ) + properties.time_maintenance_begin = AAZStrType( + serialized_name="timeMaintenanceBegin", + flags={"read_only": True}, + ) + properties.time_maintenance_end = AAZStrType( + serialized_name="timeMaintenanceEnd", + flags={"read_only": True}, + ) + properties.time_of_last_failover = AAZStrType( + serialized_name="timeOfLastFailover", + flags={"read_only": True}, + ) + properties.time_of_last_refresh = AAZStrType( + serialized_name="timeOfLastRefresh", + flags={"read_only": True}, + ) + properties.time_of_last_refresh_point = AAZStrType( + serialized_name="timeOfLastRefreshPoint", + flags={"read_only": True}, + ) + properties.time_of_last_switchover = AAZStrType( + serialized_name="timeOfLastSwitchover", + flags={"read_only": True}, + ) + properties.time_reclamation_of_free_autonomous_database = AAZStrType( + serialized_name="timeReclamationOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_gbs = AAZIntType( + serialized_name="usedDataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_tbs = AAZIntType( + serialized_name="usedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + ) + properties.whitelisted_ips = AAZListType( + serialized_name="whitelistedIps", + ) + + apex_details = cls._schema_on_200.properties.apex_details + apex_details.apex_version = AAZStrType( + serialized_name="apexVersion", + ) + apex_details.ords_version = AAZStrType( + serialized_name="ordsVersion", + ) + + available_upgrade_versions = cls._schema_on_200.properties.available_upgrade_versions + available_upgrade_versions.Element = AAZStrType() + + connection_strings = cls._schema_on_200.properties.connection_strings + connection_strings.all_connection_strings = AAZObjectType( + serialized_name="allConnectionStrings", + ) + connection_strings.dedicated = AAZStrType() + connection_strings.high = AAZStrType() + connection_strings.low = AAZStrType() + connection_strings.medium = AAZStrType() + connection_strings.profiles = AAZListType() + + all_connection_strings = cls._schema_on_200.properties.connection_strings.all_connection_strings + all_connection_strings.high = AAZStrType() + all_connection_strings.low = AAZStrType() + all_connection_strings.medium = AAZStrType() + + profiles = cls._schema_on_200.properties.connection_strings.profiles + profiles.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.connection_strings.profiles.Element + _element.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.host_format = AAZStrType( + serialized_name="hostFormat", + flags={"required": True}, + ) + _element.is_regional = AAZBoolType( + serialized_name="isRegional", + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + _element.session_mode = AAZStrType( + serialized_name="sessionMode", + flags={"required": True}, + ) + _element.syntax_format = AAZStrType( + serialized_name="syntaxFormat", + flags={"required": True}, + ) + _element.tls_authentication = AAZStrType( + serialized_name="tlsAuthentication", + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + connection_urls = cls._schema_on_200.properties.connection_urls + connection_urls.apex_url = AAZStrType( + serialized_name="apexUrl", + ) + connection_urls.database_transforms_url = AAZStrType( + serialized_name="databaseTransformsUrl", + ) + connection_urls.graph_studio_url = AAZStrType( + serialized_name="graphStudioUrl", + ) + connection_urls.machine_learning_notebook_url = AAZStrType( + serialized_name="machineLearningNotebookUrl", + ) + connection_urls.mongo_db_url = AAZStrType( + serialized_name="mongoDbUrl", + ) + connection_urls.ords_url = AAZStrType( + serialized_name="ordsUrl", + ) + connection_urls.sql_dev_web_url = AAZStrType( + serialized_name="sqlDevWebUrl", + ) + + customer_contacts = cls._schema_on_200.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + local_standby_db = cls._schema_on_200.properties.local_standby_db + local_standby_db.lag_time_in_seconds = AAZIntType( + serialized_name="lagTimeInSeconds", + ) + local_standby_db.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + local_standby_db.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + local_standby_db.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + ) + local_standby_db.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + ) + + long_term_backup_schedule = cls._schema_on_200.properties.long_term_backup_schedule + long_term_backup_schedule.is_disabled = AAZBoolType( + serialized_name="isDisabled", + ) + long_term_backup_schedule.repeat_cadence = AAZStrType( + serialized_name="repeatCadence", + ) + long_term_backup_schedule.retention_period_in_days = AAZIntType( + serialized_name="retentionPeriodInDays", + ) + long_term_backup_schedule.time_of_backup = AAZStrType( + serialized_name="timeOfBackup", + ) + + peer_db_ids = cls._schema_on_200.properties.peer_db_ids + peer_db_ids.Element = AAZStrType() + + provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus + provisionable_cpus.Element = AAZIntType() + + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.scheduled_start_time = AAZStrType( + serialized_name="scheduledStartTime", + ) + _element.scheduled_stop_time = AAZStrType( + serialized_name="scheduledStopTime", + ) + + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week + day_of_week.name = AAZStrType( + flags={"required": True}, + ) + + supported_regions_to_clone_to = cls._schema_on_200.properties.supported_regions_to_clone_to + supported_regions_to_clone_to.Element = AAZStrType() + + whitelisted_ips = cls._schema_on_200.properties.whitelisted_ips + whitelisted_ips.Element = AAZStrType() + + disc_clone = cls._schema_on_200.properties.discriminate_by("data_base_type", "Clone") + disc_clone.is_reconnect_clone_enabled = AAZBoolType( + serialized_name="isReconnectCloneEnabled", + flags={"read_only": True}, + ) + disc_clone.is_refreshable_clone = AAZBoolType( + serialized_name="isRefreshableClone", + flags={"read_only": True}, + ) + disc_clone.refreshable_status = AAZStrType( + serialized_name="refreshableStatus", + flags={"read_only": True}, + ) + disc_clone.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + disc_clone.time_until_reconnect_clone_enabled = AAZStrType( + serialized_name="timeUntilReconnectCloneEnabled", + ) + + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ChangeDisasterRecoveryConfigurationHelper: + """Helper class for ChangeDisasterRecoveryConfiguration""" + + +__all__ = ["ChangeDisasterRecoveryConfiguration"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_create.py index cfde4f5845e..45e1f9fab64 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_create.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_create.py @@ -22,9 +22,9 @@ class Create(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2025-09-01"], ] } @@ -66,12 +66,20 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--clone"], arg_group="Properties", ) + _args_schema.clone_from_backup_timestamp = AAZObjectArg( + options=["--clone-from-backup-timestamp"], + arg_group="Properties", + ) + _args_schema.cross_region_disaster_recovery = AAZObjectArg( + options=["--cross-region-disaster-recovery"], + arg_group="Properties", + ) _args_schema.regular = AAZObjectArg( options=["--regular"], arg_group="Properties", blank={}, ) - _args_schema.admin_password = AAZPasswordArg( + _args_schema.admin_password = AAZStrArg( options=["--admin-password"], arg_group="Properties", help="Admin password.", @@ -79,11 +87,11 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=30, min_length=12, ), - blank=AAZPromptPasswordInput( + blank=AAZPromptInput( msg="Password:", ), ) - _args_schema.autonomous_database_id = AAZResourceIdArg( + _args_schema.autonomous_database_id = AAZStrArg( options=["--autonomous-database-id"], arg_group="Properties", help="Autonomous Database ID", @@ -114,7 +122,7 @@ def _build_arguments_schema(cls, *args, **kwargs): help="The compute amount (CPUs) available to the database.", fmt=AAZFloatArgFormat( maximum=512.0, - minimum=0.0, + minimum=0.1, ), ) _args_schema.compute_model = AAZStrArg( @@ -235,17 +243,17 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="The resource's private endpoint label.", ) - _args_schema.scheduled_operations = AAZObjectArg( - options=["--scheduled-operations"], + _args_schema.scheduled_operations_list = AAZListArg( + options=["--scheduled-operations-list"], arg_group="Properties", help="The list of scheduled operations.", ) - _args_schema.subnet_id = AAZResourceIdArg( + _args_schema.subnet_id = AAZStrArg( options=["--subnet-id"], arg_group="Properties", help="Client subnet", ) - _args_schema.vnet_id = AAZResourceIdArg( + _args_schema.vnet_id = AAZStrArg( options=["--vnet-id"], arg_group="Properties", help="VNET for network connectivity", @@ -273,12 +281,74 @@ def _build_arguments_schema(cls, *args, **kwargs): help="The source of the database.", enum={"BackupFromId": "BackupFromId", "BackupFromTimestamp": "BackupFromTimestamp", "CloneToRefreshable": "CloneToRefreshable", "CrossRegionDataguard": "CrossRegionDataguard", "CrossRegionDisasterRecovery": "CrossRegionDisasterRecovery", "Database": "Database", "None": "None"}, ) - clone.source_id = AAZResourceIdArg( + clone.source_id = AAZStrArg( options=["source-id"], help="The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database.", required=True, ) + clone_from_backup_timestamp = cls._args_schema.clone_from_backup_timestamp + clone_from_backup_timestamp.clone_type = AAZStrArg( + options=["clone-type"], + help="The Autonomous Database clone type.", + required=True, + enum={"Full": "Full", "Metadata": "Metadata"}, + ) + clone_from_backup_timestamp.source = AAZStrArg( + options=["source"], + help="The source of the database.", + required=True, + enum={"BackupFromTimestamp": "BackupFromTimestamp"}, + ) + clone_from_backup_timestamp.source_id = AAZStrArg( + options=["source-id"], + help="The ID of the source Autonomous Database that you will clone to create a new Autonomous Database.", + required=True, + ) + clone_from_backup_timestamp.timestamp = AAZDateTimeArg( + options=["timestamp"], + help="The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past.", + ) + clone_from_backup_timestamp.use_latest_available_backup_time_stamp = AAZBoolArg( + options=["use-latest-available-backup-time-stamp"], + help="Clone from latest available backup timestamp.", + ) + + cross_region_disaster_recovery = cls._args_schema.cross_region_disaster_recovery + cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolArg( + options=["is-replicate-automatic-backups"], + help="If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.", + ) + cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrArg( + options=["remote-disaster-recovery-type"], + help="Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + required=True, + enum={"Adg": "Adg", "BackupBased": "BackupBased"}, + ) + cross_region_disaster_recovery.source = AAZStrArg( + options=["source"], + help="The source of the database.", + required=True, + enum={"CrossRegionDisasterRecovery": "CrossRegionDisasterRecovery"}, + ) + cross_region_disaster_recovery.source_id = AAZStrArg( + options=["source-id"], + help="The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association.", + required=True, + ) + cross_region_disaster_recovery.source_location = AAZStrArg( + options=["source-location"], + help="The name of the region where source Autonomous Database exists.", + ) + cross_region_disaster_recovery.source_ocid = AAZStrArg( + options=["source-ocid"], + help="The source database ocid", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + customer_contacts = cls._args_schema.customer_contacts customer_contacts.Element = AAZObjectArg() @@ -293,13 +363,16 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) - scheduled_operations = cls._args_schema.scheduled_operations - scheduled_operations.day_of_week = AAZObjectArg( + scheduled_operations_list = cls._args_schema.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectArg() + + _element = cls._args_schema.scheduled_operations_list.Element + _element.day_of_week = AAZObjectArg( options=["day-of-week"], help="Day of week", required=True, ) - scheduled_operations.scheduled_start_time = AAZStrArg( + _element.scheduled_start_time = AAZStrArg( options=["scheduled-start-time"], help="auto start time. value must be of ISO-8601 format HH:mm", fmt=AAZStrArgFormat( @@ -307,7 +380,7 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - scheduled_operations.scheduled_stop_time = AAZStrArg( + _element.scheduled_stop_time = AAZStrArg( options=["scheduled-stop-time"], help="auto stop time. value must be of ISO-8601 format HH:mm", fmt=AAZStrArgFormat( @@ -316,7 +389,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) - day_of_week = cls._args_schema.scheduled_operations.day_of_week + day_of_week = cls._args_schema.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrArg( options=["name"], help="Name of the day of the week.", @@ -434,7 +507,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -460,12 +533,12 @@ def content(self): typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("properties", AAZObjectType) _builder.set_prop("tags", AAZDictType, ".tags") properties = _builder.get(".properties") if properties is not None: - properties.set_prop("adminPassword", AAZStrType, ".admin_password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("adminPassword", AAZStrType, ".admin_password") properties.set_prop("autonomousDatabaseId", AAZStrType, ".autonomous_database_id") properties.set_prop("autonomousMaintenanceScheduleType", AAZStrType, ".autonomous_maintenance_schedule_type") properties.set_prop("backupRetentionPeriodInDays", AAZIntType, ".backup_retention_period_in_days") @@ -475,6 +548,8 @@ def content(self): properties.set_prop("cpuCoreCount", AAZIntType, ".cpu_core_count") properties.set_prop("customerContacts", AAZListType, ".customer_contacts") properties.set_const("dataBaseType", "Clone", AAZStrType, ".clone", typ_kwargs={"flags": {"required": True}}) + properties.set_const("dataBaseType", "CloneFromBackupTimestamp", AAZStrType, ".clone_from_backup_timestamp", typ_kwargs={"flags": {"required": True}}) + properties.set_const("dataBaseType", "CrossRegionDisasterRecovery", AAZStrType, ".cross_region_disaster_recovery", typ_kwargs={"flags": {"required": True}}) properties.set_const("dataBaseType", "Regular", AAZStrType, ".regular", typ_kwargs={"flags": {"required": True}}) properties.set_prop("dataStorageSizeInGbs", AAZIntType, ".data_storage_size_in_gbs") properties.set_prop("dataStorageSizeInTbs", AAZIntType, ".data_storage_size_in_tbs") @@ -491,11 +566,13 @@ def content(self): properties.set_prop("ncharacterSet", AAZStrType, ".ncharacter_set") properties.set_prop("privateEndpointIp", AAZStrType, ".private_endpoint_ip") properties.set_prop("privateEndpointLabel", AAZStrType, ".private_endpoint_label") - properties.set_prop("scheduledOperations", AAZObjectType, ".scheduled_operations") + properties.set_prop("scheduledOperationsList", AAZListType, ".scheduled_operations_list") properties.set_prop("subnetId", AAZStrType, ".subnet_id") properties.set_prop("vnetId", AAZStrType, ".vnet_id") properties.set_prop("whitelistedIps", AAZListType, ".whitelisted_ips") properties.discriminate_by("dataBaseType", "Clone") + properties.discriminate_by("dataBaseType", "CloneFromBackupTimestamp") + properties.discriminate_by("dataBaseType", "CrossRegionDisasterRecovery") properties.discriminate_by("dataBaseType", "Regular") customer_contacts = _builder.get(".properties.customerContacts") @@ -506,13 +583,17 @@ def content(self): if _elements is not None: _elements.set_prop("email", AAZStrType, ".email", typ_kwargs={"flags": {"required": True}}) - scheduled_operations = _builder.get(".properties.scheduledOperations") - if scheduled_operations is not None: - scheduled_operations.set_prop("dayOfWeek", AAZObjectType, ".day_of_week", typ_kwargs={"flags": {"required": True}}) - scheduled_operations.set_prop("scheduledStartTime", AAZStrType, ".scheduled_start_time") - scheduled_operations.set_prop("scheduledStopTime", AAZStrType, ".scheduled_stop_time") + scheduled_operations_list = _builder.get(".properties.scheduledOperationsList") + if scheduled_operations_list is not None: + scheduled_operations_list.set_elements(AAZObjectType, ".") - day_of_week = _builder.get(".properties.scheduledOperations.dayOfWeek") + _elements = _builder.get(".properties.scheduledOperationsList[]") + if _elements is not None: + _elements.set_prop("dayOfWeek", AAZObjectType, ".day_of_week", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("scheduledStartTime", AAZStrType, ".scheduled_start_time") + _elements.set_prop("scheduledStopTime", AAZStrType, ".scheduled_stop_time") + + day_of_week = _builder.get(".properties.scheduledOperationsList[].dayOfWeek") if day_of_week is not None: day_of_week.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) @@ -527,6 +608,23 @@ def content(self): disc_clone.set_prop("source", AAZStrType, ".clone.source") disc_clone.set_prop("sourceId", AAZStrType, ".clone.source_id", typ_kwargs={"flags": {"required": True}}) + disc_clone_from_backup_timestamp = _builder.get(".properties{dataBaseType:CloneFromBackupTimestamp}") + if disc_clone_from_backup_timestamp is not None: + disc_clone_from_backup_timestamp.set_prop("cloneType", AAZStrType, ".clone_from_backup_timestamp.clone_type", typ_kwargs={"flags": {"required": True}}) + disc_clone_from_backup_timestamp.set_prop("source", AAZStrType, ".clone_from_backup_timestamp.source", typ_kwargs={"flags": {"required": True}}) + disc_clone_from_backup_timestamp.set_prop("sourceId", AAZStrType, ".clone_from_backup_timestamp.source_id", typ_kwargs={"flags": {"required": True}}) + disc_clone_from_backup_timestamp.set_prop("timestamp", AAZStrType, ".clone_from_backup_timestamp.timestamp") + disc_clone_from_backup_timestamp.set_prop("useLatestAvailableBackupTimeStamp", AAZBoolType, ".clone_from_backup_timestamp.use_latest_available_backup_time_stamp") + + disc_cross_region_disaster_recovery = _builder.get(".properties{dataBaseType:CrossRegionDisasterRecovery}") + if disc_cross_region_disaster_recovery is not None: + disc_cross_region_disaster_recovery.set_prop("isReplicateAutomaticBackups", AAZBoolType, ".cross_region_disaster_recovery.is_replicate_automatic_backups") + disc_cross_region_disaster_recovery.set_prop("remoteDisasterRecoveryType", AAZStrType, ".cross_region_disaster_recovery.remote_disaster_recovery_type", typ_kwargs={"flags": {"required": True}}) + disc_cross_region_disaster_recovery.set_prop("source", AAZStrType, ".cross_region_disaster_recovery.source", typ_kwargs={"flags": {"required": True}}) + disc_cross_region_disaster_recovery.set_prop("sourceId", AAZStrType, ".cross_region_disaster_recovery.source_id", typ_kwargs={"flags": {"required": True}}) + disc_cross_region_disaster_recovery.set_prop("sourceLocation", AAZStrType, ".cross_region_disaster_recovery.source_location") + disc_cross_region_disaster_recovery.set_prop("sourceOcid", AAZStrType, ".cross_region_disaster_recovery.source_ocid") + tags = _builder.get(".tags") if tags is not None: tags.set_elements(AAZStrType, ".") @@ -560,9 +658,7 @@ def _build_schema_on_200_201(cls): _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200_201.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200_201.properties = AAZObjectType() _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -583,6 +679,7 @@ def _build_schema_on_200_201(cls): ) properties.apex_details = AAZObjectType( serialized_name="apexDetails", + flags={"read_only": True}, ) properties.autonomous_database_id = AAZStrType( serialized_name="autonomousDatabaseId", @@ -608,9 +705,11 @@ def _build_schema_on_200_201(cls): ) properties.connection_strings = AAZObjectType( serialized_name="connectionStrings", + flags={"read_only": True}, ) properties.connection_urls = AAZObjectType( serialized_name="connectionUrls", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -618,11 +717,9 @@ def _build_schema_on_200_201(cls): properties.customer_contacts = AAZListType( serialized_name="customerContacts", ) - properties.data_base_type = AAZStrType( - serialized_name="dataBaseType", - ) properties.data_safe_status = AAZStrType( serialized_name="dataSafeStatus", + flags={"read_only": True}, ) properties.data_storage_size_in_gbs = AAZIntType( serialized_name="dataStorageSizeInGbs", @@ -679,15 +776,18 @@ def _build_schema_on_200_201(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( serialized_name="localAdgAutoFailoverMaxDataLossLimit", ) properties.local_disaster_recovery_type = AAZStrType( serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, ) properties.local_standby_db = AAZObjectType( serialized_name="localStandbyDb", + flags={"read_only": True}, ) properties.long_term_backup_schedule = AAZObjectType( serialized_name="longTermBackupSchedule", @@ -707,12 +807,15 @@ def _build_schema_on_200_201(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.open_mode = AAZStrType( serialized_name="openMode", ) properties.operations_insights_status = AAZStrType( serialized_name="operationsInsightsStatus", + flags={"read_only": True}, ) properties.peer_db_ids = AAZListType( serialized_name="peerDbIds", @@ -739,9 +842,13 @@ def _build_schema_on_200_201(cls): serialized_name="provisioningState", flags={"read_only": True}, ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", ) properties.service_console_url = AAZStrType( serialized_name="serviceConsoleUrl", @@ -770,6 +877,10 @@ def _build_schema_on_200_201(cls): serialized_name="timeDeletionOfFreeAutonomousDatabase", flags={"read_only": True}, ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) properties.time_local_data_guard_enabled = AAZStrType( serialized_name="timeLocalDataGuardEnabled", flags={"read_only": True}, @@ -947,19 +1058,36 @@ def _build_schema_on_200_201(cls): provisionable_cpus = cls._schema_on_200_201.properties.provisionable_cpus provisionable_cpus.Element = AAZIntType() - scheduled_operations = cls._schema_on_200_201.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( + remote_disaster_recovery_configuration = cls._schema_on_200_201.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200_201.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( serialized_name="dayOfWeek", flags={"required": True}, ) - scheduled_operations.scheduled_start_time = AAZStrType( + _element.scheduled_start_time = AAZStrType( serialized_name="scheduledStartTime", ) - scheduled_operations.scheduled_stop_time = AAZStrType( + _element.scheduled_stop_time = AAZStrType( serialized_name="scheduledStopTime", ) - day_of_week = cls._schema_on_200_201.properties.scheduled_operations.day_of_week + day_of_week = cls._schema_on_200_201.properties.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrType( flags={"required": True}, ) @@ -981,6 +1109,7 @@ def _build_schema_on_200_201(cls): ) disc_clone.refreshable_status = AAZStrType( serialized_name="refreshableStatus", + flags={"read_only": True}, ) disc_clone.source_id = AAZStrType( serialized_name="sourceId", @@ -990,6 +1119,25 @@ def _build_schema_on_200_201(cls): serialized_name="timeUntilReconnectCloneEnabled", ) + disc_clone_from_backup_timestamp = cls._schema_on_200_201.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200_201.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + system_data = cls._schema_on_200_201.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_delete.py index bd6a8ff0a56..0fd62d334c0 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_delete.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_delete.py @@ -23,9 +23,9 @@ class Delete(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2025-09-01"], ] } @@ -148,7 +148,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_failover.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_failover.py index c53264bcac5..dbf6980f20e 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_failover.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_failover.py @@ -22,9 +22,9 @@ class Failover(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/failover", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/failover", "2025-09-01"], ] } @@ -72,6 +72,16 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) + _args_schema.peer_db_location = AAZStrArg( + options=["--peer-db-location"], + arg_group="Body", + help="The location of the Disaster Recovery peer database.", + ) + _args_schema.peer_db_ocid = AAZStrArg( + options=["--peer-db-ocid"], + arg_group="Body", + help="Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + ) return cls._args_schema def _execute_operations(self): @@ -155,7 +165,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -181,6 +191,8 @@ def content(self): typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("peerDbId", AAZStrType, ".peer_db_id") + _builder.set_prop("peerDbLocation", AAZStrType, ".peer_db_location") + _builder.set_prop("peerDbOcid", AAZStrType, ".peer_db_ocid") return self.serialize_content(_content_value) @@ -211,9 +223,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -234,6 +244,7 @@ def _build_schema_on_200(cls): ) properties.apex_details = AAZObjectType( serialized_name="apexDetails", + flags={"read_only": True}, ) properties.autonomous_database_id = AAZStrType( serialized_name="autonomousDatabaseId", @@ -259,9 +270,11 @@ def _build_schema_on_200(cls): ) properties.connection_strings = AAZObjectType( serialized_name="connectionStrings", + flags={"read_only": True}, ) properties.connection_urls = AAZObjectType( serialized_name="connectionUrls", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -271,6 +284,7 @@ def _build_schema_on_200(cls): ) properties.data_safe_status = AAZStrType( serialized_name="dataSafeStatus", + flags={"read_only": True}, ) properties.data_storage_size_in_gbs = AAZIntType( serialized_name="dataStorageSizeInGbs", @@ -327,15 +341,18 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( serialized_name="localAdgAutoFailoverMaxDataLossLimit", ) properties.local_disaster_recovery_type = AAZStrType( serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, ) properties.local_standby_db = AAZObjectType( serialized_name="localStandbyDb", + flags={"read_only": True}, ) properties.long_term_backup_schedule = AAZObjectType( serialized_name="longTermBackupSchedule", @@ -355,12 +372,15 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.open_mode = AAZStrType( serialized_name="openMode", ) properties.operations_insights_status = AAZStrType( serialized_name="operationsInsightsStatus", + flags={"read_only": True}, ) properties.peer_db_ids = AAZListType( serialized_name="peerDbIds", @@ -387,9 +407,13 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", ) properties.service_console_url = AAZStrType( serialized_name="serviceConsoleUrl", @@ -418,6 +442,10 @@ def _build_schema_on_200(cls): serialized_name="timeDeletionOfFreeAutonomousDatabase", flags={"read_only": True}, ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) properties.time_local_data_guard_enabled = AAZStrType( serialized_name="timeLocalDataGuardEnabled", flags={"read_only": True}, @@ -595,19 +623,36 @@ def _build_schema_on_200(cls): provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus provisionable_cpus.Element = AAZIntType() - scheduled_operations = cls._schema_on_200.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( serialized_name="dayOfWeek", flags={"required": True}, ) - scheduled_operations.scheduled_start_time = AAZStrType( + _element.scheduled_start_time = AAZStrType( serialized_name="scheduledStartTime", ) - scheduled_operations.scheduled_stop_time = AAZStrType( + _element.scheduled_stop_time = AAZStrType( serialized_name="scheduledStopTime", ) - day_of_week = cls._schema_on_200.properties.scheduled_operations.day_of_week + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrType( flags={"required": True}, ) @@ -629,6 +674,7 @@ def _build_schema_on_200(cls): ) disc_clone.refreshable_status = AAZStrType( serialized_name="refreshableStatus", + flags={"read_only": True}, ) disc_clone.source_id = AAZStrType( serialized_name="sourceId", @@ -638,6 +684,25 @@ def _build_schema_on_200(cls): serialized_name="timeUntilReconnectCloneEnabled", ) + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_generate_wallet.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_generate_wallet.py new file mode 100644 index 00000000000..58a4455a8b2 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_generate_wallet.py @@ -0,0 +1,216 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database autonomous-database generate-wallet", +) +class GenerateWallet(AAZCommand): + """Generate wallet action on Autonomous Database + + :example: Generate Wallet + az oracle-database autonomous-database generate-wallet --autonomousdatabasename --resource-group --password --is-regional True + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/generatewallet", "2025-09-01"], + ] + } + + 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.autonomousdatabasename = AAZStrArg( + options=["--autonomousdatabasename"], + help="The database name.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=30, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.generate_type = AAZStrArg( + options=["--generate-type"], + arg_group="Body", + help="The type of wallet to generate.", + enum={"All": "All", "Single": "Single"}, + ) + _args_schema.is_regional = AAZBoolArg( + options=["--is-regional"], + arg_group="Body", + help="True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only.", + ) + _args_schema.password = AAZStrArg( + options=["--password"], + arg_group="Body", + help="The password to encrypt the keys inside the wallet", + required=True, + fmt=AAZStrArgFormat( + min_length=8, + ), + blank=AAZPromptInput( + msg="Password:", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AutonomousDatabasesGenerateWallet(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 AutonomousDatabasesGenerateWallet(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/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet", + **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( + "autonomousdatabasename", self.ctx.args.autonomousdatabasename, + 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", "2025-09-01", + 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("generateType", AAZStrType, ".generate_type") + _builder.set_prop("isRegional", AAZBoolType, ".is_regional") + _builder.set_prop("password", AAZStrType, ".password", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + 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.wallet_files = AAZStrType( + serialized_name="walletFiles", + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _GenerateWalletHelper: + """Helper class for GenerateWallet""" + + +__all__ = ["GenerateWallet"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_list.py index da3eba6fbb8..2fba84bbc5c 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_list.py @@ -22,10 +22,10 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/autonomousdatabases", "2023-09-01"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/autonomousdatabases", "2025-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases", "2025-09-01"], ] } @@ -51,12 +51,12 @@ def _build_arguments_schema(cls, *args, **kwargs): 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 + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) if condition_0: - self.AutonomousDatabasesListByResourceGroup(ctx=self.ctx)() - if condition_1: self.AutonomousDatabasesListBySubscription(ctx=self.ctx)() + if condition_1: + self.AutonomousDatabasesListByResourceGroup(ctx=self.ctx)() self.post_operations() @register_callback @@ -72,7 +72,7 @@ def _output(self, *args, **kwargs): next_link = self.deserialize_output(self.ctx.vars.instance.next_link) return result, next_link - class AutonomousDatabasesListByResourceGroup(AAZHttpOperation): + class AutonomousDatabasesListBySubscription(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -86,7 +86,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases", + "/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases", **self.url_parameters ) @@ -101,10 +101,6 @@ def error_format(self): @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, @@ -116,7 +112,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -169,9 +165,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -192,6 +186,7 @@ def _build_schema_on_200(cls): ) properties.apex_details = AAZObjectType( serialized_name="apexDetails", + flags={"read_only": True}, ) properties.autonomous_database_id = AAZStrType( serialized_name="autonomousDatabaseId", @@ -217,9 +212,11 @@ def _build_schema_on_200(cls): ) properties.connection_strings = AAZObjectType( serialized_name="connectionStrings", + flags={"read_only": True}, ) properties.connection_urls = AAZObjectType( serialized_name="connectionUrls", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -227,11 +224,9 @@ def _build_schema_on_200(cls): properties.customer_contacts = AAZListType( serialized_name="customerContacts", ) - properties.data_base_type = AAZStrType( - serialized_name="dataBaseType", - ) properties.data_safe_status = AAZStrType( serialized_name="dataSafeStatus", + flags={"read_only": True}, ) properties.data_storage_size_in_gbs = AAZIntType( serialized_name="dataStorageSizeInGbs", @@ -288,15 +283,18 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( serialized_name="localAdgAutoFailoverMaxDataLossLimit", ) properties.local_disaster_recovery_type = AAZStrType( serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, ) properties.local_standby_db = AAZObjectType( serialized_name="localStandbyDb", + flags={"read_only": True}, ) properties.long_term_backup_schedule = AAZObjectType( serialized_name="longTermBackupSchedule", @@ -316,12 +314,15 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.open_mode = AAZStrType( serialized_name="openMode", ) properties.operations_insights_status = AAZStrType( serialized_name="operationsInsightsStatus", + flags={"read_only": True}, ) properties.peer_db_ids = AAZListType( serialized_name="peerDbIds", @@ -348,9 +349,13 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", ) properties.service_console_url = AAZStrType( serialized_name="serviceConsoleUrl", @@ -379,6 +384,10 @@ def _build_schema_on_200(cls): serialized_name="timeDeletionOfFreeAutonomousDatabase", flags={"read_only": True}, ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) properties.time_local_data_guard_enabled = AAZStrType( serialized_name="timeLocalDataGuardEnabled", flags={"read_only": True}, @@ -556,19 +565,36 @@ def _build_schema_on_200(cls): provisionable_cpus = cls._schema_on_200.value.Element.properties.provisionable_cpus provisionable_cpus.Element = AAZIntType() - scheduled_operations = cls._schema_on_200.value.Element.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( + remote_disaster_recovery_configuration = cls._schema_on_200.value.Element.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.value.Element.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( serialized_name="dayOfWeek", flags={"required": True}, ) - scheduled_operations.scheduled_start_time = AAZStrType( + _element.scheduled_start_time = AAZStrType( serialized_name="scheduledStartTime", ) - scheduled_operations.scheduled_stop_time = AAZStrType( + _element.scheduled_stop_time = AAZStrType( serialized_name="scheduledStopTime", ) - day_of_week = cls._schema_on_200.value.Element.properties.scheduled_operations.day_of_week + day_of_week = cls._schema_on_200.value.Element.properties.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrType( flags={"required": True}, ) @@ -590,6 +616,7 @@ def _build_schema_on_200(cls): ) disc_clone.refreshable_status = AAZStrType( serialized_name="refreshableStatus", + flags={"read_only": True}, ) disc_clone.source_id = AAZStrType( serialized_name="sourceId", @@ -599,6 +626,25 @@ def _build_schema_on_200(cls): serialized_name="timeUntilReconnectCloneEnabled", ) + disc_clone_from_backup_timestamp = cls._schema_on_200.value.Element.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.value.Element.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", @@ -624,7 +670,7 @@ def _build_schema_on_200(cls): return cls._schema_on_200 - class AutonomousDatabasesListBySubscription(AAZHttpOperation): + class AutonomousDatabasesListByResourceGroup(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -638,7 +684,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases", **self.url_parameters ) @@ -653,6 +699,10 @@ def error_format(self): @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, @@ -664,7 +714,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -717,9 +767,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -740,6 +788,7 @@ def _build_schema_on_200(cls): ) properties.apex_details = AAZObjectType( serialized_name="apexDetails", + flags={"read_only": True}, ) properties.autonomous_database_id = AAZStrType( serialized_name="autonomousDatabaseId", @@ -765,9 +814,11 @@ def _build_schema_on_200(cls): ) properties.connection_strings = AAZObjectType( serialized_name="connectionStrings", + flags={"read_only": True}, ) properties.connection_urls = AAZObjectType( serialized_name="connectionUrls", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -775,11 +826,9 @@ def _build_schema_on_200(cls): properties.customer_contacts = AAZListType( serialized_name="customerContacts", ) - properties.data_base_type = AAZStrType( - serialized_name="dataBaseType", - ) properties.data_safe_status = AAZStrType( serialized_name="dataSafeStatus", + flags={"read_only": True}, ) properties.data_storage_size_in_gbs = AAZIntType( serialized_name="dataStorageSizeInGbs", @@ -836,15 +885,18 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( serialized_name="localAdgAutoFailoverMaxDataLossLimit", ) properties.local_disaster_recovery_type = AAZStrType( serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, ) properties.local_standby_db = AAZObjectType( serialized_name="localStandbyDb", + flags={"read_only": True}, ) properties.long_term_backup_schedule = AAZObjectType( serialized_name="longTermBackupSchedule", @@ -864,12 +916,15 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.open_mode = AAZStrType( serialized_name="openMode", ) properties.operations_insights_status = AAZStrType( serialized_name="operationsInsightsStatus", + flags={"read_only": True}, ) properties.peer_db_ids = AAZListType( serialized_name="peerDbIds", @@ -896,9 +951,13 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", ) properties.service_console_url = AAZStrType( serialized_name="serviceConsoleUrl", @@ -927,6 +986,10 @@ def _build_schema_on_200(cls): serialized_name="timeDeletionOfFreeAutonomousDatabase", flags={"read_only": True}, ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) properties.time_local_data_guard_enabled = AAZStrType( serialized_name="timeLocalDataGuardEnabled", flags={"read_only": True}, @@ -1104,19 +1167,36 @@ def _build_schema_on_200(cls): provisionable_cpus = cls._schema_on_200.value.Element.properties.provisionable_cpus provisionable_cpus.Element = AAZIntType() - scheduled_operations = cls._schema_on_200.value.Element.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( + remote_disaster_recovery_configuration = cls._schema_on_200.value.Element.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.value.Element.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( serialized_name="dayOfWeek", flags={"required": True}, ) - scheduled_operations.scheduled_start_time = AAZStrType( + _element.scheduled_start_time = AAZStrType( serialized_name="scheduledStartTime", ) - scheduled_operations.scheduled_stop_time = AAZStrType( + _element.scheduled_stop_time = AAZStrType( serialized_name="scheduledStopTime", ) - day_of_week = cls._schema_on_200.value.Element.properties.scheduled_operations.day_of_week + day_of_week = cls._schema_on_200.value.Element.properties.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrType( flags={"required": True}, ) @@ -1138,6 +1218,7 @@ def _build_schema_on_200(cls): ) disc_clone.refreshable_status = AAZStrType( serialized_name="refreshableStatus", + flags={"read_only": True}, ) disc_clone.source_id = AAZStrType( serialized_name="sourceId", @@ -1147,6 +1228,25 @@ def _build_schema_on_200(cls): serialized_name="timeUntilReconnectCloneEnabled", ) + disc_clone_from_backup_timestamp = cls._schema_on_200.value.Element.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.value.Element.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_restore.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_restore.py index 03b7d533ca9..0763a986f60 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_restore.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_restore.py @@ -22,9 +22,9 @@ class Restore(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/restore", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/restore", "2025-09-01"], ] } @@ -152,7 +152,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -208,9 +208,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -231,6 +229,7 @@ def _build_schema_on_200(cls): ) properties.apex_details = AAZObjectType( serialized_name="apexDetails", + flags={"read_only": True}, ) properties.autonomous_database_id = AAZStrType( serialized_name="autonomousDatabaseId", @@ -256,9 +255,11 @@ def _build_schema_on_200(cls): ) properties.connection_strings = AAZObjectType( serialized_name="connectionStrings", + flags={"read_only": True}, ) properties.connection_urls = AAZObjectType( serialized_name="connectionUrls", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -268,6 +269,7 @@ def _build_schema_on_200(cls): ) properties.data_safe_status = AAZStrType( serialized_name="dataSafeStatus", + flags={"read_only": True}, ) properties.data_storage_size_in_gbs = AAZIntType( serialized_name="dataStorageSizeInGbs", @@ -324,15 +326,18 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( serialized_name="localAdgAutoFailoverMaxDataLossLimit", ) properties.local_disaster_recovery_type = AAZStrType( serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, ) properties.local_standby_db = AAZObjectType( serialized_name="localStandbyDb", + flags={"read_only": True}, ) properties.long_term_backup_schedule = AAZObjectType( serialized_name="longTermBackupSchedule", @@ -352,12 +357,15 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.open_mode = AAZStrType( serialized_name="openMode", ) properties.operations_insights_status = AAZStrType( serialized_name="operationsInsightsStatus", + flags={"read_only": True}, ) properties.peer_db_ids = AAZListType( serialized_name="peerDbIds", @@ -384,9 +392,13 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", ) properties.service_console_url = AAZStrType( serialized_name="serviceConsoleUrl", @@ -415,6 +427,10 @@ def _build_schema_on_200(cls): serialized_name="timeDeletionOfFreeAutonomousDatabase", flags={"read_only": True}, ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) properties.time_local_data_guard_enabled = AAZStrType( serialized_name="timeLocalDataGuardEnabled", flags={"read_only": True}, @@ -592,19 +608,36 @@ def _build_schema_on_200(cls): provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus provisionable_cpus.Element = AAZIntType() - scheduled_operations = cls._schema_on_200.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( serialized_name="dayOfWeek", flags={"required": True}, ) - scheduled_operations.scheduled_start_time = AAZStrType( + _element.scheduled_start_time = AAZStrType( serialized_name="scheduledStartTime", ) - scheduled_operations.scheduled_stop_time = AAZStrType( + _element.scheduled_stop_time = AAZStrType( serialized_name="scheduledStopTime", ) - day_of_week = cls._schema_on_200.properties.scheduled_operations.day_of_week + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrType( flags={"required": True}, ) @@ -626,6 +659,7 @@ def _build_schema_on_200(cls): ) disc_clone.refreshable_status = AAZStrType( serialized_name="refreshableStatus", + flags={"read_only": True}, ) disc_clone.source_id = AAZStrType( serialized_name="sourceId", @@ -635,6 +669,25 @@ def _build_schema_on_200(cls): serialized_name="timeUntilReconnectCloneEnabled", ) + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_show.py index cea723003e0..8b1561d04e3 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_show.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_show.py @@ -22,9 +22,9 @@ class Show(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2025-09-01"], ] } @@ -125,7 +125,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -167,9 +167,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -190,6 +188,7 @@ def _build_schema_on_200(cls): ) properties.apex_details = AAZObjectType( serialized_name="apexDetails", + flags={"read_only": True}, ) properties.autonomous_database_id = AAZStrType( serialized_name="autonomousDatabaseId", @@ -215,9 +214,11 @@ def _build_schema_on_200(cls): ) properties.connection_strings = AAZObjectType( serialized_name="connectionStrings", + flags={"read_only": True}, ) properties.connection_urls = AAZObjectType( serialized_name="connectionUrls", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -225,11 +226,9 @@ def _build_schema_on_200(cls): properties.customer_contacts = AAZListType( serialized_name="customerContacts", ) - properties.data_base_type = AAZStrType( - serialized_name="dataBaseType", - ) properties.data_safe_status = AAZStrType( serialized_name="dataSafeStatus", + flags={"read_only": True}, ) properties.data_storage_size_in_gbs = AAZIntType( serialized_name="dataStorageSizeInGbs", @@ -286,15 +285,18 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( serialized_name="localAdgAutoFailoverMaxDataLossLimit", ) properties.local_disaster_recovery_type = AAZStrType( serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, ) properties.local_standby_db = AAZObjectType( serialized_name="localStandbyDb", + flags={"read_only": True}, ) properties.long_term_backup_schedule = AAZObjectType( serialized_name="longTermBackupSchedule", @@ -314,12 +316,15 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.open_mode = AAZStrType( serialized_name="openMode", ) properties.operations_insights_status = AAZStrType( serialized_name="operationsInsightsStatus", + flags={"read_only": True}, ) properties.peer_db_ids = AAZListType( serialized_name="peerDbIds", @@ -346,9 +351,13 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", ) properties.service_console_url = AAZStrType( serialized_name="serviceConsoleUrl", @@ -377,6 +386,10 @@ def _build_schema_on_200(cls): serialized_name="timeDeletionOfFreeAutonomousDatabase", flags={"read_only": True}, ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) properties.time_local_data_guard_enabled = AAZStrType( serialized_name="timeLocalDataGuardEnabled", flags={"read_only": True}, @@ -554,19 +567,36 @@ def _build_schema_on_200(cls): provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus provisionable_cpus.Element = AAZIntType() - scheduled_operations = cls._schema_on_200.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( serialized_name="dayOfWeek", flags={"required": True}, ) - scheduled_operations.scheduled_start_time = AAZStrType( + _element.scheduled_start_time = AAZStrType( serialized_name="scheduledStartTime", ) - scheduled_operations.scheduled_stop_time = AAZStrType( + _element.scheduled_stop_time = AAZStrType( serialized_name="scheduledStopTime", ) - day_of_week = cls._schema_on_200.properties.scheduled_operations.day_of_week + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrType( flags={"required": True}, ) @@ -588,6 +618,7 @@ def _build_schema_on_200(cls): ) disc_clone.refreshable_status = AAZStrType( serialized_name="refreshableStatus", + flags={"read_only": True}, ) disc_clone.source_id = AAZStrType( serialized_name="sourceId", @@ -597,6 +628,25 @@ def _build_schema_on_200(cls): serialized_name="timeUntilReconnectCloneEnabled", ) + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_shrink.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_shrink.py new file mode 100644 index 00000000000..a35648be021 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_shrink.py @@ -0,0 +1,697 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database autonomous-database shrink", +) +class Shrink(AAZCommand): + """This operation shrinks the current allocated storage down to the current actual used data storage. + + :example: Shrink + az oracle-database autonomous-database shrink --autonomousdatabasename --resource-group + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/shrink", "2025-09-01"], + ] + } + + 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.autonomousdatabasename = AAZStrArg( + options=["--autonomousdatabasename"], + help="The database name.", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=30, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.AutonomousDatabasesShrink(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 AutonomousDatabasesShrink(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": "location"}, + 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": "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/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink", + **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( + "autonomousdatabasename", self.ctx.args.autonomousdatabasename, + 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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200.properties + properties.actual_used_data_storage_size_in_tbs = AAZFloatType( + serialized_name="actualUsedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.allocated_storage_size_in_tbs = AAZFloatType( + serialized_name="allocatedStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.apex_details = AAZObjectType( + serialized_name="apexDetails", + flags={"read_only": True}, + ) + properties.autonomous_database_id = AAZStrType( + serialized_name="autonomousDatabaseId", + ) + properties.autonomous_maintenance_schedule_type = AAZStrType( + serialized_name="autonomousMaintenanceScheduleType", + ) + properties.available_upgrade_versions = AAZListType( + serialized_name="availableUpgradeVersions", + flags={"read_only": True}, + ) + properties.backup_retention_period_in_days = AAZIntType( + serialized_name="backupRetentionPeriodInDays", + ) + properties.character_set = AAZStrType( + serialized_name="characterSet", + ) + properties.compute_count = AAZFloatType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.connection_strings = AAZObjectType( + serialized_name="connectionStrings", + flags={"read_only": True}, + ) + properties.connection_urls = AAZObjectType( + serialized_name="connectionUrls", + flags={"read_only": True}, + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_safe_status = AAZStrType( + serialized_name="dataSafeStatus", + flags={"read_only": True}, + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + ) + properties.data_storage_size_in_tbs = AAZIntType( + serialized_name="dataStorageSizeInTbs", + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + ) + properties.db_workload = AAZStrType( + serialized_name="dbWorkload", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.failed_data_recovery_in_seconds = AAZIntType( + serialized_name="failedDataRecoveryInSeconds", + flags={"read_only": True}, + ) + properties.in_memory_area_in_gbs = AAZIntType( + serialized_name="inMemoryAreaInGbs", + flags={"read_only": True}, + ) + properties.is_auto_scaling_enabled = AAZBoolType( + serialized_name="isAutoScalingEnabled", + ) + properties.is_auto_scaling_for_storage_enabled = AAZBoolType( + serialized_name="isAutoScalingForStorageEnabled", + ) + properties.is_local_data_guard_enabled = AAZBoolType( + serialized_name="isLocalDataGuardEnabled", + ) + properties.is_mtls_connection_required = AAZBoolType( + serialized_name="isMtlsConnectionRequired", + ) + properties.is_preview = AAZBoolType( + serialized_name="isPreview", + flags={"read_only": True}, + ) + properties.is_remote_data_guard_enabled = AAZBoolType( + serialized_name="isRemoteDataGuardEnabled", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( + serialized_name="localAdgAutoFailoverMaxDataLossLimit", + ) + properties.local_disaster_recovery_type = AAZStrType( + serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, + ) + properties.local_standby_db = AAZObjectType( + serialized_name="localStandbyDb", + flags={"read_only": True}, + ) + properties.long_term_backup_schedule = AAZObjectType( + serialized_name="longTermBackupSchedule", + ) + properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType( + serialized_name="memoryPerOracleComputeUnitInGbs", + flags={"read_only": True}, + ) + properties.ncharacter_set = AAZStrType( + serialized_name="ncharacterSet", + ) + properties.next_long_term_backup_time_stamp = AAZStrType( + serialized_name="nextLongTermBackupTimeStamp", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.open_mode = AAZStrType( + serialized_name="openMode", + ) + properties.operations_insights_status = AAZStrType( + serialized_name="operationsInsightsStatus", + flags={"read_only": True}, + ) + properties.peer_db_ids = AAZListType( + serialized_name="peerDbIds", + flags={"read_only": True}, + ) + properties.permission_level = AAZStrType( + serialized_name="permissionLevel", + ) + properties.private_endpoint = AAZStrType( + serialized_name="privateEndpoint", + flags={"read_only": True}, + ) + properties.private_endpoint_ip = AAZStrType( + serialized_name="privateEndpointIp", + ) + properties.private_endpoint_label = AAZStrType( + serialized_name="privateEndpointLabel", + ) + properties.provisionable_cpus = AAZListType( + serialized_name="provisionableCpus", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) + properties.role = AAZStrType() + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", + ) + properties.service_console_url = AAZStrType( + serialized_name="serviceConsoleUrl", + flags={"read_only": True}, + ) + properties.sql_web_developer_url = AAZStrType( + serialized_name="sqlWebDeveloperUrl", + flags={"read_only": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + properties.supported_regions_to_clone_to = AAZListType( + serialized_name="supportedRegionsToCloneTo", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + flags={"read_only": True}, + ) + properties.time_deletion_of_free_autonomous_database = AAZStrType( + serialized_name="timeDeletionOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) + properties.time_local_data_guard_enabled = AAZStrType( + serialized_name="timeLocalDataGuardEnabled", + flags={"read_only": True}, + ) + properties.time_maintenance_begin = AAZStrType( + serialized_name="timeMaintenanceBegin", + flags={"read_only": True}, + ) + properties.time_maintenance_end = AAZStrType( + serialized_name="timeMaintenanceEnd", + flags={"read_only": True}, + ) + properties.time_of_last_failover = AAZStrType( + serialized_name="timeOfLastFailover", + flags={"read_only": True}, + ) + properties.time_of_last_refresh = AAZStrType( + serialized_name="timeOfLastRefresh", + flags={"read_only": True}, + ) + properties.time_of_last_refresh_point = AAZStrType( + serialized_name="timeOfLastRefreshPoint", + flags={"read_only": True}, + ) + properties.time_of_last_switchover = AAZStrType( + serialized_name="timeOfLastSwitchover", + flags={"read_only": True}, + ) + properties.time_reclamation_of_free_autonomous_database = AAZStrType( + serialized_name="timeReclamationOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_gbs = AAZIntType( + serialized_name="usedDataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_tbs = AAZIntType( + serialized_name="usedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + ) + properties.whitelisted_ips = AAZListType( + serialized_name="whitelistedIps", + ) + + apex_details = cls._schema_on_200.properties.apex_details + apex_details.apex_version = AAZStrType( + serialized_name="apexVersion", + ) + apex_details.ords_version = AAZStrType( + serialized_name="ordsVersion", + ) + + available_upgrade_versions = cls._schema_on_200.properties.available_upgrade_versions + available_upgrade_versions.Element = AAZStrType() + + connection_strings = cls._schema_on_200.properties.connection_strings + connection_strings.all_connection_strings = AAZObjectType( + serialized_name="allConnectionStrings", + ) + connection_strings.dedicated = AAZStrType() + connection_strings.high = AAZStrType() + connection_strings.low = AAZStrType() + connection_strings.medium = AAZStrType() + connection_strings.profiles = AAZListType() + + all_connection_strings = cls._schema_on_200.properties.connection_strings.all_connection_strings + all_connection_strings.high = AAZStrType() + all_connection_strings.low = AAZStrType() + all_connection_strings.medium = AAZStrType() + + profiles = cls._schema_on_200.properties.connection_strings.profiles + profiles.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.connection_strings.profiles.Element + _element.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.host_format = AAZStrType( + serialized_name="hostFormat", + flags={"required": True}, + ) + _element.is_regional = AAZBoolType( + serialized_name="isRegional", + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + _element.session_mode = AAZStrType( + serialized_name="sessionMode", + flags={"required": True}, + ) + _element.syntax_format = AAZStrType( + serialized_name="syntaxFormat", + flags={"required": True}, + ) + _element.tls_authentication = AAZStrType( + serialized_name="tlsAuthentication", + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + connection_urls = cls._schema_on_200.properties.connection_urls + connection_urls.apex_url = AAZStrType( + serialized_name="apexUrl", + ) + connection_urls.database_transforms_url = AAZStrType( + serialized_name="databaseTransformsUrl", + ) + connection_urls.graph_studio_url = AAZStrType( + serialized_name="graphStudioUrl", + ) + connection_urls.machine_learning_notebook_url = AAZStrType( + serialized_name="machineLearningNotebookUrl", + ) + connection_urls.mongo_db_url = AAZStrType( + serialized_name="mongoDbUrl", + ) + connection_urls.ords_url = AAZStrType( + serialized_name="ordsUrl", + ) + connection_urls.sql_dev_web_url = AAZStrType( + serialized_name="sqlDevWebUrl", + ) + + customer_contacts = cls._schema_on_200.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + local_standby_db = cls._schema_on_200.properties.local_standby_db + local_standby_db.lag_time_in_seconds = AAZIntType( + serialized_name="lagTimeInSeconds", + ) + local_standby_db.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + local_standby_db.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + local_standby_db.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + ) + local_standby_db.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + ) + + long_term_backup_schedule = cls._schema_on_200.properties.long_term_backup_schedule + long_term_backup_schedule.is_disabled = AAZBoolType( + serialized_name="isDisabled", + ) + long_term_backup_schedule.repeat_cadence = AAZStrType( + serialized_name="repeatCadence", + ) + long_term_backup_schedule.retention_period_in_days = AAZIntType( + serialized_name="retentionPeriodInDays", + ) + long_term_backup_schedule.time_of_backup = AAZStrType( + serialized_name="timeOfBackup", + ) + + peer_db_ids = cls._schema_on_200.properties.peer_db_ids + peer_db_ids.Element = AAZStrType() + + provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus + provisionable_cpus.Element = AAZIntType() + + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.scheduled_start_time = AAZStrType( + serialized_name="scheduledStartTime", + ) + _element.scheduled_stop_time = AAZStrType( + serialized_name="scheduledStopTime", + ) + + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week + day_of_week.name = AAZStrType( + flags={"required": True}, + ) + + supported_regions_to_clone_to = cls._schema_on_200.properties.supported_regions_to_clone_to + supported_regions_to_clone_to.Element = AAZStrType() + + whitelisted_ips = cls._schema_on_200.properties.whitelisted_ips + whitelisted_ips.Element = AAZStrType() + + disc_clone = cls._schema_on_200.properties.discriminate_by("data_base_type", "Clone") + disc_clone.is_reconnect_clone_enabled = AAZBoolType( + serialized_name="isReconnectCloneEnabled", + flags={"read_only": True}, + ) + disc_clone.is_refreshable_clone = AAZBoolType( + serialized_name="isRefreshableClone", + flags={"read_only": True}, + ) + disc_clone.refreshable_status = AAZStrType( + serialized_name="refreshableStatus", + flags={"read_only": True}, + ) + disc_clone.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + disc_clone.time_until_reconnect_clone_enabled = AAZStrType( + serialized_name="timeUntilReconnectCloneEnabled", + ) + + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShrinkHelper: + """Helper class for Shrink""" + + +__all__ = ["Shrink"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_switchover.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_switchover.py index 8e9292bc581..aeffc072ad0 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_switchover.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_switchover.py @@ -22,9 +22,9 @@ class Switchover(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/switchover", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/switchover", "2025-09-01"], ] } @@ -72,6 +72,16 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) + _args_schema.peer_db_location = AAZStrArg( + options=["--peer-db-location"], + arg_group="Body", + help="The location of the Disaster Recovery peer database.", + ) + _args_schema.peer_db_ocid = AAZStrArg( + options=["--peer-db-ocid"], + arg_group="Body", + help="Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + ) return cls._args_schema def _execute_operations(self): @@ -155,7 +165,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -181,6 +191,8 @@ def content(self): typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("peerDbId", AAZStrType, ".peer_db_id") + _builder.set_prop("peerDbLocation", AAZStrType, ".peer_db_location") + _builder.set_prop("peerDbOcid", AAZStrType, ".peer_db_ocid") return self.serialize_content(_content_value) @@ -211,9 +223,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -234,6 +244,7 @@ def _build_schema_on_200(cls): ) properties.apex_details = AAZObjectType( serialized_name="apexDetails", + flags={"read_only": True}, ) properties.autonomous_database_id = AAZStrType( serialized_name="autonomousDatabaseId", @@ -259,9 +270,11 @@ def _build_schema_on_200(cls): ) properties.connection_strings = AAZObjectType( serialized_name="connectionStrings", + flags={"read_only": True}, ) properties.connection_urls = AAZObjectType( serialized_name="connectionUrls", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -269,11 +282,9 @@ def _build_schema_on_200(cls): properties.customer_contacts = AAZListType( serialized_name="customerContacts", ) - properties.data_base_type = AAZStrType( - serialized_name="dataBaseType", - ) properties.data_safe_status = AAZStrType( serialized_name="dataSafeStatus", + flags={"read_only": True}, ) properties.data_storage_size_in_gbs = AAZIntType( serialized_name="dataStorageSizeInGbs", @@ -330,15 +341,18 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( serialized_name="localAdgAutoFailoverMaxDataLossLimit", ) properties.local_disaster_recovery_type = AAZStrType( serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, ) properties.local_standby_db = AAZObjectType( serialized_name="localStandbyDb", + flags={"read_only": True}, ) properties.long_term_backup_schedule = AAZObjectType( serialized_name="longTermBackupSchedule", @@ -358,12 +372,15 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.open_mode = AAZStrType( serialized_name="openMode", ) properties.operations_insights_status = AAZStrType( serialized_name="operationsInsightsStatus", + flags={"read_only": True}, ) properties.peer_db_ids = AAZListType( serialized_name="peerDbIds", @@ -390,9 +407,13 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", ) properties.service_console_url = AAZStrType( serialized_name="serviceConsoleUrl", @@ -421,6 +442,10 @@ def _build_schema_on_200(cls): serialized_name="timeDeletionOfFreeAutonomousDatabase", flags={"read_only": True}, ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) properties.time_local_data_guard_enabled = AAZStrType( serialized_name="timeLocalDataGuardEnabled", flags={"read_only": True}, @@ -598,19 +623,36 @@ def _build_schema_on_200(cls): provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus provisionable_cpus.Element = AAZIntType() - scheduled_operations = cls._schema_on_200.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( serialized_name="dayOfWeek", flags={"required": True}, ) - scheduled_operations.scheduled_start_time = AAZStrType( + _element.scheduled_start_time = AAZStrType( serialized_name="scheduledStartTime", ) - scheduled_operations.scheduled_stop_time = AAZStrType( + _element.scheduled_stop_time = AAZStrType( serialized_name="scheduledStopTime", ) - day_of_week = cls._schema_on_200.properties.scheduled_operations.day_of_week + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrType( flags={"required": True}, ) @@ -632,6 +674,7 @@ def _build_schema_on_200(cls): ) disc_clone.refreshable_status = AAZStrType( serialized_name="refreshableStatus", + flags={"read_only": True}, ) disc_clone.source_id = AAZStrType( serialized_name="sourceId", @@ -641,6 +684,25 @@ def _build_schema_on_200(cls): serialized_name="timeUntilReconnectCloneEnabled", ) + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_update.py index 8579dc208b3..d89a8f895c0 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_update.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_update.py @@ -22,9 +22,9 @@ class Update(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2025-09-01"], ] } @@ -69,12 +69,22 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--clone"], arg_group="Properties", ) + _args_schema.clone_from_backup_timestamp = AAZObjectArg( + options=["--clone-from-backup-timestamp"], + arg_group="Properties", + blank={}, + ) + _args_schema.cross_region_disaster_recovery = AAZObjectArg( + options=["--cross-region-disaster-recovery"], + arg_group="Properties", + blank={}, + ) _args_schema.regular = AAZObjectArg( options=["--regular"], arg_group="Properties", blank={}, ) - _args_schema.admin_password = AAZPasswordArg( + _args_schema.admin_password = AAZStrArg( options=["--admin-password"], arg_group="Properties", help="Admin password.", @@ -83,7 +93,7 @@ def _build_arguments_schema(cls, *args, **kwargs): max_length=30, min_length=12, ), - blank=AAZPromptPasswordInput( + blank=AAZPromptInput( msg="Password:", ), ) @@ -107,7 +117,7 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, fmt=AAZFloatArgFormat( maximum=512.0, - minimum=0.0, + minimum=0.1, ), ) _args_schema.cpu_core_count = AAZIntArg( @@ -241,8 +251,8 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, enum={"BackupCopy": "BackupCopy", "DisabledStandby": "DisabledStandby", "Primary": "Primary", "SnapshotStandby": "SnapshotStandby", "Standby": "Standby"}, ) - _args_schema.scheduled_operations = AAZObjectArg( - options=["--scheduled-operations"], + _args_schema.scheduled_operations_list = AAZListArg( + options=["--scheduled-operations-list"], arg_group="Properties", help="The list of scheduled operations.", nullable=True, @@ -303,12 +313,17 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) - scheduled_operations = cls._args_schema.scheduled_operations - scheduled_operations.day_of_week = AAZObjectArg( + scheduled_operations_list = cls._args_schema.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.scheduled_operations_list.Element + _element.day_of_week = AAZObjectArg( options=["day-of-week"], help="Day of week", ) - scheduled_operations.scheduled_start_time = AAZStrArg( + _element.scheduled_start_time = AAZStrArg( options=["scheduled-start-time"], help="auto start time. value must be of ISO-8601 format HH:mm", nullable=True, @@ -317,7 +332,7 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - scheduled_operations.scheduled_stop_time = AAZStrArg( + _element.scheduled_stop_time = AAZStrArg( options=["scheduled-stop-time"], help="auto stop time. value must be of ISO-8601 format HH:mm", nullable=True, @@ -327,7 +342,7 @@ def _build_arguments_schema(cls, *args, **kwargs): ), ) - day_of_week = cls._args_schema.scheduled_operations.day_of_week + day_of_week = cls._args_schema.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrArg( options=["name"], help="Name of the day of the week.", @@ -437,7 +452,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -468,7 +483,519 @@ def _build_schema_on_200(cls): return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_autonomous_database_read(cls._schema_on_200) + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200.properties + properties.actual_used_data_storage_size_in_tbs = AAZFloatType( + serialized_name="actualUsedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.allocated_storage_size_in_tbs = AAZFloatType( + serialized_name="allocatedStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.apex_details = AAZObjectType( + serialized_name="apexDetails", + flags={"read_only": True}, + ) + properties.autonomous_database_id = AAZStrType( + serialized_name="autonomousDatabaseId", + ) + properties.autonomous_maintenance_schedule_type = AAZStrType( + serialized_name="autonomousMaintenanceScheduleType", + ) + properties.available_upgrade_versions = AAZListType( + serialized_name="availableUpgradeVersions", + flags={"read_only": True}, + ) + properties.backup_retention_period_in_days = AAZIntType( + serialized_name="backupRetentionPeriodInDays", + ) + properties.character_set = AAZStrType( + serialized_name="characterSet", + ) + properties.compute_count = AAZFloatType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.connection_strings = AAZObjectType( + serialized_name="connectionStrings", + flags={"read_only": True}, + ) + properties.connection_urls = AAZObjectType( + serialized_name="connectionUrls", + flags={"read_only": True}, + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_safe_status = AAZStrType( + serialized_name="dataSafeStatus", + flags={"read_only": True}, + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + ) + properties.data_storage_size_in_tbs = AAZIntType( + serialized_name="dataStorageSizeInTbs", + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + ) + properties.db_workload = AAZStrType( + serialized_name="dbWorkload", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.failed_data_recovery_in_seconds = AAZIntType( + serialized_name="failedDataRecoveryInSeconds", + flags={"read_only": True}, + ) + properties.in_memory_area_in_gbs = AAZIntType( + serialized_name="inMemoryAreaInGbs", + flags={"read_only": True}, + ) + properties.is_auto_scaling_enabled = AAZBoolType( + serialized_name="isAutoScalingEnabled", + ) + properties.is_auto_scaling_for_storage_enabled = AAZBoolType( + serialized_name="isAutoScalingForStorageEnabled", + ) + properties.is_local_data_guard_enabled = AAZBoolType( + serialized_name="isLocalDataGuardEnabled", + ) + properties.is_mtls_connection_required = AAZBoolType( + serialized_name="isMtlsConnectionRequired", + ) + properties.is_preview = AAZBoolType( + serialized_name="isPreview", + flags={"read_only": True}, + ) + properties.is_remote_data_guard_enabled = AAZBoolType( + serialized_name="isRemoteDataGuardEnabled", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( + serialized_name="localAdgAutoFailoverMaxDataLossLimit", + ) + properties.local_disaster_recovery_type = AAZStrType( + serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, + ) + properties.local_standby_db = AAZObjectType( + serialized_name="localStandbyDb", + flags={"read_only": True}, + ) + properties.long_term_backup_schedule = AAZObjectType( + serialized_name="longTermBackupSchedule", + ) + properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType( + serialized_name="memoryPerOracleComputeUnitInGbs", + flags={"read_only": True}, + ) + properties.ncharacter_set = AAZStrType( + serialized_name="ncharacterSet", + ) + properties.next_long_term_backup_time_stamp = AAZStrType( + serialized_name="nextLongTermBackupTimeStamp", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.open_mode = AAZStrType( + serialized_name="openMode", + ) + properties.operations_insights_status = AAZStrType( + serialized_name="operationsInsightsStatus", + flags={"read_only": True}, + ) + properties.peer_db_ids = AAZListType( + serialized_name="peerDbIds", + flags={"read_only": True}, + ) + properties.permission_level = AAZStrType( + serialized_name="permissionLevel", + ) + properties.private_endpoint = AAZStrType( + serialized_name="privateEndpoint", + flags={"read_only": True}, + ) + properties.private_endpoint_ip = AAZStrType( + serialized_name="privateEndpointIp", + ) + properties.private_endpoint_label = AAZStrType( + serialized_name="privateEndpointLabel", + ) + properties.provisionable_cpus = AAZListType( + serialized_name="provisionableCpus", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) + properties.role = AAZStrType() + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", + ) + properties.service_console_url = AAZStrType( + serialized_name="serviceConsoleUrl", + flags={"read_only": True}, + ) + properties.sql_web_developer_url = AAZStrType( + serialized_name="sqlWebDeveloperUrl", + flags={"read_only": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + properties.supported_regions_to_clone_to = AAZListType( + serialized_name="supportedRegionsToCloneTo", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + flags={"read_only": True}, + ) + properties.time_deletion_of_free_autonomous_database = AAZStrType( + serialized_name="timeDeletionOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) + properties.time_local_data_guard_enabled = AAZStrType( + serialized_name="timeLocalDataGuardEnabled", + flags={"read_only": True}, + ) + properties.time_maintenance_begin = AAZStrType( + serialized_name="timeMaintenanceBegin", + flags={"read_only": True}, + ) + properties.time_maintenance_end = AAZStrType( + serialized_name="timeMaintenanceEnd", + flags={"read_only": True}, + ) + properties.time_of_last_failover = AAZStrType( + serialized_name="timeOfLastFailover", + flags={"read_only": True}, + ) + properties.time_of_last_refresh = AAZStrType( + serialized_name="timeOfLastRefresh", + flags={"read_only": True}, + ) + properties.time_of_last_refresh_point = AAZStrType( + serialized_name="timeOfLastRefreshPoint", + flags={"read_only": True}, + ) + properties.time_of_last_switchover = AAZStrType( + serialized_name="timeOfLastSwitchover", + flags={"read_only": True}, + ) + properties.time_reclamation_of_free_autonomous_database = AAZStrType( + serialized_name="timeReclamationOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_gbs = AAZIntType( + serialized_name="usedDataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_tbs = AAZIntType( + serialized_name="usedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + ) + properties.whitelisted_ips = AAZListType( + serialized_name="whitelistedIps", + ) + + apex_details = cls._schema_on_200.properties.apex_details + apex_details.apex_version = AAZStrType( + serialized_name="apexVersion", + ) + apex_details.ords_version = AAZStrType( + serialized_name="ordsVersion", + ) + + available_upgrade_versions = cls._schema_on_200.properties.available_upgrade_versions + available_upgrade_versions.Element = AAZStrType() + + connection_strings = cls._schema_on_200.properties.connection_strings + connection_strings.all_connection_strings = AAZObjectType( + serialized_name="allConnectionStrings", + ) + connection_strings.dedicated = AAZStrType() + connection_strings.high = AAZStrType() + connection_strings.low = AAZStrType() + connection_strings.medium = AAZStrType() + connection_strings.profiles = AAZListType() + + all_connection_strings = cls._schema_on_200.properties.connection_strings.all_connection_strings + all_connection_strings.high = AAZStrType() + all_connection_strings.low = AAZStrType() + all_connection_strings.medium = AAZStrType() + + profiles = cls._schema_on_200.properties.connection_strings.profiles + profiles.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.connection_strings.profiles.Element + _element.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.host_format = AAZStrType( + serialized_name="hostFormat", + flags={"required": True}, + ) + _element.is_regional = AAZBoolType( + serialized_name="isRegional", + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + _element.session_mode = AAZStrType( + serialized_name="sessionMode", + flags={"required": True}, + ) + _element.syntax_format = AAZStrType( + serialized_name="syntaxFormat", + flags={"required": True}, + ) + _element.tls_authentication = AAZStrType( + serialized_name="tlsAuthentication", + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + connection_urls = cls._schema_on_200.properties.connection_urls + connection_urls.apex_url = AAZStrType( + serialized_name="apexUrl", + ) + connection_urls.database_transforms_url = AAZStrType( + serialized_name="databaseTransformsUrl", + ) + connection_urls.graph_studio_url = AAZStrType( + serialized_name="graphStudioUrl", + ) + connection_urls.machine_learning_notebook_url = AAZStrType( + serialized_name="machineLearningNotebookUrl", + ) + connection_urls.mongo_db_url = AAZStrType( + serialized_name="mongoDbUrl", + ) + connection_urls.ords_url = AAZStrType( + serialized_name="ordsUrl", + ) + connection_urls.sql_dev_web_url = AAZStrType( + serialized_name="sqlDevWebUrl", + ) + + customer_contacts = cls._schema_on_200.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + local_standby_db = cls._schema_on_200.properties.local_standby_db + local_standby_db.lag_time_in_seconds = AAZIntType( + serialized_name="lagTimeInSeconds", + ) + local_standby_db.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + local_standby_db.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + local_standby_db.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + ) + local_standby_db.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + ) + + long_term_backup_schedule = cls._schema_on_200.properties.long_term_backup_schedule + long_term_backup_schedule.is_disabled = AAZBoolType( + serialized_name="isDisabled", + ) + long_term_backup_schedule.repeat_cadence = AAZStrType( + serialized_name="repeatCadence", + ) + long_term_backup_schedule.retention_period_in_days = AAZIntType( + serialized_name="retentionPeriodInDays", + ) + long_term_backup_schedule.time_of_backup = AAZStrType( + serialized_name="timeOfBackup", + ) + + peer_db_ids = cls._schema_on_200.properties.peer_db_ids + peer_db_ids.Element = AAZStrType() + + provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus + provisionable_cpus.Element = AAZIntType() + + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.scheduled_start_time = AAZStrType( + serialized_name="scheduledStartTime", + ) + _element.scheduled_stop_time = AAZStrType( + serialized_name="scheduledStopTime", + ) + + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week + day_of_week.name = AAZStrType( + flags={"required": True}, + ) + + supported_regions_to_clone_to = cls._schema_on_200.properties.supported_regions_to_clone_to + supported_regions_to_clone_to.Element = AAZStrType() + + whitelisted_ips = cls._schema_on_200.properties.whitelisted_ips + whitelisted_ips.Element = AAZStrType() + + disc_clone = cls._schema_on_200.properties.discriminate_by("data_base_type", "Clone") + disc_clone.is_reconnect_clone_enabled = AAZBoolType( + serialized_name="isReconnectCloneEnabled", + flags={"read_only": True}, + ) + disc_clone.is_refreshable_clone = AAZBoolType( + serialized_name="isRefreshableClone", + flags={"read_only": True}, + ) + disc_clone.refreshable_status = AAZStrType( + serialized_name="refreshableStatus", + flags={"read_only": True}, + ) + disc_clone.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + disc_clone.time_until_reconnect_clone_enabled = AAZStrType( + serialized_name="timeUntilReconnectCloneEnabled", + ) + + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() return cls._schema_on_200 @@ -536,7 +1063,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -579,7 +1106,519 @@ def _build_schema_on_200_201(cls): return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() - _UpdateHelper._build_schema_autonomous_database_read(cls._schema_on_200_201) + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _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() + _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}, + ) + + properties = cls._schema_on_200_201.properties + properties.actual_used_data_storage_size_in_tbs = AAZFloatType( + serialized_name="actualUsedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.allocated_storage_size_in_tbs = AAZFloatType( + serialized_name="allocatedStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.apex_details = AAZObjectType( + serialized_name="apexDetails", + flags={"read_only": True}, + ) + properties.autonomous_database_id = AAZStrType( + serialized_name="autonomousDatabaseId", + ) + properties.autonomous_maintenance_schedule_type = AAZStrType( + serialized_name="autonomousMaintenanceScheduleType", + ) + properties.available_upgrade_versions = AAZListType( + serialized_name="availableUpgradeVersions", + flags={"read_only": True}, + ) + properties.backup_retention_period_in_days = AAZIntType( + serialized_name="backupRetentionPeriodInDays", + ) + properties.character_set = AAZStrType( + serialized_name="characterSet", + ) + properties.compute_count = AAZFloatType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.connection_strings = AAZObjectType( + serialized_name="connectionStrings", + flags={"read_only": True}, + ) + properties.connection_urls = AAZObjectType( + serialized_name="connectionUrls", + flags={"read_only": True}, + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_safe_status = AAZStrType( + serialized_name="dataSafeStatus", + flags={"read_only": True}, + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + ) + properties.data_storage_size_in_tbs = AAZIntType( + serialized_name="dataStorageSizeInTbs", + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + ) + properties.db_workload = AAZStrType( + serialized_name="dbWorkload", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.failed_data_recovery_in_seconds = AAZIntType( + serialized_name="failedDataRecoveryInSeconds", + flags={"read_only": True}, + ) + properties.in_memory_area_in_gbs = AAZIntType( + serialized_name="inMemoryAreaInGbs", + flags={"read_only": True}, + ) + properties.is_auto_scaling_enabled = AAZBoolType( + serialized_name="isAutoScalingEnabled", + ) + properties.is_auto_scaling_for_storage_enabled = AAZBoolType( + serialized_name="isAutoScalingForStorageEnabled", + ) + properties.is_local_data_guard_enabled = AAZBoolType( + serialized_name="isLocalDataGuardEnabled", + ) + properties.is_mtls_connection_required = AAZBoolType( + serialized_name="isMtlsConnectionRequired", + ) + properties.is_preview = AAZBoolType( + serialized_name="isPreview", + flags={"read_only": True}, + ) + properties.is_remote_data_guard_enabled = AAZBoolType( + serialized_name="isRemoteDataGuardEnabled", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( + serialized_name="localAdgAutoFailoverMaxDataLossLimit", + ) + properties.local_disaster_recovery_type = AAZStrType( + serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, + ) + properties.local_standby_db = AAZObjectType( + serialized_name="localStandbyDb", + flags={"read_only": True}, + ) + properties.long_term_backup_schedule = AAZObjectType( + serialized_name="longTermBackupSchedule", + ) + properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType( + serialized_name="memoryPerOracleComputeUnitInGbs", + flags={"read_only": True}, + ) + properties.ncharacter_set = AAZStrType( + serialized_name="ncharacterSet", + ) + properties.next_long_term_backup_time_stamp = AAZStrType( + serialized_name="nextLongTermBackupTimeStamp", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.open_mode = AAZStrType( + serialized_name="openMode", + ) + properties.operations_insights_status = AAZStrType( + serialized_name="operationsInsightsStatus", + flags={"read_only": True}, + ) + properties.peer_db_ids = AAZListType( + serialized_name="peerDbIds", + flags={"read_only": True}, + ) + properties.permission_level = AAZStrType( + serialized_name="permissionLevel", + ) + properties.private_endpoint = AAZStrType( + serialized_name="privateEndpoint", + flags={"read_only": True}, + ) + properties.private_endpoint_ip = AAZStrType( + serialized_name="privateEndpointIp", + ) + properties.private_endpoint_label = AAZStrType( + serialized_name="privateEndpointLabel", + ) + properties.provisionable_cpus = AAZListType( + serialized_name="provisionableCpus", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) + properties.role = AAZStrType() + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", + ) + properties.service_console_url = AAZStrType( + serialized_name="serviceConsoleUrl", + flags={"read_only": True}, + ) + properties.sql_web_developer_url = AAZStrType( + serialized_name="sqlWebDeveloperUrl", + flags={"read_only": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + ) + properties.supported_regions_to_clone_to = AAZListType( + serialized_name="supportedRegionsToCloneTo", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + flags={"read_only": True}, + ) + properties.time_deletion_of_free_autonomous_database = AAZStrType( + serialized_name="timeDeletionOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) + properties.time_local_data_guard_enabled = AAZStrType( + serialized_name="timeLocalDataGuardEnabled", + flags={"read_only": True}, + ) + properties.time_maintenance_begin = AAZStrType( + serialized_name="timeMaintenanceBegin", + flags={"read_only": True}, + ) + properties.time_maintenance_end = AAZStrType( + serialized_name="timeMaintenanceEnd", + flags={"read_only": True}, + ) + properties.time_of_last_failover = AAZStrType( + serialized_name="timeOfLastFailover", + flags={"read_only": True}, + ) + properties.time_of_last_refresh = AAZStrType( + serialized_name="timeOfLastRefresh", + flags={"read_only": True}, + ) + properties.time_of_last_refresh_point = AAZStrType( + serialized_name="timeOfLastRefreshPoint", + flags={"read_only": True}, + ) + properties.time_of_last_switchover = AAZStrType( + serialized_name="timeOfLastSwitchover", + flags={"read_only": True}, + ) + properties.time_reclamation_of_free_autonomous_database = AAZStrType( + serialized_name="timeReclamationOfFreeAutonomousDatabase", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_gbs = AAZIntType( + serialized_name="usedDataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.used_data_storage_size_in_tbs = AAZIntType( + serialized_name="usedDataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + ) + properties.whitelisted_ips = AAZListType( + serialized_name="whitelistedIps", + ) + + apex_details = cls._schema_on_200_201.properties.apex_details + apex_details.apex_version = AAZStrType( + serialized_name="apexVersion", + ) + apex_details.ords_version = AAZStrType( + serialized_name="ordsVersion", + ) + + available_upgrade_versions = cls._schema_on_200_201.properties.available_upgrade_versions + available_upgrade_versions.Element = AAZStrType() + + connection_strings = cls._schema_on_200_201.properties.connection_strings + connection_strings.all_connection_strings = AAZObjectType( + serialized_name="allConnectionStrings", + ) + connection_strings.dedicated = AAZStrType() + connection_strings.high = AAZStrType() + connection_strings.low = AAZStrType() + connection_strings.medium = AAZStrType() + connection_strings.profiles = AAZListType() + + all_connection_strings = cls._schema_on_200_201.properties.connection_strings.all_connection_strings + all_connection_strings.high = AAZStrType() + all_connection_strings.low = AAZStrType() + all_connection_strings.medium = AAZStrType() + + profiles = cls._schema_on_200_201.properties.connection_strings.profiles + profiles.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.connection_strings.profiles.Element + _element.consumer_group = AAZStrType( + serialized_name="consumerGroup", + ) + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.host_format = AAZStrType( + serialized_name="hostFormat", + flags={"required": True}, + ) + _element.is_regional = AAZBoolType( + serialized_name="isRegional", + ) + _element.protocol = AAZStrType( + flags={"required": True}, + ) + _element.session_mode = AAZStrType( + serialized_name="sessionMode", + flags={"required": True}, + ) + _element.syntax_format = AAZStrType( + serialized_name="syntaxFormat", + flags={"required": True}, + ) + _element.tls_authentication = AAZStrType( + serialized_name="tlsAuthentication", + ) + _element.value = AAZStrType( + flags={"required": True}, + ) + + connection_urls = cls._schema_on_200_201.properties.connection_urls + connection_urls.apex_url = AAZStrType( + serialized_name="apexUrl", + ) + connection_urls.database_transforms_url = AAZStrType( + serialized_name="databaseTransformsUrl", + ) + connection_urls.graph_studio_url = AAZStrType( + serialized_name="graphStudioUrl", + ) + connection_urls.machine_learning_notebook_url = AAZStrType( + serialized_name="machineLearningNotebookUrl", + ) + connection_urls.mongo_db_url = AAZStrType( + serialized_name="mongoDbUrl", + ) + connection_urls.ords_url = AAZStrType( + serialized_name="ordsUrl", + ) + connection_urls.sql_dev_web_url = AAZStrType( + serialized_name="sqlDevWebUrl", + ) + + customer_contacts = cls._schema_on_200_201.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + local_standby_db = cls._schema_on_200_201.properties.local_standby_db + local_standby_db.lag_time_in_seconds = AAZIntType( + serialized_name="lagTimeInSeconds", + ) + local_standby_db.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + local_standby_db.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + local_standby_db.time_data_guard_role_changed = AAZStrType( + serialized_name="timeDataGuardRoleChanged", + ) + local_standby_db.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + ) + + long_term_backup_schedule = cls._schema_on_200_201.properties.long_term_backup_schedule + long_term_backup_schedule.is_disabled = AAZBoolType( + serialized_name="isDisabled", + ) + long_term_backup_schedule.repeat_cadence = AAZStrType( + serialized_name="repeatCadence", + ) + long_term_backup_schedule.retention_period_in_days = AAZIntType( + serialized_name="retentionPeriodInDays", + ) + long_term_backup_schedule.time_of_backup = AAZStrType( + serialized_name="timeOfBackup", + ) + + peer_db_ids = cls._schema_on_200_201.properties.peer_db_ids + peer_db_ids.Element = AAZStrType() + + provisionable_cpus = cls._schema_on_200_201.properties.provisionable_cpus + provisionable_cpus.Element = AAZIntType() + + remote_disaster_recovery_configuration = cls._schema_on_200_201.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200_201.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( + serialized_name="dayOfWeek", + flags={"required": True}, + ) + _element.scheduled_start_time = AAZStrType( + serialized_name="scheduledStartTime", + ) + _element.scheduled_stop_time = AAZStrType( + serialized_name="scheduledStopTime", + ) + + day_of_week = cls._schema_on_200_201.properties.scheduled_operations_list.Element.day_of_week + day_of_week.name = AAZStrType( + flags={"required": True}, + ) + + supported_regions_to_clone_to = cls._schema_on_200_201.properties.supported_regions_to_clone_to + supported_regions_to_clone_to.Element = AAZStrType() + + whitelisted_ips = cls._schema_on_200_201.properties.whitelisted_ips + whitelisted_ips.Element = AAZStrType() + + disc_clone = cls._schema_on_200_201.properties.discriminate_by("data_base_type", "Clone") + disc_clone.is_reconnect_clone_enabled = AAZBoolType( + serialized_name="isReconnectCloneEnabled", + flags={"read_only": True}, + ) + disc_clone.is_refreshable_clone = AAZBoolType( + serialized_name="isRefreshableClone", + flags={"read_only": True}, + ) + disc_clone.refreshable_status = AAZStrType( + serialized_name="refreshableStatus", + flags={"read_only": True}, + ) + disc_clone.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + disc_clone.time_until_reconnect_clone_enabled = AAZStrType( + serialized_name="timeUntilReconnectCloneEnabled", + ) + + disc_clone_from_backup_timestamp = cls._schema_on_200_201.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200_201.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + 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", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() return cls._schema_on_200_201 @@ -594,12 +1633,12 @@ def _update_instance(self, instance): value=instance, typ=AAZObjectType ) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("properties", AAZObjectType) _builder.set_prop("tags", AAZDictType, ".tags") properties = _builder.get(".properties") if properties is not None: - properties.set_prop("adminPassword", AAZStrType, ".admin_password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("adminPassword", AAZStrType, ".admin_password") properties.set_prop("autonomousMaintenanceScheduleType", AAZStrType, ".autonomous_maintenance_schedule_type") properties.set_prop("backupRetentionPeriodInDays", AAZIntType, ".backup_retention_period_in_days") properties.set_prop("computeCount", AAZFloatType, ".compute_count") @@ -620,9 +1659,11 @@ def _update_instance(self, instance): properties.set_prop("peerDbId", AAZStrType, ".peer_db_id") properties.set_prop("permissionLevel", AAZStrType, ".permission_level") properties.set_prop("role", AAZStrType, ".role") - properties.set_prop("scheduledOperations", AAZObjectType, ".scheduled_operations") + properties.set_prop("scheduledOperationsList", AAZListType, ".scheduled_operations_list") properties.set_prop("whitelistedIps", AAZListType, ".whitelisted_ips") properties.discriminate_by("dataBaseType", "Clone") + properties.discriminate_by("dataBaseType", "CloneFromBackupTimestamp") + properties.discriminate_by("dataBaseType", "CrossRegionDisasterRecovery") properties.discriminate_by("dataBaseType", "Regular") customer_contacts = _builder.get(".properties.customerContacts") @@ -640,13 +1681,17 @@ def _update_instance(self, instance): long_term_backup_schedule.set_prop("retentionPeriodInDays", AAZIntType, ".retention_period_in_days") long_term_backup_schedule.set_prop("timeOfBackup", AAZStrType, ".time_of_backup") - scheduled_operations = _builder.get(".properties.scheduledOperations") - if scheduled_operations is not None: - scheduled_operations.set_prop("dayOfWeek", AAZObjectType, ".day_of_week", typ_kwargs={"flags": {"required": True}}) - scheduled_operations.set_prop("scheduledStartTime", AAZStrType, ".scheduled_start_time") - scheduled_operations.set_prop("scheduledStopTime", AAZStrType, ".scheduled_stop_time") + scheduled_operations_list = _builder.get(".properties.scheduledOperationsList") + if scheduled_operations_list is not None: + scheduled_operations_list.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.scheduledOperationsList[]") + if _elements is not None: + _elements.set_prop("dayOfWeek", AAZObjectType, ".day_of_week", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("scheduledStartTime", AAZStrType, ".scheduled_start_time") + _elements.set_prop("scheduledStopTime", AAZStrType, ".scheduled_stop_time") - day_of_week = _builder.get(".properties.scheduledOperations.dayOfWeek") + day_of_week = _builder.get(".properties.scheduledOperationsList[].dayOfWeek") if day_of_week is not None: day_of_week.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) @@ -676,492 +1721,5 @@ def __call__(self, *args, **kwargs): class _UpdateHelper: """Helper class for Update""" - _schema_autonomous_database_read = None - - @classmethod - def _build_schema_autonomous_database_read(cls, _schema): - if cls._schema_autonomous_database_read is not None: - _schema.id = cls._schema_autonomous_database_read.id - _schema.location = cls._schema_autonomous_database_read.location - _schema.name = cls._schema_autonomous_database_read.name - _schema.properties = cls._schema_autonomous_database_read.properties - _schema.system_data = cls._schema_autonomous_database_read.system_data - _schema.tags = cls._schema_autonomous_database_read.tags - _schema.type = cls._schema_autonomous_database_read.type - return - - cls._schema_autonomous_database_read = _schema_autonomous_database_read = AAZObjectType() - - autonomous_database_read = _schema_autonomous_database_read - autonomous_database_read.id = AAZStrType( - flags={"read_only": True}, - ) - autonomous_database_read.location = AAZStrType( - flags={"required": True}, - ) - autonomous_database_read.name = AAZStrType( - flags={"read_only": True}, - ) - autonomous_database_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - autonomous_database_read.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - autonomous_database_read.tags = AAZDictType() - autonomous_database_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_autonomous_database_read.properties - properties.actual_used_data_storage_size_in_tbs = AAZFloatType( - serialized_name="actualUsedDataStorageSizeInTbs", - flags={"read_only": True}, - ) - properties.allocated_storage_size_in_tbs = AAZFloatType( - serialized_name="allocatedStorageSizeInTbs", - flags={"read_only": True}, - ) - properties.apex_details = AAZObjectType( - serialized_name="apexDetails", - ) - properties.autonomous_database_id = AAZStrType( - serialized_name="autonomousDatabaseId", - ) - properties.autonomous_maintenance_schedule_type = AAZStrType( - serialized_name="autonomousMaintenanceScheduleType", - ) - properties.available_upgrade_versions = AAZListType( - serialized_name="availableUpgradeVersions", - flags={"read_only": True}, - ) - properties.backup_retention_period_in_days = AAZIntType( - serialized_name="backupRetentionPeriodInDays", - ) - properties.character_set = AAZStrType( - serialized_name="characterSet", - ) - properties.compute_count = AAZFloatType( - serialized_name="computeCount", - ) - properties.compute_model = AAZStrType( - serialized_name="computeModel", - ) - properties.connection_strings = AAZObjectType( - serialized_name="connectionStrings", - ) - properties.connection_urls = AAZObjectType( - serialized_name="connectionUrls", - ) - properties.cpu_core_count = AAZIntType( - serialized_name="cpuCoreCount", - ) - properties.customer_contacts = AAZListType( - serialized_name="customerContacts", - ) - properties.data_base_type = AAZStrType( - serialized_name="dataBaseType", - ) - properties.data_safe_status = AAZStrType( - serialized_name="dataSafeStatus", - ) - properties.data_storage_size_in_gbs = AAZIntType( - serialized_name="dataStorageSizeInGbs", - ) - properties.data_storage_size_in_tbs = AAZIntType( - serialized_name="dataStorageSizeInTbs", - ) - properties.database_edition = AAZStrType( - serialized_name="databaseEdition", - ) - properties.db_version = AAZStrType( - serialized_name="dbVersion", - ) - properties.db_workload = AAZStrType( - serialized_name="dbWorkload", - ) - properties.display_name = AAZStrType( - serialized_name="displayName", - ) - properties.failed_data_recovery_in_seconds = AAZIntType( - serialized_name="failedDataRecoveryInSeconds", - flags={"read_only": True}, - ) - properties.in_memory_area_in_gbs = AAZIntType( - serialized_name="inMemoryAreaInGbs", - flags={"read_only": True}, - ) - properties.is_auto_scaling_enabled = AAZBoolType( - serialized_name="isAutoScalingEnabled", - ) - properties.is_auto_scaling_for_storage_enabled = AAZBoolType( - serialized_name="isAutoScalingForStorageEnabled", - ) - properties.is_local_data_guard_enabled = AAZBoolType( - serialized_name="isLocalDataGuardEnabled", - ) - properties.is_mtls_connection_required = AAZBoolType( - serialized_name="isMtlsConnectionRequired", - ) - properties.is_preview = AAZBoolType( - serialized_name="isPreview", - flags={"read_only": True}, - ) - properties.is_remote_data_guard_enabled = AAZBoolType( - serialized_name="isRemoteDataGuardEnabled", - flags={"read_only": True}, - ) - properties.license_model = AAZStrType( - serialized_name="licenseModel", - ) - properties.lifecycle_details = AAZStrType( - serialized_name="lifecycleDetails", - flags={"read_only": True}, - ) - properties.lifecycle_state = AAZStrType( - serialized_name="lifecycleState", - ) - properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( - serialized_name="localAdgAutoFailoverMaxDataLossLimit", - ) - properties.local_disaster_recovery_type = AAZStrType( - serialized_name="localDisasterRecoveryType", - ) - properties.local_standby_db = AAZObjectType( - serialized_name="localStandbyDb", - ) - properties.long_term_backup_schedule = AAZObjectType( - serialized_name="longTermBackupSchedule", - ) - properties.memory_per_oracle_compute_unit_in_gbs = AAZIntType( - serialized_name="memoryPerOracleComputeUnitInGbs", - flags={"read_only": True}, - ) - properties.ncharacter_set = AAZStrType( - serialized_name="ncharacterSet", - ) - properties.next_long_term_backup_time_stamp = AAZStrType( - serialized_name="nextLongTermBackupTimeStamp", - flags={"read_only": True}, - ) - properties.oci_url = AAZStrType( - serialized_name="ociUrl", - flags={"read_only": True}, - ) - properties.ocid = AAZStrType() - properties.open_mode = AAZStrType( - serialized_name="openMode", - ) - properties.operations_insights_status = AAZStrType( - serialized_name="operationsInsightsStatus", - ) - properties.peer_db_ids = AAZListType( - serialized_name="peerDbIds", - flags={"read_only": True}, - ) - properties.permission_level = AAZStrType( - serialized_name="permissionLevel", - ) - properties.private_endpoint = AAZStrType( - serialized_name="privateEndpoint", - flags={"read_only": True}, - ) - properties.private_endpoint_ip = AAZStrType( - serialized_name="privateEndpointIp", - ) - properties.private_endpoint_label = AAZStrType( - serialized_name="privateEndpointLabel", - ) - properties.provisionable_cpus = AAZListType( - serialized_name="provisionableCpus", - flags={"read_only": True}, - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", - ) - properties.service_console_url = AAZStrType( - serialized_name="serviceConsoleUrl", - flags={"read_only": True}, - ) - properties.sql_web_developer_url = AAZStrType( - serialized_name="sqlWebDeveloperUrl", - flags={"read_only": True}, - ) - properties.subnet_id = AAZStrType( - serialized_name="subnetId", - ) - properties.supported_regions_to_clone_to = AAZListType( - serialized_name="supportedRegionsToCloneTo", - flags={"read_only": True}, - ) - properties.time_created = AAZStrType( - serialized_name="timeCreated", - flags={"read_only": True}, - ) - properties.time_data_guard_role_changed = AAZStrType( - serialized_name="timeDataGuardRoleChanged", - flags={"read_only": True}, - ) - properties.time_deletion_of_free_autonomous_database = AAZStrType( - serialized_name="timeDeletionOfFreeAutonomousDatabase", - flags={"read_only": True}, - ) - properties.time_local_data_guard_enabled = AAZStrType( - serialized_name="timeLocalDataGuardEnabled", - flags={"read_only": True}, - ) - properties.time_maintenance_begin = AAZStrType( - serialized_name="timeMaintenanceBegin", - flags={"read_only": True}, - ) - properties.time_maintenance_end = AAZStrType( - serialized_name="timeMaintenanceEnd", - flags={"read_only": True}, - ) - properties.time_of_last_failover = AAZStrType( - serialized_name="timeOfLastFailover", - flags={"read_only": True}, - ) - properties.time_of_last_refresh = AAZStrType( - serialized_name="timeOfLastRefresh", - flags={"read_only": True}, - ) - properties.time_of_last_refresh_point = AAZStrType( - serialized_name="timeOfLastRefreshPoint", - flags={"read_only": True}, - ) - properties.time_of_last_switchover = AAZStrType( - serialized_name="timeOfLastSwitchover", - flags={"read_only": True}, - ) - properties.time_reclamation_of_free_autonomous_database = AAZStrType( - serialized_name="timeReclamationOfFreeAutonomousDatabase", - flags={"read_only": True}, - ) - properties.used_data_storage_size_in_gbs = AAZIntType( - serialized_name="usedDataStorageSizeInGbs", - flags={"read_only": True}, - ) - properties.used_data_storage_size_in_tbs = AAZIntType( - serialized_name="usedDataStorageSizeInTbs", - flags={"read_only": True}, - ) - properties.vnet_id = AAZStrType( - serialized_name="vnetId", - ) - properties.whitelisted_ips = AAZListType( - serialized_name="whitelistedIps", - ) - - apex_details = _schema_autonomous_database_read.properties.apex_details - apex_details.apex_version = AAZStrType( - serialized_name="apexVersion", - ) - apex_details.ords_version = AAZStrType( - serialized_name="ordsVersion", - ) - - available_upgrade_versions = _schema_autonomous_database_read.properties.available_upgrade_versions - available_upgrade_versions.Element = AAZStrType() - - connection_strings = _schema_autonomous_database_read.properties.connection_strings - connection_strings.all_connection_strings = AAZObjectType( - serialized_name="allConnectionStrings", - ) - connection_strings.dedicated = AAZStrType() - connection_strings.high = AAZStrType() - connection_strings.low = AAZStrType() - connection_strings.medium = AAZStrType() - connection_strings.profiles = AAZListType() - - all_connection_strings = _schema_autonomous_database_read.properties.connection_strings.all_connection_strings - all_connection_strings.high = AAZStrType() - all_connection_strings.low = AAZStrType() - all_connection_strings.medium = AAZStrType() - - profiles = _schema_autonomous_database_read.properties.connection_strings.profiles - profiles.Element = AAZObjectType() - - _element = _schema_autonomous_database_read.properties.connection_strings.profiles.Element - _element.consumer_group = AAZStrType( - serialized_name="consumerGroup", - ) - _element.display_name = AAZStrType( - serialized_name="displayName", - flags={"required": True}, - ) - _element.host_format = AAZStrType( - serialized_name="hostFormat", - flags={"required": True}, - ) - _element.is_regional = AAZBoolType( - serialized_name="isRegional", - ) - _element.protocol = AAZStrType( - flags={"required": True}, - ) - _element.session_mode = AAZStrType( - serialized_name="sessionMode", - flags={"required": True}, - ) - _element.syntax_format = AAZStrType( - serialized_name="syntaxFormat", - flags={"required": True}, - ) - _element.tls_authentication = AAZStrType( - serialized_name="tlsAuthentication", - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - connection_urls = _schema_autonomous_database_read.properties.connection_urls - connection_urls.apex_url = AAZStrType( - serialized_name="apexUrl", - ) - connection_urls.database_transforms_url = AAZStrType( - serialized_name="databaseTransformsUrl", - ) - connection_urls.graph_studio_url = AAZStrType( - serialized_name="graphStudioUrl", - ) - connection_urls.machine_learning_notebook_url = AAZStrType( - serialized_name="machineLearningNotebookUrl", - ) - connection_urls.mongo_db_url = AAZStrType( - serialized_name="mongoDbUrl", - ) - connection_urls.ords_url = AAZStrType( - serialized_name="ordsUrl", - ) - connection_urls.sql_dev_web_url = AAZStrType( - serialized_name="sqlDevWebUrl", - ) - - customer_contacts = _schema_autonomous_database_read.properties.customer_contacts - customer_contacts.Element = AAZObjectType() - - _element = _schema_autonomous_database_read.properties.customer_contacts.Element - _element.email = AAZStrType( - flags={"required": True}, - ) - - local_standby_db = _schema_autonomous_database_read.properties.local_standby_db - local_standby_db.lag_time_in_seconds = AAZIntType( - serialized_name="lagTimeInSeconds", - ) - local_standby_db.lifecycle_details = AAZStrType( - serialized_name="lifecycleDetails", - ) - local_standby_db.lifecycle_state = AAZStrType( - serialized_name="lifecycleState", - ) - local_standby_db.time_data_guard_role_changed = AAZStrType( - serialized_name="timeDataGuardRoleChanged", - ) - local_standby_db.time_disaster_recovery_role_changed = AAZStrType( - serialized_name="timeDisasterRecoveryRoleChanged", - ) - - long_term_backup_schedule = _schema_autonomous_database_read.properties.long_term_backup_schedule - long_term_backup_schedule.is_disabled = AAZBoolType( - serialized_name="isDisabled", - ) - long_term_backup_schedule.repeat_cadence = AAZStrType( - serialized_name="repeatCadence", - ) - long_term_backup_schedule.retention_period_in_days = AAZIntType( - serialized_name="retentionPeriodInDays", - ) - long_term_backup_schedule.time_of_backup = AAZStrType( - serialized_name="timeOfBackup", - ) - - peer_db_ids = _schema_autonomous_database_read.properties.peer_db_ids - peer_db_ids.Element = AAZStrType() - - provisionable_cpus = _schema_autonomous_database_read.properties.provisionable_cpus - provisionable_cpus.Element = AAZIntType() - - scheduled_operations = _schema_autonomous_database_read.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( - serialized_name="dayOfWeek", - flags={"required": True}, - ) - scheduled_operations.scheduled_start_time = AAZStrType( - serialized_name="scheduledStartTime", - ) - scheduled_operations.scheduled_stop_time = AAZStrType( - serialized_name="scheduledStopTime", - ) - - day_of_week = _schema_autonomous_database_read.properties.scheduled_operations.day_of_week - day_of_week.name = AAZStrType( - flags={"required": True}, - ) - - supported_regions_to_clone_to = _schema_autonomous_database_read.properties.supported_regions_to_clone_to - supported_regions_to_clone_to.Element = AAZStrType() - - whitelisted_ips = _schema_autonomous_database_read.properties.whitelisted_ips - whitelisted_ips.Element = AAZStrType() - - disc_clone = _schema_autonomous_database_read.properties.discriminate_by("data_base_type", "Clone") - disc_clone.is_reconnect_clone_enabled = AAZBoolType( - serialized_name="isReconnectCloneEnabled", - flags={"read_only": True}, - ) - disc_clone.is_refreshable_clone = AAZBoolType( - serialized_name="isRefreshableClone", - flags={"read_only": True}, - ) - disc_clone.refreshable_status = AAZStrType( - serialized_name="refreshableStatus", - ) - disc_clone.source_id = AAZStrType( - serialized_name="sourceId", - flags={"required": True}, - ) - disc_clone.time_until_reconnect_clone_enabled = AAZStrType( - serialized_name="timeUntilReconnectCloneEnabled", - ) - - system_data = _schema_autonomous_database_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_autonomous_database_read.tags - tags.Element = AAZStrType() - - _schema.id = cls._schema_autonomous_database_read.id - _schema.location = cls._schema_autonomous_database_read.location - _schema.name = cls._schema_autonomous_database_read.name - _schema.properties = cls._schema_autonomous_database_read.properties - _schema.system_data = cls._schema_autonomous_database_read.system_data - _schema.tags = cls._schema_autonomous_database_read.tags - _schema.type = cls._schema_autonomous_database_read.type - __all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_wait.py index 6b54ee4c8e6..8545702139e 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_wait.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}", "2025-09-01"], ] } @@ -121,7 +121,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -163,9 +163,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -186,6 +184,7 @@ def _build_schema_on_200(cls): ) properties.apex_details = AAZObjectType( serialized_name="apexDetails", + flags={"read_only": True}, ) properties.autonomous_database_id = AAZStrType( serialized_name="autonomousDatabaseId", @@ -211,9 +210,11 @@ def _build_schema_on_200(cls): ) properties.connection_strings = AAZObjectType( serialized_name="connectionStrings", + flags={"read_only": True}, ) properties.connection_urls = AAZObjectType( serialized_name="connectionUrls", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -221,11 +222,9 @@ def _build_schema_on_200(cls): properties.customer_contacts = AAZListType( serialized_name="customerContacts", ) - properties.data_base_type = AAZStrType( - serialized_name="dataBaseType", - ) properties.data_safe_status = AAZStrType( serialized_name="dataSafeStatus", + flags={"read_only": True}, ) properties.data_storage_size_in_gbs = AAZIntType( serialized_name="dataStorageSizeInGbs", @@ -282,15 +281,18 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.local_adg_auto_failover_max_data_loss_limit = AAZIntType( serialized_name="localAdgAutoFailoverMaxDataLossLimit", ) properties.local_disaster_recovery_type = AAZStrType( serialized_name="localDisasterRecoveryType", + flags={"read_only": True}, ) properties.local_standby_db = AAZObjectType( serialized_name="localStandbyDb", + flags={"read_only": True}, ) properties.long_term_backup_schedule = AAZObjectType( serialized_name="longTermBackupSchedule", @@ -310,12 +312,15 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.open_mode = AAZStrType( serialized_name="openMode", ) properties.operations_insights_status = AAZStrType( serialized_name="operationsInsightsStatus", + flags={"read_only": True}, ) properties.peer_db_ids = AAZListType( serialized_name="peerDbIds", @@ -342,9 +347,13 @@ def _build_schema_on_200(cls): serialized_name="provisioningState", flags={"read_only": True}, ) + properties.remote_disaster_recovery_configuration = AAZObjectType( + serialized_name="remoteDisasterRecoveryConfiguration", + flags={"read_only": True}, + ) properties.role = AAZStrType() - properties.scheduled_operations = AAZObjectType( - serialized_name="scheduledOperations", + properties.scheduled_operations_list = AAZListType( + serialized_name="scheduledOperationsList", ) properties.service_console_url = AAZStrType( serialized_name="serviceConsoleUrl", @@ -373,6 +382,10 @@ def _build_schema_on_200(cls): serialized_name="timeDeletionOfFreeAutonomousDatabase", flags={"read_only": True}, ) + properties.time_disaster_recovery_role_changed = AAZStrType( + serialized_name="timeDisasterRecoveryRoleChanged", + flags={"read_only": True}, + ) properties.time_local_data_guard_enabled = AAZStrType( serialized_name="timeLocalDataGuardEnabled", flags={"read_only": True}, @@ -550,19 +563,36 @@ def _build_schema_on_200(cls): provisionable_cpus = cls._schema_on_200.properties.provisionable_cpus provisionable_cpus.Element = AAZIntType() - scheduled_operations = cls._schema_on_200.properties.scheduled_operations - scheduled_operations.day_of_week = AAZObjectType( + remote_disaster_recovery_configuration = cls._schema_on_200.properties.remote_disaster_recovery_configuration + remote_disaster_recovery_configuration.disaster_recovery_type = AAZStrType( + serialized_name="disasterRecoveryType", + ) + remote_disaster_recovery_configuration.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + remote_disaster_recovery_configuration.is_snapshot_standby = AAZBoolType( + serialized_name="isSnapshotStandby", + ) + remote_disaster_recovery_configuration.time_snapshot_standby_enabled_till = AAZStrType( + serialized_name="timeSnapshotStandbyEnabledTill", + ) + + scheduled_operations_list = cls._schema_on_200.properties.scheduled_operations_list + scheduled_operations_list.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.scheduled_operations_list.Element + _element.day_of_week = AAZObjectType( serialized_name="dayOfWeek", flags={"required": True}, ) - scheduled_operations.scheduled_start_time = AAZStrType( + _element.scheduled_start_time = AAZStrType( serialized_name="scheduledStartTime", ) - scheduled_operations.scheduled_stop_time = AAZStrType( + _element.scheduled_stop_time = AAZStrType( serialized_name="scheduledStopTime", ) - day_of_week = cls._schema_on_200.properties.scheduled_operations.day_of_week + day_of_week = cls._schema_on_200.properties.scheduled_operations_list.Element.day_of_week day_of_week.name = AAZStrType( flags={"required": True}, ) @@ -584,6 +614,7 @@ def _build_schema_on_200(cls): ) disc_clone.refreshable_status = AAZStrType( serialized_name="refreshableStatus", + flags={"read_only": True}, ) disc_clone.source_id = AAZStrType( serialized_name="sourceId", @@ -593,6 +624,25 @@ def _build_schema_on_200(cls): serialized_name="timeUntilReconnectCloneEnabled", ) + disc_clone_from_backup_timestamp = cls._schema_on_200.properties.discriminate_by("data_base_type", "CloneFromBackupTimestamp") + disc_clone_from_backup_timestamp.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + + disc_cross_region_disaster_recovery = cls._schema_on_200.properties.discriminate_by("data_base_type", "CrossRegionDisasterRecovery") + disc_cross_region_disaster_recovery.is_replicate_automatic_backups = AAZBoolType( + serialized_name="isReplicateAutomaticBackups", + ) + disc_cross_region_disaster_recovery.remote_disaster_recovery_type = AAZStrType( + serialized_name="remoteDisasterRecoveryType", + flags={"required": True}, + ) + disc_cross_region_disaster_recovery.source_id = AAZStrType( + serialized_name="sourceId", + flags={"required": True}, + ) + system_data = cls._schema_on_200.system_data system_data.created_at = AAZStrType( serialized_name="createdAt", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_create.py index 666c69202da..009abdd1868 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_create.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_create.py @@ -22,9 +22,9 @@ class Create(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2025-09-01"], ] } @@ -79,10 +79,6 @@ def _build_arguments_schema(cls, *args, **kwargs): options=["--retention-days", "--retention-period-in-days"], arg_group="Properties", help="Retention period, in days, for long-term backups.", - fmt=AAZIntArgFormat( - maximum=3650, - minimum=60, - ), ) return cls._args_schema @@ -171,7 +167,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -196,7 +192,7 @@ def content(self): typ=AAZObjectType, typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: @@ -229,9 +225,7 @@ def _build_schema_on_200_201(cls): _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200_201.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200_201.properties = AAZObjectType() _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -243,9 +237,11 @@ def _build_schema_on_200_201(cls): properties = cls._schema_on_200_201.properties properties.autonomous_database_ocid = AAZStrType( serialized_name="autonomousDatabaseOcid", + flags={"read_only": True}, ) properties.backup_type = AAZStrType( serialized_name="backupType", + flags={"read_only": True}, ) properties.database_size_in_tbs = AAZFloatType( serialized_name="databaseSizeInTbs", @@ -272,8 +268,11 @@ def _build_schema_on_200_201(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, ) - properties.ocid = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_delete.py index 1de14e75bcd..ebdc742f01b 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_delete.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_delete.py @@ -23,9 +23,9 @@ class Delete(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2025-09-01"], ] } @@ -161,7 +161,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_list.py index 5dd93ce2a40..1961201cca9 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups", "2025-09-01"], ] } @@ -62,7 +62,7 @@ def _build_arguments_schema(cls, *args, **kwargs): def _execute_operations(self): self.pre_operations() - self.AutonomousDatabaseBackupsListByAutonomousDatabase(ctx=self.ctx)() + self.AutonomousDatabaseBackupsListByParent(ctx=self.ctx)() self.post_operations() @register_callback @@ -78,7 +78,7 @@ def _output(self, *args, **kwargs): next_link = self.deserialize_output(self.ctx.vars.instance.next_link) return result, next_link - class AutonomousDatabaseBackupsListByAutonomousDatabase(AAZHttpOperation): + class AutonomousDatabaseBackupsListByParent(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -126,7 +126,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -176,9 +176,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -190,9 +188,11 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.value.Element.properties properties.autonomous_database_ocid = AAZStrType( serialized_name="autonomousDatabaseOcid", + flags={"read_only": True}, ) properties.backup_type = AAZStrType( serialized_name="backupType", + flags={"read_only": True}, ) properties.database_size_in_tbs = AAZFloatType( serialized_name="databaseSizeInTbs", @@ -219,8 +219,11 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, ) - properties.ocid = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_show.py index 0d3623558ee..ec50f542e4c 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_show.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_show.py @@ -22,9 +22,9 @@ class Show(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2025-09-01"], ] } @@ -138,7 +138,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -177,9 +177,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -191,9 +189,11 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.properties properties.autonomous_database_ocid = AAZStrType( serialized_name="autonomousDatabaseOcid", + flags={"read_only": True}, ) properties.backup_type = AAZStrType( serialized_name="backupType", + flags={"read_only": True}, ) properties.database_size_in_tbs = AAZFloatType( serialized_name="databaseSizeInTbs", @@ -220,8 +220,11 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, ) - properties.ocid = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_update.py index 068d0616b14..48fd348d68b 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_update.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_update.py @@ -22,9 +22,9 @@ class Update(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2025-09-01"], ] } @@ -79,10 +79,6 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="Retention period, in days, for long-term backups.", nullable=True, - fmt=AAZIntArgFormat( - maximum=3650, - minimum=60, - ), ) return cls._args_schema @@ -168,7 +164,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -199,7 +195,105 @@ def _build_schema_on_200(cls): return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_autonomous_database_backup_read(cls._schema_on_200) + + _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() + _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.autonomous_database_ocid = AAZStrType( + serialized_name="autonomousDatabaseOcid", + flags={"read_only": True}, + ) + properties.backup_type = AAZStrType( + serialized_name="backupType", + flags={"read_only": True}, + ) + properties.database_size_in_tbs = AAZFloatType( + serialized_name="databaseSizeInTbs", + flags={"read_only": True}, + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.is_automatic = AAZBoolType( + serialized_name="isAutomatic", + flags={"read_only": True}, + ) + properties.is_restorable = AAZBoolType( + serialized_name="isRestorable", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention_period_in_days = AAZIntType( + serialized_name="retentionPeriodInDays", + ) + properties.size_in_tbs = AAZFloatType( + serialized_name="sizeInTbs", + flags={"read_only": True}, + ) + properties.time_available_til = AAZStrType( + serialized_name="timeAvailableTil", + flags={"read_only": True}, + ) + properties.time_ended = AAZStrType( + serialized_name="timeEnded", + flags={"read_only": True}, + ) + properties.time_started = AAZStrType( + serialized_name="timeStarted", + flags={"read_only": 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 @@ -271,7 +365,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -314,7 +408,105 @@ def _build_schema_on_200_201(cls): return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() - _UpdateHelper._build_schema_autonomous_database_backup_read(cls._schema_on_200_201) + + _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() + _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.autonomous_database_ocid = AAZStrType( + serialized_name="autonomousDatabaseOcid", + flags={"read_only": True}, + ) + properties.backup_type = AAZStrType( + serialized_name="backupType", + flags={"read_only": True}, + ) + properties.database_size_in_tbs = AAZFloatType( + serialized_name="databaseSizeInTbs", + flags={"read_only": True}, + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.is_automatic = AAZBoolType( + serialized_name="isAutomatic", + flags={"read_only": True}, + ) + properties.is_restorable = AAZBoolType( + serialized_name="isRestorable", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.retention_period_in_days = AAZIntType( + serialized_name="retentionPeriodInDays", + ) + properties.size_in_tbs = AAZFloatType( + serialized_name="sizeInTbs", + flags={"read_only": True}, + ) + properties.time_available_til = AAZStrType( + serialized_name="timeAvailableTil", + flags={"read_only": True}, + ) + properties.time_ended = AAZStrType( + serialized_name="timeEnded", + flags={"read_only": True}, + ) + properties.time_started = AAZStrType( + serialized_name="timeStarted", + flags={"read_only": 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 @@ -329,7 +521,7 @@ def _update_instance(self, instance): value=instance, typ=AAZObjectType ) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("properties", AAZObjectType) properties = _builder.get(".properties") if properties is not None: @@ -349,121 +541,5 @@ def __call__(self, *args, **kwargs): class _UpdateHelper: """Helper class for Update""" - _schema_autonomous_database_backup_read = None - - @classmethod - def _build_schema_autonomous_database_backup_read(cls, _schema): - if cls._schema_autonomous_database_backup_read is not None: - _schema.id = cls._schema_autonomous_database_backup_read.id - _schema.name = cls._schema_autonomous_database_backup_read.name - _schema.properties = cls._schema_autonomous_database_backup_read.properties - _schema.system_data = cls._schema_autonomous_database_backup_read.system_data - _schema.type = cls._schema_autonomous_database_backup_read.type - return - - cls._schema_autonomous_database_backup_read = _schema_autonomous_database_backup_read = AAZObjectType() - - autonomous_database_backup_read = _schema_autonomous_database_backup_read - autonomous_database_backup_read.id = AAZStrType( - flags={"read_only": True}, - ) - autonomous_database_backup_read.name = AAZStrType( - flags={"read_only": True}, - ) - autonomous_database_backup_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - autonomous_database_backup_read.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - autonomous_database_backup_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_autonomous_database_backup_read.properties - properties.autonomous_database_ocid = AAZStrType( - serialized_name="autonomousDatabaseOcid", - ) - properties.backup_type = AAZStrType( - serialized_name="backupType", - ) - properties.database_size_in_tbs = AAZFloatType( - serialized_name="databaseSizeInTbs", - flags={"read_only": True}, - ) - properties.db_version = AAZStrType( - serialized_name="dbVersion", - flags={"read_only": True}, - ) - properties.display_name = AAZStrType( - serialized_name="displayName", - ) - properties.is_automatic = AAZBoolType( - serialized_name="isAutomatic", - flags={"read_only": True}, - ) - properties.is_restorable = AAZBoolType( - serialized_name="isRestorable", - flags={"read_only": True}, - ) - properties.lifecycle_details = AAZStrType( - serialized_name="lifecycleDetails", - flags={"read_only": True}, - ) - properties.lifecycle_state = AAZStrType( - serialized_name="lifecycleState", - ) - properties.ocid = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.retention_period_in_days = AAZIntType( - serialized_name="retentionPeriodInDays", - ) - properties.size_in_tbs = AAZFloatType( - serialized_name="sizeInTbs", - flags={"read_only": True}, - ) - properties.time_available_til = AAZStrType( - serialized_name="timeAvailableTil", - flags={"read_only": True}, - ) - properties.time_ended = AAZStrType( - serialized_name="timeEnded", - flags={"read_only": True}, - ) - properties.time_started = AAZStrType( - serialized_name="timeStarted", - flags={"read_only": True}, - ) - - system_data = _schema_autonomous_database_backup_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_autonomous_database_backup_read.id - _schema.name = cls._schema_autonomous_database_backup_read.name - _schema.properties = cls._schema_autonomous_database_backup_read.properties - _schema.system_data = cls._schema_autonomous_database_backup_read.system_data - _schema.type = cls._schema_autonomous_database_backup_read.type - __all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_wait.py index fada0d567b9..c1e97853e9a 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_wait.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/backup/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/autonomousdatabases/{}/autonomousdatabasebackups/{}", "2025-09-01"], ] } @@ -134,7 +134,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -173,9 +173,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -187,9 +185,11 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.properties properties.autonomous_database_ocid = AAZStrType( serialized_name="autonomousDatabaseOcid", + flags={"read_only": True}, ) properties.backup_type = AAZStrType( serialized_name="backupType", + flags={"read_only": True}, ) properties.database_size_in_tbs = AAZFloatType( serialized_name="databaseSizeInTbs", @@ -216,8 +216,11 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, ) - properties.ocid = AAZStrType() properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/__init__.py index d63ae5a6fc9..2df85698253 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/__init__.py @@ -10,3 +10,4 @@ from .__cmd_group import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/_list.py index 1d00491b15f..92920dccf2e 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdatabasecharactersets", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdatabasecharactersets", "2025-09-01"], ] } @@ -112,7 +112,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -162,9 +162,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -176,7 +174,7 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.value.Element.properties properties.character_set = AAZStrType( serialized_name="characterSet", - flags={"required": True, "read_only": True}, + flags={"required": True}, ) system_data = cls._schema_on_200.value.Element.system_data diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/_show.py new file mode 100644 index 00000000000..39859eba850 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/character_set/_show.py @@ -0,0 +1,208 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database autonomous-database character-set show", +) +class Show(AAZCommand): + """Get a AutonomousDatabaseCharacterSet + + :example: Get ADBS Character Set + az oracle-database autonomous-database character-set show --location --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdatabasecharactersets/{}", "2025-09-01"], + ] + } + + 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.adbscharsetname = AAZStrArg( + options=["-n", "--name", "--adbscharsetname"], + help="AutonomousDatabaseCharacterSet name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AutonomousDatabaseCharacterSetsGet(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 AutonomousDatabaseCharacterSetsGet(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/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}", + **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( + "adbscharsetname", self.ctx.args.adbscharsetname, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.character_set = AAZStrType( + serialized_name="characterSet", + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/__init__.py index d63ae5a6fc9..2df85698253 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/__init__.py @@ -10,3 +10,4 @@ from .__cmd_group import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/_list.py index b2922d2cb1f..93e69d790dd 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdatabasenationalcharactersets", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdatabasenationalcharactersets", "2025-09-01"], ] } @@ -112,7 +112,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -162,9 +162,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -176,7 +174,7 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.value.Element.properties properties.character_set = AAZStrType( serialized_name="characterSet", - flags={"required": True, "read_only": True}, + flags={"required": True}, ) system_data = cls._schema_on_200.value.Element.system_data diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/_show.py new file mode 100644 index 00000000000..844fc13bc3f --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/national_character_set/_show.py @@ -0,0 +1,208 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database autonomous-database national-character-set show", +) +class Show(AAZCommand): + """Get a AutonomousDatabaseNationalCharacterSet + + :example: Get ADBS National Character Set + az oracle-database autonomous-database national-character-set show --location --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdatabasenationalcharactersets/{}", "2025-09-01"], + ] + } + + 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.adbsncharsetname = AAZStrArg( + options=["-n", "--name", "--adbsncharsetname"], + help="AutonomousDatabaseNationalCharacterSets name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AutonomousDatabaseNationalCharacterSetsGet(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 AutonomousDatabaseNationalCharacterSetsGet(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/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}", + **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( + "adbsncharsetname", self.ctx.args.adbsncharsetname, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.character_set = AAZStrType( + serialized_name="characterSet", + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/__init__.py index d63ae5a6fc9..2df85698253 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/__init__.py @@ -10,3 +10,4 @@ from .__cmd_group import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/_list.py index b6227020043..ae731788ca7 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdbversions", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdbversions", "2025-09-01"], ] } @@ -112,7 +112,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -162,9 +162,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -179,22 +177,18 @@ def _build_schema_on_200(cls): ) properties.is_default_for_free = AAZBoolType( serialized_name="isDefaultForFree", - flags={"read_only": True}, ) properties.is_default_for_paid = AAZBoolType( serialized_name="isDefaultForPaid", - flags={"read_only": True}, ) properties.is_free_tier_enabled = AAZBoolType( serialized_name="isFreeTierEnabled", - flags={"read_only": True}, ) properties.is_paid_enabled = AAZBoolType( serialized_name="isPaidEnabled", - flags={"read_only": True}, ) properties.version = AAZStrType( - flags={"required": True, "read_only": True}, + flags={"required": True}, ) system_data = cls._schema_on_200.value.Element.system_data diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/_show.py new file mode 100644 index 00000000000..1c30824edd1 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/autonomous_database/version/_show.py @@ -0,0 +1,222 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database autonomous-database version show", +) +class Show(AAZCommand): + """Get a AutonomousDbVersion + + :example: Get ADBS Version + az oracle-database autonomous-database version show --location --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/autonomousdbversions/{}", "2025-09-01"], + ] + } + + 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.autonomousdbversionsname = AAZStrArg( + options=["-n", "--name", "--autonomousdbversionsname"], + help="AutonomousDbVersion name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.AutonomousDatabaseVersionsGet(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 AutonomousDatabaseVersionsGet(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/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}", + **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( + "autonomousdbversionsname", self.ctx.args.autonomousdbversionsname, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.db_workload = AAZStrType( + serialized_name="dbWorkload", + ) + properties.is_default_for_free = AAZBoolType( + serialized_name="isDefaultForFree", + ) + properties.is_default_for_paid = AAZBoolType( + serialized_name="isDefaultForPaid", + ) + properties.is_free_tier_enabled = AAZBoolType( + serialized_name="isFreeTierEnabled", + ) + properties.is_paid_enabled = AAZBoolType( + serialized_name="isPaidEnabled", + ) + properties.version = 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/__init__.py index db73033039b..ec539cee88f 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/__init__.py @@ -9,6 +9,8 @@ # flake8: noqa from .__cmd_group import * +from ._add_storage_capacity import * +from ._configure_exascale import * from ._create import * from ._delete import * from ._list import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_add_storage_capacity.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_add_storage_capacity.py new file mode 100644 index 00000000000..c78402545e2 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_add_storage_capacity.py @@ -0,0 +1,468 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-exadata-infrastructure add-storage-capacity", +) +class AddStorageCapacity(AAZCommand): + """Perform add storage capacity on exadata infra + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}/addstoragecapacity", "2025-09-01"], + ] + } + + 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.cloudexadatainfrastructurename = AAZStrArg( + options=["--cloudexadatainfrastructurename"], + help="CloudExadataInfrastructure name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.CloudExadataInfrastructuresAddStorageCapacity(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 CloudExadataInfrastructuresAddStorageCapacity(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": "location"}, + 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": "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/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity", + **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( + "cloudexadatainfrastructurename", self.ctx.args.cloudexadatainfrastructurename, + 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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType( + flags={"required": True}, + ) + + properties = cls._schema_on_200.properties + properties.activated_storage_count = AAZIntType( + serialized_name="activatedStorageCount", + flags={"read_only": True}, + ) + properties.additional_storage_count = AAZIntType( + serialized_name="additionalStorageCount", + flags={"read_only": True}, + ) + properties.available_storage_size_in_gbs = AAZIntType( + serialized_name="availableStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.cpu_count = AAZIntType( + serialized_name="cpuCount", + flags={"read_only": True}, + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_storage_size_in_tbs = AAZFloatType( + serialized_name="dataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.db_server_version = AAZStrType( + serialized_name="dbServerVersion", + flags={"read_only": True}, + ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.estimated_patching_time = AAZObjectType( + serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, + ) + properties.last_maintenance_run_id = AAZStrType( + serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.maintenance_window = AAZObjectType( + serialized_name="maintenanceWindow", + ) + properties.max_cpu_count = AAZIntType( + serialized_name="maxCpuCount", + flags={"read_only": True}, + ) + properties.max_data_storage_in_tbs = AAZFloatType( + serialized_name="maxDataStorageInTbs", + flags={"read_only": True}, + ) + properties.max_db_node_storage_size_in_gbs = AAZIntType( + serialized_name="maxDbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.max_memory_in_gbs = AAZIntType( + serialized_name="maxMemoryInGbs", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.monthly_db_server_version = AAZStrType( + serialized_name="monthlyDbServerVersion", + flags={"read_only": True}, + ) + properties.monthly_storage_server_version = AAZStrType( + serialized_name="monthlyStorageServerVersion", + flags={"read_only": True}, + ) + properties.next_maintenance_run_id = AAZStrType( + serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.storage_count = AAZIntType( + serialized_name="storageCount", + ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) + properties.storage_server_version = AAZStrType( + serialized_name="storageServerVersion", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.total_storage_size_in_gbs = AAZIntType( + serialized_name="totalStorageSizeInGbs", + flags={"read_only": True}, + ) + + customer_contacts = cls._schema_on_200.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + defined_file_system_configuration = cls._schema_on_200.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + + estimated_patching_time = cls._schema_on_200.properties.estimated_patching_time + estimated_patching_time.estimated_db_server_patching_time = AAZIntType( + serialized_name="estimatedDbServerPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.estimated_network_switches_patching_time = AAZIntType( + serialized_name="estimatedNetworkSwitchesPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.estimated_storage_server_patching_time = AAZIntType( + serialized_name="estimatedStorageServerPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.total_estimated_patching_time = AAZIntType( + serialized_name="totalEstimatedPatchingTime", + flags={"read_only": True}, + ) + + exascale_config = cls._schema_on_200.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + + maintenance_window = cls._schema_on_200.properties.maintenance_window + maintenance_window.custom_action_timeout_in_mins = AAZIntType( + serialized_name="customActionTimeoutInMins", + ) + maintenance_window.days_of_week = AAZListType( + serialized_name="daysOfWeek", + ) + maintenance_window.hours_of_day = AAZListType( + serialized_name="hoursOfDay", + ) + maintenance_window.is_custom_action_timeout_enabled = AAZBoolType( + serialized_name="isCustomActionTimeoutEnabled", + ) + maintenance_window.is_monthly_patching_enabled = AAZBoolType( + serialized_name="isMonthlyPatchingEnabled", + ) + maintenance_window.lead_time_in_weeks = AAZIntType( + serialized_name="leadTimeInWeeks", + ) + maintenance_window.months = AAZListType() + maintenance_window.patching_mode = AAZStrType( + serialized_name="patchingMode", + ) + maintenance_window.preference = AAZStrType() + maintenance_window.weeks_of_month = AAZListType( + serialized_name="weeksOfMonth", + ) + + days_of_week = cls._schema_on_200.properties.maintenance_window.days_of_week + days_of_week.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_window.days_of_week.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + + hours_of_day = cls._schema_on_200.properties.maintenance_window.hours_of_day + hours_of_day.Element = AAZIntType() + + months = cls._schema_on_200.properties.maintenance_window.months + months.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_window.months.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + + weeks_of_month = cls._schema_on_200.properties.maintenance_window.weeks_of_month + weeks_of_month.Element = AAZIntType() + + 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() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _AddStorageCapacityHelper: + """Helper class for AddStorageCapacity""" + + +__all__ = ["AddStorageCapacity"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_configure_exascale.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_configure_exascale.py new file mode 100644 index 00000000000..093c9126516 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_configure_exascale.py @@ -0,0 +1,492 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-exadata-infrastructure configure-exascale", +) +class ConfigureExascale(AAZCommand): + """Configures Exascale on Cloud exadata infrastructure resource + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}/configureexascale", "2025-09-01"], + ] + } + + 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.cloudexadatainfrastructurename = AAZStrArg( + options=["--cloudexadatainfrastructurename"], + help="CloudExadataInfrastructure name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.total_storage_in_gbs = AAZIntArg( + options=["--total-storage-in-gbs"], + arg_group="Body", + help="Storage size needed for Exascale in GBs.", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.CloudExadataInfrastructuresConfigureExascale(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 CloudExadataInfrastructuresConfigureExascale(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": "location"}, + 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": "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/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/configureExascale", + **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( + "cloudexadatainfrastructurename", self.ctx.args.cloudexadatainfrastructurename, + 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", "2025-09-01", + 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("totalStorageInGbs", AAZIntType, ".total_storage_in_gbs", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType( + flags={"required": True}, + ) + + properties = cls._schema_on_200.properties + properties.activated_storage_count = AAZIntType( + serialized_name="activatedStorageCount", + flags={"read_only": True}, + ) + properties.additional_storage_count = AAZIntType( + serialized_name="additionalStorageCount", + flags={"read_only": True}, + ) + properties.available_storage_size_in_gbs = AAZIntType( + serialized_name="availableStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.cpu_count = AAZIntType( + serialized_name="cpuCount", + flags={"read_only": True}, + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_storage_size_in_tbs = AAZFloatType( + serialized_name="dataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.db_server_version = AAZStrType( + serialized_name="dbServerVersion", + flags={"read_only": True}, + ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.estimated_patching_time = AAZObjectType( + serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, + ) + properties.last_maintenance_run_id = AAZStrType( + serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.maintenance_window = AAZObjectType( + serialized_name="maintenanceWindow", + ) + properties.max_cpu_count = AAZIntType( + serialized_name="maxCpuCount", + flags={"read_only": True}, + ) + properties.max_data_storage_in_tbs = AAZFloatType( + serialized_name="maxDataStorageInTbs", + flags={"read_only": True}, + ) + properties.max_db_node_storage_size_in_gbs = AAZIntType( + serialized_name="maxDbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.max_memory_in_gbs = AAZIntType( + serialized_name="maxMemoryInGbs", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.monthly_db_server_version = AAZStrType( + serialized_name="monthlyDbServerVersion", + flags={"read_only": True}, + ) + properties.monthly_storage_server_version = AAZStrType( + serialized_name="monthlyStorageServerVersion", + flags={"read_only": True}, + ) + properties.next_maintenance_run_id = AAZStrType( + serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.storage_count = AAZIntType( + serialized_name="storageCount", + ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) + properties.storage_server_version = AAZStrType( + serialized_name="storageServerVersion", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.total_storage_size_in_gbs = AAZIntType( + serialized_name="totalStorageSizeInGbs", + flags={"read_only": True}, + ) + + customer_contacts = cls._schema_on_200.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + defined_file_system_configuration = cls._schema_on_200.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + + estimated_patching_time = cls._schema_on_200.properties.estimated_patching_time + estimated_patching_time.estimated_db_server_patching_time = AAZIntType( + serialized_name="estimatedDbServerPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.estimated_network_switches_patching_time = AAZIntType( + serialized_name="estimatedNetworkSwitchesPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.estimated_storage_server_patching_time = AAZIntType( + serialized_name="estimatedStorageServerPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.total_estimated_patching_time = AAZIntType( + serialized_name="totalEstimatedPatchingTime", + flags={"read_only": True}, + ) + + exascale_config = cls._schema_on_200.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + + maintenance_window = cls._schema_on_200.properties.maintenance_window + maintenance_window.custom_action_timeout_in_mins = AAZIntType( + serialized_name="customActionTimeoutInMins", + ) + maintenance_window.days_of_week = AAZListType( + serialized_name="daysOfWeek", + ) + maintenance_window.hours_of_day = AAZListType( + serialized_name="hoursOfDay", + ) + maintenance_window.is_custom_action_timeout_enabled = AAZBoolType( + serialized_name="isCustomActionTimeoutEnabled", + ) + maintenance_window.is_monthly_patching_enabled = AAZBoolType( + serialized_name="isMonthlyPatchingEnabled", + ) + maintenance_window.lead_time_in_weeks = AAZIntType( + serialized_name="leadTimeInWeeks", + ) + maintenance_window.months = AAZListType() + maintenance_window.patching_mode = AAZStrType( + serialized_name="patchingMode", + ) + maintenance_window.preference = AAZStrType() + maintenance_window.weeks_of_month = AAZListType( + serialized_name="weeksOfMonth", + ) + + days_of_week = cls._schema_on_200.properties.maintenance_window.days_of_week + days_of_week.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_window.days_of_week.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + + hours_of_day = cls._schema_on_200.properties.maintenance_window.hours_of_day + hours_of_day.Element = AAZIntType() + + months = cls._schema_on_200.properties.maintenance_window.months + months.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_window.months.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + + weeks_of_month = cls._schema_on_200.properties.maintenance_window.weeks_of_month + weeks_of_month.Element = AAZIntType() + + 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() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ConfigureExascaleHelper: + """Helper class for ConfigureExascale""" + + +__all__ = ["ConfigureExascale"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_create.py index 89513063f0a..70122260d0e 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_create.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_create.py @@ -22,9 +22,9 @@ class Create(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2025-09-01"], ] } @@ -70,6 +70,15 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. ", ) + _args_schema.database_server_type = AAZStrArg( + options=["--database-server-type"], + arg_group="Properties", + help="The database server model type of the cloud Exadata infrastructure resource.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) _args_schema.display_name = AAZStrArg( options=["--display-name"], arg_group="Properties", @@ -94,6 +103,15 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="The number of storage servers for the cloud Exadata infrastructure.", ) + _args_schema.storage_server_type = AAZStrArg( + options=["--storage-server-type"], + arg_group="Properties", + help="The storage server model type of the cloud Exadata infrastructure resource.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) customer_contacts = cls._args_schema.customer_contacts customer_contacts.Element = AAZObjectArg() @@ -296,7 +314,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -322,7 +340,7 @@ def content(self): typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("properties", AAZObjectType) _builder.set_prop("tags", AAZDictType, ".tags") _builder.set_prop("zones", AAZListType, ".zones", typ_kwargs={"flags": {"required": True}}) @@ -330,10 +348,12 @@ def content(self): if properties is not None: properties.set_prop("computeCount", AAZIntType, ".compute_count") properties.set_prop("customerContacts", AAZListType, ".customer_contacts") + properties.set_prop("databaseServerType", AAZStrType, ".database_server_type") properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={"flags": {"required": True}}) properties.set_prop("maintenanceWindow", AAZObjectType, ".maintenance_window") properties.set_prop("shape", AAZStrType, ".shape", typ_kwargs={"flags": {"required": True}}) properties.set_prop("storageCount", AAZIntType, ".storage_count") + properties.set_prop("storageServerType", AAZStrType, ".storage_server_type") customer_contacts = _builder.get(".properties.customerContacts") if customer_contacts is not None: @@ -417,9 +437,7 @@ def _build_schema_on_200_201(cls): _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200_201.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200_201.properties = AAZObjectType() _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -448,6 +466,10 @@ def _build_schema_on_200_201(cls): properties.compute_count = AAZIntType( serialized_name="computeCount", ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) properties.cpu_count = AAZIntType( serialized_name="cpuCount", flags={"read_only": True}, @@ -459,6 +481,9 @@ def _build_schema_on_200_201(cls): serialized_name="dataStorageSizeInTbs", flags={"read_only": True}, ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) properties.db_node_storage_size_in_gbs = AAZIntType( serialized_name="dbNodeStorageSizeInGbs", flags={"read_only": True}, @@ -467,15 +492,25 @@ def _build_schema_on_200_201(cls): serialized_name="dbServerVersion", flags={"read_only": True}, ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.estimated_patching_time = AAZObjectType( serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, ) properties.last_maintenance_run_id = AAZStrType( serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, ) properties.lifecycle_details = AAZStrType( serialized_name="lifecycleDetails", @@ -483,6 +518,7 @@ def _build_schema_on_200_201(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.maintenance_window = AAZObjectType( serialized_name="maintenanceWindow", @@ -517,12 +553,15 @@ def _build_schema_on_200_201(cls): ) properties.next_maintenance_run_id = AAZStrType( serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, ) properties.oci_url = AAZStrType( serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -533,6 +572,9 @@ def _build_schema_on_200_201(cls): properties.storage_count = AAZIntType( serialized_name="storageCount", ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) properties.storage_server_version = AAZStrType( serialized_name="storageServerVersion", flags={"read_only": True}, @@ -554,6 +596,23 @@ def _build_schema_on_200_201(cls): flags={"required": True}, ) + defined_file_system_configuration = cls._schema_on_200_201.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + estimated_patching_time = cls._schema_on_200_201.properties.estimated_patching_time estimated_patching_time.estimated_db_server_patching_time = AAZIntType( serialized_name="estimatedDbServerPatchingTime", @@ -572,6 +631,15 @@ def _build_schema_on_200_201(cls): flags={"read_only": True}, ) + exascale_config = cls._schema_on_200_201.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + maintenance_window = cls._schema_on_200_201.properties.maintenance_window maintenance_window.custom_action_timeout_in_mins = AAZIntType( serialized_name="customActionTimeoutInMins", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_delete.py index 619d3fd4164..d98bbb25e76 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_delete.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_delete.py @@ -23,9 +23,9 @@ class Delete(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2025-09-01"], ] } @@ -146,7 +146,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_list.py index 4a0e5fb035b..3d39715a562 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_list.py @@ -22,10 +22,10 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/cloudexadatainfrastructures", "2023-09-01"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/cloudexadatainfrastructures", "2025-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures", "2025-09-01"], ] } @@ -51,12 +51,12 @@ def _build_arguments_schema(cls, *args, **kwargs): 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 + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) if condition_0: - self.CloudExadataInfrastructuresListByResourceGroup(ctx=self.ctx)() - if condition_1: self.CloudExadataInfrastructuresListBySubscription(ctx=self.ctx)() + if condition_1: + self.CloudExadataInfrastructuresListByResourceGroup(ctx=self.ctx)() self.post_operations() @register_callback @@ -72,7 +72,7 @@ def _output(self, *args, **kwargs): next_link = self.deserialize_output(self.ctx.vars.instance.next_link) return result, next_link - class CloudExadataInfrastructuresListByResourceGroup(AAZHttpOperation): + class CloudExadataInfrastructuresListBySubscription(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -86,7 +86,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures", + "/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures", **self.url_parameters ) @@ -101,10 +101,6 @@ def error_format(self): @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, @@ -116,7 +112,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -169,9 +165,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -200,6 +194,10 @@ def _build_schema_on_200(cls): properties.compute_count = AAZIntType( serialized_name="computeCount", ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) properties.cpu_count = AAZIntType( serialized_name="cpuCount", flags={"read_only": True}, @@ -211,6 +209,9 @@ def _build_schema_on_200(cls): serialized_name="dataStorageSizeInTbs", flags={"read_only": True}, ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) properties.db_node_storage_size_in_gbs = AAZIntType( serialized_name="dbNodeStorageSizeInGbs", flags={"read_only": True}, @@ -219,15 +220,25 @@ def _build_schema_on_200(cls): serialized_name="dbServerVersion", flags={"read_only": True}, ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.estimated_patching_time = AAZObjectType( serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, ) properties.last_maintenance_run_id = AAZStrType( serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, ) properties.lifecycle_details = AAZStrType( serialized_name="lifecycleDetails", @@ -235,6 +246,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.maintenance_window = AAZObjectType( serialized_name="maintenanceWindow", @@ -269,12 +281,15 @@ def _build_schema_on_200(cls): ) properties.next_maintenance_run_id = AAZStrType( serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, ) properties.oci_url = AAZStrType( serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -285,6 +300,9 @@ def _build_schema_on_200(cls): properties.storage_count = AAZIntType( serialized_name="storageCount", ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) properties.storage_server_version = AAZStrType( serialized_name="storageServerVersion", flags={"read_only": True}, @@ -306,6 +324,23 @@ def _build_schema_on_200(cls): flags={"required": True}, ) + defined_file_system_configuration = cls._schema_on_200.value.Element.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + estimated_patching_time = cls._schema_on_200.value.Element.properties.estimated_patching_time estimated_patching_time.estimated_db_server_patching_time = AAZIntType( serialized_name="estimatedDbServerPatchingTime", @@ -324,6 +359,15 @@ def _build_schema_on_200(cls): flags={"read_only": True}, ) + exascale_config = cls._schema_on_200.value.Element.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + maintenance_window = cls._schema_on_200.value.Element.properties.maintenance_window maintenance_window.custom_action_timeout_in_mins = AAZIntType( serialized_name="customActionTimeoutInMins", @@ -402,7 +446,7 @@ def _build_schema_on_200(cls): return cls._schema_on_200 - class CloudExadataInfrastructuresListBySubscription(AAZHttpOperation): + class CloudExadataInfrastructuresListByResourceGroup(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -416,7 +460,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures", **self.url_parameters ) @@ -431,6 +475,10 @@ def error_format(self): @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, @@ -442,7 +490,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -495,9 +543,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -526,6 +572,10 @@ def _build_schema_on_200(cls): properties.compute_count = AAZIntType( serialized_name="computeCount", ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) properties.cpu_count = AAZIntType( serialized_name="cpuCount", flags={"read_only": True}, @@ -537,6 +587,9 @@ def _build_schema_on_200(cls): serialized_name="dataStorageSizeInTbs", flags={"read_only": True}, ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) properties.db_node_storage_size_in_gbs = AAZIntType( serialized_name="dbNodeStorageSizeInGbs", flags={"read_only": True}, @@ -545,15 +598,25 @@ def _build_schema_on_200(cls): serialized_name="dbServerVersion", flags={"read_only": True}, ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.estimated_patching_time = AAZObjectType( serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, ) properties.last_maintenance_run_id = AAZStrType( serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, ) properties.lifecycle_details = AAZStrType( serialized_name="lifecycleDetails", @@ -561,6 +624,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.maintenance_window = AAZObjectType( serialized_name="maintenanceWindow", @@ -595,12 +659,15 @@ def _build_schema_on_200(cls): ) properties.next_maintenance_run_id = AAZStrType( serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, ) properties.oci_url = AAZStrType( serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -611,6 +678,9 @@ def _build_schema_on_200(cls): properties.storage_count = AAZIntType( serialized_name="storageCount", ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) properties.storage_server_version = AAZStrType( serialized_name="storageServerVersion", flags={"read_only": True}, @@ -632,6 +702,23 @@ def _build_schema_on_200(cls): flags={"required": True}, ) + defined_file_system_configuration = cls._schema_on_200.value.Element.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + estimated_patching_time = cls._schema_on_200.value.Element.properties.estimated_patching_time estimated_patching_time.estimated_db_server_patching_time = AAZIntType( serialized_name="estimatedDbServerPatchingTime", @@ -650,6 +737,15 @@ def _build_schema_on_200(cls): flags={"read_only": True}, ) + exascale_config = cls._schema_on_200.value.Element.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + maintenance_window = cls._schema_on_200.value.Element.properties.maintenance_window maintenance_window.custom_action_timeout_in_mins = AAZIntType( serialized_name="customActionTimeoutInMins", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_show.py index daa0b2daf55..14f5096b4b0 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_show.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_show.py @@ -22,9 +22,9 @@ class Show(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2025-09-01"], ] } @@ -123,7 +123,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -165,9 +165,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -196,6 +194,10 @@ def _build_schema_on_200(cls): properties.compute_count = AAZIntType( serialized_name="computeCount", ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) properties.cpu_count = AAZIntType( serialized_name="cpuCount", flags={"read_only": True}, @@ -207,6 +209,9 @@ def _build_schema_on_200(cls): serialized_name="dataStorageSizeInTbs", flags={"read_only": True}, ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) properties.db_node_storage_size_in_gbs = AAZIntType( serialized_name="dbNodeStorageSizeInGbs", flags={"read_only": True}, @@ -215,15 +220,25 @@ def _build_schema_on_200(cls): serialized_name="dbServerVersion", flags={"read_only": True}, ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.estimated_patching_time = AAZObjectType( serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, ) properties.last_maintenance_run_id = AAZStrType( serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, ) properties.lifecycle_details = AAZStrType( serialized_name="lifecycleDetails", @@ -231,6 +246,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.maintenance_window = AAZObjectType( serialized_name="maintenanceWindow", @@ -265,12 +281,15 @@ def _build_schema_on_200(cls): ) properties.next_maintenance_run_id = AAZStrType( serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, ) properties.oci_url = AAZStrType( serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -281,6 +300,9 @@ def _build_schema_on_200(cls): properties.storage_count = AAZIntType( serialized_name="storageCount", ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) properties.storage_server_version = AAZStrType( serialized_name="storageServerVersion", flags={"read_only": True}, @@ -302,6 +324,23 @@ def _build_schema_on_200(cls): flags={"required": True}, ) + defined_file_system_configuration = cls._schema_on_200.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + estimated_patching_time = cls._schema_on_200.properties.estimated_patching_time estimated_patching_time.estimated_db_server_patching_time = AAZIntType( serialized_name="estimatedDbServerPatchingTime", @@ -320,6 +359,15 @@ def _build_schema_on_200(cls): flags={"read_only": True}, ) + exascale_config = cls._schema_on_200.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + maintenance_window = cls._schema_on_200.properties.maintenance_window maintenance_window.custom_action_timeout_in_mins = AAZIntType( serialized_name="customActionTimeoutInMins", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_update.py index 6c59e738cbc..41a6927a9bb 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_update.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_update.py @@ -22,9 +22,9 @@ class Update(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2025-09-01"], ] } @@ -308,7 +308,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -339,7 +339,295 @@ def _build_schema_on_200(cls): return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_cloud_exadata_infrastructure_read(cls._schema_on_200) + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType( + flags={"required": True}, + ) + + properties = cls._schema_on_200.properties + properties.activated_storage_count = AAZIntType( + serialized_name="activatedStorageCount", + flags={"read_only": True}, + ) + properties.additional_storage_count = AAZIntType( + serialized_name="additionalStorageCount", + flags={"read_only": True}, + ) + properties.available_storage_size_in_gbs = AAZIntType( + serialized_name="availableStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.cpu_count = AAZIntType( + serialized_name="cpuCount", + flags={"read_only": True}, + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_storage_size_in_tbs = AAZFloatType( + serialized_name="dataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.db_server_version = AAZStrType( + serialized_name="dbServerVersion", + flags={"read_only": True}, + ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.estimated_patching_time = AAZObjectType( + serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, + ) + properties.last_maintenance_run_id = AAZStrType( + serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.maintenance_window = AAZObjectType( + serialized_name="maintenanceWindow", + ) + properties.max_cpu_count = AAZIntType( + serialized_name="maxCpuCount", + flags={"read_only": True}, + ) + properties.max_data_storage_in_tbs = AAZFloatType( + serialized_name="maxDataStorageInTbs", + flags={"read_only": True}, + ) + properties.max_db_node_storage_size_in_gbs = AAZIntType( + serialized_name="maxDbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.max_memory_in_gbs = AAZIntType( + serialized_name="maxMemoryInGbs", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.monthly_db_server_version = AAZStrType( + serialized_name="monthlyDbServerVersion", + flags={"read_only": True}, + ) + properties.monthly_storage_server_version = AAZStrType( + serialized_name="monthlyStorageServerVersion", + flags={"read_only": True}, + ) + properties.next_maintenance_run_id = AAZStrType( + serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.storage_count = AAZIntType( + serialized_name="storageCount", + ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) + properties.storage_server_version = AAZStrType( + serialized_name="storageServerVersion", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.total_storage_size_in_gbs = AAZIntType( + serialized_name="totalStorageSizeInGbs", + flags={"read_only": True}, + ) + + customer_contacts = cls._schema_on_200.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + defined_file_system_configuration = cls._schema_on_200.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + + estimated_patching_time = cls._schema_on_200.properties.estimated_patching_time + estimated_patching_time.estimated_db_server_patching_time = AAZIntType( + serialized_name="estimatedDbServerPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.estimated_network_switches_patching_time = AAZIntType( + serialized_name="estimatedNetworkSwitchesPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.estimated_storage_server_patching_time = AAZIntType( + serialized_name="estimatedStorageServerPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.total_estimated_patching_time = AAZIntType( + serialized_name="totalEstimatedPatchingTime", + flags={"read_only": True}, + ) + + exascale_config = cls._schema_on_200.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + + maintenance_window = cls._schema_on_200.properties.maintenance_window + maintenance_window.custom_action_timeout_in_mins = AAZIntType( + serialized_name="customActionTimeoutInMins", + ) + maintenance_window.days_of_week = AAZListType( + serialized_name="daysOfWeek", + ) + maintenance_window.hours_of_day = AAZListType( + serialized_name="hoursOfDay", + ) + maintenance_window.is_custom_action_timeout_enabled = AAZBoolType( + serialized_name="isCustomActionTimeoutEnabled", + ) + maintenance_window.is_monthly_patching_enabled = AAZBoolType( + serialized_name="isMonthlyPatchingEnabled", + ) + maintenance_window.lead_time_in_weeks = AAZIntType( + serialized_name="leadTimeInWeeks", + ) + maintenance_window.months = AAZListType() + maintenance_window.patching_mode = AAZStrType( + serialized_name="patchingMode", + ) + maintenance_window.preference = AAZStrType() + maintenance_window.weeks_of_month = AAZListType( + serialized_name="weeksOfMonth", + ) + + days_of_week = cls._schema_on_200.properties.maintenance_window.days_of_week + days_of_week.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_window.days_of_week.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + + hours_of_day = cls._schema_on_200.properties.maintenance_window.hours_of_day + hours_of_day.Element = AAZIntType() + + months = cls._schema_on_200.properties.maintenance_window.months + months.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.maintenance_window.months.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + + weeks_of_month = cls._schema_on_200.properties.maintenance_window.weeks_of_month + weeks_of_month.Element = AAZIntType() + + 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() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() return cls._schema_on_200 @@ -407,7 +695,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -450,7 +738,295 @@ def _build_schema_on_200_201(cls): return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() - _UpdateHelper._build_schema_cloud_exadata_infrastructure_read(cls._schema_on_200_201) + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _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() + _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}, + ) + _schema_on_200_201.zones = AAZListType( + flags={"required": True}, + ) + + properties = cls._schema_on_200_201.properties + properties.activated_storage_count = AAZIntType( + serialized_name="activatedStorageCount", + flags={"read_only": True}, + ) + properties.additional_storage_count = AAZIntType( + serialized_name="additionalStorageCount", + flags={"read_only": True}, + ) + properties.available_storage_size_in_gbs = AAZIntType( + serialized_name="availableStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.cpu_count = AAZIntType( + serialized_name="cpuCount", + flags={"read_only": True}, + ) + properties.customer_contacts = AAZListType( + serialized_name="customerContacts", + ) + properties.data_storage_size_in_tbs = AAZFloatType( + serialized_name="dataStorageSizeInTbs", + flags={"read_only": True}, + ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.db_server_version = AAZStrType( + serialized_name="dbServerVersion", + flags={"read_only": True}, + ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.estimated_patching_time = AAZObjectType( + serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, + ) + properties.last_maintenance_run_id = AAZStrType( + serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.maintenance_window = AAZObjectType( + serialized_name="maintenanceWindow", + ) + properties.max_cpu_count = AAZIntType( + serialized_name="maxCpuCount", + flags={"read_only": True}, + ) + properties.max_data_storage_in_tbs = AAZFloatType( + serialized_name="maxDataStorageInTbs", + flags={"read_only": True}, + ) + properties.max_db_node_storage_size_in_gbs = AAZIntType( + serialized_name="maxDbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.max_memory_in_gbs = AAZIntType( + serialized_name="maxMemoryInGbs", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.monthly_db_server_version = AAZStrType( + serialized_name="monthlyDbServerVersion", + flags={"read_only": True}, + ) + properties.monthly_storage_server_version = AAZStrType( + serialized_name="monthlyStorageServerVersion", + flags={"read_only": True}, + ) + properties.next_maintenance_run_id = AAZStrType( + serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.storage_count = AAZIntType( + serialized_name="storageCount", + ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) + properties.storage_server_version = AAZStrType( + serialized_name="storageServerVersion", + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.total_storage_size_in_gbs = AAZIntType( + serialized_name="totalStorageSizeInGbs", + flags={"read_only": True}, + ) + + customer_contacts = cls._schema_on_200_201.properties.customer_contacts + customer_contacts.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.customer_contacts.Element + _element.email = AAZStrType( + flags={"required": True}, + ) + + defined_file_system_configuration = cls._schema_on_200_201.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + + estimated_patching_time = cls._schema_on_200_201.properties.estimated_patching_time + estimated_patching_time.estimated_db_server_patching_time = AAZIntType( + serialized_name="estimatedDbServerPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.estimated_network_switches_patching_time = AAZIntType( + serialized_name="estimatedNetworkSwitchesPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.estimated_storage_server_patching_time = AAZIntType( + serialized_name="estimatedStorageServerPatchingTime", + flags={"read_only": True}, + ) + estimated_patching_time.total_estimated_patching_time = AAZIntType( + serialized_name="totalEstimatedPatchingTime", + flags={"read_only": True}, + ) + + exascale_config = cls._schema_on_200_201.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + + maintenance_window = cls._schema_on_200_201.properties.maintenance_window + maintenance_window.custom_action_timeout_in_mins = AAZIntType( + serialized_name="customActionTimeoutInMins", + ) + maintenance_window.days_of_week = AAZListType( + serialized_name="daysOfWeek", + ) + maintenance_window.hours_of_day = AAZListType( + serialized_name="hoursOfDay", + ) + maintenance_window.is_custom_action_timeout_enabled = AAZBoolType( + serialized_name="isCustomActionTimeoutEnabled", + ) + maintenance_window.is_monthly_patching_enabled = AAZBoolType( + serialized_name="isMonthlyPatchingEnabled", + ) + maintenance_window.lead_time_in_weeks = AAZIntType( + serialized_name="leadTimeInWeeks", + ) + maintenance_window.months = AAZListType() + maintenance_window.patching_mode = AAZStrType( + serialized_name="patchingMode", + ) + maintenance_window.preference = AAZStrType() + maintenance_window.weeks_of_month = AAZListType( + serialized_name="weeksOfMonth", + ) + + days_of_week = cls._schema_on_200_201.properties.maintenance_window.days_of_week + days_of_week.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.maintenance_window.days_of_week.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + + hours_of_day = cls._schema_on_200_201.properties.maintenance_window.hours_of_day + hours_of_day.Element = AAZIntType() + + months = cls._schema_on_200_201.properties.maintenance_window.months + months.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.maintenance_window.months.Element + _element.name = AAZStrType( + flags={"required": True}, + ) + + weeks_of_month = cls._schema_on_200_201.properties.maintenance_window.weeks_of_month + weeks_of_month.Element = AAZIntType() + + 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() + + zones = cls._schema_on_200_201.zones + zones.Element = AAZStrType() return cls._schema_on_200_201 @@ -465,7 +1041,7 @@ def _update_instance(self, instance): value=instance, typ=AAZObjectType ) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("properties", AAZObjectType) _builder.set_prop("tags", AAZDictType, ".tags") _builder.set_prop("zones", AAZListType, ".zones", typ_kwargs={"flags": {"required": True}}) @@ -544,272 +1120,5 @@ def __call__(self, *args, **kwargs): class _UpdateHelper: """Helper class for Update""" - _schema_cloud_exadata_infrastructure_read = None - - @classmethod - def _build_schema_cloud_exadata_infrastructure_read(cls, _schema): - if cls._schema_cloud_exadata_infrastructure_read is not None: - _schema.id = cls._schema_cloud_exadata_infrastructure_read.id - _schema.location = cls._schema_cloud_exadata_infrastructure_read.location - _schema.name = cls._schema_cloud_exadata_infrastructure_read.name - _schema.properties = cls._schema_cloud_exadata_infrastructure_read.properties - _schema.system_data = cls._schema_cloud_exadata_infrastructure_read.system_data - _schema.tags = cls._schema_cloud_exadata_infrastructure_read.tags - _schema.type = cls._schema_cloud_exadata_infrastructure_read.type - _schema.zones = cls._schema_cloud_exadata_infrastructure_read.zones - return - - cls._schema_cloud_exadata_infrastructure_read = _schema_cloud_exadata_infrastructure_read = AAZObjectType() - - cloud_exadata_infrastructure_read = _schema_cloud_exadata_infrastructure_read - cloud_exadata_infrastructure_read.id = AAZStrType( - flags={"read_only": True}, - ) - cloud_exadata_infrastructure_read.location = AAZStrType( - flags={"required": True}, - ) - cloud_exadata_infrastructure_read.name = AAZStrType( - flags={"read_only": True}, - ) - cloud_exadata_infrastructure_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - cloud_exadata_infrastructure_read.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - cloud_exadata_infrastructure_read.tags = AAZDictType() - cloud_exadata_infrastructure_read.type = AAZStrType( - flags={"read_only": True}, - ) - cloud_exadata_infrastructure_read.zones = AAZListType( - flags={"required": True}, - ) - - properties = _schema_cloud_exadata_infrastructure_read.properties - properties.activated_storage_count = AAZIntType( - serialized_name="activatedStorageCount", - flags={"read_only": True}, - ) - properties.additional_storage_count = AAZIntType( - serialized_name="additionalStorageCount", - flags={"read_only": True}, - ) - properties.available_storage_size_in_gbs = AAZIntType( - serialized_name="availableStorageSizeInGbs", - flags={"read_only": True}, - ) - properties.compute_count = AAZIntType( - serialized_name="computeCount", - ) - properties.cpu_count = AAZIntType( - serialized_name="cpuCount", - flags={"read_only": True}, - ) - properties.customer_contacts = AAZListType( - serialized_name="customerContacts", - ) - properties.data_storage_size_in_tbs = AAZFloatType( - serialized_name="dataStorageSizeInTbs", - flags={"read_only": True}, - ) - properties.db_node_storage_size_in_gbs = AAZIntType( - serialized_name="dbNodeStorageSizeInGbs", - flags={"read_only": True}, - ) - properties.db_server_version = AAZStrType( - serialized_name="dbServerVersion", - flags={"read_only": True}, - ) - properties.display_name = AAZStrType( - serialized_name="displayName", - flags={"required": True}, - ) - properties.estimated_patching_time = AAZObjectType( - serialized_name="estimatedPatchingTime", - ) - properties.last_maintenance_run_id = AAZStrType( - serialized_name="lastMaintenanceRunId", - ) - properties.lifecycle_details = AAZStrType( - serialized_name="lifecycleDetails", - flags={"read_only": True}, - ) - properties.lifecycle_state = AAZStrType( - serialized_name="lifecycleState", - ) - properties.maintenance_window = AAZObjectType( - serialized_name="maintenanceWindow", - ) - properties.max_cpu_count = AAZIntType( - serialized_name="maxCpuCount", - flags={"read_only": True}, - ) - properties.max_data_storage_in_tbs = AAZFloatType( - serialized_name="maxDataStorageInTbs", - flags={"read_only": True}, - ) - properties.max_db_node_storage_size_in_gbs = AAZIntType( - serialized_name="maxDbNodeStorageSizeInGbs", - flags={"read_only": True}, - ) - properties.max_memory_in_gbs = AAZIntType( - serialized_name="maxMemoryInGbs", - flags={"read_only": True}, - ) - properties.memory_size_in_gbs = AAZIntType( - serialized_name="memorySizeInGbs", - flags={"read_only": True}, - ) - properties.monthly_db_server_version = AAZStrType( - serialized_name="monthlyDbServerVersion", - flags={"read_only": True}, - ) - properties.monthly_storage_server_version = AAZStrType( - serialized_name="monthlyStorageServerVersion", - flags={"read_only": True}, - ) - properties.next_maintenance_run_id = AAZStrType( - serialized_name="nextMaintenanceRunId", - ) - properties.oci_url = AAZStrType( - serialized_name="ociUrl", - flags={"read_only": True}, - ) - properties.ocid = AAZStrType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.shape = AAZStrType( - flags={"required": True}, - ) - properties.storage_count = AAZIntType( - serialized_name="storageCount", - ) - properties.storage_server_version = AAZStrType( - serialized_name="storageServerVersion", - flags={"read_only": True}, - ) - properties.time_created = AAZStrType( - serialized_name="timeCreated", - flags={"read_only": True}, - ) - properties.total_storage_size_in_gbs = AAZIntType( - serialized_name="totalStorageSizeInGbs", - flags={"read_only": True}, - ) - - customer_contacts = _schema_cloud_exadata_infrastructure_read.properties.customer_contacts - customer_contacts.Element = AAZObjectType() - - _element = _schema_cloud_exadata_infrastructure_read.properties.customer_contacts.Element - _element.email = AAZStrType( - flags={"required": True}, - ) - - estimated_patching_time = _schema_cloud_exadata_infrastructure_read.properties.estimated_patching_time - estimated_patching_time.estimated_db_server_patching_time = AAZIntType( - serialized_name="estimatedDbServerPatchingTime", - flags={"read_only": True}, - ) - estimated_patching_time.estimated_network_switches_patching_time = AAZIntType( - serialized_name="estimatedNetworkSwitchesPatchingTime", - flags={"read_only": True}, - ) - estimated_patching_time.estimated_storage_server_patching_time = AAZIntType( - serialized_name="estimatedStorageServerPatchingTime", - flags={"read_only": True}, - ) - estimated_patching_time.total_estimated_patching_time = AAZIntType( - serialized_name="totalEstimatedPatchingTime", - flags={"read_only": True}, - ) - - maintenance_window = _schema_cloud_exadata_infrastructure_read.properties.maintenance_window - maintenance_window.custom_action_timeout_in_mins = AAZIntType( - serialized_name="customActionTimeoutInMins", - ) - maintenance_window.days_of_week = AAZListType( - serialized_name="daysOfWeek", - ) - maintenance_window.hours_of_day = AAZListType( - serialized_name="hoursOfDay", - ) - maintenance_window.is_custom_action_timeout_enabled = AAZBoolType( - serialized_name="isCustomActionTimeoutEnabled", - ) - maintenance_window.is_monthly_patching_enabled = AAZBoolType( - serialized_name="isMonthlyPatchingEnabled", - ) - maintenance_window.lead_time_in_weeks = AAZIntType( - serialized_name="leadTimeInWeeks", - ) - maintenance_window.months = AAZListType() - maintenance_window.patching_mode = AAZStrType( - serialized_name="patchingMode", - ) - maintenance_window.preference = AAZStrType() - maintenance_window.weeks_of_month = AAZListType( - serialized_name="weeksOfMonth", - ) - - days_of_week = _schema_cloud_exadata_infrastructure_read.properties.maintenance_window.days_of_week - days_of_week.Element = AAZObjectType() - - _element = _schema_cloud_exadata_infrastructure_read.properties.maintenance_window.days_of_week.Element - _element.name = AAZStrType( - flags={"required": True}, - ) - - hours_of_day = _schema_cloud_exadata_infrastructure_read.properties.maintenance_window.hours_of_day - hours_of_day.Element = AAZIntType() - - months = _schema_cloud_exadata_infrastructure_read.properties.maintenance_window.months - months.Element = AAZObjectType() - - _element = _schema_cloud_exadata_infrastructure_read.properties.maintenance_window.months.Element - _element.name = AAZStrType( - flags={"required": True}, - ) - - weeks_of_month = _schema_cloud_exadata_infrastructure_read.properties.maintenance_window.weeks_of_month - weeks_of_month.Element = AAZIntType() - - system_data = _schema_cloud_exadata_infrastructure_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_cloud_exadata_infrastructure_read.tags - tags.Element = AAZStrType() - - zones = _schema_cloud_exadata_infrastructure_read.zones - zones.Element = AAZStrType() - - _schema.id = cls._schema_cloud_exadata_infrastructure_read.id - _schema.location = cls._schema_cloud_exadata_infrastructure_read.location - _schema.name = cls._schema_cloud_exadata_infrastructure_read.name - _schema.properties = cls._schema_cloud_exadata_infrastructure_read.properties - _schema.system_data = cls._schema_cloud_exadata_infrastructure_read.system_data - _schema.tags = cls._schema_cloud_exadata_infrastructure_read.tags - _schema.type = cls._schema_cloud_exadata_infrastructure_read.type - _schema.zones = cls._schema_cloud_exadata_infrastructure_read.zones - __all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_wait.py index 1359200470c..e5974885076 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_wait.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}", "2025-09-01"], ] } @@ -119,7 +119,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -161,9 +161,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -192,6 +190,10 @@ def _build_schema_on_200(cls): properties.compute_count = AAZIntType( serialized_name="computeCount", ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) properties.cpu_count = AAZIntType( serialized_name="cpuCount", flags={"read_only": True}, @@ -203,6 +205,9 @@ def _build_schema_on_200(cls): serialized_name="dataStorageSizeInTbs", flags={"read_only": True}, ) + properties.database_server_type = AAZStrType( + serialized_name="databaseServerType", + ) properties.db_node_storage_size_in_gbs = AAZIntType( serialized_name="dbNodeStorageSizeInGbs", flags={"read_only": True}, @@ -211,15 +216,25 @@ def _build_schema_on_200(cls): serialized_name="dbServerVersion", flags={"read_only": True}, ) + properties.defined_file_system_configuration = AAZListType( + serialized_name="definedFileSystemConfiguration", + flags={"read_only": True}, + ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.estimated_patching_time = AAZObjectType( serialized_name="estimatedPatchingTime", + flags={"read_only": True}, + ) + properties.exascale_config = AAZObjectType( + serialized_name="exascaleConfig", + flags={"read_only": True}, ) properties.last_maintenance_run_id = AAZStrType( serialized_name="lastMaintenanceRunId", + flags={"read_only": True}, ) properties.lifecycle_details = AAZStrType( serialized_name="lifecycleDetails", @@ -227,6 +242,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.maintenance_window = AAZObjectType( serialized_name="maintenanceWindow", @@ -261,12 +277,15 @@ def _build_schema_on_200(cls): ) properties.next_maintenance_run_id = AAZStrType( serialized_name="nextMaintenanceRunId", + flags={"read_only": True}, ) properties.oci_url = AAZStrType( serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -277,6 +296,9 @@ def _build_schema_on_200(cls): properties.storage_count = AAZIntType( serialized_name="storageCount", ) + properties.storage_server_type = AAZStrType( + serialized_name="storageServerType", + ) properties.storage_server_version = AAZStrType( serialized_name="storageServerVersion", flags={"read_only": True}, @@ -298,6 +320,23 @@ def _build_schema_on_200(cls): flags={"required": True}, ) + defined_file_system_configuration = cls._schema_on_200.properties.defined_file_system_configuration + defined_file_system_configuration.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.defined_file_system_configuration.Element + _element.is_backup_partition = AAZBoolType( + serialized_name="isBackupPartition", + ) + _element.is_resizable = AAZBoolType( + serialized_name="isResizable", + ) + _element.min_size_gb = AAZIntType( + serialized_name="minSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + estimated_patching_time = cls._schema_on_200.properties.estimated_patching_time estimated_patching_time.estimated_db_server_patching_time = AAZIntType( serialized_name="estimatedDbServerPatchingTime", @@ -316,6 +355,15 @@ def _build_schema_on_200(cls): flags={"read_only": True}, ) + exascale_config = cls._schema_on_200.properties.exascale_config + exascale_config.available_storage_in_gbs = AAZIntType( + serialized_name="availableStorageInGbs", + ) + exascale_config.total_storage_in_gbs = AAZIntType( + serialized_name="totalStorageInGbs", + flags={"required": True}, + ) + maintenance_window = cls._schema_on_200.properties.maintenance_window maintenance_window.custom_action_timeout_in_mins = AAZIntType( serialized_name="customActionTimeoutInMins", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/__init__.py index d63ae5a6fc9..2df85698253 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/__init__.py @@ -10,3 +10,4 @@ from .__cmd_group import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_list.py index b71c8bbb694..41747ea9d78 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}/dbservers", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}/dbservers", "2025-09-01"], ] } @@ -60,7 +60,7 @@ def _build_arguments_schema(cls, *args, **kwargs): def _execute_operations(self): self.pre_operations() - self.DbServersListByCloudExadataInfrastructure(ctx=self.ctx)() + self.DbServersListByParent(ctx=self.ctx)() self.post_operations() @register_callback @@ -76,7 +76,7 @@ def _output(self, *args, **kwargs): next_link = self.deserialize_output(self.ctx.vars.instance.next_link) return result, next_link - class DbServersListByCloudExadataInfrastructure(AAZHttpOperation): + class DbServersListByParent(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -124,7 +124,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -174,9 +174,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -196,6 +194,11 @@ def _build_schema_on_200(cls): ) properties.compartment_id = AAZStrType( serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -211,6 +214,7 @@ def _build_schema_on_200(cls): ) properties.db_server_patching_details = AAZObjectType( serialized_name="dbServerPatchingDetails", + flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", @@ -218,6 +222,7 @@ def _build_schema_on_200(cls): ) properties.exadata_infrastructure_id = AAZStrType( serialized_name="exadataInfrastructureId", + flags={"read_only": True}, ) properties.lifecycle_details = AAZStrType( serialized_name="lifecycleDetails", @@ -225,6 +230,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.max_cpu_count = AAZIntType( serialized_name="maxCpuCount", @@ -242,7 +248,9 @@ def _build_schema_on_200(cls): serialized_name="memorySizeInGbs", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.provisioning_state = AAZStrType( serialized_name="provisioningState", flags={"read_only": True}, @@ -275,6 +283,7 @@ def _build_schema_on_200(cls): ) db_server_patching_details.patching_status = AAZStrType( serialized_name="patchingStatus", + flags={"read_only": True}, ) db_server_patching_details.time_patching_ended = AAZStrType( serialized_name="timePatchingEnded", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_show.py new file mode 100644 index 00000000000..86e06efc36d --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_exadata_infrastructure/database_server/_show.py @@ -0,0 +1,330 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-exadata-infrastructure database-server show", +) +class Show(AAZCommand): + """Get a DbServer + + :example: Get Exa Infra Database Server + az oracle-database cloud-exadata-infrastructure database-server show --cloudexadatainfrastructurename --resource-group --dbserverocid + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudexadatainfrastructures/{}/dbservers/{}", "2025-09-01"], + ] + } + + 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.cloudexadatainfrastructurename = AAZStrArg( + options=["--cloudexadatainfrastructurename"], + help="CloudExadataInfrastructure name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.dbserverocid = AAZStrArg( + options=["-n", "--name", "--dbserverocid"], + help="DbServer OCID.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=255, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DbServersGet(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 DbServersGet(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/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}", + **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( + "cloudexadatainfrastructurename", self.ctx.args.cloudexadatainfrastructurename, + required=True, + ), + **self.serialize_url_param( + "dbserverocid", self.ctx.args.dbserverocid, + 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", "2025-09-01", + 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() + _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.autonomous_virtual_machine_ids = AAZListType( + serialized_name="autonomousVirtualMachineIds", + flags={"read_only": True}, + ) + properties.autonomous_vm_cluster_ids = AAZListType( + serialized_name="autonomousVmClusterIds", + flags={"read_only": True}, + ) + properties.compartment_id = AAZStrType( + serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + flags={"read_only": True}, + ) + properties.db_node_ids = AAZListType( + serialized_name="dbNodeIds", + flags={"read_only": True}, + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.db_server_patching_details = AAZObjectType( + serialized_name="dbServerPatchingDetails", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"read_only": True}, + ) + properties.exadata_infrastructure_id = AAZStrType( + serialized_name="exadataInfrastructureId", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.max_cpu_count = AAZIntType( + serialized_name="maxCpuCount", + flags={"read_only": True}, + ) + properties.max_db_node_storage_in_gbs = AAZIntType( + serialized_name="maxDbNodeStorageInGbs", + flags={"read_only": True}, + ) + properties.max_memory_in_gbs = AAZIntType( + serialized_name="maxMemoryInGbs", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"read_only": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.vm_cluster_ids = AAZListType( + serialized_name="vmClusterIds", + flags={"read_only": True}, + ) + + autonomous_virtual_machine_ids = cls._schema_on_200.properties.autonomous_virtual_machine_ids + autonomous_virtual_machine_ids.Element = AAZStrType() + + autonomous_vm_cluster_ids = cls._schema_on_200.properties.autonomous_vm_cluster_ids + autonomous_vm_cluster_ids.Element = AAZStrType() + + db_node_ids = cls._schema_on_200.properties.db_node_ids + db_node_ids.Element = AAZStrType() + + db_server_patching_details = cls._schema_on_200.properties.db_server_patching_details + db_server_patching_details.estimated_patch_duration = AAZIntType( + serialized_name="estimatedPatchDuration", + flags={"read_only": True}, + ) + db_server_patching_details.patching_status = AAZStrType( + serialized_name="patchingStatus", + flags={"read_only": True}, + ) + db_server_patching_details.time_patching_ended = AAZStrType( + serialized_name="timePatchingEnded", + flags={"read_only": True}, + ) + db_server_patching_details.time_patching_started = AAZStrType( + serialized_name="timePatchingStarted", + flags={"read_only": True}, + ) + + vm_cluster_ids = cls._schema_on_200.properties.vm_cluster_ids + vm_cluster_ids.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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/__init__.py index d033f27c440..d35e68fd467 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/__init__.py @@ -13,6 +13,7 @@ from ._create import * from ._delete import * from ._list import * +from ._list_private_ip_address import * from ._remove_vm import * from ._show import * from ._update import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_add_vm.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_add_vm.py index 01d14983fc2..8474987f45f 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_add_vm.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_add_vm.py @@ -22,9 +22,9 @@ class AddVm(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/addvms", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/addvms", "2025-09-01"], ] } @@ -158,7 +158,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -218,9 +218,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -243,6 +241,11 @@ def _build_schema_on_200(cls): ) properties.compartment_id = AAZStrType( serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -265,12 +268,19 @@ def _build_schema_on_200(cls): ) properties.disk_redundancy = AAZStrType( serialized_name="diskRedundancy", + flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) properties.gi_version = AAZStrType( serialized_name="giVersion", flags={"required": True}, @@ -280,6 +290,7 @@ def _build_schema_on_200(cls): ) properties.iorm_config_cache = AAZObjectType( serialized_name="iormConfigCache", + flags={"read_only": True}, ) properties.is_local_backup_enabled = AAZBoolType( serialized_name="isLocalBackupEnabled", @@ -289,6 +300,7 @@ def _build_schema_on_200(cls): ) properties.last_update_history_entry_id = AAZStrType( serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, ) properties.license_model = AAZStrType( serialized_name="licenseModel", @@ -299,6 +311,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.listener_port = AAZIntType( serialized_name="listenerPort", @@ -322,7 +335,9 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.ocpu_count = AAZFloatType( serialized_name="ocpuCount", ) @@ -336,6 +351,7 @@ def _build_schema_on_200(cls): ) properties.scan_dns_record_id = AAZStrType( serialized_name="scanDnsRecordId", + flags={"read_only": True}, ) properties.scan_ip_ids = AAZListType( serialized_name="scanIpIds", @@ -354,6 +370,10 @@ def _build_schema_on_200(cls): serialized_name="sshPublicKeys", flags={"required": True}, ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) properties.storage_size_in_gbs = AAZIntType( serialized_name="storageSizeInGbs", ) @@ -363,6 +383,7 @@ def _build_schema_on_200(cls): ) properties.subnet_ocid = AAZStrType( serialized_name="subnetOcid", + flags={"read_only": True}, ) properties.system_version = AAZStrType( serialized_name="systemVersion", @@ -400,6 +421,17 @@ def _build_schema_on_200(cls): db_servers = cls._schema_on_200.properties.db_servers db_servers.Element = AAZStrType() + file_system_configuration_details = cls._schema_on_200.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache iorm_config_cache.db_plans = AAZListType( serialized_name="dbPlans", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_create.py index 5461be3ac5c..0e11fc62dd7 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_create.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_create.py @@ -22,9 +22,9 @@ class Create(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2025-09-01"], ] } @@ -69,7 +69,7 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - _args_schema.cloud_exadata_infrastructure_id = AAZResourceIdArg( + _args_schema.cloud_exadata_infrastructure_id = AAZStrArg( options=["--exa-infra-id", "--cloud-exadata-infrastructure-id"], arg_group="Properties", help="Cloud Exadata Infrastructure ID", @@ -127,6 +127,11 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="The domain name for the cloud VM cluster.", ) + _args_schema.exascale_db_storage_vault_id = AAZStrArg( + options=["--exascale-db-storage-vault-id"], + arg_group="Properties", + help="Exadata Database Storage Vault ID", + ) _args_schema.gi_version = AAZStrArg( options=["--gi-version"], arg_group="Properties", @@ -189,7 +194,7 @@ def _build_arguments_schema(cls, *args, **kwargs): arg_group="Properties", help="The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", ) - _args_schema.subnet_id = AAZResourceIdArg( + _args_schema.subnet_id = AAZStrArg( options=["--subnet-id"], arg_group="Properties", help="Client subnet", @@ -212,7 +217,7 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) - _args_schema.vnet_id = AAZResourceIdArg( + _args_schema.vnet_id = AAZStrArg( options=["--vnet-id"], arg_group="Properties", help="VNET for network connectivity", @@ -395,7 +400,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -421,7 +426,7 @@ def content(self): typ_kwargs={"flags": {"required": True, "client_flatten": True}} ) _builder.set_prop("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("properties", AAZObjectType) _builder.set_prop("tags", AAZDictType, ".tags") properties = _builder.get(".properties") @@ -437,6 +442,7 @@ def content(self): properties.set_prop("dbServers", AAZListType, ".db_servers") properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={"flags": {"required": True}}) properties.set_prop("domain", AAZStrType, ".domain") + properties.set_prop("exascaleDbStorageVaultId", AAZStrType, ".exascale_db_storage_vault_id") properties.set_prop("giVersion", AAZStrType, ".gi_version", typ_kwargs={"flags": {"required": True}}) properties.set_prop("hostname", AAZStrType, ".hostname", typ_kwargs={"flags": {"required": True}}) properties.set_prop("isLocalBackupEnabled", AAZBoolType, ".is_local_backup_enabled") @@ -515,9 +521,7 @@ def _build_schema_on_200_201(cls): _schema_on_200_201.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200_201.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200_201.properties = AAZObjectType() _schema_on_200_201.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -540,6 +544,11 @@ def _build_schema_on_200_201(cls): ) properties.compartment_id = AAZStrType( serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -562,12 +571,19 @@ def _build_schema_on_200_201(cls): ) properties.disk_redundancy = AAZStrType( serialized_name="diskRedundancy", + flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) properties.gi_version = AAZStrType( serialized_name="giVersion", flags={"required": True}, @@ -577,6 +593,7 @@ def _build_schema_on_200_201(cls): ) properties.iorm_config_cache = AAZObjectType( serialized_name="iormConfigCache", + flags={"read_only": True}, ) properties.is_local_backup_enabled = AAZBoolType( serialized_name="isLocalBackupEnabled", @@ -586,6 +603,7 @@ def _build_schema_on_200_201(cls): ) properties.last_update_history_entry_id = AAZStrType( serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, ) properties.license_model = AAZStrType( serialized_name="licenseModel", @@ -596,6 +614,7 @@ def _build_schema_on_200_201(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.listener_port = AAZIntType( serialized_name="listenerPort", @@ -619,7 +638,9 @@ def _build_schema_on_200_201(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.ocpu_count = AAZFloatType( serialized_name="ocpuCount", ) @@ -633,6 +654,7 @@ def _build_schema_on_200_201(cls): ) properties.scan_dns_record_id = AAZStrType( serialized_name="scanDnsRecordId", + flags={"read_only": True}, ) properties.scan_ip_ids = AAZListType( serialized_name="scanIpIds", @@ -651,6 +673,10 @@ def _build_schema_on_200_201(cls): serialized_name="sshPublicKeys", flags={"required": True}, ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) properties.storage_size_in_gbs = AAZIntType( serialized_name="storageSizeInGbs", ) @@ -660,6 +686,7 @@ def _build_schema_on_200_201(cls): ) properties.subnet_ocid = AAZStrType( serialized_name="subnetOcid", + flags={"read_only": True}, ) properties.system_version = AAZStrType( serialized_name="systemVersion", @@ -697,6 +724,17 @@ def _build_schema_on_200_201(cls): db_servers = cls._schema_on_200_201.properties.db_servers db_servers.Element = AAZStrType() + file_system_configuration_details = cls._schema_on_200_201.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + iorm_config_cache = cls._schema_on_200_201.properties.iorm_config_cache iorm_config_cache.db_plans = AAZListType( serialized_name="dbPlans", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_delete.py index 5a5cf1edf65..2035cbca1d7 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_delete.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_delete.py @@ -23,9 +23,9 @@ class Delete(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2025-09-01"], ] } @@ -146,7 +146,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list.py index 5c564026132..602f4b95ba1 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list.py @@ -22,10 +22,10 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/cloudvmclusters", "2023-09-01"], - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/cloudvmclusters", "2025-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters", "2025-09-01"], ] } @@ -51,12 +51,12 @@ def _build_arguments_schema(cls, *args, **kwargs): 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 + condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) if condition_0: - self.CloudVmClustersListByResourceGroup(ctx=self.ctx)() - if condition_1: self.CloudVmClustersListBySubscription(ctx=self.ctx)() + if condition_1: + self.CloudVmClustersListByResourceGroup(ctx=self.ctx)() self.post_operations() @register_callback @@ -72,7 +72,7 @@ def _output(self, *args, **kwargs): next_link = self.deserialize_output(self.ctx.vars.instance.next_link) return result, next_link - class CloudVmClustersListByResourceGroup(AAZHttpOperation): + class CloudVmClustersListBySubscription(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -86,7 +86,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters", + "/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters", **self.url_parameters ) @@ -101,10 +101,6 @@ def error_format(self): @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, @@ -116,7 +112,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -169,9 +165,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -194,6 +188,11 @@ def _build_schema_on_200(cls): ) properties.compartment_id = AAZStrType( serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -216,12 +215,19 @@ def _build_schema_on_200(cls): ) properties.disk_redundancy = AAZStrType( serialized_name="diskRedundancy", + flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) properties.gi_version = AAZStrType( serialized_name="giVersion", flags={"required": True}, @@ -231,6 +237,7 @@ def _build_schema_on_200(cls): ) properties.iorm_config_cache = AAZObjectType( serialized_name="iormConfigCache", + flags={"read_only": True}, ) properties.is_local_backup_enabled = AAZBoolType( serialized_name="isLocalBackupEnabled", @@ -240,6 +247,7 @@ def _build_schema_on_200(cls): ) properties.last_update_history_entry_id = AAZStrType( serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, ) properties.license_model = AAZStrType( serialized_name="licenseModel", @@ -250,6 +258,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.listener_port = AAZIntType( serialized_name="listenerPort", @@ -273,7 +282,9 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.ocpu_count = AAZFloatType( serialized_name="ocpuCount", ) @@ -287,6 +298,7 @@ def _build_schema_on_200(cls): ) properties.scan_dns_record_id = AAZStrType( serialized_name="scanDnsRecordId", + flags={"read_only": True}, ) properties.scan_ip_ids = AAZListType( serialized_name="scanIpIds", @@ -305,6 +317,10 @@ def _build_schema_on_200(cls): serialized_name="sshPublicKeys", flags={"required": True}, ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) properties.storage_size_in_gbs = AAZIntType( serialized_name="storageSizeInGbs", ) @@ -314,6 +330,7 @@ def _build_schema_on_200(cls): ) properties.subnet_ocid = AAZStrType( serialized_name="subnetOcid", + flags={"read_only": True}, ) properties.system_version = AAZStrType( serialized_name="systemVersion", @@ -351,6 +368,17 @@ def _build_schema_on_200(cls): db_servers = cls._schema_on_200.value.Element.properties.db_servers db_servers.Element = AAZStrType() + file_system_configuration_details = cls._schema_on_200.value.Element.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + iorm_config_cache = cls._schema_on_200.value.Element.properties.iorm_config_cache iorm_config_cache.db_plans = AAZListType( serialized_name="dbPlans", @@ -428,7 +456,7 @@ def _build_schema_on_200(cls): return cls._schema_on_200 - class CloudVmClustersListBySubscription(AAZHttpOperation): + class CloudVmClustersListByResourceGroup(AAZHttpOperation): CLIENT_TYPE = "MgmtClient" def __call__(self, *args, **kwargs): @@ -442,7 +470,7 @@ def __call__(self, *args, **kwargs): @property def url(self): return self.client.format_url( - "/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters", + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters", **self.url_parameters ) @@ -457,6 +485,10 @@ def error_format(self): @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, @@ -468,7 +500,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -521,9 +553,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -546,6 +576,11 @@ def _build_schema_on_200(cls): ) properties.compartment_id = AAZStrType( serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -568,12 +603,19 @@ def _build_schema_on_200(cls): ) properties.disk_redundancy = AAZStrType( serialized_name="diskRedundancy", + flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) properties.gi_version = AAZStrType( serialized_name="giVersion", flags={"required": True}, @@ -583,6 +625,7 @@ def _build_schema_on_200(cls): ) properties.iorm_config_cache = AAZObjectType( serialized_name="iormConfigCache", + flags={"read_only": True}, ) properties.is_local_backup_enabled = AAZBoolType( serialized_name="isLocalBackupEnabled", @@ -592,6 +635,7 @@ def _build_schema_on_200(cls): ) properties.last_update_history_entry_id = AAZStrType( serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, ) properties.license_model = AAZStrType( serialized_name="licenseModel", @@ -602,6 +646,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.listener_port = AAZIntType( serialized_name="listenerPort", @@ -625,7 +670,9 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.ocpu_count = AAZFloatType( serialized_name="ocpuCount", ) @@ -639,6 +686,7 @@ def _build_schema_on_200(cls): ) properties.scan_dns_record_id = AAZStrType( serialized_name="scanDnsRecordId", + flags={"read_only": True}, ) properties.scan_ip_ids = AAZListType( serialized_name="scanIpIds", @@ -657,6 +705,10 @@ def _build_schema_on_200(cls): serialized_name="sshPublicKeys", flags={"required": True}, ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) properties.storage_size_in_gbs = AAZIntType( serialized_name="storageSizeInGbs", ) @@ -666,6 +718,7 @@ def _build_schema_on_200(cls): ) properties.subnet_ocid = AAZStrType( serialized_name="subnetOcid", + flags={"read_only": True}, ) properties.system_version = AAZStrType( serialized_name="systemVersion", @@ -703,6 +756,17 @@ def _build_schema_on_200(cls): db_servers = cls._schema_on_200.value.Element.properties.db_servers db_servers.Element = AAZStrType() + file_system_configuration_details = cls._schema_on_200.value.Element.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + iorm_config_cache = cls._schema_on_200.value.Element.properties.iorm_config_cache iorm_config_cache.db_plans = AAZListType( serialized_name="dbPlans", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list_private_ip_address.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list_private_ip_address.py new file mode 100644 index 00000000000..30218e935bd --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_list_private_ip_address.py @@ -0,0 +1,228 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-vm-cluster list-private-ip-address", +) +class ListPrivateIpAddress(AAZCommand): + """List Private IP Addresses by the provided filter + + :example: List Private IP Addresses + az oracle-database cloud-vm-cluster list-private-ip-address --cloudvmclustername --resource-group --subnet-id --vnic-id + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/listprivateipaddresses", "2025-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.subnet_id = AAZStrArg( + options=["--subnet-id"], + arg_group="Body", + help="Subnet OCID", + required=True, + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.vnic_id = AAZStrArg( + options=["--vnic-id"], + arg_group="Body", + help="VCN OCID", + required=True, + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.CloudVmClustersListPrivateIpAddresses(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 CloudVmClustersListPrivateIpAddresses(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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", "2025-09-01", + 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("subnetId", AAZStrType, ".subnet_id", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("vnicId", AAZStrType, ".vnic_id", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + 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 = AAZListType() + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.Element = AAZObjectType() + + _element = cls._schema_on_200.Element + _element.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + _element.hostname_label = AAZStrType( + serialized_name="hostnameLabel", + flags={"required": True}, + ) + _element.ip_address = AAZStrType( + serialized_name="ipAddress", + flags={"required": True}, + ) + _element.ocid = AAZStrType( + flags={"required": True}, + ) + _element.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + + return cls._schema_on_200 + + +class _ListPrivateIpAddressHelper: + """Helper class for ListPrivateIpAddress""" + + +__all__ = ["ListPrivateIpAddress"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_remove_vm.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_remove_vm.py index 4bc2426f78a..937826b7095 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_remove_vm.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_remove_vm.py @@ -22,9 +22,9 @@ class RemoveVm(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/removevms", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/removevms", "2025-09-01"], ] } @@ -158,7 +158,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -218,9 +218,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -243,6 +241,11 @@ def _build_schema_on_200(cls): ) properties.compartment_id = AAZStrType( serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -265,12 +268,19 @@ def _build_schema_on_200(cls): ) properties.disk_redundancy = AAZStrType( serialized_name="diskRedundancy", + flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) properties.gi_version = AAZStrType( serialized_name="giVersion", flags={"required": True}, @@ -280,6 +290,7 @@ def _build_schema_on_200(cls): ) properties.iorm_config_cache = AAZObjectType( serialized_name="iormConfigCache", + flags={"read_only": True}, ) properties.is_local_backup_enabled = AAZBoolType( serialized_name="isLocalBackupEnabled", @@ -289,6 +300,7 @@ def _build_schema_on_200(cls): ) properties.last_update_history_entry_id = AAZStrType( serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, ) properties.license_model = AAZStrType( serialized_name="licenseModel", @@ -299,6 +311,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.listener_port = AAZIntType( serialized_name="listenerPort", @@ -322,7 +335,9 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.ocpu_count = AAZFloatType( serialized_name="ocpuCount", ) @@ -336,6 +351,7 @@ def _build_schema_on_200(cls): ) properties.scan_dns_record_id = AAZStrType( serialized_name="scanDnsRecordId", + flags={"read_only": True}, ) properties.scan_ip_ids = AAZListType( serialized_name="scanIpIds", @@ -354,6 +370,10 @@ def _build_schema_on_200(cls): serialized_name="sshPublicKeys", flags={"required": True}, ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) properties.storage_size_in_gbs = AAZIntType( serialized_name="storageSizeInGbs", ) @@ -363,6 +383,7 @@ def _build_schema_on_200(cls): ) properties.subnet_ocid = AAZStrType( serialized_name="subnetOcid", + flags={"read_only": True}, ) properties.system_version = AAZStrType( serialized_name="systemVersion", @@ -400,6 +421,17 @@ def _build_schema_on_200(cls): db_servers = cls._schema_on_200.properties.db_servers db_servers.Element = AAZStrType() + file_system_configuration_details = cls._schema_on_200.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache iorm_config_cache.db_plans = AAZListType( serialized_name="dbPlans", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_show.py index a9da245ac39..9df5fb4a17c 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_show.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_show.py @@ -22,9 +22,9 @@ class Show(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2025-09-01"], ] } @@ -123,7 +123,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -165,9 +165,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -190,6 +188,11 @@ def _build_schema_on_200(cls): ) properties.compartment_id = AAZStrType( serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -212,12 +215,19 @@ def _build_schema_on_200(cls): ) properties.disk_redundancy = AAZStrType( serialized_name="diskRedundancy", + flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) properties.gi_version = AAZStrType( serialized_name="giVersion", flags={"required": True}, @@ -227,6 +237,7 @@ def _build_schema_on_200(cls): ) properties.iorm_config_cache = AAZObjectType( serialized_name="iormConfigCache", + flags={"read_only": True}, ) properties.is_local_backup_enabled = AAZBoolType( serialized_name="isLocalBackupEnabled", @@ -236,6 +247,7 @@ def _build_schema_on_200(cls): ) properties.last_update_history_entry_id = AAZStrType( serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, ) properties.license_model = AAZStrType( serialized_name="licenseModel", @@ -246,6 +258,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.listener_port = AAZIntType( serialized_name="listenerPort", @@ -269,7 +282,9 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.ocpu_count = AAZFloatType( serialized_name="ocpuCount", ) @@ -283,6 +298,7 @@ def _build_schema_on_200(cls): ) properties.scan_dns_record_id = AAZStrType( serialized_name="scanDnsRecordId", + flags={"read_only": True}, ) properties.scan_ip_ids = AAZListType( serialized_name="scanIpIds", @@ -301,6 +317,10 @@ def _build_schema_on_200(cls): serialized_name="sshPublicKeys", flags={"required": True}, ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) properties.storage_size_in_gbs = AAZIntType( serialized_name="storageSizeInGbs", ) @@ -310,6 +330,7 @@ def _build_schema_on_200(cls): ) properties.subnet_ocid = AAZStrType( serialized_name="subnetOcid", + flags={"read_only": True}, ) properties.system_version = AAZStrType( serialized_name="systemVersion", @@ -347,6 +368,17 @@ def _build_schema_on_200(cls): db_servers = cls._schema_on_200.properties.db_servers db_servers.Element = AAZStrType() + file_system_configuration_details = cls._schema_on_200.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache iorm_config_cache.db_plans = AAZListType( serialized_name="dbPlans", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_update.py index ed25b6c57fe..d4f03419227 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_update.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_update.py @@ -22,9 +22,9 @@ class Update(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2025-09-01"], ] } @@ -101,6 +101,12 @@ def _build_arguments_schema(cls, *args, **kwargs): min_length=1, ), ) + _args_schema.file_system_configuration_details = AAZListArg( + options=["--file-system-configuration-details"], + arg_group="Properties", + help="Array of mount path and size.", + nullable=True, + ) _args_schema.license_model = AAZStrArg( options=["--license-model"], arg_group="Properties", @@ -158,6 +164,23 @@ def _build_arguments_schema(cls, *args, **kwargs): nullable=True, ) + file_system_configuration_details = cls._args_schema.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectArg( + nullable=True, + ) + + _element = cls._args_schema.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntArg( + options=["file-system-size-gb"], + help="Size of the VM", + nullable=True, + ) + _element.mount_point = AAZStrArg( + options=["mount-point"], + help="Mount path", + nullable=True, + ) + ssh_public_keys = cls._args_schema.ssh_public_keys ssh_public_keys.Element = AAZStrArg( nullable=True, @@ -257,7 +280,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -288,7 +311,305 @@ def _build_schema_on_200(cls): return cls._schema_on_200 cls._schema_on_200 = AAZObjectType() - _UpdateHelper._build_schema_cloud_vm_cluster_read(cls._schema_on_200) + + _schema_on_200 = cls._schema_on_200 + _schema_on_200.id = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.cloud_exadata_infrastructure_id = AAZStrType( + serialized_name="cloudExadataInfrastructureId", + flags={"required": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.compartment_id = AAZStrType( + serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + flags={"required": True}, + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.data_storage_percentage = AAZIntType( + serialized_name="dataStoragePercentage", + ) + properties.data_storage_size_in_tbs = AAZFloatType( + serialized_name="dataStorageSizeInTbs", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + ) + properties.db_servers = AAZListType( + serialized_name="dbServers", + ) + properties.disk_redundancy = AAZStrType( + serialized_name="diskRedundancy", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"required": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.is_local_backup_enabled = AAZBoolType( + serialized_name="isLocalBackupEnabled", + ) + properties.is_sparse_diskgroup_enabled = AAZBoolType( + serialized_name="isSparseDiskgroupEnabled", + ) + properties.last_update_history_entry_id = AAZStrType( + serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"read_only": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.ocpu_count = AAZFloatType( + serialized_name="ocpuCount", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"read_only": True}, + ) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) + properties.storage_size_in_gbs = AAZIntType( + serialized_name="storageSizeInGbs", + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_id = AAZStrType( + serialized_name="zoneId", + ) + + data_collection_options = cls._schema_on_200.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + db_servers = cls._schema_on_200.properties.db_servers + db_servers.Element = AAZStrType() + + file_system_configuration_details = cls._schema_on_200.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() return cls._schema_on_200 @@ -356,7 +677,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -399,7 +720,305 @@ def _build_schema_on_200_201(cls): return cls._schema_on_200_201 cls._schema_on_200_201 = AAZObjectType() - _UpdateHelper._build_schema_cloud_vm_cluster_read(cls._schema_on_200_201) + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _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() + _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}, + ) + + properties = cls._schema_on_200_201.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.cloud_exadata_infrastructure_id = AAZStrType( + serialized_name="cloudExadataInfrastructureId", + flags={"required": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.compartment_id = AAZStrType( + serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + flags={"required": True}, + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.data_storage_percentage = AAZIntType( + serialized_name="dataStoragePercentage", + ) + properties.data_storage_size_in_tbs = AAZFloatType( + serialized_name="dataStorageSizeInTbs", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + ) + properties.db_servers = AAZListType( + serialized_name="dbServers", + ) + properties.disk_redundancy = AAZStrType( + serialized_name="diskRedundancy", + flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"required": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.is_local_backup_enabled = AAZBoolType( + serialized_name="isLocalBackupEnabled", + ) + properties.is_sparse_diskgroup_enabled = AAZBoolType( + serialized_name="isSparseDiskgroupEnabled", + ) + properties.last_update_history_entry_id = AAZStrType( + serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"read_only": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.ocpu_count = AAZFloatType( + serialized_name="ocpuCount", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"read_only": True}, + ) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) + properties.storage_size_in_gbs = AAZIntType( + serialized_name="storageSizeInGbs", + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_id = AAZStrType( + serialized_name="zoneId", + ) + + data_collection_options = cls._schema_on_200_201.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + db_servers = cls._schema_on_200_201.properties.db_servers + db_servers.Element = AAZStrType() + + file_system_configuration_details = cls._schema_on_200_201.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + + iorm_config_cache = cls._schema_on_200_201.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200_201.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200_201.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200_201.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200_201.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200_201.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200_201.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() return cls._schema_on_200_201 @@ -414,7 +1033,7 @@ def _update_instance(self, instance): value=instance, typ=AAZObjectType ) - _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("properties", AAZObjectType) _builder.set_prop("tags", AAZDictType, ".tags") properties = _builder.get(".properties") @@ -425,6 +1044,7 @@ def _update_instance(self, instance): properties.set_prop("dataStorageSizeInTbs", AAZFloatType, ".data_storage_size_in_tbs") properties.set_prop("dbNodeStorageSizeInGbs", AAZIntType, ".db_node_storage_size_in_gbs") properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("fileSystemConfigurationDetails", AAZListType, ".file_system_configuration_details") properties.set_prop("licenseModel", AAZStrType, ".license_model") properties.set_prop("memorySizeInGbs", AAZIntType, ".memory_size_in_gbs") properties.set_prop("ocpuCount", AAZFloatType, ".ocpu_count") @@ -441,6 +1061,15 @@ def _update_instance(self, instance): data_collection_options.set_prop("isHealthMonitoringEnabled", AAZBoolType, ".is_health_monitoring_enabled") data_collection_options.set_prop("isIncidentLogsEnabled", AAZBoolType, ".is_incident_logs_enabled") + file_system_configuration_details = _builder.get(".properties.fileSystemConfigurationDetails") + if file_system_configuration_details is not None: + file_system_configuration_details.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.fileSystemConfigurationDetails[]") + if _elements is not None: + _elements.set_prop("fileSystemSizeGb", AAZIntType, ".file_system_size_gb") + _elements.set_prop("mountPoint", AAZStrType, ".mount_point") + ssh_public_keys = _builder.get(".properties.sshPublicKeys") if ssh_public_keys is not None: ssh_public_keys.set_elements(AAZStrType, ".") @@ -463,296 +1092,5 @@ def __call__(self, *args, **kwargs): class _UpdateHelper: """Helper class for Update""" - _schema_cloud_vm_cluster_read = None - - @classmethod - def _build_schema_cloud_vm_cluster_read(cls, _schema): - if cls._schema_cloud_vm_cluster_read is not None: - _schema.id = cls._schema_cloud_vm_cluster_read.id - _schema.location = cls._schema_cloud_vm_cluster_read.location - _schema.name = cls._schema_cloud_vm_cluster_read.name - _schema.properties = cls._schema_cloud_vm_cluster_read.properties - _schema.system_data = cls._schema_cloud_vm_cluster_read.system_data - _schema.tags = cls._schema_cloud_vm_cluster_read.tags - _schema.type = cls._schema_cloud_vm_cluster_read.type - return - - cls._schema_cloud_vm_cluster_read = _schema_cloud_vm_cluster_read = AAZObjectType() - - cloud_vm_cluster_read = _schema_cloud_vm_cluster_read - cloud_vm_cluster_read.id = AAZStrType( - flags={"read_only": True}, - ) - cloud_vm_cluster_read.location = AAZStrType( - flags={"required": True}, - ) - cloud_vm_cluster_read.name = AAZStrType( - flags={"read_only": True}, - ) - cloud_vm_cluster_read.properties = AAZObjectType( - flags={"client_flatten": True}, - ) - cloud_vm_cluster_read.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - cloud_vm_cluster_read.tags = AAZDictType() - cloud_vm_cluster_read.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = _schema_cloud_vm_cluster_read.properties - properties.backup_subnet_cidr = AAZStrType( - serialized_name="backupSubnetCidr", - ) - properties.cloud_exadata_infrastructure_id = AAZStrType( - serialized_name="cloudExadataInfrastructureId", - flags={"required": True}, - ) - properties.cluster_name = AAZStrType( - serialized_name="clusterName", - ) - properties.compartment_id = AAZStrType( - serialized_name="compartmentId", - ) - properties.cpu_core_count = AAZIntType( - serialized_name="cpuCoreCount", - flags={"required": True}, - ) - properties.data_collection_options = AAZObjectType( - serialized_name="dataCollectionOptions", - ) - properties.data_storage_percentage = AAZIntType( - serialized_name="dataStoragePercentage", - ) - properties.data_storage_size_in_tbs = AAZFloatType( - serialized_name="dataStorageSizeInTbs", - ) - properties.db_node_storage_size_in_gbs = AAZIntType( - serialized_name="dbNodeStorageSizeInGbs", - ) - properties.db_servers = AAZListType( - serialized_name="dbServers", - ) - properties.disk_redundancy = AAZStrType( - serialized_name="diskRedundancy", - ) - properties.display_name = AAZStrType( - serialized_name="displayName", - flags={"required": True}, - ) - properties.domain = AAZStrType() - properties.gi_version = AAZStrType( - serialized_name="giVersion", - flags={"required": True}, - ) - properties.hostname = AAZStrType( - flags={"required": True}, - ) - properties.iorm_config_cache = AAZObjectType( - serialized_name="iormConfigCache", - ) - properties.is_local_backup_enabled = AAZBoolType( - serialized_name="isLocalBackupEnabled", - ) - properties.is_sparse_diskgroup_enabled = AAZBoolType( - serialized_name="isSparseDiskgroupEnabled", - ) - properties.last_update_history_entry_id = AAZStrType( - serialized_name="lastUpdateHistoryEntryId", - ) - properties.license_model = AAZStrType( - serialized_name="licenseModel", - ) - properties.lifecycle_details = AAZStrType( - serialized_name="lifecycleDetails", - flags={"read_only": True}, - ) - properties.lifecycle_state = AAZStrType( - serialized_name="lifecycleState", - ) - properties.listener_port = AAZIntType( - serialized_name="listenerPort", - flags={"read_only": True}, - ) - properties.memory_size_in_gbs = AAZIntType( - serialized_name="memorySizeInGbs", - ) - properties.node_count = AAZIntType( - serialized_name="nodeCount", - flags={"read_only": True}, - ) - properties.nsg_cidrs = AAZListType( - serialized_name="nsgCidrs", - ) - properties.nsg_url = AAZStrType( - serialized_name="nsgUrl", - flags={"read_only": True}, - ) - properties.oci_url = AAZStrType( - serialized_name="ociUrl", - flags={"read_only": True}, - ) - properties.ocid = AAZStrType() - properties.ocpu_count = AAZFloatType( - serialized_name="ocpuCount", - ) - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.scan_dns_name = AAZStrType( - serialized_name="scanDnsName", - flags={"read_only": True}, - ) - properties.scan_dns_record_id = AAZStrType( - serialized_name="scanDnsRecordId", - ) - properties.scan_ip_ids = AAZListType( - serialized_name="scanIpIds", - flags={"read_only": True}, - ) - properties.scan_listener_port_tcp = AAZIntType( - serialized_name="scanListenerPortTcp", - ) - properties.scan_listener_port_tcp_ssl = AAZIntType( - serialized_name="scanListenerPortTcpSsl", - ) - properties.shape = AAZStrType( - flags={"read_only": True}, - ) - properties.ssh_public_keys = AAZListType( - serialized_name="sshPublicKeys", - flags={"required": True}, - ) - properties.storage_size_in_gbs = AAZIntType( - serialized_name="storageSizeInGbs", - ) - properties.subnet_id = AAZStrType( - serialized_name="subnetId", - flags={"required": True}, - ) - properties.subnet_ocid = AAZStrType( - serialized_name="subnetOcid", - ) - properties.system_version = AAZStrType( - serialized_name="systemVersion", - ) - properties.time_created = AAZStrType( - serialized_name="timeCreated", - flags={"read_only": True}, - ) - properties.time_zone = AAZStrType( - serialized_name="timeZone", - ) - properties.vip_ids = AAZListType( - serialized_name="vipIds", - flags={"read_only": True}, - ) - properties.vnet_id = AAZStrType( - serialized_name="vnetId", - flags={"required": True}, - ) - properties.zone_id = AAZStrType( - serialized_name="zoneId", - ) - - data_collection_options = _schema_cloud_vm_cluster_read.properties.data_collection_options - data_collection_options.is_diagnostics_events_enabled = AAZBoolType( - serialized_name="isDiagnosticsEventsEnabled", - ) - data_collection_options.is_health_monitoring_enabled = AAZBoolType( - serialized_name="isHealthMonitoringEnabled", - ) - data_collection_options.is_incident_logs_enabled = AAZBoolType( - serialized_name="isIncidentLogsEnabled", - ) - - db_servers = _schema_cloud_vm_cluster_read.properties.db_servers - db_servers.Element = AAZStrType() - - iorm_config_cache = _schema_cloud_vm_cluster_read.properties.iorm_config_cache - iorm_config_cache.db_plans = AAZListType( - serialized_name="dbPlans", - ) - iorm_config_cache.lifecycle_details = AAZStrType( - serialized_name="lifecycleDetails", - ) - iorm_config_cache.lifecycle_state = AAZStrType( - serialized_name="lifecycleState", - ) - iorm_config_cache.objective = AAZStrType() - - db_plans = _schema_cloud_vm_cluster_read.properties.iorm_config_cache.db_plans - db_plans.Element = AAZObjectType() - - _element = _schema_cloud_vm_cluster_read.properties.iorm_config_cache.db_plans.Element - _element.db_name = AAZStrType( - serialized_name="dbName", - ) - _element.flash_cache_limit = AAZStrType( - serialized_name="flashCacheLimit", - ) - _element.share = AAZIntType() - - nsg_cidrs = _schema_cloud_vm_cluster_read.properties.nsg_cidrs - nsg_cidrs.Element = AAZObjectType() - - _element = _schema_cloud_vm_cluster_read.properties.nsg_cidrs.Element - _element.destination_port_range = AAZObjectType( - serialized_name="destinationPortRange", - ) - _element.source = AAZStrType( - flags={"required": True}, - ) - - destination_port_range = _schema_cloud_vm_cluster_read.properties.nsg_cidrs.Element.destination_port_range - destination_port_range.max = AAZIntType( - flags={"required": True}, - ) - destination_port_range.min = AAZIntType( - flags={"required": True}, - ) - - scan_ip_ids = _schema_cloud_vm_cluster_read.properties.scan_ip_ids - scan_ip_ids.Element = AAZStrType() - - ssh_public_keys = _schema_cloud_vm_cluster_read.properties.ssh_public_keys - ssh_public_keys.Element = AAZStrType() - - vip_ids = _schema_cloud_vm_cluster_read.properties.vip_ids - vip_ids.Element = AAZStrType() - - system_data = _schema_cloud_vm_cluster_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_cloud_vm_cluster_read.tags - tags.Element = AAZStrType() - - _schema.id = cls._schema_cloud_vm_cluster_read.id - _schema.location = cls._schema_cloud_vm_cluster_read.location - _schema.name = cls._schema_cloud_vm_cluster_read.name - _schema.properties = cls._schema_cloud_vm_cluster_read.properties - _schema.system_data = cls._schema_cloud_vm_cluster_read.system_data - _schema.tags = cls._schema_cloud_vm_cluster_read.tags - _schema.type = cls._schema_cloud_vm_cluster_read.type - __all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_wait.py index 8b1da038510..506701c5c5a 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_wait.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/_wait.py @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand): _aaz_info = { "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}", "2025-09-01"], ] } @@ -119,7 +119,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -161,9 +161,7 @@ def _build_schema_on_200(cls): _schema_on_200.name = AAZStrType( flags={"read_only": True}, ) - _schema_on_200.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _schema_on_200.properties = AAZObjectType() _schema_on_200.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -186,6 +184,11 @@ def _build_schema_on_200(cls): ) properties.compartment_id = AAZStrType( serialized_name="compartmentId", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, ) properties.cpu_core_count = AAZIntType( serialized_name="cpuCoreCount", @@ -208,12 +211,19 @@ def _build_schema_on_200(cls): ) properties.disk_redundancy = AAZStrType( serialized_name="diskRedundancy", + flags={"read_only": True}, ) properties.display_name = AAZStrType( serialized_name="displayName", flags={"required": True}, ) properties.domain = AAZStrType() + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + ) + properties.file_system_configuration_details = AAZListType( + serialized_name="fileSystemConfigurationDetails", + ) properties.gi_version = AAZStrType( serialized_name="giVersion", flags={"required": True}, @@ -223,6 +233,7 @@ def _build_schema_on_200(cls): ) properties.iorm_config_cache = AAZObjectType( serialized_name="iormConfigCache", + flags={"read_only": True}, ) properties.is_local_backup_enabled = AAZBoolType( serialized_name="isLocalBackupEnabled", @@ -232,6 +243,7 @@ def _build_schema_on_200(cls): ) properties.last_update_history_entry_id = AAZStrType( serialized_name="lastUpdateHistoryEntryId", + flags={"read_only": True}, ) properties.license_model = AAZStrType( serialized_name="licenseModel", @@ -242,6 +254,7 @@ def _build_schema_on_200(cls): ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"read_only": True}, ) properties.listener_port = AAZIntType( serialized_name="listenerPort", @@ -265,7 +278,9 @@ def _build_schema_on_200(cls): serialized_name="ociUrl", flags={"read_only": True}, ) - properties.ocid = AAZStrType() + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) properties.ocpu_count = AAZFloatType( serialized_name="ocpuCount", ) @@ -279,6 +294,7 @@ def _build_schema_on_200(cls): ) properties.scan_dns_record_id = AAZStrType( serialized_name="scanDnsRecordId", + flags={"read_only": True}, ) properties.scan_ip_ids = AAZListType( serialized_name="scanIpIds", @@ -297,6 +313,10 @@ def _build_schema_on_200(cls): serialized_name="sshPublicKeys", flags={"required": True}, ) + properties.storage_management_type = AAZStrType( + serialized_name="storageManagementType", + flags={"read_only": True}, + ) properties.storage_size_in_gbs = AAZIntType( serialized_name="storageSizeInGbs", ) @@ -306,6 +326,7 @@ def _build_schema_on_200(cls): ) properties.subnet_ocid = AAZStrType( serialized_name="subnetOcid", + flags={"read_only": True}, ) properties.system_version = AAZStrType( serialized_name="systemVersion", @@ -343,6 +364,17 @@ def _build_schema_on_200(cls): db_servers = cls._schema_on_200.properties.db_servers db_servers.Element = AAZStrType() + file_system_configuration_details = cls._schema_on_200.properties.file_system_configuration_details + file_system_configuration_details.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.file_system_configuration_details.Element + _element.file_system_size_gb = AAZIntType( + serialized_name="fileSystemSizeGb", + ) + _element.mount_point = AAZStrType( + serialized_name="mountPoint", + ) + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache iorm_config_cache.db_plans = AAZListType( serialized_name="dbPlans", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/database_node/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/database_node/__init__.py index 42777293b84..2669684101d 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/database_node/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/database_node/__init__.py @@ -11,3 +11,4 @@ from .__cmd_group import * from ._action import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/database_node/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/database_node/_show.py new file mode 100644 index 00000000000..037a01e9bda --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/database_node/_show.py @@ -0,0 +1,290 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-vm-cluster database-node show", +) +class Show(AAZCommand): + """Get a DbNode + + :example: Get a DB Node + az oracle-database cloud-vm-cluster database-node show --cloudvmclustername --resource-group --dbnodeocid + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/dbnodes/{}", "2025-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.dbnodeocid = AAZStrArg( + options=["-n", "--name", "--dbnodeocid"], + help="DbNode OCID.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=255, + min_length=1, + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DbNodesGet(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 DbNodesGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + required=True, + ), + **self.serialize_url_param( + "dbnodeocid", self.ctx.args.dbnodeocid, + 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", "2025-09-01", + 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() + _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.additional_details = AAZStrType( + serialized_name="additionalDetails", + ) + properties.backup_ip_id = AAZStrType( + serialized_name="backupIpId", + ) + properties.backup_vnic2_id = AAZStrType( + serialized_name="backupVnic2Id", + ) + properties.backup_vnic_id = AAZStrType( + serialized_name="backupVnicId", + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + ) + properties.db_server_id = AAZStrType( + serialized_name="dbServerId", + ) + properties.db_system_id = AAZStrType( + serialized_name="dbSystemId", + flags={"required": True}, + ) + properties.fault_domain = AAZStrType( + serialized_name="faultDomain", + ) + properties.host_ip_id = AAZStrType( + serialized_name="hostIpId", + ) + properties.hostname = AAZStrType() + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"required": True}, + ) + properties.maintenance_type = AAZStrType( + serialized_name="maintenanceType", + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + ) + properties.ocid = AAZStrType( + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.software_storage_size_in_gb = AAZIntType( + serialized_name="softwareStorageSizeInGb", + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"required": True}, + ) + properties.time_maintenance_window_end = AAZStrType( + serialized_name="timeMaintenanceWindowEnd", + ) + properties.time_maintenance_window_start = AAZStrType( + serialized_name="timeMaintenanceWindowStart", + ) + properties.vnic2_id = AAZStrType( + serialized_name="vnic2Id", + ) + properties.vnic_id = AAZStrType( + serialized_name="vnicId", + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/__cmd_group.py new file mode 100644 index 00000000000..1ba99d4b551 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/__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( + "oracle-database cloud-vm-cluster virtual-network-address", +) +class __CMDGroup(AAZCommandGroup): + """Virtual Network Address + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_create.py new file mode 100644 index 00000000000..3811458b29f --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_create.py @@ -0,0 +1,297 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-vm-cluster virtual-network-address create", +) +class Create(AAZCommand): + """Create a VirtualNetworkAddress + + :example: Create Virtual Network Address + az oracle-database cloud-vm-cluster virtual-network-address create --cloudvmclustername --resource-group --name --ip-address --vm-ocid + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2023-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.ip_address = AAZStrArg( + options=["--ip-address"], + arg_group="Properties", + help="Virtual network Address address.", + ) + _args_schema.vm_ocid = AAZStrArg( + options=["--vm-ocid"], + arg_group="Properties", + help="Virtual Machine OCID.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VirtualNetworkAddressesCreateOrUpdate(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 VirtualNetworkAddressesCreateOrUpdate(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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": {"client_flatten": True}}) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("ipAddress", AAZStrType, ".ip_address") + properties.set_prop("vmOcid", AAZStrType, ".vm_ocid") + + 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={"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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + properties.ocid = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_delete.py new file mode 100644 index 00000000000..e58ff24f613 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_delete.py @@ -0,0 +1,181 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-vm-cluster virtual-network-address delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a VirtualNetworkAddress + + :example: Delete Virtual Network Address + az oracle-database cloud-vm-cluster virtual-network-address delete --cloudvmclustername --resource-group --name + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2023-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VirtualNetworkAddressesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class VirtualNetworkAddressesDelete(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": "location"}, + 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": "location"}, + 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": "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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_list.py new file mode 100644 index 00000000000..d632912dd58 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_list.py @@ -0,0 +1,242 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-vm-cluster virtual-network-address list", +) +class List(AAZCommand): + """List VirtualNetworkAddress resources by CloudVmCluster + + :example: List Virtual Network Address + az oracle-database cloud-vm-cluster virtual-network-address list --cloudvmclustername --resource-group + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses", "2023-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworkAddressesListByCloudVmCluster(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 VirtualNetworkAddressesListByCloudVmCluster(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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", "2023-09-01", + 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={"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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + properties.ocid = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_show.py new file mode 100644 index 00000000000..b6bb7959da7 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_show.py @@ -0,0 +1,245 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-vm-cluster virtual-network-address show", +) +class Show(AAZCommand): + """Get a VirtualNetworkAddress + + :example: Get Vnet address + az oracle-database cloud-vm-cluster virtual-network-address show --cloudvmclustername --resource-group --name + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2023-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworkAddressesGet(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 VirtualNetworkAddressesGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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={"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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + properties.ocid = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_update.py new file mode 100644 index 00000000000..662b2c16a21 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_update.py @@ -0,0 +1,419 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-vm-cluster virtual-network-address update", +) +class Update(AAZCommand): + """Update a VirtualNetworkAddress + + :example: Update Vnet address + az oracle-database cloud-vm-cluster virtual-network-address update --cloudvmclustername --resource-group --name + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2023-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworkAddressesGet(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.VirtualNetworkAddressesCreateOrUpdate(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 VirtualNetworkAddressesGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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_virtual_network_address_read(cls._schema_on_200) + + return cls._schema_on_200 + + class VirtualNetworkAddressesCreateOrUpdate(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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_virtual_network_address_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 + ) + + 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_virtual_network_address_read = None + + @classmethod + def _build_schema_virtual_network_address_read(cls, _schema): + if cls._schema_virtual_network_address_read is not None: + _schema.id = cls._schema_virtual_network_address_read.id + _schema.name = cls._schema_virtual_network_address_read.name + _schema.properties = cls._schema_virtual_network_address_read.properties + _schema.system_data = cls._schema_virtual_network_address_read.system_data + _schema.type = cls._schema_virtual_network_address_read.type + return + + cls._schema_virtual_network_address_read = _schema_virtual_network_address_read = AAZObjectType() + + virtual_network_address_read = _schema_virtual_network_address_read + virtual_network_address_read.id = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_address_read.name = AAZStrType( + flags={"read_only": True}, + ) + virtual_network_address_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + virtual_network_address_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + virtual_network_address_read.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = _schema_virtual_network_address_read.properties + properties.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + properties.ocid = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + system_data = _schema_virtual_network_address_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_virtual_network_address_read.id + _schema.name = cls._schema_virtual_network_address_read.name + _schema.properties = cls._schema_virtual_network_address_read.properties + _schema.system_data = cls._schema_virtual_network_address_read.system_data + _schema.type = cls._schema_virtual_network_address_read.type + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_wait.py new file mode 100644 index 00000000000..64311019092 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/cloud_vm_cluster/virtual_network_address/_wait.py @@ -0,0 +1,241 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database cloud-vm-cluster virtual-network-address wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2023-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworkAddressesGet(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 VirtualNetworkAddressesGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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={"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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + properties.ocid = AAZStrType() + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/__init__.py index d63ae5a6fc9..2df85698253 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/__init__.py @@ -10,3 +10,4 @@ from .__cmd_group import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/_list.py index 36e5ca67267..6e15aabfe92 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dbsystemshapes", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dbsystemshapes", "2025-09-01"], ] } @@ -48,6 +48,14 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.location = AAZResourceLocationArg( required=True, ) + _args_schema.shape_attribute = AAZStrArg( + options=["--shape-attribute"], + help="Filters the result for the given Shape Attribute, such as BLOCK_STORAGE or SMART_STORAGE.", + ) + _args_schema.zone = AAZStrArg( + options=["--zone"], + help="Filters the result for the given Azure Availability Zone", + ) return cls._args_schema def _execute_operations(self): @@ -112,7 +120,13 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "shapeAttribute", self.ctx.args.shape_attribute, + ), + **self.serialize_query_param( + "zone", self.ctx.args.zone, + ), + **self.serialize_query_param( + "api-version", "2025-09-01", required=True, ), } @@ -162,9 +176,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -174,86 +186,86 @@ def _build_schema_on_200(cls): ) properties = cls._schema_on_200.value.Element.properties + properties.are_server_types_supported = AAZBoolType( + serialized_name="areServerTypesSupported", + ) properties.available_core_count = AAZIntType( serialized_name="availableCoreCount", - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.available_core_count_per_node = AAZIntType( serialized_name="availableCoreCountPerNode", - flags={"read_only": True}, ) properties.available_data_storage_in_tbs = AAZIntType( serialized_name="availableDataStorageInTbs", - flags={"read_only": True}, ) properties.available_data_storage_per_server_in_tbs = AAZFloatType( serialized_name="availableDataStoragePerServerInTbs", - flags={"read_only": True}, ) properties.available_db_node_per_node_in_gbs = AAZIntType( serialized_name="availableDbNodePerNodeInGbs", - flags={"read_only": True}, ) properties.available_db_node_storage_in_gbs = AAZIntType( serialized_name="availableDbNodeStorageInGbs", - flags={"read_only": True}, ) properties.available_memory_in_gbs = AAZIntType( serialized_name="availableMemoryInGbs", - flags={"read_only": True}, ) properties.available_memory_per_node_in_gbs = AAZIntType( serialized_name="availableMemoryPerNodeInGbs", - flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", ) properties.core_count_increment = AAZIntType( serialized_name="coreCountIncrement", - flags={"read_only": True}, + ) + properties.display_name = AAZStrType( + serialized_name="displayName", ) properties.max_storage_count = AAZIntType( serialized_name="maxStorageCount", - flags={"read_only": True}, ) properties.maximum_node_count = AAZIntType( serialized_name="maximumNodeCount", - flags={"read_only": True}, ) properties.min_core_count_per_node = AAZIntType( serialized_name="minCoreCountPerNode", - flags={"read_only": True}, ) properties.min_data_storage_in_tbs = AAZIntType( serialized_name="minDataStorageInTbs", - flags={"read_only": True}, ) properties.min_db_node_storage_per_node_in_gbs = AAZIntType( serialized_name="minDbNodeStoragePerNodeInGbs", - flags={"read_only": True}, ) properties.min_memory_per_node_in_gbs = AAZIntType( serialized_name="minMemoryPerNodeInGbs", - flags={"read_only": True}, ) properties.min_storage_count = AAZIntType( serialized_name="minStorageCount", - flags={"read_only": True}, ) properties.minimum_core_count = AAZIntType( serialized_name="minimumCoreCount", - flags={"read_only": True}, ) properties.minimum_node_count = AAZIntType( serialized_name="minimumNodeCount", - flags={"read_only": True}, ) properties.runtime_minimum_core_count = AAZIntType( serialized_name="runtimeMinimumCoreCount", - flags={"read_only": True}, + ) + properties.shape_attributes = AAZListType( + serialized_name="shapeAttributes", ) properties.shape_family = AAZStrType( serialized_name="shapeFamily", - flags={"read_only": True}, ) + properties.shape_name = AAZStrType( + serialized_name="shapeName", + flags={"required": True}, + ) + + shape_attributes = cls._schema_on_200.value.Element.properties.shape_attributes + shape_attributes.Element = AAZStrType() system_data = cls._schema_on_200.value.Element.system_data system_data.created_at = AAZStrType( diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/_show.py new file mode 100644 index 00000000000..897f3c3ae2c --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/database_system_shape/_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( + "oracle-database database-system-shape show", +) +class Show(AAZCommand): + """Get a DbSystemShape + + :example: Get database system shapes + az oracle-database database-system-shape show --name --location + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dbsystemshapes/{}", "2023-09-01"], + ] + } + + 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.dbsystemshapename = AAZStrArg( + options=["-n", "--name", "--dbsystemshapename"], + help="DbSystemShape name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DbSystemShapesGet(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 DbSystemShapesGet(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/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}", + **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( + "dbsystemshapename", self.ctx.args.dbsystemshapename, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2023-09-01", + 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={"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.available_core_count = AAZIntType( + serialized_name="availableCoreCount", + flags={"required": True, "read_only": True}, + ) + properties.available_core_count_per_node = AAZIntType( + serialized_name="availableCoreCountPerNode", + flags={"read_only": True}, + ) + properties.available_data_storage_in_tbs = AAZIntType( + serialized_name="availableDataStorageInTbs", + flags={"read_only": True}, + ) + properties.available_data_storage_per_server_in_tbs = AAZFloatType( + serialized_name="availableDataStoragePerServerInTbs", + flags={"read_only": True}, + ) + properties.available_db_node_per_node_in_gbs = AAZIntType( + serialized_name="availableDbNodePerNodeInGbs", + flags={"read_only": True}, + ) + properties.available_db_node_storage_in_gbs = AAZIntType( + serialized_name="availableDbNodeStorageInGbs", + flags={"read_only": True}, + ) + properties.available_memory_in_gbs = AAZIntType( + serialized_name="availableMemoryInGbs", + flags={"read_only": True}, + ) + properties.available_memory_per_node_in_gbs = AAZIntType( + serialized_name="availableMemoryPerNodeInGbs", + flags={"read_only": True}, + ) + properties.core_count_increment = AAZIntType( + serialized_name="coreCountIncrement", + flags={"read_only": True}, + ) + properties.max_storage_count = AAZIntType( + serialized_name="maxStorageCount", + flags={"read_only": True}, + ) + properties.maximum_node_count = AAZIntType( + serialized_name="maximumNodeCount", + flags={"read_only": True}, + ) + properties.min_core_count_per_node = AAZIntType( + serialized_name="minCoreCountPerNode", + flags={"read_only": True}, + ) + properties.min_data_storage_in_tbs = AAZIntType( + serialized_name="minDataStorageInTbs", + flags={"read_only": True}, + ) + properties.min_db_node_storage_per_node_in_gbs = AAZIntType( + serialized_name="minDbNodeStoragePerNodeInGbs", + flags={"read_only": True}, + ) + properties.min_memory_per_node_in_gbs = AAZIntType( + serialized_name="minMemoryPerNodeInGbs", + flags={"read_only": True}, + ) + properties.min_storage_count = AAZIntType( + serialized_name="minStorageCount", + flags={"read_only": True}, + ) + properties.minimum_core_count = AAZIntType( + serialized_name="minimumCoreCount", + flags={"read_only": True}, + ) + properties.minimum_node_count = AAZIntType( + serialized_name="minimumNodeCount", + flags={"read_only": True}, + ) + properties.runtime_minimum_core_count = AAZIntType( + serialized_name="runtimeMinimumCoreCount", + flags={"read_only": True}, + ) + properties.shape_family = AAZStrType( + serialized_name="shapeFamily", + flags={"read_only": 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/__cmd_group.py new file mode 100644 index 00000000000..46a0a6b204c --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/__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( + "oracle-database db-system", +) +class __CMDGroup(AAZCommandGroup): + """Manage Db System + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_create.py new file mode 100644 index 00000000000..f7ede7dd7a2 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_create.py @@ -0,0 +1,592 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database db-system create", +) +class Create(AAZCommand): + """Create a DbSystem + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/dbsystems/{}", "2025-09-01"], + ] + } + + 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.db_system_name = AAZStrArg( + options=["-n", "--name", "--db-system-name"], + help="The name of the DbSystem", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.admin_password = AAZPasswordArg( + options=["--admin-password"], + arg_group="Properties", + help="A strong password for SYS, SYSTEM, and PDB Admin. The password must be at least nine characters and contain at least two uppercase, two lowercase, two numbers, and two special characters. The special characters must be _, #, or -.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + blank=AAZPromptPasswordInput( + msg="Password:", + ), + ) + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + arg_group="Properties", + help="The cluster name for Exadata and 2-node RAC virtual machine DB systems. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.", + fmt=AAZStrArgFormat( + max_length=11, + min_length=1, + ), + ) + _args_schema.compute_count = AAZIntArg( + options=["--compute-count"], + arg_group="Properties", + help="The number of compute servers for the DB system.", + ) + _args_schema.compute_model = AAZStrArg( + options=["--compute-model"], + arg_group="Properties", + help="The compute model for Base Database Service. This is required if using the `computeCount` parameter. If using `cpuCoreCount` then it is an error to specify `computeModel` to a non-null value. The ECPU compute model is the recommended model, and the OCPU compute model is legacy.", + enum={"ECPU": "ECPU", "OCPU": "OCPU"}, + ) + _args_schema.database_edition = AAZStrArg( + options=["--database-edition"], + arg_group="Properties", + help="The Oracle Database Edition that applies to all the databases on the DB system. Exadata DB systems and 2-node RAC DB systems require EnterpriseEditionExtremePerformance.", + enum={"EnterpriseEdition": "EnterpriseEdition", "EnterpriseEditionDeveloper": "EnterpriseEditionDeveloper", "EnterpriseEditionExtreme": "EnterpriseEditionExtreme", "EnterpriseEditionHighPerformance": "EnterpriseEditionHighPerformance", "StandardEdition": "StandardEdition"}, + ) + _args_schema.db_system_options = AAZObjectArg( + options=["--db-system-options"], + arg_group="Properties", + help="The DB system options.", + ) + _args_schema.db_version = AAZStrArg( + options=["--db-version"], + arg_group="Properties", + help="A valid Oracle Database version. For a list of supported versions, use the ListDbVersions operation.", + ) + _args_schema.disk_redundancy = AAZStrArg( + options=["--disk-redundancy"], + arg_group="Properties", + help="The type of redundancy configured for the DB system. NORMAL is 2-way redundancy. HIGH is 3-way redundancy.", + enum={"High": "High", "Normal": "Normal"}, + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="The user-friendly name for the DB system. The name does not have to be unique.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.domain = AAZStrArg( + options=["--domain"], + arg_group="Properties", + help="The domain name for the DB system.", + ) + _args_schema.hostname = AAZStrArg( + options=["--hostname"], + arg_group="Properties", + help="The hostname for the DB system.", + ) + _args_schema.initial_data_storage_size_in_gb = AAZIntArg( + options=["--initial-data-storage-size-in-gb"], + arg_group="Properties", + help="Size in GB of the initial data volume that will be created and attached to a virtual machine DB system. You can scale up storage after provisioning, as needed. Note that the total storage size attached will be more than the amount you specify to allow for REDO/RECO space and software volume.", + default=256, + fmt=AAZIntArgFormat( + minimum=2, + ), + ) + _args_schema.license_model = AAZStrArg( + options=["--license-model"], + arg_group="Properties", + help="The Oracle license model that applies to all the databases on the DB system. The default is LicenseIncluded.", + default="LicenseIncluded", + enum={"BringYourOwnLicense": "BringYourOwnLicense", "LicenseIncluded": "LicenseIncluded"}, + ) + _args_schema.network_anchor_id = AAZResourceIdArg( + options=["--network-anchor-id"], + arg_group="Properties", + help="Azure Network Anchor ID", + ) + _args_schema.node_count = AAZIntArg( + options=["--node-count"], + arg_group="Properties", + help="The number of nodes in the DB system. For RAC DB systems, the value is greater than 1.", + default=1, + fmt=AAZIntArgFormat( + minimum=1, + ), + ) + _args_schema.pdb_name = AAZStrArg( + options=["--pdb-name"], + arg_group="Properties", + help="The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.", + ) + _args_schema.resource_anchor_id = AAZResourceIdArg( + options=["--resource-anchor-id"], + arg_group="Properties", + help="Azure Resource Anchor ID", + ) + _args_schema.shape = AAZStrArg( + options=["--shape"], + arg_group="Properties", + help="The shape of the DB system. The shape determines resources to allocate to the DB system. For virtual machine shapes, the number of CPU cores and memory. For bare metal and Exadata shapes, the number of CPU cores, storage, and memory.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.ssh_public_keys = AAZListArg( + options=["--ssh-public-keys"], + arg_group="Properties", + help="The public key portion of one or more key pairs used for SSH access to the DB system.", + ) + _args_schema.storage_volume_performance_mode = AAZStrArg( + options=["--storage-volume-performance-mode"], + arg_group="Properties", + help="The block storage volume performance level. Valid values are Balanced and HighPerformance. See [Block Volume Performance](/Content/Block/Concepts/blockvolumeperformance.htm) for more information.", + enum={"Balanced": "Balanced", "HighPerformance": "HighPerformance"}, + ) + _args_schema.time_zone = AAZStrArg( + options=["--time-zone"], + arg_group="Properties", + help="The time zone of the DB system, e.g., UTC, to set the timeZone as UTC.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + + db_system_options = cls._args_schema.db_system_options + db_system_options.storage_management = AAZStrArg( + options=["storage-management"], + help="The storage option used in DB system. ASM - Automatic storage management, LVM - Logical Volume management.", + enum={"LVM": "LVM"}, + ) + + ssh_public_keys = cls._args_schema.ssh_public_keys + ssh_public_keys.Element = AAZStrArg( + fmt=AAZStrArgFormat( + max_length=1024, + min_length=1, + ), + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _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.", + ) + _args_schema.zones = AAZListArg( + options=["--zones"], + arg_group="Resource", + help="The availability zones.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + zones = cls._args_schema.zones + zones.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.DbSystemsCreateOrUpdate(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 DbSystemsCreateOrUpdate(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/Oracle.Database/dbSystems/{dbSystemName}", + **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( + "dbSystemName", self.ctx.args.db_system_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", "2025-09-01", + 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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + _builder.set_prop("zones", AAZListType, ".zones") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("adminPassword", AAZStrType, ".admin_password", typ_kwargs={"flags": {"secret": True}}) + properties.set_prop("clusterName", AAZStrType, ".cluster_name") + properties.set_prop("computeCount", AAZIntType, ".compute_count") + properties.set_prop("computeModel", AAZStrType, ".compute_model") + properties.set_prop("databaseEdition", AAZStrType, ".database_edition", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("dbSystemOptions", AAZObjectType, ".db_system_options") + properties.set_prop("dbVersion", AAZStrType, ".db_version", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("diskRedundancy", AAZStrType, ".disk_redundancy") + properties.set_prop("displayName", AAZStrType, ".display_name") + properties.set_prop("domain", AAZStrType, ".domain") + properties.set_prop("hostname", AAZStrType, ".hostname", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("initialDataStorageSizeInGb", AAZIntType, ".initial_data_storage_size_in_gb") + properties.set_prop("licenseModel", AAZStrType, ".license_model") + properties.set_prop("networkAnchorId", AAZStrType, ".network_anchor_id", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("nodeCount", AAZIntType, ".node_count") + properties.set_prop("pdbName", AAZStrType, ".pdb_name") + properties.set_prop("resourceAnchorId", AAZStrType, ".resource_anchor_id", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("shape", AAZStrType, ".shape", typ_kwargs={"flags": {"required": True}}) + properties.set_const("source", "None", AAZStrType, ".", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("sshPublicKeys", AAZListType, ".ssh_public_keys", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("storageVolumePerformanceMode", AAZStrType, ".storage_volume_performance_mode") + properties.set_prop("timeZone", AAZStrType, ".time_zone") + + db_system_options = _builder.get(".properties.dbSystemOptions") + if db_system_options is not None: + db_system_options.set_prop("storageManagement", AAZStrType, ".storage_management") + + ssh_public_keys = _builder.get(".properties.sshPublicKeys") + if ssh_public_keys is not None: + ssh_public_keys.set_elements(AAZStrType, ".") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + zones = _builder.get(".zones") + if zones is not None: + zones.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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType( + flags={"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}, + ) + _schema_on_200_201.zones = AAZListType() + + properties = cls._schema_on_200_201.properties + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + flags={"required": True}, + ) + properties.db_system_options = AAZObjectType( + serialized_name="dbSystemOptions", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + flags={"required": True}, + ) + properties.disk_redundancy = AAZStrType( + serialized_name="diskRedundancy", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.domain = AAZStrType() + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.network_anchor_id = AAZStrType( + serialized_name="networkAnchorId", + flags={"required": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_ips = AAZListType( + serialized_name="scanIps", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.source = AAZStrType( + flags={"required": True}, + ) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.storage_volume_performance_mode = AAZStrType( + serialized_name="storageVolumePerformanceMode", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + db_system_options = cls._schema_on_200_201.properties.db_system_options + db_system_options.storage_management = AAZStrType( + serialized_name="storageManagement", + ) + + scan_ips = cls._schema_on_200_201.properties.scan_ips + scan_ips.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200_201.properties.ssh_public_keys + ssh_public_keys.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", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200_201.zones + zones.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_delete.py new file mode 100644 index 00000000000..3876d10f451 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_delete.py @@ -0,0 +1,163 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database db-system delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a DbSystem + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/dbsystems/{}", "2025-09-01"], + ] + } + + 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.db_system_name = AAZStrArg( + options=["-n", "--name", "--db-system-name"], + help="The name of the DbSystem", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.DbSystemsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class DbSystemsDelete(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": "location"}, + 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": "location"}, + 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": "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/Oracle.Database/dbSystems/{dbSystemName}", + **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( + "dbSystemName", self.ctx.args.db_system_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", "2025-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_list.py new file mode 100644 index 00000000000..25c24c2588d --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_list.py @@ -0,0 +1,585 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database db-system list", +) +class List(AAZCommand): + """List DbSystem resources by subscription ID + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/dbsystems", "2025-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/dbsystems", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.DbSystemsListBySubscription(ctx=self.ctx)() + if condition_1: + self.DbSystemsListByResourceGroup(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 DbSystemsListBySubscription(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/Oracle.Database/dbSystems", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType() + + properties = cls._schema_on_200.value.Element.properties + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + flags={"required": True}, + ) + properties.db_system_options = AAZObjectType( + serialized_name="dbSystemOptions", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + flags={"required": True}, + ) + properties.disk_redundancy = AAZStrType( + serialized_name="diskRedundancy", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.domain = AAZStrType() + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.network_anchor_id = AAZStrType( + serialized_name="networkAnchorId", + flags={"required": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_ips = AAZListType( + serialized_name="scanIps", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.source = AAZStrType( + flags={"required": True}, + ) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.storage_volume_performance_mode = AAZStrType( + serialized_name="storageVolumePerformanceMode", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + db_system_options = cls._schema_on_200.value.Element.properties.db_system_options + db_system_options.storage_management = AAZStrType( + serialized_name="storageManagement", + ) + + scan_ips = cls._schema_on_200.value.Element.properties.scan_ips + scan_ips.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.value.Element.properties.ssh_public_keys + ssh_public_keys.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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.value.Element.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + class DbSystemsListByResourceGroup(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/Oracle.Database/dbSystems", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType() + + properties = cls._schema_on_200.value.Element.properties + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + flags={"required": True}, + ) + properties.db_system_options = AAZObjectType( + serialized_name="dbSystemOptions", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + flags={"required": True}, + ) + properties.disk_redundancy = AAZStrType( + serialized_name="diskRedundancy", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.domain = AAZStrType() + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.network_anchor_id = AAZStrType( + serialized_name="networkAnchorId", + flags={"required": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_ips = AAZListType( + serialized_name="scanIps", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.source = AAZStrType( + flags={"required": True}, + ) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.storage_volume_performance_mode = AAZStrType( + serialized_name="storageVolumePerformanceMode", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + db_system_options = cls._schema_on_200.value.Element.properties.db_system_options + db_system_options.storage_management = AAZStrType( + serialized_name="storageManagement", + ) + + scan_ips = cls._schema_on_200.value.Element.properties.scan_ips + scan_ips.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.value.Element.properties.ssh_public_keys + ssh_public_keys.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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.value.Element.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_show.py new file mode 100644 index 00000000000..d5609ef6dc9 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_show.py @@ -0,0 +1,329 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database db-system show", +) +class Show(AAZCommand): + """Get a DbSystem + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/dbsystems/{}", "2025-09-01"], + ] + } + + 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.db_system_name = AAZStrArg( + options=["-n", "--name", "--db-system-name"], + help="The name of the DbSystem", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DbSystemsGet(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 DbSystemsGet(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/Oracle.Database/dbSystems/{dbSystemName}", + **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( + "dbSystemName", self.ctx.args.db_system_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + flags={"required": True}, + ) + properties.db_system_options = AAZObjectType( + serialized_name="dbSystemOptions", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + flags={"required": True}, + ) + properties.disk_redundancy = AAZStrType( + serialized_name="diskRedundancy", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.domain = AAZStrType() + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.network_anchor_id = AAZStrType( + serialized_name="networkAnchorId", + flags={"required": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_ips = AAZListType( + serialized_name="scanIps", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.source = AAZStrType( + flags={"required": True}, + ) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.storage_volume_performance_mode = AAZStrType( + serialized_name="storageVolumePerformanceMode", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + db_system_options = cls._schema_on_200.properties.db_system_options + db_system_options.storage_management = AAZStrType( + serialized_name="storageManagement", + ) + + scan_ips = cls._schema_on_200.properties.scan_ips + scan_ips.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys + ssh_public_keys.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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_update.py new file mode 100644 index 00000000000..9c2874a5960 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_update.py @@ -0,0 +1,541 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database db-system update", +) +class Update(AAZCommand): + """Update a DbSystem + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/dbsystems/{}", "2025-09-01"], + ] + } + + 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.db_system_name = AAZStrArg( + options=["-n", "--name", "--db-system-name"], + help="The name of the DbSystem", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + nullable=True, + ) + _args_schema.zones = AAZListArg( + options=["--zones"], + arg_group="Resource", + help="The availability zones.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + zones = cls._args_schema.zones + zones.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DbSystemsGet(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.DbSystemsCreateOrUpdate(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 DbSystemsGet(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/Oracle.Database/dbSystems/{dbSystemName}", + **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( + "dbSystemName", self.ctx.args.db_system_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", "2025-09-01", + 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_db_system_read(cls._schema_on_200) + + return cls._schema_on_200 + + class DbSystemsCreateOrUpdate(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/Oracle.Database/dbSystems/{dbSystemName}", + **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( + "dbSystemName", self.ctx.args.db_system_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", "2025-09-01", + 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_db_system_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("tags", AAZDictType, ".tags") + _builder.set_prop("zones", AAZListType, ".zones") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + zones = _builder.get(".zones") + if zones is not None: + zones.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_db_system_read = None + + @classmethod + def _build_schema_db_system_read(cls, _schema): + if cls._schema_db_system_read is not None: + _schema.id = cls._schema_db_system_read.id + _schema.location = cls._schema_db_system_read.location + _schema.name = cls._schema_db_system_read.name + _schema.properties = cls._schema_db_system_read.properties + _schema.system_data = cls._schema_db_system_read.system_data + _schema.tags = cls._schema_db_system_read.tags + _schema.type = cls._schema_db_system_read.type + _schema.zones = cls._schema_db_system_read.zones + return + + cls._schema_db_system_read = _schema_db_system_read = AAZObjectType() + + db_system_read = _schema_db_system_read + db_system_read.id = AAZStrType( + flags={"read_only": True}, + ) + db_system_read.location = AAZStrType( + flags={"required": True}, + ) + db_system_read.name = AAZStrType( + flags={"read_only": True}, + ) + db_system_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + db_system_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + db_system_read.tags = AAZDictType() + db_system_read.type = AAZStrType( + flags={"read_only": True}, + ) + db_system_read.zones = AAZListType() + + properties = _schema_db_system_read.properties + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + flags={"required": True}, + ) + properties.db_system_options = AAZObjectType( + serialized_name="dbSystemOptions", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + flags={"required": True}, + ) + properties.disk_redundancy = AAZStrType( + serialized_name="diskRedundancy", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.domain = AAZStrType() + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.network_anchor_id = AAZStrType( + serialized_name="networkAnchorId", + flags={"required": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_ips = AAZListType( + serialized_name="scanIps", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.source = AAZStrType( + flags={"required": True}, + ) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.storage_volume_performance_mode = AAZStrType( + serialized_name="storageVolumePerformanceMode", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + db_system_options = _schema_db_system_read.properties.db_system_options + db_system_options.storage_management = AAZStrType( + serialized_name="storageManagement", + ) + + scan_ips = _schema_db_system_read.properties.scan_ips + scan_ips.Element = AAZStrType() + + ssh_public_keys = _schema_db_system_read.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + system_data = _schema_db_system_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_db_system_read.tags + tags.Element = AAZStrType() + + zones = _schema_db_system_read.zones + zones.Element = AAZStrType() + + _schema.id = cls._schema_db_system_read.id + _schema.location = cls._schema_db_system_read.location + _schema.name = cls._schema_db_system_read.name + _schema.properties = cls._schema_db_system_read.properties + _schema.system_data = cls._schema_db_system_read.system_data + _schema.tags = cls._schema_db_system_read.tags + _schema.type = cls._schema_db_system_read.type + _schema.zones = cls._schema_db_system_read.zones + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_wait.py new file mode 100644 index 00000000000..79091d2ab9e --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system/_wait.py @@ -0,0 +1,328 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database db-system wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/dbsystems/{}", "2025-09-01"], + ] + } + + 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.db_system_name = AAZStrArg( + options=["-n", "--name", "--db-system-name"], + help="The name of the DbSystem", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DbSystemsGet(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 DbSystemsGet(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/Oracle.Database/dbSystems/{dbSystemName}", + **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( + "dbSystemName", self.ctx.args.db_system_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType( + flags={"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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.compute_count = AAZIntType( + serialized_name="computeCount", + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + ) + properties.data_storage_size_in_gbs = AAZIntType( + serialized_name="dataStorageSizeInGbs", + flags={"read_only": True}, + ) + properties.database_edition = AAZStrType( + serialized_name="databaseEdition", + flags={"required": True}, + ) + properties.db_system_options = AAZObjectType( + serialized_name="dbSystemOptions", + ) + properties.db_version = AAZStrType( + serialized_name="dbVersion", + flags={"required": True}, + ) + properties.disk_redundancy = AAZStrType( + serialized_name="diskRedundancy", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + ) + properties.domain = AAZStrType() + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.network_anchor_id = AAZStrType( + serialized_name="networkAnchorId", + flags={"required": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_ips = AAZListType( + serialized_name="scanIps", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.source = AAZStrType( + flags={"required": True}, + ) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.storage_volume_performance_mode = AAZStrType( + serialized_name="storageVolumePerformanceMode", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.version = AAZStrType( + flags={"read_only": True}, + ) + + db_system_options = cls._schema_on_200.properties.db_system_options + db_system_options.storage_management = AAZStrType( + serialized_name="storageManagement", + ) + + scan_ips = cls._schema_on_200.properties.scan_ips + scan_ips.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys + ssh_public_keys.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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/__cmd_group.py new file mode 100644 index 00000000000..875b0ecc6be --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/__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( + "oracle-database db-system-db-version", +) +class __CMDGroup(AAZCommandGroup): + """Manage Db System Db Version + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/__init__.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: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/_list.py new file mode 100644 index 00000000000..1ceddc6461a --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/_list.py @@ -0,0 +1,264 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database db-system-db-version list", +) +class List(AAZCommand): + """List DbVersion resources by SubscriptionLocationResource + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dbsystemdbversions", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.location = AAZResourceLocationArg( + required=True, + ) + _args_schema.db_system_id = AAZStrArg( + options=["--db-system-id"], + help="The DB system AzureId. If provided, filters the results to the set of database versions which are supported for the DB system.", + ) + _args_schema.db_system_shape = AAZStrArg( + options=["--db-system-shape"], + help="If provided, filters the results to the set of database versions which are supported for the given shape. e.g., VM.Standard.E5.Flex", + enum={"VM.Standard.x86": "VM.Standard.x86"}, + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.is_database_software_image_supported = AAZBoolArg( + options=["--is-database-software-image-supported"], + help="If true, filters the results to the set of Oracle Database versions that are supported for the database software images.", + ) + _args_schema.is_upgrade_supported = AAZBoolArg( + options=["--is-upgrade-supported"], + help="If true, filters the results to the set of database versions which are supported for Upgrade.", + ) + _args_schema.shape_family = AAZStrArg( + options=["--shape-family"], + help="If provided, filters the results to the set of database versions which are supported for the given shape family.", + enum={"EXADATA": "EXADATA", "EXADB_XS": "EXADB_XS", "SINGLENODE": "SINGLENODE", "VIRTUALMACHINE": "VIRTUALMACHINE"}, + ) + _args_schema.storage_management = AAZStrArg( + options=["--storage-management"], + help="The DB system storage management option. Used to list database versions available for that storage manager. Valid values are ASM and LVM.", + enum={"LVM": "LVM"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DbVersionsListByLocation(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 DbVersionsListByLocation(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/Oracle.Database/locations/{location}/dbSystemDbVersions", + **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( + "location", self.ctx.args.location, + 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( + "dbSystemId", self.ctx.args.db_system_id, + ), + **self.serialize_query_param( + "dbSystemShape", self.ctx.args.db_system_shape, + ), + **self.serialize_query_param( + "isDatabaseSoftwareImageSupported", self.ctx.args.is_database_software_image_supported, + ), + **self.serialize_query_param( + "isUpgradeSupported", self.ctx.args.is_upgrade_supported, + ), + **self.serialize_query_param( + "shapeFamily", self.ctx.args.shape_family, + ), + **self.serialize_query_param( + "storageManagement", self.ctx.args.storage_management, + ), + **self.serialize_query_param( + "api-version", "2025-09-01", + 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() + _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.is_latest_for_major_version = AAZBoolType( + serialized_name="isLatestForMajorVersion", + ) + properties.is_preview_db_version = AAZBoolType( + serialized_name="isPreviewDbVersion", + ) + properties.is_upgrade_supported = AAZBoolType( + serialized_name="isUpgradeSupported", + ) + properties.supports_pdb = AAZBoolType( + serialized_name="supportsPdb", + ) + properties.version = 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/_show.py new file mode 100644 index 00000000000..32aeb700317 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/db_system_db_version/_show.py @@ -0,0 +1,216 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database db-system-db-version show", +) +class Show(AAZCommand): + """Get a DbVersion + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dbsystemdbversions/{}", "2025-09-01"], + ] + } + + 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.dbversionsname = AAZStrArg( + options=["-n", "--name", "--dbversionsname"], + help="DbVersion name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DbVersionsGet(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 DbVersionsGet(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/Oracle.Database/locations/{location}/dbSystemDbVersions/{dbversionsname}", + **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( + "dbversionsname", self.ctx.args.dbversionsname, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.is_latest_for_major_version = AAZBoolType( + serialized_name="isLatestForMajorVersion", + ) + properties.is_preview_db_version = AAZBoolType( + serialized_name="isPreviewDbVersion", + ) + properties.is_upgrade_supported = AAZBoolType( + serialized_name="isUpgradeSupported", + ) + properties.supports_pdb = AAZBoolType( + serialized_name="supportsPdb", + ) + properties.version = 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/__init__.py index d63ae5a6fc9..2df85698253 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/__init__.py @@ -10,3 +10,4 @@ from .__cmd_group import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/_list.py index 3291eefb3dd..2ec6235daf1 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dnsprivateviews", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dnsprivateviews", "2025-09-01"], ] } @@ -112,7 +112,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -162,9 +162,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -176,14 +174,15 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.value.Element.properties properties.display_name = AAZStrType( serialized_name="displayName", - flags={"read_only": True}, + flags={"required": True}, ) properties.is_protected = AAZBoolType( serialized_name="isProtected", - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"required": True}, ) properties.ocid = AAZStrType( flags={"required": True}, @@ -193,15 +192,15 @@ def _build_schema_on_200(cls): flags={"read_only": True}, ) properties.self = AAZStrType( - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.time_created = AAZStrType( serialized_name="timeCreated", - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.time_updated = AAZStrType( serialized_name="timeUpdated", - flags={"required": True, "read_only": True}, + flags={"required": True}, ) system_data = cls._schema_on_200.value.Element.system_data diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/_show.py new file mode 100644 index 00000000000..98fd6ae4472 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_view/_show.py @@ -0,0 +1,236 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database dns-private-view show", +) +class Show(AAZCommand): + """Get a DnsPrivateView + + :example: Get DNS Private View + az oracle-database dns-private-view show --location --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dnsprivateviews/{}", "2025-09-01"], + ] + } + + 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.dnsprivateviewocid = AAZStrArg( + options=["-n", "--name", "--dnsprivateviewocid"], + help="DnsPrivateView OCID", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=255, + min_length=1, + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DnsPrivateViewsGet(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 DnsPrivateViewsGet(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/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}", + **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( + "dnsprivateviewocid", self.ctx.args.dnsprivateviewocid, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.is_protected = AAZBoolType( + serialized_name="isProtected", + flags={"required": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"required": True}, + ) + properties.ocid = AAZStrType( + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.self = AAZStrType( + flags={"required": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"required": True}, + ) + properties.time_updated = AAZStrType( + serialized_name="timeUpdated", + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/__init__.py index d63ae5a6fc9..2df85698253 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/__init__.py @@ -10,3 +10,4 @@ from .__cmd_group import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/_list.py index 2400e83484b..56a80f02323 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dnsprivatezones", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dnsprivatezones", "2025-09-01"], ] } @@ -112,7 +112,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "api-version", "2025-09-01", required=True, ), } @@ -162,9 +162,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -176,10 +174,11 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.value.Element.properties properties.is_protected = AAZBoolType( serialized_name="isProtected", - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.lifecycle_state = AAZStrType( serialized_name="lifecycleState", + flags={"required": True}, ) properties.ocid = AAZStrType( flags={"required": True}, @@ -189,17 +188,17 @@ def _build_schema_on_200(cls): flags={"read_only": True}, ) properties.self = AAZStrType( - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.serial = AAZIntType( - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.time_created = AAZStrType( serialized_name="timeCreated", - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.version = AAZStrType( - flags={"required": True, "read_only": True}, + flags={"required": True}, ) properties.view_id = AAZStrType( serialized_name="viewId", diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/_show.py new file mode 100644 index 00000000000..fdf42bccff5 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/dns_private_zone/_show.py @@ -0,0 +1,239 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database dns-private-zone show", +) +class Show(AAZCommand): + """Get a DnsPrivateZone + + :example: Get DNS Private Zone + az oracle-database dns-private-zone show --location --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/dnsprivatezones/{}", "2025-09-01"], + ] + } + + 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.dnsprivatezonename = AAZStrArg( + options=["-n", "--name", "--dnsprivatezonename"], + help="DnsPrivateZone name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.DnsPrivateZonesGet(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 DnsPrivateZonesGet(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/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}", + **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( + "dnsprivatezonename", self.ctx.args.dnsprivatezonename, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.is_protected = AAZBoolType( + serialized_name="isProtected", + flags={"required": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"required": True}, + ) + properties.ocid = AAZStrType( + flags={"required": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.self = AAZStrType( + flags={"required": True}, + ) + properties.serial = AAZIntType( + flags={"required": True}, + ) + properties.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"required": True}, + ) + properties.version = AAZStrType( + flags={"required": True}, + ) + properties.view_id = AAZStrType( + serialized_name="viewId", + ) + properties.zone_type = AAZStrType( + serialized_name="zoneType", + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/__cmd_group.py new file mode 100644 index 00000000000..d0ee6743397 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/__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( + "oracle-database exadb-vm-cluster", +) +class __CMDGroup(AAZCommandGroup): + """Manage Exadb Vm Cluster + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/__init__.py new file mode 100644 index 00000000000..fdc6275f237 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/__init__.py @@ -0,0 +1,18 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._remove_vm import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_create.py new file mode 100644 index 00000000000..d46faf6e938 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_create.py @@ -0,0 +1,806 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster create", +) +class Create(AAZCommand): + """Create a ExadbVmCluster + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}", "2025-09-01"], + ] + } + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["-n", "--name", "--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.backup_subnet_cidr = AAZStrArg( + options=["--backup-subnet-cidr"], + arg_group="Properties", + help="Client OCI backup subnet CIDR, default is 192.168.252.0/22", + fmt=AAZStrArgFormat( + max_length=32, + min_length=1, + ), + ) + _args_schema.cluster_name = AAZStrArg( + options=["--cluster-name"], + arg_group="Properties", + help="The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.", + fmt=AAZStrArgFormat( + max_length=11, + min_length=1, + ), + ) + _args_schema.data_collection_options = AAZObjectArg( + options=["--data-collection-options"], + arg_group="Properties", + help="Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS.", + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="Display Name", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.domain = AAZStrArg( + options=["--domain"], + arg_group="Properties", + help="A domain name used for the Exadata VM cluster on Exascale Infrastructure", + ) + _args_schema.enabled_ecpu_count = AAZIntArg( + options=["--enabled-ecpu-count"], + arg_group="Properties", + help="The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure.", + fmt=AAZIntArgFormat( + minimum=0, + ), + ) + _args_schema.exascale_db_storage_vault_id = AAZStrArg( + options=["--exascale-db-storage-vault-id"], + arg_group="Properties", + help="The Azure Resource ID of the Exadata Database Storage Vault.", + ) + _args_schema.grid_image_ocid = AAZStrArg( + options=["--grid-image-ocid"], + arg_group="Properties", + help="Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.hostname = AAZStrArg( + options=["--hostname"], + arg_group="Properties", + help="The hostname for the Exadata VM cluster on Exascale Infrastructure.", + fmt=AAZStrArgFormat( + max_length=12, + min_length=1, + ), + ) + _args_schema.license_model = AAZStrArg( + options=["--license-model"], + arg_group="Properties", + help="The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. ", + enum={"BringYourOwnLicense": "BringYourOwnLicense", "LicenseIncluded": "LicenseIncluded"}, + ) + _args_schema.node_count = AAZIntArg( + options=["--node-count"], + arg_group="Properties", + help="The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + ) + _args_schema.nsg_cidrs = AAZListArg( + options=["--nsg-cidrs"], + arg_group="Properties", + help="CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + ) + _args_schema.private_zone_ocid = AAZStrArg( + options=["--private-zone-ocid"], + arg_group="Properties", + help="The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.scan_listener_port_tcp = AAZIntArg( + options=["--scan-listener-port-tcp"], + arg_group="Properties", + help="The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + ) + _args_schema.scan_listener_port_tcp_ssl = AAZIntArg( + options=["--scan-listener-port-tcp-ssl"], + arg_group="Properties", + help="The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + ) + _args_schema.shape = AAZStrArg( + options=["--shape"], + arg_group="Properties", + help="The shape of the Exadata VM cluster on Exascale Infrastructure resource", + ) + _args_schema.shape_attribute = AAZStrArg( + options=["--shape-attribute"], + arg_group="Properties", + help="The type of Exascale storage used for Exadata VM cluster.", + enum={"BLOCK_STORAGE": "BLOCK_STORAGE", "SMART_STORAGE": "SMART_STORAGE"}, + ) + _args_schema.ssh_public_keys = AAZListArg( + options=["--ssh-public-keys"], + arg_group="Properties", + help="The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure.", + ) + _args_schema.subnet_id = AAZStrArg( + options=["--subnet-id"], + arg_group="Properties", + help="Client subnet", + ) + _args_schema.system_version = AAZStrArg( + options=["--system-version"], + arg_group="Properties", + help="Operating system version of the image.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.time_zone = AAZStrArg( + options=["--time-zone"], + arg_group="Properties", + help="The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.total_ecpu_count = AAZIntArg( + options=["--total-ecpu-count"], + arg_group="Properties", + help="The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure.", + fmt=AAZIntArgFormat( + minimum=2, + ), + ) + _args_schema.vm_file_system_storage = AAZObjectArg( + options=["--vm-file-system-storage"], + arg_group="Properties", + help="Filesystem storage details.", + ) + _args_schema.vnet_id = AAZStrArg( + options=["--vnet-id"], + arg_group="Properties", + help="VNET for network connectivity", + ) + + data_collection_options = cls._args_schema.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolArg( + options=["is-diagnostics-events-enabled"], + help="Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + default=False, + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolArg( + options=["is-health-monitoring-enabled"], + help="Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + default=False, + ) + data_collection_options.is_incident_logs_enabled = AAZBoolArg( + options=["is-incident-logs-enabled"], + help="Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + default=False, + ) + + nsg_cidrs = cls._args_schema.nsg_cidrs + nsg_cidrs.Element = AAZObjectArg() + + _element = cls._args_schema.nsg_cidrs.Element + _element.destination_port_range = AAZObjectArg( + options=["destination-port-range"], + help="Destination port range to specify particular destination ports for TCP rules.", + ) + _element.source = AAZStrArg( + options=["source"], + help="Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.", + required=True, + fmt=AAZStrArgFormat( + max_length=128, + min_length=1, + ), + ) + + destination_port_range = cls._args_schema.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntArg( + options=["max"], + help="The maximum port number, which must not be less than the minimum port number. To specify a single port number, set both the min and max to the same value.", + required=True, + fmt=AAZIntArgFormat( + maximum=65535, + minimum=1, + ), + ) + destination_port_range.min = AAZIntArg( + options=["min"], + help="The minimum port number, which must not be greater than the maximum port number.", + required=True, + fmt=AAZIntArgFormat( + maximum=65535, + minimum=1, + ), + ) + + ssh_public_keys = cls._args_schema.ssh_public_keys + ssh_public_keys.Element = AAZStrArg() + + vm_file_system_storage = cls._args_schema.vm_file_system_storage + vm_file_system_storage.total_size_in_gbs = AAZIntArg( + options=["total-size-in-gbs"], + help="Total Capacity", + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _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.", + ) + _args_schema.zones = AAZListArg( + options=["--zones"], + arg_group="Resource", + help="The availability zones.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + zones = cls._args_schema.zones + zones.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ExadbVmClustersCreateOrUpdate(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 ExadbVmClustersCreateOrUpdate(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_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", "2025-09-01", + 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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + _builder.set_prop("zones", AAZListType, ".zones") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("backupSubnetCidr", AAZStrType, ".backup_subnet_cidr") + properties.set_prop("clusterName", AAZStrType, ".cluster_name") + properties.set_prop("dataCollectionOptions", AAZObjectType, ".data_collection_options") + properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("domain", AAZStrType, ".domain") + properties.set_prop("enabledEcpuCount", AAZIntType, ".enabled_ecpu_count", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("exascaleDbStorageVaultId", AAZStrType, ".exascale_db_storage_vault_id", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("gridImageOcid", AAZStrType, ".grid_image_ocid") + properties.set_prop("hostname", AAZStrType, ".hostname", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("licenseModel", AAZStrType, ".license_model") + properties.set_prop("nodeCount", AAZIntType, ".node_count", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("nsgCidrs", AAZListType, ".nsg_cidrs") + properties.set_prop("privateZoneOcid", AAZStrType, ".private_zone_ocid") + properties.set_prop("scanListenerPortTcp", AAZIntType, ".scan_listener_port_tcp") + properties.set_prop("scanListenerPortTcpSsl", AAZIntType, ".scan_listener_port_tcp_ssl") + properties.set_prop("shape", AAZStrType, ".shape", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("shapeAttribute", AAZStrType, ".shape_attribute") + properties.set_prop("sshPublicKeys", AAZListType, ".ssh_public_keys", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("subnetId", AAZStrType, ".subnet_id", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("systemVersion", AAZStrType, ".system_version") + properties.set_prop("timeZone", AAZStrType, ".time_zone") + properties.set_prop("totalEcpuCount", AAZIntType, ".total_ecpu_count", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("vmFileSystemStorage", AAZObjectType, ".vm_file_system_storage", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("vnetId", AAZStrType, ".vnet_id", typ_kwargs={"flags": {"required": True}}) + + data_collection_options = _builder.get(".properties.dataCollectionOptions") + if data_collection_options is not None: + data_collection_options.set_prop("isDiagnosticsEventsEnabled", AAZBoolType, ".is_diagnostics_events_enabled") + data_collection_options.set_prop("isHealthMonitoringEnabled", AAZBoolType, ".is_health_monitoring_enabled") + data_collection_options.set_prop("isIncidentLogsEnabled", AAZBoolType, ".is_incident_logs_enabled") + + nsg_cidrs = _builder.get(".properties.nsgCidrs") + if nsg_cidrs is not None: + nsg_cidrs.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.nsgCidrs[]") + if _elements is not None: + _elements.set_prop("destinationPortRange", AAZObjectType, ".destination_port_range") + _elements.set_prop("source", AAZStrType, ".source", typ_kwargs={"flags": {"required": True}}) + + destination_port_range = _builder.get(".properties.nsgCidrs[].destinationPortRange") + if destination_port_range is not None: + destination_port_range.set_prop("max", AAZIntType, ".max", typ_kwargs={"flags": {"required": True}}) + destination_port_range.set_prop("min", AAZIntType, ".min", typ_kwargs={"flags": {"required": True}}) + + ssh_public_keys = _builder.get(".properties.sshPublicKeys") + if ssh_public_keys is not None: + ssh_public_keys.set_elements(AAZStrType, ".") + + vm_file_system_storage = _builder.get(".properties.vmFileSystemStorage") + if vm_file_system_storage is not None: + vm_file_system_storage.set_prop("totalSizeInGbs", AAZIntType, ".total_size_in_gbs", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + zones = _builder.get(".zones") + if zones is not None: + zones.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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _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}, + ) + _schema_on_200_201.zones = AAZListType() + + properties = cls._schema_on_200_201.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.backup_subnet_ocid = AAZStrType( + serialized_name="backupSubnetOcid", + flags={"read_only": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.enabled_ecpu_count = AAZIntType( + serialized_name="enabledEcpuCount", + flags={"required": True}, + ) + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + flags={"required": True}, + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"read_only": True}, + ) + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.grid_image_type = AAZStrType( + serialized_name="gridImageType", + flags={"read_only": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"required": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.private_zone_ocid = AAZStrType( + serialized_name="privateZoneOcid", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.shape_attribute = AAZStrType( + serialized_name="shapeAttribute", + ) + properties.snapshot_file_system_storage = AAZObjectType( + serialized_name="snapshotFileSystemStorage", + flags={"read_only": True}, + ) + _CreateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.snapshot_file_system_storage) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.total_ecpu_count = AAZIntType( + serialized_name="totalEcpuCount", + flags={"required": True}, + ) + properties.total_file_system_storage = AAZObjectType( + serialized_name="totalFileSystemStorage", + flags={"read_only": True}, + ) + _CreateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.total_file_system_storage) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vm_file_system_storage = AAZObjectType( + serialized_name="vmFileSystemStorage", + flags={"required": True}, + ) + _CreateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.vm_file_system_storage) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_ocid = AAZStrType( + serialized_name="zoneOcid", + flags={"read_only": True}, + ) + + data_collection_options = cls._schema_on_200_201.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + iorm_config_cache = cls._schema_on_200_201.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200_201.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200_201.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200_201.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200_201.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200_201.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200_201.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200_201.zones + zones.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + _schema_exadbvmclusterstoragedetails_read = None + + @classmethod + def _build_schema_exadbvmclusterstoragedetails_read(cls, _schema): + if cls._schema_exadbvmclusterstoragedetails_read is not None: + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + return + + cls._schema_exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read = AAZObjectType() + + exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read + exadbvmclusterstoragedetails_read.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + flags={"required": True}, + ) + + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + + +__all__ = ["Create"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_delete.py new file mode 100644 index 00000000000..1198a9930fa --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_delete.py @@ -0,0 +1,163 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a ExadbVmCluster + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}", "2025-09-01"], + ] + } + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["-n", "--name", "--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ExadbVmClustersDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ExadbVmClustersDelete(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": "location"}, + 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": "location"}, + 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": "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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_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", "2025-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_list.py new file mode 100644 index 00000000000..ff785eff22a --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_list.py @@ -0,0 +1,815 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster list", +) +class List(AAZCommand): + """List ExadbVmCluster resources by subscription ID + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/exadbvmclusters", "2025-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.ExadbVmClustersListBySubscription(ctx=self.ctx)() + if condition_1: + self.ExadbVmClustersListByResourceGroup(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 ExadbVmClustersListBySubscription(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/Oracle.Database/exadbVmClusters", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType() + + properties = cls._schema_on_200.value.Element.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.backup_subnet_ocid = AAZStrType( + serialized_name="backupSubnetOcid", + flags={"read_only": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.enabled_ecpu_count = AAZIntType( + serialized_name="enabledEcpuCount", + flags={"required": True}, + ) + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + flags={"required": True}, + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"read_only": True}, + ) + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.grid_image_type = AAZStrType( + serialized_name="gridImageType", + flags={"read_only": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"required": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.private_zone_ocid = AAZStrType( + serialized_name="privateZoneOcid", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.shape_attribute = AAZStrType( + serialized_name="shapeAttribute", + ) + properties.snapshot_file_system_storage = AAZObjectType( + serialized_name="snapshotFileSystemStorage", + flags={"read_only": True}, + ) + _ListHelper._build_schema_exadbvmclusterstoragedetails_read(properties.snapshot_file_system_storage) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.total_ecpu_count = AAZIntType( + serialized_name="totalEcpuCount", + flags={"required": True}, + ) + properties.total_file_system_storage = AAZObjectType( + serialized_name="totalFileSystemStorage", + flags={"read_only": True}, + ) + _ListHelper._build_schema_exadbvmclusterstoragedetails_read(properties.total_file_system_storage) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vm_file_system_storage = AAZObjectType( + serialized_name="vmFileSystemStorage", + flags={"required": True}, + ) + _ListHelper._build_schema_exadbvmclusterstoragedetails_read(properties.vm_file_system_storage) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_ocid = AAZStrType( + serialized_name="zoneOcid", + flags={"read_only": True}, + ) + + data_collection_options = cls._schema_on_200.value.Element.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + iorm_config_cache = cls._schema_on_200.value.Element.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200.value.Element.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200.value.Element.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200.value.Element.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200.value.Element.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.value.Element.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200.value.Element.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.value.Element.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + class ExadbVmClustersListByResourceGroup(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/Oracle.Database/exadbVmClusters", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType() + + properties = cls._schema_on_200.value.Element.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.backup_subnet_ocid = AAZStrType( + serialized_name="backupSubnetOcid", + flags={"read_only": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.enabled_ecpu_count = AAZIntType( + serialized_name="enabledEcpuCount", + flags={"required": True}, + ) + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + flags={"required": True}, + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"read_only": True}, + ) + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.grid_image_type = AAZStrType( + serialized_name="gridImageType", + flags={"read_only": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"required": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.private_zone_ocid = AAZStrType( + serialized_name="privateZoneOcid", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.shape_attribute = AAZStrType( + serialized_name="shapeAttribute", + ) + properties.snapshot_file_system_storage = AAZObjectType( + serialized_name="snapshotFileSystemStorage", + flags={"read_only": True}, + ) + _ListHelper._build_schema_exadbvmclusterstoragedetails_read(properties.snapshot_file_system_storage) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.total_ecpu_count = AAZIntType( + serialized_name="totalEcpuCount", + flags={"required": True}, + ) + properties.total_file_system_storage = AAZObjectType( + serialized_name="totalFileSystemStorage", + flags={"read_only": True}, + ) + _ListHelper._build_schema_exadbvmclusterstoragedetails_read(properties.total_file_system_storage) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vm_file_system_storage = AAZObjectType( + serialized_name="vmFileSystemStorage", + flags={"required": True}, + ) + _ListHelper._build_schema_exadbvmclusterstoragedetails_read(properties.vm_file_system_storage) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_ocid = AAZStrType( + serialized_name="zoneOcid", + flags={"read_only": True}, + ) + + data_collection_options = cls._schema_on_200.value.Element.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + iorm_config_cache = cls._schema_on_200.value.Element.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200.value.Element.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200.value.Element.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200.value.Element.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200.value.Element.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200.value.Element.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.value.Element.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200.value.Element.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.value.Element.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + _schema_exadbvmclusterstoragedetails_read = None + + @classmethod + def _build_schema_exadbvmclusterstoragedetails_read(cls, _schema): + if cls._schema_exadbvmclusterstoragedetails_read is not None: + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + return + + cls._schema_exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read = AAZObjectType() + + exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read + exadbvmclusterstoragedetails_read.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + flags={"required": True}, + ) + + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + + +__all__ = ["List"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_remove_vm.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_remove_vm.py new file mode 100644 index 00000000000..1361ad46886 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_remove_vm.py @@ -0,0 +1,512 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster remove-vm", +) +class RemoveVm(AAZCommand): + """Remove VMs from the VM Cluster + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}/removevms", "2025-09-01"], + ] + } + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.db_nodes = AAZListArg( + options=["--db-nodes"], + arg_group="Body", + help="The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed.", + required=True, + ) + + db_nodes = cls._args_schema.db_nodes + db_nodes.Element = AAZObjectArg() + + _element = cls._args_schema.db_nodes.Element + _element.db_node_id = AAZStrArg( + options=["db-node-id"], + help="Exascale DbNode Azure Resource ID", + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ExadbVmClustersRemoveVms(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 ExadbVmClustersRemoveVms(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": "location"}, + 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": "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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_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", "2025-09-01", + 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("dbNodes", AAZListType, ".db_nodes", typ_kwargs={"flags": {"required": True}}) + + db_nodes = _builder.get(".dbNodes") + if db_nodes is not None: + db_nodes.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".dbNodes[]") + if _elements is not None: + _elements.set_prop("dbNodeId", AAZStrType, ".db_node_id", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.backup_subnet_ocid = AAZStrType( + serialized_name="backupSubnetOcid", + flags={"read_only": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.enabled_ecpu_count = AAZIntType( + serialized_name="enabledEcpuCount", + flags={"required": True}, + ) + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + flags={"required": True}, + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"read_only": True}, + ) + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.grid_image_type = AAZStrType( + serialized_name="gridImageType", + flags={"read_only": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"required": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.private_zone_ocid = AAZStrType( + serialized_name="privateZoneOcid", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.shape_attribute = AAZStrType( + serialized_name="shapeAttribute", + ) + properties.snapshot_file_system_storage = AAZObjectType( + serialized_name="snapshotFileSystemStorage", + flags={"read_only": True}, + ) + _RemoveVmHelper._build_schema_exadbvmclusterstoragedetails_read(properties.snapshot_file_system_storage) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.total_ecpu_count = AAZIntType( + serialized_name="totalEcpuCount", + flags={"required": True}, + ) + properties.total_file_system_storage = AAZObjectType( + serialized_name="totalFileSystemStorage", + flags={"read_only": True}, + ) + _RemoveVmHelper._build_schema_exadbvmclusterstoragedetails_read(properties.total_file_system_storage) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vm_file_system_storage = AAZObjectType( + serialized_name="vmFileSystemStorage", + flags={"required": True}, + ) + _RemoveVmHelper._build_schema_exadbvmclusterstoragedetails_read(properties.vm_file_system_storage) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_ocid = AAZStrType( + serialized_name="zoneOcid", + flags={"read_only": True}, + ) + + data_collection_options = cls._schema_on_200.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _RemoveVmHelper: + """Helper class for RemoveVm""" + + _schema_exadbvmclusterstoragedetails_read = None + + @classmethod + def _build_schema_exadbvmclusterstoragedetails_read(cls, _schema): + if cls._schema_exadbvmclusterstoragedetails_read is not None: + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + return + + cls._schema_exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read = AAZObjectType() + + exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read + exadbvmclusterstoragedetails_read.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + flags={"required": True}, + ) + + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + + +__all__ = ["RemoveVm"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_show.py new file mode 100644 index 00000000000..43ff1fc6ca8 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_show.py @@ -0,0 +1,453 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster show", +) +class Show(AAZCommand): + """Get a ExadbVmCluster + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}", "2025-09-01"], + ] + } + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["-n", "--name", "--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ExadbVmClustersGet(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 ExadbVmClustersGet(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.backup_subnet_ocid = AAZStrType( + serialized_name="backupSubnetOcid", + flags={"read_only": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.enabled_ecpu_count = AAZIntType( + serialized_name="enabledEcpuCount", + flags={"required": True}, + ) + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + flags={"required": True}, + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"read_only": True}, + ) + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.grid_image_type = AAZStrType( + serialized_name="gridImageType", + flags={"read_only": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"required": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.private_zone_ocid = AAZStrType( + serialized_name="privateZoneOcid", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.shape_attribute = AAZStrType( + serialized_name="shapeAttribute", + ) + properties.snapshot_file_system_storage = AAZObjectType( + serialized_name="snapshotFileSystemStorage", + flags={"read_only": True}, + ) + _ShowHelper._build_schema_exadbvmclusterstoragedetails_read(properties.snapshot_file_system_storage) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.total_ecpu_count = AAZIntType( + serialized_name="totalEcpuCount", + flags={"required": True}, + ) + properties.total_file_system_storage = AAZObjectType( + serialized_name="totalFileSystemStorage", + flags={"read_only": True}, + ) + _ShowHelper._build_schema_exadbvmclusterstoragedetails_read(properties.total_file_system_storage) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vm_file_system_storage = AAZObjectType( + serialized_name="vmFileSystemStorage", + flags={"required": True}, + ) + _ShowHelper._build_schema_exadbvmclusterstoragedetails_read(properties.vm_file_system_storage) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_ocid = AAZStrType( + serialized_name="zoneOcid", + flags={"read_only": True}, + ) + + data_collection_options = cls._schema_on_200.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + _schema_exadbvmclusterstoragedetails_read = None + + @classmethod + def _build_schema_exadbvmclusterstoragedetails_read(cls, _schema): + if cls._schema_exadbvmclusterstoragedetails_read is not None: + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + return + + cls._schema_exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read = AAZObjectType() + + exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read + exadbvmclusterstoragedetails_read.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + flags={"required": True}, + ) + + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + + +__all__ = ["Show"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_update.py new file mode 100644 index 00000000000..4704cfe9a3b --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_update.py @@ -0,0 +1,924 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster update", +) +class Update(AAZCommand): + """Update a ExadbVmCluster + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}", "2025-09-01"], + ] + } + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["-n", "--name", "--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.node_count = AAZIntArg( + options=["--node-count"], + arg_group="Properties", + help="The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + nullable=True, + ) + _args_schema.zones = AAZListArg( + options=["--zones"], + arg_group="Resource", + help="The availability zones.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + zones = cls._args_schema.zones + zones.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ExadbVmClustersGet(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.ExadbVmClustersCreateOrUpdate(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 ExadbVmClustersGet(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.backup_subnet_ocid = AAZStrType( + serialized_name="backupSubnetOcid", + flags={"read_only": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.enabled_ecpu_count = AAZIntType( + serialized_name="enabledEcpuCount", + flags={"required": True}, + ) + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + flags={"required": True}, + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"read_only": True}, + ) + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.grid_image_type = AAZStrType( + serialized_name="gridImageType", + flags={"read_only": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"required": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.private_zone_ocid = AAZStrType( + serialized_name="privateZoneOcid", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.shape_attribute = AAZStrType( + serialized_name="shapeAttribute", + ) + properties.snapshot_file_system_storage = AAZObjectType( + serialized_name="snapshotFileSystemStorage", + flags={"read_only": True}, + ) + _UpdateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.snapshot_file_system_storage) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.total_ecpu_count = AAZIntType( + serialized_name="totalEcpuCount", + flags={"required": True}, + ) + properties.total_file_system_storage = AAZObjectType( + serialized_name="totalFileSystemStorage", + flags={"read_only": True}, + ) + _UpdateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.total_file_system_storage) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vm_file_system_storage = AAZObjectType( + serialized_name="vmFileSystemStorage", + flags={"required": True}, + ) + _UpdateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.vm_file_system_storage) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_ocid = AAZStrType( + serialized_name="zoneOcid", + flags={"read_only": True}, + ) + + data_collection_options = cls._schema_on_200.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + class ExadbVmClustersCreateOrUpdate(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_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", "2025-09-01", + 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() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _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() + _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}, + ) + _schema_on_200_201.zones = AAZListType() + + properties = cls._schema_on_200_201.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.backup_subnet_ocid = AAZStrType( + serialized_name="backupSubnetOcid", + flags={"read_only": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.enabled_ecpu_count = AAZIntType( + serialized_name="enabledEcpuCount", + flags={"required": True}, + ) + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + flags={"required": True}, + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"read_only": True}, + ) + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.grid_image_type = AAZStrType( + serialized_name="gridImageType", + flags={"read_only": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"required": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.private_zone_ocid = AAZStrType( + serialized_name="privateZoneOcid", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.shape_attribute = AAZStrType( + serialized_name="shapeAttribute", + ) + properties.snapshot_file_system_storage = AAZObjectType( + serialized_name="snapshotFileSystemStorage", + flags={"read_only": True}, + ) + _UpdateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.snapshot_file_system_storage) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.total_ecpu_count = AAZIntType( + serialized_name="totalEcpuCount", + flags={"required": True}, + ) + properties.total_file_system_storage = AAZObjectType( + serialized_name="totalFileSystemStorage", + flags={"read_only": True}, + ) + _UpdateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.total_file_system_storage) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vm_file_system_storage = AAZObjectType( + serialized_name="vmFileSystemStorage", + flags={"required": True}, + ) + _UpdateHelper._build_schema_exadbvmclusterstoragedetails_read(properties.vm_file_system_storage) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_ocid = AAZStrType( + serialized_name="zoneOcid", + flags={"read_only": True}, + ) + + data_collection_options = cls._schema_on_200_201.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + iorm_config_cache = cls._schema_on_200_201.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200_201.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200_201.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200_201.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200_201.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200_201.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200_201.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200_201.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200_201.zones + zones.Element = AAZStrType() + + 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("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + _builder.set_prop("zones", AAZListType, ".zones") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("nodeCount", AAZIntType, ".node_count", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + zones = _builder.get(".zones") + if zones is not None: + zones.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_exadbvmclusterstoragedetails_read = None + + @classmethod + def _build_schema_exadbvmclusterstoragedetails_read(cls, _schema): + if cls._schema_exadbvmclusterstoragedetails_read is not None: + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + return + + cls._schema_exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read = AAZObjectType() + + exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read + exadbvmclusterstoragedetails_read.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + flags={"required": True}, + ) + + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_wait.py new file mode 100644 index 00000000000..ceb4798d2ab --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/_wait.py @@ -0,0 +1,452 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}", "2025-09-01"], + ] + } + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["-n", "--name", "--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ExadbVmClustersGet(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 ExadbVmClustersGet(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.backup_subnet_cidr = AAZStrType( + serialized_name="backupSubnetCidr", + ) + properties.backup_subnet_ocid = AAZStrType( + serialized_name="backupSubnetOcid", + flags={"read_only": True}, + ) + properties.cluster_name = AAZStrType( + serialized_name="clusterName", + ) + properties.data_collection_options = AAZObjectType( + serialized_name="dataCollectionOptions", + ) + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.domain = AAZStrType() + properties.enabled_ecpu_count = AAZIntType( + serialized_name="enabledEcpuCount", + flags={"required": True}, + ) + properties.exascale_db_storage_vault_id = AAZStrType( + serialized_name="exascaleDbStorageVaultId", + flags={"required": True}, + ) + properties.gi_version = AAZStrType( + serialized_name="giVersion", + flags={"read_only": True}, + ) + properties.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.grid_image_type = AAZStrType( + serialized_name="gridImageType", + flags={"read_only": True}, + ) + properties.hostname = AAZStrType( + flags={"required": True}, + ) + properties.iorm_config_cache = AAZObjectType( + serialized_name="iormConfigCache", + flags={"read_only": True}, + ) + properties.license_model = AAZStrType( + serialized_name="licenseModel", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.listener_port = AAZIntType( + serialized_name="listenerPort", + flags={"read_only": True}, + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + flags={"read_only": True}, + ) + properties.node_count = AAZIntType( + serialized_name="nodeCount", + flags={"required": True}, + ) + properties.nsg_cidrs = AAZListType( + serialized_name="nsgCidrs", + ) + properties.nsg_url = AAZStrType( + serialized_name="nsgUrl", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.private_zone_ocid = AAZStrType( + serialized_name="privateZoneOcid", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.scan_dns_name = AAZStrType( + serialized_name="scanDnsName", + flags={"read_only": True}, + ) + properties.scan_dns_record_id = AAZStrType( + serialized_name="scanDnsRecordId", + flags={"read_only": True}, + ) + properties.scan_ip_ids = AAZListType( + serialized_name="scanIpIds", + flags={"read_only": True}, + ) + properties.scan_listener_port_tcp = AAZIntType( + serialized_name="scanListenerPortTcp", + ) + properties.scan_listener_port_tcp_ssl = AAZIntType( + serialized_name="scanListenerPortTcpSsl", + ) + properties.shape = AAZStrType( + flags={"required": True}, + ) + properties.shape_attribute = AAZStrType( + serialized_name="shapeAttribute", + ) + properties.snapshot_file_system_storage = AAZObjectType( + serialized_name="snapshotFileSystemStorage", + flags={"read_only": True}, + ) + _WaitHelper._build_schema_exadbvmclusterstoragedetails_read(properties.snapshot_file_system_storage) + properties.ssh_public_keys = AAZListType( + serialized_name="sshPublicKeys", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.subnet_ocid = AAZStrType( + serialized_name="subnetOcid", + flags={"read_only": True}, + ) + properties.system_version = AAZStrType( + serialized_name="systemVersion", + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.total_ecpu_count = AAZIntType( + serialized_name="totalEcpuCount", + flags={"required": True}, + ) + properties.total_file_system_storage = AAZObjectType( + serialized_name="totalFileSystemStorage", + flags={"read_only": True}, + ) + _WaitHelper._build_schema_exadbvmclusterstoragedetails_read(properties.total_file_system_storage) + properties.vip_ids = AAZListType( + serialized_name="vipIds", + flags={"read_only": True}, + ) + properties.vm_file_system_storage = AAZObjectType( + serialized_name="vmFileSystemStorage", + flags={"required": True}, + ) + _WaitHelper._build_schema_exadbvmclusterstoragedetails_read(properties.vm_file_system_storage) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"required": True}, + ) + properties.zone_ocid = AAZStrType( + serialized_name="zoneOcid", + flags={"read_only": True}, + ) + + data_collection_options = cls._schema_on_200.properties.data_collection_options + data_collection_options.is_diagnostics_events_enabled = AAZBoolType( + serialized_name="isDiagnosticsEventsEnabled", + ) + data_collection_options.is_health_monitoring_enabled = AAZBoolType( + serialized_name="isHealthMonitoringEnabled", + ) + data_collection_options.is_incident_logs_enabled = AAZBoolType( + serialized_name="isIncidentLogsEnabled", + ) + + iorm_config_cache = cls._schema_on_200.properties.iorm_config_cache + iorm_config_cache.db_plans = AAZListType( + serialized_name="dbPlans", + ) + iorm_config_cache.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + ) + iorm_config_cache.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + iorm_config_cache.objective = AAZStrType() + + db_plans = cls._schema_on_200.properties.iorm_config_cache.db_plans + db_plans.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.iorm_config_cache.db_plans.Element + _element.db_name = AAZStrType( + serialized_name="dbName", + ) + _element.flash_cache_limit = AAZStrType( + serialized_name="flashCacheLimit", + ) + _element.share = AAZIntType() + + nsg_cidrs = cls._schema_on_200.properties.nsg_cidrs + nsg_cidrs.Element = AAZObjectType() + + _element = cls._schema_on_200.properties.nsg_cidrs.Element + _element.destination_port_range = AAZObjectType( + serialized_name="destinationPortRange", + ) + _element.source = AAZStrType( + flags={"required": True}, + ) + + destination_port_range = cls._schema_on_200.properties.nsg_cidrs.Element.destination_port_range + destination_port_range.max = AAZIntType( + flags={"required": True}, + ) + destination_port_range.min = AAZIntType( + flags={"required": True}, + ) + + scan_ip_ids = cls._schema_on_200.properties.scan_ip_ids + scan_ip_ids.Element = AAZStrType() + + ssh_public_keys = cls._schema_on_200.properties.ssh_public_keys + ssh_public_keys.Element = AAZStrType() + + vip_ids = cls._schema_on_200.properties.vip_ids + vip_ids.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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + _schema_exadbvmclusterstoragedetails_read = None + + @classmethod + def _build_schema_exadbvmclusterstoragedetails_read(cls, _schema): + if cls._schema_exadbvmclusterstoragedetails_read is not None: + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + return + + cls._schema_exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read = AAZObjectType() + + exadbvmclusterstoragedetails_read = _schema_exadbvmclusterstoragedetails_read + exadbvmclusterstoragedetails_read.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + flags={"required": True}, + ) + + _schema.total_size_in_gbs = cls._schema_exadbvmclusterstoragedetails_read.total_size_in_gbs + + +__all__ = ["Wait"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/__cmd_group.py new file mode 100644 index 00000000000..5806c68acbb --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/__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( + "oracle-database exadb-vm-cluster db-node", +) +class __CMDGroup(AAZCommandGroup): + """Manage Db Node + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/__init__.py new file mode 100644 index 00000000000..2669684101d --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/__init__.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: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._action import * +from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_action.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_action.py new file mode 100644 index 00000000000..efe92135bc7 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_action.py @@ -0,0 +1,222 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster db-node action", +) +class Action(AAZCommand): + """VM actions on DbNode of ExadbVmCluster by the provided filter + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}/dbnodes/{}/action", "2025-09-01"], + ] + } + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.exascale_db_node_name = AAZStrArg( + options=["--exascale-db-node-name"], + help="The name of the ExascaleDbNode", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.action = AAZStrArg( + options=["--action"], + arg_group="Body", + help="Db action", + required=True, + enum={"Reset": "Reset", "SoftReset": "SoftReset", "Start": "Start", "Stop": "Stop"}, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ExascaleDbNodesAction(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 ExascaleDbNodesAction(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": "location"}, + 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": "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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_name, + required=True, + ), + **self.serialize_url_param( + "exascaleDbNodeName", self.ctx.args.exascale_db_node_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", "2025-09-01", + 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("action", AAZStrType, ".action", typ_kwargs={"flags": {"required": True}}) + + return self.serialize_content(_content_value) + + 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.provisioning_state = AAZStrType( + serialized_name="provisioningState", + ) + + return cls._schema_on_200 + + +class _ActionHelper: + """Helper class for Action""" + + +__all__ = ["Action"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_list.py new file mode 100644 index 00000000000..9bd0bad888d --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_list.py @@ -0,0 +1,249 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster db-node list", +) +class List(AAZCommand): + """List ExascaleDbNode resources by ExadbVmCluster + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}/dbnodes", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ExascaleDbNodesListByParent(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 ExascaleDbNodesListByParent(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_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", "2025-09-01", + 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() + _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.additional_details = AAZStrType( + serialized_name="additionalDetails", + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + ) + properties.fault_domain = AAZStrType( + serialized_name="faultDomain", + ) + properties.hostname = AAZStrType() + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + properties.maintenance_type = AAZStrType( + serialized_name="maintenanceType", + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + ) + properties.ocid = AAZStrType( + flags={"required": True}, + ) + properties.software_storage_size_in_gb = AAZIntType( + serialized_name="softwareStorageSizeInGb", + ) + properties.time_maintenance_window_end = AAZStrType( + serialized_name="timeMaintenanceWindowEnd", + ) + properties.time_maintenance_window_start = AAZStrType( + serialized_name="timeMaintenanceWindowStart", + ) + properties.total_cpu_core_count = AAZIntType( + serialized_name="totalCpuCoreCount", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_show.py new file mode 100644 index 00000000000..f331295f527 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exadb_vm_cluster/db_node/_show.py @@ -0,0 +1,250 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exadb-vm-cluster db-node show", +) +class Show(AAZCommand): + """Get a ExascaleDbNode + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exadbvmclusters/{}/dbnodes/{}", "2025-09-01"], + ] + } + + 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.exadb_vm_cluster_name = AAZStrArg( + options=["--exadb-vm-cluster-name"], + help="The name of the ExadbVmCluster", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.exascale_db_node_name = AAZStrArg( + options=["-n", "--name", "--exascale-db-node-name"], + help="The name of the ExascaleDbNode", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ExascaleDbNodesGet(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 ExascaleDbNodesGet(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}", + **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( + "exadbVmClusterName", self.ctx.args.exadb_vm_cluster_name, + required=True, + ), + **self.serialize_url_param( + "exascaleDbNodeName", self.ctx.args.exascale_db_node_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", "2025-09-01", + 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() + _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.additional_details = AAZStrType( + serialized_name="additionalDetails", + ) + properties.cpu_core_count = AAZIntType( + serialized_name="cpuCoreCount", + ) + properties.db_node_storage_size_in_gbs = AAZIntType( + serialized_name="dbNodeStorageSizeInGbs", + ) + properties.fault_domain = AAZStrType( + serialized_name="faultDomain", + ) + properties.hostname = AAZStrType() + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + ) + properties.maintenance_type = AAZStrType( + serialized_name="maintenanceType", + ) + properties.memory_size_in_gbs = AAZIntType( + serialized_name="memorySizeInGbs", + ) + properties.ocid = AAZStrType( + flags={"required": True}, + ) + properties.software_storage_size_in_gb = AAZIntType( + serialized_name="softwareStorageSizeInGb", + ) + properties.time_maintenance_window_end = AAZStrType( + serialized_name="timeMaintenanceWindowEnd", + ) + properties.time_maintenance_window_start = AAZStrType( + serialized_name="timeMaintenanceWindowStart", + ) + properties.total_cpu_core_count = AAZIntType( + serialized_name="totalCpuCoreCount", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/__cmd_group.py new file mode 100644 index 00000000000..ce59f039e32 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/__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( + "oracle-database exascale-db-storage-vault", +) +class __CMDGroup(AAZCommandGroup): + """Manage Exascale Db Storage Vault + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_create.py new file mode 100644 index 00000000000..804470fade2 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_create.py @@ -0,0 +1,405 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exascale-db-storage-vault create", +) +class Create(AAZCommand): + """Create a ExascaleDbStorageVault + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exascaledbstoragevaults/{}", "2025-09-01"], + ] + } + + 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.exascale_db_storage_vault_name = AAZStrArg( + options=["-n", "--name", "--exascale-db-storage-vault-name"], + help="The name of the ExascaleDbStorageVault", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.additional_flash_cache_in_percent = AAZIntArg( + options=["--additional-flash-cache-in-percent"], + arg_group="Properties", + help="The size of additional Flash Cache in percentage of High Capacity database storage.", + fmt=AAZIntArgFormat( + minimum=0, + ), + ) + _args_schema.description = AAZStrArg( + options=["--description"], + arg_group="Properties", + help="Exadata Database Storage Vault description.", + fmt=AAZStrArgFormat( + max_length=400, + min_length=1, + ), + ) + _args_schema.display_name = AAZStrArg( + options=["--display-name"], + arg_group="Properties", + help="The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.exadata_infrastructure_id = AAZStrArg( + options=["--exadata-infrastructure-id"], + arg_group="Properties", + help="Cloud Exadata infrastructure ID", + ) + _args_schema.high_capacity_database_storage_input = AAZObjectArg( + options=["--high-capacity-database-storage-input"], + arg_group="Properties", + help="Create exadata Database Storage Details", + ) + _args_schema.time_zone = AAZStrArg( + options=["--time-zone"], + arg_group="Properties", + help="The time zone that you want to use for the Exadata Database Storage Vault", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + + high_capacity_database_storage_input = cls._args_schema.high_capacity_database_storage_input + high_capacity_database_storage_input.total_size_in_gbs = AAZIntArg( + options=["total-size-in-gbs"], + help="Total Capacity", + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _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.", + ) + _args_schema.zones = AAZListArg( + options=["--zones"], + arg_group="Resource", + help="The availability zones.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + zones = cls._args_schema.zones + zones.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ExascaleDbStorageVaultsCreate(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 ExascaleDbStorageVaultsCreate(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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", + **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( + "exascaleDbStorageVaultName", self.ctx.args.exascale_db_storage_vault_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", "2025-09-01", + 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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + _builder.set_prop("zones", AAZListType, ".zones") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("additionalFlashCacheInPercent", AAZIntType, ".additional_flash_cache_in_percent") + properties.set_prop("description", AAZStrType, ".description") + properties.set_prop("displayName", AAZStrType, ".display_name", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("exadataInfrastructureId", AAZStrType, ".exadata_infrastructure_id") + properties.set_prop("highCapacityDatabaseStorageInput", AAZObjectType, ".high_capacity_database_storage_input", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("timeZone", AAZStrType, ".time_zone") + + high_capacity_database_storage_input = _builder.get(".properties.highCapacityDatabaseStorageInput") + if high_capacity_database_storage_input is not None: + high_capacity_database_storage_input.set_prop("totalSizeInGbs", AAZIntType, ".total_size_in_gbs", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + zones = _builder.get(".zones") + if zones is not None: + zones.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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _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}, + ) + _schema_on_200_201.zones = AAZListType() + + properties = cls._schema_on_200_201.properties + properties.additional_flash_cache_in_percent = AAZIntType( + serialized_name="additionalFlashCacheInPercent", + ) + properties.attached_shape_attributes = AAZListType( + serialized_name="attachedShapeAttributes", + flags={"read_only": True}, + ) + properties.description = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.exadata_infrastructure_id = AAZStrType( + serialized_name="exadataInfrastructureId", + ) + properties.high_capacity_database_storage = AAZObjectType( + serialized_name="highCapacityDatabaseStorage", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vm_cluster_count = AAZIntType( + serialized_name="vmClusterCount", + flags={"read_only": True}, + ) + + attached_shape_attributes = cls._schema_on_200_201.properties.attached_shape_attributes + attached_shape_attributes.Element = AAZStrType() + + high_capacity_database_storage = cls._schema_on_200_201.properties.high_capacity_database_storage + high_capacity_database_storage.available_size_in_gbs = AAZIntType( + serialized_name="availableSizeInGbs", + ) + high_capacity_database_storage.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + ) + + 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() + + zones = cls._schema_on_200_201.zones + zones.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_delete.py new file mode 100644 index 00000000000..eb4d755517a --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_delete.py @@ -0,0 +1,163 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exascale-db-storage-vault delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a ExascaleDbStorageVault + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exascaledbstoragevaults/{}", "2025-09-01"], + ] + } + + 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.exascale_db_storage_vault_name = AAZStrArg( + options=["-n", "--name", "--exascale-db-storage-vault-name"], + help="The name of the ExascaleDbStorageVault", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ExascaleDbStorageVaultsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ExascaleDbStorageVaultsDelete(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": "location"}, + 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": "location"}, + 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": "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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", + **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( + "exascaleDbStorageVaultName", self.ctx.args.exascale_db_storage_vault_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", "2025-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_list.py new file mode 100644 index 00000000000..c37f71d40f0 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_list.py @@ -0,0 +1,461 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exascale-db-storage-vault list", +) +class List(AAZCommand): + """List ExascaleDbStorageVault resources by subscription ID + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/exascaledbstoragevaults", "2025-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exascaledbstoragevaults", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.ExascaleDbStorageVaultsListBySubscription(ctx=self.ctx)() + if condition_1: + self.ExascaleDbStorageVaultsListByResourceGroup(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 ExascaleDbStorageVaultsListBySubscription(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/Oracle.Database/exascaleDbStorageVaults", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType() + + properties = cls._schema_on_200.value.Element.properties + properties.additional_flash_cache_in_percent = AAZIntType( + serialized_name="additionalFlashCacheInPercent", + ) + properties.attached_shape_attributes = AAZListType( + serialized_name="attachedShapeAttributes", + flags={"read_only": True}, + ) + properties.description = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.exadata_infrastructure_id = AAZStrType( + serialized_name="exadataInfrastructureId", + ) + properties.high_capacity_database_storage = AAZObjectType( + serialized_name="highCapacityDatabaseStorage", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vm_cluster_count = AAZIntType( + serialized_name="vmClusterCount", + flags={"read_only": True}, + ) + + attached_shape_attributes = cls._schema_on_200.value.Element.properties.attached_shape_attributes + attached_shape_attributes.Element = AAZStrType() + + high_capacity_database_storage = cls._schema_on_200.value.Element.properties.high_capacity_database_storage + high_capacity_database_storage.available_size_in_gbs = AAZIntType( + serialized_name="availableSizeInGbs", + ) + high_capacity_database_storage.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + ) + + 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() + + zones = cls._schema_on_200.value.Element.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + class ExascaleDbStorageVaultsListByResourceGroup(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/Oracle.Database/exascaleDbStorageVaults", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType() + + properties = cls._schema_on_200.value.Element.properties + properties.additional_flash_cache_in_percent = AAZIntType( + serialized_name="additionalFlashCacheInPercent", + ) + properties.attached_shape_attributes = AAZListType( + serialized_name="attachedShapeAttributes", + flags={"read_only": True}, + ) + properties.description = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.exadata_infrastructure_id = AAZStrType( + serialized_name="exadataInfrastructureId", + ) + properties.high_capacity_database_storage = AAZObjectType( + serialized_name="highCapacityDatabaseStorage", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vm_cluster_count = AAZIntType( + serialized_name="vmClusterCount", + flags={"read_only": True}, + ) + + attached_shape_attributes = cls._schema_on_200.value.Element.properties.attached_shape_attributes + attached_shape_attributes.Element = AAZStrType() + + high_capacity_database_storage = cls._schema_on_200.value.Element.properties.high_capacity_database_storage + high_capacity_database_storage.available_size_in_gbs = AAZIntType( + serialized_name="availableSizeInGbs", + ) + high_capacity_database_storage.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + ) + + 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() + + zones = cls._schema_on_200.value.Element.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_show.py new file mode 100644 index 00000000000..5cdf16afaa7 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_show.py @@ -0,0 +1,267 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exascale-db-storage-vault show", +) +class Show(AAZCommand): + """Get a ExascaleDbStorageVault + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exascaledbstoragevaults/{}", "2025-09-01"], + ] + } + + 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.exascale_db_storage_vault_name = AAZStrArg( + options=["-n", "--name", "--exascale-db-storage-vault-name"], + help="The name of the ExascaleDbStorageVault", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ExascaleDbStorageVaultsGet(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 ExascaleDbStorageVaultsGet(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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", + **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( + "exascaleDbStorageVaultName", self.ctx.args.exascale_db_storage_vault_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.additional_flash_cache_in_percent = AAZIntType( + serialized_name="additionalFlashCacheInPercent", + ) + properties.attached_shape_attributes = AAZListType( + serialized_name="attachedShapeAttributes", + flags={"read_only": True}, + ) + properties.description = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.exadata_infrastructure_id = AAZStrType( + serialized_name="exadataInfrastructureId", + ) + properties.high_capacity_database_storage = AAZObjectType( + serialized_name="highCapacityDatabaseStorage", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vm_cluster_count = AAZIntType( + serialized_name="vmClusterCount", + flags={"read_only": True}, + ) + + attached_shape_attributes = cls._schema_on_200.properties.attached_shape_attributes + attached_shape_attributes.Element = AAZStrType() + + high_capacity_database_storage = cls._schema_on_200.properties.high_capacity_database_storage + high_capacity_database_storage.available_size_in_gbs = AAZIntType( + serialized_name="availableSizeInGbs", + ) + high_capacity_database_storage.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + ) + + 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() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_update.py new file mode 100644 index 00000000000..4237d251f7d --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_update.py @@ -0,0 +1,556 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exascale-db-storage-vault update", +) +class Update(AAZCommand): + """Update a ExascaleDbStorageVault + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exascaledbstoragevaults/{}", "2025-09-01"], + ] + } + + 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.exascale_db_storage_vault_name = AAZStrArg( + options=["-n", "--name", "--exascale-db-storage-vault-name"], + help="The name of the ExascaleDbStorageVault", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + nullable=True, + ) + _args_schema.zones = AAZListArg( + options=["--zones"], + arg_group="Resource", + help="The availability zones.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + zones = cls._args_schema.zones + zones.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ExascaleDbStorageVaultsGet(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.ExascaleDbStorageVaultsCreate(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 ExascaleDbStorageVaultsGet(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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", + **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( + "exascaleDbStorageVaultName", self.ctx.args.exascale_db_storage_vault_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.additional_flash_cache_in_percent = AAZIntType( + serialized_name="additionalFlashCacheInPercent", + ) + properties.attached_shape_attributes = AAZListType( + serialized_name="attachedShapeAttributes", + flags={"read_only": True}, + ) + properties.description = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.exadata_infrastructure_id = AAZStrType( + serialized_name="exadataInfrastructureId", + ) + properties.high_capacity_database_storage = AAZObjectType( + serialized_name="highCapacityDatabaseStorage", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vm_cluster_count = AAZIntType( + serialized_name="vmClusterCount", + flags={"read_only": True}, + ) + + attached_shape_attributes = cls._schema_on_200.properties.attached_shape_attributes + attached_shape_attributes.Element = AAZStrType() + + high_capacity_database_storage = cls._schema_on_200.properties.high_capacity_database_storage + high_capacity_database_storage.available_size_in_gbs = AAZIntType( + serialized_name="availableSizeInGbs", + ) + high_capacity_database_storage.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + ) + + 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() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + class ExascaleDbStorageVaultsCreate(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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", + **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( + "exascaleDbStorageVaultName", self.ctx.args.exascale_db_storage_vault_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", "2025-09-01", + 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() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _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() + _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}, + ) + _schema_on_200_201.zones = AAZListType() + + properties = cls._schema_on_200_201.properties + properties.additional_flash_cache_in_percent = AAZIntType( + serialized_name="additionalFlashCacheInPercent", + ) + properties.attached_shape_attributes = AAZListType( + serialized_name="attachedShapeAttributes", + flags={"read_only": True}, + ) + properties.description = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.exadata_infrastructure_id = AAZStrType( + serialized_name="exadataInfrastructureId", + ) + properties.high_capacity_database_storage = AAZObjectType( + serialized_name="highCapacityDatabaseStorage", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vm_cluster_count = AAZIntType( + serialized_name="vmClusterCount", + flags={"read_only": True}, + ) + + attached_shape_attributes = cls._schema_on_200_201.properties.attached_shape_attributes + attached_shape_attributes.Element = AAZStrType() + + high_capacity_database_storage = cls._schema_on_200_201.properties.high_capacity_database_storage + high_capacity_database_storage.available_size_in_gbs = AAZIntType( + serialized_name="availableSizeInGbs", + ) + high_capacity_database_storage.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + ) + + 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() + + zones = cls._schema_on_200_201.zones + zones.Element = AAZStrType() + + 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("tags", AAZDictType, ".tags") + _builder.set_prop("zones", AAZListType, ".zones") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + zones = _builder.get(".zones") + if zones is not None: + zones.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""" + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_wait.py new file mode 100644 index 00000000000..f949d797918 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/exascale_db_storage_vault/_wait.py @@ -0,0 +1,266 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database exascale-db-storage-vault wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/exascaledbstoragevaults/{}", "2025-09-01"], + ] + } + + 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.exascale_db_storage_vault_name = AAZStrArg( + options=["-n", "--name", "--exascale-db-storage-vault-name"], + help="The name of the ExascaleDbStorageVault", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ExascaleDbStorageVaultsGet(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 ExascaleDbStorageVaultsGet(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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", + **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( + "exascaleDbStorageVaultName", self.ctx.args.exascale_db_storage_vault_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.additional_flash_cache_in_percent = AAZIntType( + serialized_name="additionalFlashCacheInPercent", + ) + properties.attached_shape_attributes = AAZListType( + serialized_name="attachedShapeAttributes", + flags={"read_only": True}, + ) + properties.description = AAZStrType() + properties.display_name = AAZStrType( + serialized_name="displayName", + flags={"required": True}, + ) + properties.exadata_infrastructure_id = AAZStrType( + serialized_name="exadataInfrastructureId", + ) + properties.high_capacity_database_storage = AAZObjectType( + serialized_name="highCapacityDatabaseStorage", + flags={"read_only": True}, + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.oci_url = AAZStrType( + serialized_name="ociUrl", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_zone = AAZStrType( + serialized_name="timeZone", + ) + properties.vm_cluster_count = AAZIntType( + serialized_name="vmClusterCount", + flags={"read_only": True}, + ) + + attached_shape_attributes = cls._schema_on_200.properties.attached_shape_attributes + attached_shape_attributes.Element = AAZStrType() + + high_capacity_database_storage = cls._schema_on_200.properties.high_capacity_database_storage + high_capacity_database_storage.available_size_in_gbs = AAZIntType( + serialized_name="availableSizeInGbs", + ) + high_capacity_database_storage.total_size_in_gbs = AAZIntType( + serialized_name="totalSizeInGbs", + ) + + 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() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/__cmd_group.py new file mode 100644 index 00000000000..2d4d610c744 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/__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( + "oracle-database flex-component", +) +class __CMDGroup(AAZCommandGroup): + """Manage Flex Component + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/__init__.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: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/_list.py new file mode 100644 index 00000000000..0a2568f27d3 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/_list.py @@ -0,0 +1,251 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database flex-component list", +) +class List(AAZCommand): + """List FlexComponent resources by SubscriptionLocationResource + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/flexcomponents", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.location = AAZResourceLocationArg( + required=True, + ) + _args_schema.shape = AAZStrArg( + options=["--shape"], + help="If provided, filters the results for the given shape", + enum={"ExaDbXS": "ExaDbXS", "Exadata.X11M": "Exadata.X11M", "Exadata.X9M": "Exadata.X9M"}, + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FlexComponentsListByParent(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 FlexComponentsListByParent(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/Oracle.Database/locations/{location}/flexComponents", + **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( + "location", self.ctx.args.location, + 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( + "shape", self.ctx.args.shape, + ), + **self.serialize_query_param( + "api-version", "2025-09-01", + 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() + _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.available_core_count = AAZIntType( + serialized_name="availableCoreCount", + flags={"read_only": True}, + ) + properties.available_db_storage_in_gbs = AAZIntType( + serialized_name="availableDbStorageInGbs", + flags={"read_only": True}, + ) + properties.available_local_storage_in_gbs = AAZIntType( + serialized_name="availableLocalStorageInGbs", + flags={"read_only": True}, + ) + properties.available_memory_in_gbs = AAZIntType( + serialized_name="availableMemoryInGbs", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.description_summary = AAZStrType( + serialized_name="descriptionSummary", + flags={"read_only": True}, + ) + properties.hardware_type = AAZStrType( + serialized_name="hardwareType", + flags={"read_only": True}, + ) + properties.minimum_core_count = AAZIntType( + serialized_name="minimumCoreCount", + flags={"read_only": True}, + ) + properties.runtime_minimum_core_count = AAZIntType( + serialized_name="runtimeMinimumCoreCount", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"read_only": 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/_show.py new file mode 100644 index 00000000000..f2db02f270a --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/flex_component/_show.py @@ -0,0 +1,240 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database flex-component show", +) +class Show(AAZCommand): + """Get a FlexComponent + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/flexcomponents/{}", "2025-09-01"], + ] + } + + 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.flex_component_name = AAZStrArg( + options=["-n", "--name", "--flex-component-name"], + help="The name of the FlexComponent", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.FlexComponentsGet(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 FlexComponentsGet(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/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}", + **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( + "flexComponentName", self.ctx.args.flex_component_name, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.available_core_count = AAZIntType( + serialized_name="availableCoreCount", + flags={"read_only": True}, + ) + properties.available_db_storage_in_gbs = AAZIntType( + serialized_name="availableDbStorageInGbs", + flags={"read_only": True}, + ) + properties.available_local_storage_in_gbs = AAZIntType( + serialized_name="availableLocalStorageInGbs", + flags={"read_only": True}, + ) + properties.available_memory_in_gbs = AAZIntType( + serialized_name="availableMemoryInGbs", + flags={"read_only": True}, + ) + properties.compute_model = AAZStrType( + serialized_name="computeModel", + flags={"read_only": True}, + ) + properties.description_summary = AAZStrType( + serialized_name="descriptionSummary", + flags={"read_only": True}, + ) + properties.hardware_type = AAZStrType( + serialized_name="hardwareType", + flags={"read_only": True}, + ) + properties.minimum_core_count = AAZIntType( + serialized_name="minimumCoreCount", + flags={"read_only": True}, + ) + properties.runtime_minimum_core_count = AAZIntType( + serialized_name="runtimeMinimumCoreCount", + flags={"read_only": True}, + ) + properties.shape = AAZStrType( + flags={"read_only": 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/__cmd_group.py new file mode 100644 index 00000000000..6efccd8a0f5 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/__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( + "oracle-database gi-minor-version", +) +class __CMDGroup(AAZCommandGroup): + """Manage Gi Minor Version + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/__init__.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: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/_list.py new file mode 100644 index 00000000000..7654a03a961 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/_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( + "oracle-database gi-minor-version list", +) +class List(AAZCommand): + """List GiMinorVersion resources by GiVersion + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/giversions/{}/giminorversions", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.giversionname = AAZStrArg( + options=["--giversionname"], + help="GiVersion name", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + ) + _args_schema.shape_family = AAZStrArg( + options=["--shape-family"], + help="If provided, filters the results to the set of database versions which are supported for the given shape family.", + enum={"EXADATA": "EXADATA", "EXADB_XS": "EXADB_XS"}, + ) + _args_schema.zone = AAZStrArg( + options=["--zone"], + help="Filters the result for the given Azure Availability Zone", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GiMinorVersionsListByParent(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 GiMinorVersionsListByParent(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/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions", + **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( + "giversionname", self.ctx.args.giversionname, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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( + "shapeFamily", self.ctx.args.shape_family, + ), + **self.serialize_query_param( + "zone", self.ctx.args.zone, + ), + **self.serialize_query_param( + "api-version", "2025-09-01", + 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() + _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.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.version = 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/_show.py new file mode 100644 index 00000000000..b1b90dd4388 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_minor_version/_show.py @@ -0,0 +1,220 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database gi-minor-version show", +) +class Show(AAZCommand): + """Get a GiMinorVersion + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/giversions/{}/giminorversions/{}", "2025-09-01"], + ] + } + + 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.gi_minor_version_name = AAZStrArg( + options=["-n", "--name", "--gi-minor-version-name"], + help="The name of the GiMinorVersion", + required=True, + id_part="child_name_2", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.giversionname = AAZStrArg( + options=["--giversionname"], + help="GiVersion name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GiMinorVersionsGet(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 GiMinorVersionsGet(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/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}", + **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( + "giMinorVersionName", self.ctx.args.gi_minor_version_name, + required=True, + ), + **self.serialize_url_param( + "giversionname", self.ctx.args.giversionname, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.grid_image_ocid = AAZStrType( + serialized_name="gridImageOcid", + ) + properties.version = 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/__init__.py index d63ae5a6fc9..2df85698253 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/__init__.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/__init__.py @@ -10,3 +10,4 @@ from .__cmd_group import * from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/_list.py index 5a12d6a62eb..603a68f21d7 100644 --- a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/_list.py +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/_list.py @@ -22,9 +22,9 @@ class List(AAZCommand): """ _aaz_info = { - "version": "2023-09-01", + "version": "2025-09-01", "resources": [ - ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/giversions", "2023-09-01"], + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/giversions", "2025-09-01"], ] } @@ -48,6 +48,23 @@ def _build_arguments_schema(cls, *args, **kwargs): _args_schema.location = AAZResourceLocationArg( required=True, ) + _args_schema.shape = AAZStrArg( + options=["--shape"], + help="If provided, filters the results for the given shape", + enum={"ExaDbXS": "ExaDbXS", "Exadata.X11M": "Exadata.X11M", "Exadata.X9M": "Exadata.X9M"}, + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + _args_schema.shape_attribute = AAZStrArg( + options=["--shape-attribute"], + help="Filters the result for the given Shape Attribute, such as BLOCK_STORAGE or SMART_STORAGE.", + ) + _args_schema.zone = AAZStrArg( + options=["--zone"], + help="Filters the result for the given Azure Availability Zone", + ) return cls._args_schema def _execute_operations(self): @@ -112,7 +129,16 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2023-09-01", + "shape", self.ctx.args.shape, + ), + **self.serialize_query_param( + "shapeAttribute", self.ctx.args.shape_attribute, + ), + **self.serialize_query_param( + "zone", self.ctx.args.zone, + ), + **self.serialize_query_param( + "api-version", "2025-09-01", required=True, ), } @@ -162,9 +188,7 @@ def _build_schema_on_200(cls): _element.name = AAZStrType( flags={"read_only": True}, ) - _element.properties = AAZObjectType( - flags={"client_flatten": True}, - ) + _element.properties = AAZObjectType() _element.system_data = AAZObjectType( serialized_name="systemData", flags={"read_only": True}, @@ -175,7 +199,7 @@ def _build_schema_on_200(cls): properties = cls._schema_on_200.value.Element.properties properties.version = AAZStrType( - flags={"required": True, "read_only": True}, + flags={"required": True}, ) system_data = cls._schema_on_200.value.Element.system_data diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/_show.py new file mode 100644 index 00000000000..8f31003fa7d --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/gi_version/_show.py @@ -0,0 +1,207 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database gi-version show", +) +class Show(AAZCommand): + """Get a GiVersion + + :example: Get Gi Version + az oracle-database gi-version show --location --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/giversions/{}", "2025-09-01"], + ] + } + + 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.giversionname = AAZStrArg( + options=["-n", "--name", "--giversionname"], + help="GiVersion name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.GiVersionsGet(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 GiVersionsGet(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/Oracle.Database/locations/{location}/giVersions/{giversionname}", + **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( + "giversionname", self.ctx.args.giversionname, + required=True, + ), + **self.serialize_url_param( + "location", self.ctx.args.location, + 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", "2025-09-01", + 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() + _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.version = 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/__cmd_group.py new file mode 100644 index 00000000000..250b026679d --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/__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( + "oracle-database network-anchor", +) +class __CMDGroup(AAZCommandGroup): + """Manage Network Anchor + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_create.py new file mode 100644 index 00000000000..7ad002c8770 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_create.py @@ -0,0 +1,431 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database network-anchor create", +) +class Create(AAZCommand): + """Create a NetworkAnchor + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/networkanchors/{}", "2025-09-01"], + ] + } + + 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.network_anchor_name = AAZStrArg( + options=["-n", "--name", "--network-anchor-name"], + help="The name of the NetworkAnchor", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.dns_forwarding_rules = AAZListArg( + options=["--dns-forwarding-rules"], + arg_group="Properties", + help="DNS forwarding rules", + ) + _args_schema.dns_listening_endpoint_allowed_cidrs = AAZStrArg( + options=["--dns-listening-endpoint-allowed-cidrs"], + arg_group="Properties", + help="Comma-separated list of CIDRs that are allowed to send requests to the DNS listening endpoint", + ) + _args_schema.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolArg( + options=["--is-oracle-dns-forwarding-endpoint-enabled"], + arg_group="Properties", + help="Indicates whether the Oracle DNS forwarding endpoint is enabled", + default=False, + ) + _args_schema.is_oracle_dns_listening_endpoint_enabled = AAZBoolArg( + options=["--is-oracle-dns-listening-endpoint-enabled"], + arg_group="Properties", + help="Indicates whether the Oracle DNS listening endpoint is enabled", + default=False, + ) + _args_schema.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolArg( + options=["--is-oracle-to-azure-dns-zone-sync-enabled"], + arg_group="Properties", + help="Indicates whether DNS zone sync from OCI to Azure is enabled", + default=False, + ) + _args_schema.oci_backup_cidr_block = AAZStrArg( + options=["--oci-backup-cidr-block"], + arg_group="Properties", + help="OCI backup subnet cidr block.", + ) + _args_schema.oci_vcn_dns_label = AAZStrArg( + options=["--oci-vcn-dns-label"], + arg_group="Properties", + help="OCI DNS label. This is optional if DNS config is provided.", + ) + _args_schema.resource_anchor_id = AAZStrArg( + options=["--resource-anchor-id"], + arg_group="Properties", + help="Corresponding resource anchor Azure ID", + ) + _args_schema.subnet_id = AAZStrArg( + options=["--subnet-id"], + arg_group="Properties", + help="Client subnet", + ) + + dns_forwarding_rules = cls._args_schema.dns_forwarding_rules + dns_forwarding_rules.Element = AAZObjectArg() + + _element = cls._args_schema.dns_forwarding_rules.Element + _element.domain_names = AAZStrArg( + options=["domain-names"], + help="Comma-separated domain names", + required=True, + ) + _element.forwarding_ip_address = AAZStrArg( + options=["forwarding-ip-address"], + help="Forwarding ip address", + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _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.", + ) + _args_schema.zones = AAZListArg( + options=["--zones"], + arg_group="Resource", + help="The availability zones.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + + zones = cls._args_schema.zones + zones.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.NetworkAnchorsCreateOrUpdate(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 NetworkAnchorsCreateOrUpdate(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/Oracle.Database/networkAnchors/{networkAnchorName}", + **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( + "networkAnchorName", self.ctx.args.network_anchor_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", "2025-09-01", + 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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + _builder.set_prop("zones", AAZListType, ".zones") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("dnsForwardingRules", AAZListType, ".dns_forwarding_rules") + properties.set_prop("dnsListeningEndpointAllowedCidrs", AAZStrType, ".dns_listening_endpoint_allowed_cidrs") + properties.set_prop("isOracleDnsForwardingEndpointEnabled", AAZBoolType, ".is_oracle_dns_forwarding_endpoint_enabled") + properties.set_prop("isOracleDnsListeningEndpointEnabled", AAZBoolType, ".is_oracle_dns_listening_endpoint_enabled") + properties.set_prop("isOracleToAzureDnsZoneSyncEnabled", AAZBoolType, ".is_oracle_to_azure_dns_zone_sync_enabled") + properties.set_prop("ociBackupCidrBlock", AAZStrType, ".oci_backup_cidr_block") + properties.set_prop("ociVcnDnsLabel", AAZStrType, ".oci_vcn_dns_label") + properties.set_prop("resourceAnchorId", AAZStrType, ".resource_anchor_id", typ_kwargs={"flags": {"required": True}}) + properties.set_prop("subnetId", AAZStrType, ".subnet_id", typ_kwargs={"flags": {"required": True}}) + + dns_forwarding_rules = _builder.get(".properties.dnsForwardingRules") + if dns_forwarding_rules is not None: + dns_forwarding_rules.set_elements(AAZObjectType, ".") + + _elements = _builder.get(".properties.dnsForwardingRules[]") + if _elements is not None: + _elements.set_prop("domainNames", AAZStrType, ".domain_names", typ_kwargs={"flags": {"required": True}}) + _elements.set_prop("forwardingIpAddress", AAZStrType, ".forwarding_ip_address", typ_kwargs={"flags": {"required": True}}) + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + zones = _builder.get(".zones") + if zones is not None: + zones.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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _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}, + ) + _schema_on_200_201.zones = AAZListType() + + properties = cls._schema_on_200_201.properties + properties.cidr_block = AAZStrType( + serialized_name="cidrBlock", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_ip_address = AAZStrType( + serialized_name="dnsForwardingEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsForwardingEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.dns_forwarding_rules_url = AAZStrType( + serialized_name="dnsForwardingRulesUrl", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_ip_address = AAZStrType( + serialized_name="dnsListeningEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsListeningEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsForwardingEndpointEnabled", + ) + properties.is_oracle_dns_listening_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsListeningEndpointEnabled", + ) + properties.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolType( + serialized_name="isOracleToAzureDnsZoneSyncEnabled", + ) + properties.oci_backup_cidr_block = AAZStrType( + serialized_name="ociBackupCidrBlock", + ) + properties.oci_subnet_id = AAZStrType( + serialized_name="ociSubnetId", + flags={"read_only": True}, + ) + properties.oci_vcn_dns_label = AAZStrType( + serialized_name="ociVcnDnsLabel", + ) + properties.oci_vcn_id = AAZStrType( + serialized_name="ociVcnId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200_201.zones + zones.Element = AAZStrType() + + return cls._schema_on_200_201 + + +class _CreateHelper: + """Helper class for Create""" + + +__all__ = ["Create"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_delete.py new file mode 100644 index 00000000000..afef59c18d6 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_delete.py @@ -0,0 +1,163 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database network-anchor delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a NetworkAnchor + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/networkanchors/{}", "2025-09-01"], + ] + } + + 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.network_anchor_name = AAZStrArg( + options=["-n", "--name", "--network-anchor-name"], + help="The name of the NetworkAnchor", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.NetworkAnchorsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class NetworkAnchorsDelete(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": "location"}, + 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": "location"}, + 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": "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/Oracle.Database/networkAnchors/{networkAnchorName}", + **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( + "networkAnchorName", self.ctx.args.network_anchor_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", "2025-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_list.py new file mode 100644 index 00000000000..9113e634f96 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_list.py @@ -0,0 +1,475 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database network-anchor list", +) +class List(AAZCommand): + """List NetworkAnchor resources by subscription ID + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/networkanchors", "2025-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/networkanchors", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.NetworkAnchorsListBySubscription(ctx=self.ctx)() + if condition_1: + self.NetworkAnchorsListByResourceGroup(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 NetworkAnchorsListBySubscription(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/Oracle.Database/networkAnchors", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType() + + properties = cls._schema_on_200.value.Element.properties + properties.cidr_block = AAZStrType( + serialized_name="cidrBlock", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_ip_address = AAZStrType( + serialized_name="dnsForwardingEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsForwardingEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.dns_forwarding_rules_url = AAZStrType( + serialized_name="dnsForwardingRulesUrl", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_ip_address = AAZStrType( + serialized_name="dnsListeningEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsListeningEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsForwardingEndpointEnabled", + ) + properties.is_oracle_dns_listening_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsListeningEndpointEnabled", + ) + properties.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolType( + serialized_name="isOracleToAzureDnsZoneSyncEnabled", + ) + properties.oci_backup_cidr_block = AAZStrType( + serialized_name="ociBackupCidrBlock", + ) + properties.oci_subnet_id = AAZStrType( + serialized_name="ociSubnetId", + flags={"read_only": True}, + ) + properties.oci_vcn_dns_label = AAZStrType( + serialized_name="ociVcnDnsLabel", + ) + properties.oci_vcn_id = AAZStrType( + serialized_name="ociVcnId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.value.Element.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + class NetworkAnchorsListByResourceGroup(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/Oracle.Database/networkAnchors", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + _element.zones = AAZListType() + + properties = cls._schema_on_200.value.Element.properties + properties.cidr_block = AAZStrType( + serialized_name="cidrBlock", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_ip_address = AAZStrType( + serialized_name="dnsForwardingEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsForwardingEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.dns_forwarding_rules_url = AAZStrType( + serialized_name="dnsForwardingRulesUrl", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_ip_address = AAZStrType( + serialized_name="dnsListeningEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsListeningEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsForwardingEndpointEnabled", + ) + properties.is_oracle_dns_listening_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsListeningEndpointEnabled", + ) + properties.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolType( + serialized_name="isOracleToAzureDnsZoneSyncEnabled", + ) + properties.oci_backup_cidr_block = AAZStrType( + serialized_name="ociBackupCidrBlock", + ) + properties.oci_subnet_id = AAZStrType( + serialized_name="ociSubnetId", + flags={"read_only": True}, + ) + properties.oci_vcn_dns_label = AAZStrType( + serialized_name="ociVcnDnsLabel", + ) + properties.oci_vcn_id = AAZStrType( + serialized_name="ociVcnId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.value.Element.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ListHelper: + """Helper class for List""" + + +__all__ = ["List"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_show.py new file mode 100644 index 00000000000..aa368f74354 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_show.py @@ -0,0 +1,274 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database network-anchor show", +) +class Show(AAZCommand): + """Get a NetworkAnchor + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/networkanchors/{}", "2025-09-01"], + ] + } + + 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.network_anchor_name = AAZStrArg( + options=["-n", "--name", "--network-anchor-name"], + help="The name of the NetworkAnchor", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkAnchorsGet(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 NetworkAnchorsGet(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/Oracle.Database/networkAnchors/{networkAnchorName}", + **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( + "networkAnchorName", self.ctx.args.network_anchor_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.cidr_block = AAZStrType( + serialized_name="cidrBlock", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_ip_address = AAZStrType( + serialized_name="dnsForwardingEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsForwardingEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.dns_forwarding_rules_url = AAZStrType( + serialized_name="dnsForwardingRulesUrl", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_ip_address = AAZStrType( + serialized_name="dnsListeningEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsListeningEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsForwardingEndpointEnabled", + ) + properties.is_oracle_dns_listening_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsListeningEndpointEnabled", + ) + properties.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolType( + serialized_name="isOracleToAzureDnsZoneSyncEnabled", + ) + properties.oci_backup_cidr_block = AAZStrType( + serialized_name="ociBackupCidrBlock", + ) + properties.oci_subnet_id = AAZStrType( + serialized_name="ociSubnetId", + flags={"read_only": True}, + ) + properties.oci_vcn_dns_label = AAZStrType( + serialized_name="ociVcnDnsLabel", + ) + properties.oci_vcn_id = AAZStrType( + serialized_name="ociVcnId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _ShowHelper: + """Helper class for Show""" + + +__all__ = ["Show"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_update.py new file mode 100644 index 00000000000..6d3be1a6ea3 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_update.py @@ -0,0 +1,606 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database network-anchor update", +) +class Update(AAZCommand): + """Update a NetworkAnchor + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/networkanchors/{}", "2025-09-01"], + ] + } + + 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.network_anchor_name = AAZStrArg( + options=["-n", "--name", "--network-anchor-name"], + help="The name of the NetworkAnchor", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolArg( + options=["--is-oracle-dns-forwarding-endpoint-enabled"], + arg_group="Properties", + help="Indicates whether the Oracle DNS forwarding endpoint is enabled", + nullable=True, + ) + _args_schema.is_oracle_dns_listening_endpoint_enabled = AAZBoolArg( + options=["--is-oracle-dns-listening-endpoint-enabled"], + arg_group="Properties", + help="Indicates whether the Oracle DNS listening endpoint is enabled", + nullable=True, + ) + _args_schema.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolArg( + options=["--is-oracle-to-azure-dns-zone-sync-enabled"], + arg_group="Properties", + help="Indicates whether DNS zone sync from OCI to Azure is enabled", + nullable=True, + ) + _args_schema.oci_backup_cidr_block = AAZStrArg( + options=["--oci-backup-cidr-block"], + arg_group="Properties", + help="OCI backup subnet cidr block.", + nullable=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + nullable=True, + ) + _args_schema.zones = AAZListArg( + options=["--zones"], + arg_group="Resource", + help="The availability zones.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + + zones = cls._args_schema.zones + zones.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkAnchorsGet(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.NetworkAnchorsCreateOrUpdate(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 NetworkAnchorsGet(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/Oracle.Database/networkAnchors/{networkAnchorName}", + **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( + "networkAnchorName", self.ctx.args.network_anchor_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.cidr_block = AAZStrType( + serialized_name="cidrBlock", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_ip_address = AAZStrType( + serialized_name="dnsForwardingEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsForwardingEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.dns_forwarding_rules_url = AAZStrType( + serialized_name="dnsForwardingRulesUrl", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_ip_address = AAZStrType( + serialized_name="dnsListeningEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsListeningEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsForwardingEndpointEnabled", + ) + properties.is_oracle_dns_listening_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsListeningEndpointEnabled", + ) + properties.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolType( + serialized_name="isOracleToAzureDnsZoneSyncEnabled", + ) + properties.oci_backup_cidr_block = AAZStrType( + serialized_name="ociBackupCidrBlock", + ) + properties.oci_subnet_id = AAZStrType( + serialized_name="ociSubnetId", + flags={"read_only": True}, + ) + properties.oci_vcn_dns_label = AAZStrType( + serialized_name="ociVcnDnsLabel", + ) + properties.oci_vcn_id = AAZStrType( + serialized_name="ociVcnId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + class NetworkAnchorsCreateOrUpdate(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/Oracle.Database/networkAnchors/{networkAnchorName}", + **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( + "networkAnchorName", self.ctx.args.network_anchor_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", "2025-09-01", + 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() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _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() + _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}, + ) + _schema_on_200_201.zones = AAZListType() + + properties = cls._schema_on_200_201.properties + properties.cidr_block = AAZStrType( + serialized_name="cidrBlock", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_ip_address = AAZStrType( + serialized_name="dnsForwardingEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsForwardingEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.dns_forwarding_rules_url = AAZStrType( + serialized_name="dnsForwardingRulesUrl", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_ip_address = AAZStrType( + serialized_name="dnsListeningEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsListeningEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsForwardingEndpointEnabled", + ) + properties.is_oracle_dns_listening_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsListeningEndpointEnabled", + ) + properties.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolType( + serialized_name="isOracleToAzureDnsZoneSyncEnabled", + ) + properties.oci_backup_cidr_block = AAZStrType( + serialized_name="ociBackupCidrBlock", + ) + properties.oci_subnet_id = AAZStrType( + serialized_name="ociSubnetId", + flags={"read_only": True}, + ) + properties.oci_vcn_dns_label = AAZStrType( + serialized_name="ociVcnDnsLabel", + ) + properties.oci_vcn_id = AAZStrType( + serialized_name="ociVcnId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200_201.zones + zones.Element = AAZStrType() + + 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("properties", AAZObjectType) + _builder.set_prop("tags", AAZDictType, ".tags") + _builder.set_prop("zones", AAZListType, ".zones") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("isOracleDnsForwardingEndpointEnabled", AAZBoolType, ".is_oracle_dns_forwarding_endpoint_enabled") + properties.set_prop("isOracleDnsListeningEndpointEnabled", AAZBoolType, ".is_oracle_dns_listening_endpoint_enabled") + properties.set_prop("isOracleToAzureDnsZoneSyncEnabled", AAZBoolType, ".is_oracle_to_azure_dns_zone_sync_enabled") + properties.set_prop("ociBackupCidrBlock", AAZStrType, ".oci_backup_cidr_block") + + tags = _builder.get(".tags") + if tags is not None: + tags.set_elements(AAZStrType, ".") + + zones = _builder.get(".zones") + if zones is not None: + zones.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""" + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_wait.py new file mode 100644 index 00000000000..133d1818775 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/network_anchor/_wait.py @@ -0,0 +1,273 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database network-anchor wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/networkanchors/{}", "2025-09-01"], + ] + } + + 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.network_anchor_name = AAZStrArg( + options=["-n", "--name", "--network-anchor-name"], + help="The name of the NetworkAnchor", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.NetworkAnchorsGet(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 NetworkAnchorsGet(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/Oracle.Database/networkAnchors/{networkAnchorName}", + **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( + "networkAnchorName", self.ctx.args.network_anchor_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + _schema_on_200.zones = AAZListType() + + properties = cls._schema_on_200.properties + properties.cidr_block = AAZStrType( + serialized_name="cidrBlock", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_ip_address = AAZStrType( + serialized_name="dnsForwardingEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_forwarding_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsForwardingEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.dns_forwarding_rules_url = AAZStrType( + serialized_name="dnsForwardingRulesUrl", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_ip_address = AAZStrType( + serialized_name="dnsListeningEndpointIpAddress", + flags={"read_only": True}, + ) + properties.dns_listening_endpoint_nsg_rules_url = AAZStrType( + serialized_name="dnsListeningEndpointNsgRulesUrl", + flags={"read_only": True}, + ) + properties.is_oracle_dns_forwarding_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsForwardingEndpointEnabled", + ) + properties.is_oracle_dns_listening_endpoint_enabled = AAZBoolType( + serialized_name="isOracleDnsListeningEndpointEnabled", + ) + properties.is_oracle_to_azure_dns_zone_sync_enabled = AAZBoolType( + serialized_name="isOracleToAzureDnsZoneSyncEnabled", + ) + properties.oci_backup_cidr_block = AAZStrType( + serialized_name="ociBackupCidrBlock", + ) + properties.oci_subnet_id = AAZStrType( + serialized_name="ociSubnetId", + flags={"read_only": True}, + ) + properties.oci_vcn_dns_label = AAZStrType( + serialized_name="ociVcnDnsLabel", + ) + properties.oci_vcn_id = AAZStrType( + serialized_name="ociVcnId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.resource_anchor_id = AAZStrType( + serialized_name="resourceAnchorId", + flags={"required": True}, + ) + properties.subnet_id = AAZStrType( + serialized_name="subnetId", + flags={"required": True}, + ) + properties.vnet_id = AAZStrType( + serialized_name="vnetId", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + zones = cls._schema_on_200.zones + zones.Element = AAZStrType() + + return cls._schema_on_200 + + +class _WaitHelper: + """Helper class for Wait""" + + +__all__ = ["Wait"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/__cmd_group.py new file mode 100644 index 00000000000..925bc24f959 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/__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( + "oracle-database oracle-subscription", +) +class __CMDGroup(AAZCommandGroup): + """Oracle Subscriptions + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/__init__.py new file mode 100644 index 00000000000..1e9349e7e87 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/__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 ._add_azure_subscription import * +from ._create import * +from ._delete import * +from ._list import * +from ._list_activation_link import * +from ._list_cloud_account_detail import * +from ._list_saas_subscription_detail import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_add_azure_subscription.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_add_azure_subscription.py new file mode 100644 index 00000000000..800912f61ed --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_add_azure_subscription.py @@ -0,0 +1,153 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription add-azure-subscription", +) +class AddAzureSubscription(AAZCommand): + """Add Azure Subscriptions + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default/addazuresubscriptions", "2025-09-01"], + ] + } + + 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 "" + + # define Arg Group "Body" + + _args_schema = cls._args_schema + _args_schema.azure_subscription_ids = AAZListArg( + options=["--azure-subscription-ids"], + arg_group="Body", + help="Azure Subscription Ids to be updated", + required=True, + ) + + azure_subscription_ids = cls._args_schema.azure_subscription_ids + azure_subscription_ids.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsAddAzureSubscriptions(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class OracleSubscriptionsAddAzureSubscriptions(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}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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": {"required": True, "client_flatten": True}} + ) + _builder.set_prop("azureSubscriptionIds", AAZListType, ".azure_subscription_ids", typ_kwargs={"flags": {"required": True}}) + + azure_subscription_ids = _builder.get(".azureSubscriptionIds") + if azure_subscription_ids is not None: + azure_subscription_ids.set_elements(AAZStrType, ".") + + return self.serialize_content(_content_value) + + +class _AddAzureSubscriptionHelper: + """Helper class for AddAzureSubscription""" + + +__all__ = ["AddAzureSubscription"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_create.py new file mode 100644 index 00000000000..3f9a7e9b649 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_create.py @@ -0,0 +1,315 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription create", +) +class Create(AAZCommand): + """Create a OracleSubscription + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2025-09-01"], + ] + } + + 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 "" + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.term_unit = AAZStrArg( + options=["--term-unit"], + arg_group="Properties", + help="Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601", + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.plan = AAZObjectArg( + options=["--plan"], + arg_group="Resource", + help="Details of the resource plan.", + ) + + plan = cls._args_schema.plan + plan.name = AAZStrArg( + options=["name"], + help="A user defined name of the 3rd Party Artifact that is being procured.", + required=True, + ) + plan.product = AAZStrArg( + options=["product"], + help="The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + required=True, + ) + plan.promotion_code = AAZStrArg( + options=["promotion-code"], + help="A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + ) + plan.publisher = AAZStrArg( + options=["publisher"], + help="The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + required=True, + ) + plan.version = AAZStrArg( + options=["version"], + help="The version of the desired product/artifact.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsCreateOrUpdate(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 OracleSubscriptionsCreateOrUpdate(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}/providers/Oracle.Database/oracleSubscriptions/default", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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("plan", AAZObjectType, ".plan") + _builder.set_prop("properties", AAZObjectType) + + plan = _builder.get(".plan") + if plan is not None: + plan.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("product", AAZStrType, ".product", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("promotionCode", AAZStrType, ".promotion_code") + plan.set_prop("publisher", AAZStrType, ".publisher", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("version", AAZStrType, ".version") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("termUnit", AAZStrType, ".term_unit") + + 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.plan = AAZObjectType() + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200_201.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200_201.properties + properties.add_subscription_operation_state = AAZStrType( + serialized_name="addSubscriptionOperationState", + flags={"read_only": True}, + ) + properties.azure_subscription_ids = AAZListType( + serialized_name="azureSubscriptionIds", + flags={"read_only": True}, + ) + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + flags={"read_only": True}, + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + flags={"read_only": True}, + ) + properties.last_operation_status_detail = AAZStrType( + serialized_name="lastOperationStatusDetail", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + azure_subscription_ids = cls._schema_on_200_201.properties.azure_subscription_ids + azure_subscription_ids.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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_delete.py new file mode 100644 index 00000000000..d863bd7efcb --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_delete.py @@ -0,0 +1,141 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a OracleSubscription + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2025-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class OracleSubscriptionsDelete(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": "location"}, + 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": "location"}, + 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": "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}/providers/Oracle.Database/oracleSubscriptions/default", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list.py new file mode 100644 index 00000000000..678694f5a7e --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list.py @@ -0,0 +1,226 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription list", +) +class List(AAZCommand): + """List OracleSubscription resources by subscription ID + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions", "2023-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.OracleSubscriptionsListBySubscription(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 OracleSubscriptionsListBySubscription(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/Oracle.Database/oracleSubscriptions", + **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", "2023-09-01", + 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.plan = AAZObjectType() + _element.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.value.Element.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.value.Element.properties + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_activation_link.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_activation_link.py new file mode 100644 index 00000000000..2e61ad3048a --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_activation_link.py @@ -0,0 +1,167 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription list-activation-link", +) +class ListActivationLink(AAZCommand): + """List Activation Links + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default/listactivationlinks", "2025-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsListActivationLinks(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 OracleSubscriptionsListActivationLinks(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": "location"}, + 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": "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}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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.existing_cloud_account_activation_link = AAZStrType( + serialized_name="existingCloudAccountActivationLink", + flags={"read_only": True}, + ) + _schema_on_200.new_cloud_account_activation_link = AAZStrType( + serialized_name="newCloudAccountActivationLink", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListActivationLinkHelper: + """Helper class for ListActivationLink""" + + +__all__ = ["ListActivationLink"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_cloud_account_detail.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_cloud_account_detail.py new file mode 100644 index 00000000000..5ba69e5b02b --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_cloud_account_detail.py @@ -0,0 +1,167 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription list-cloud-account-detail", +) +class ListCloudAccountDetail(AAZCommand): + """List Cloud Account Details + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default/listcloudaccountdetails", "2025-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsListCloudAccountDetails(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 OracleSubscriptionsListCloudAccountDetails(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": "location"}, + 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": "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}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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.cloud_account_home_region = AAZStrType( + serialized_name="cloudAccountHomeRegion", + flags={"read_only": True}, + ) + _schema_on_200.cloud_account_name = AAZStrType( + serialized_name="cloudAccountName", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListCloudAccountDetailHelper: + """Helper class for ListCloudAccountDetail""" + + +__all__ = ["ListCloudAccountDetail"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_saas_subscription_detail.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_saas_subscription_detail.py new file mode 100644 index 00000000000..b18c17db930 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_list_saas_subscription_detail.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription list-saas-subscription-detail", +) +class ListSaasSubscriptionDetail(AAZCommand): + """List Saas Subscription Details + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default/listsaassubscriptiondetails", "2025-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsListSaasSubscriptionDetails(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 OracleSubscriptionsListSaasSubscriptionDetails(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": "location"}, + 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": "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}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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.is_auto_renew = AAZBoolType( + serialized_name="isAutoRenew", + flags={"read_only": True}, + ) + _schema_on_200.is_free_trial = AAZBoolType( + serialized_name="isFreeTrial", + flags={"read_only": True}, + ) + _schema_on_200.offer_id = AAZStrType( + serialized_name="offerId", + flags={"read_only": True}, + ) + _schema_on_200.plan_id = AAZStrType( + serialized_name="planId", + flags={"read_only": True}, + ) + _schema_on_200.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"read_only": True}, + ) + _schema_on_200.purchaser_email_id = AAZStrType( + serialized_name="purchaserEmailId", + flags={"read_only": True}, + ) + _schema_on_200.purchaser_tenant_id = AAZStrType( + serialized_name="purchaserTenantId", + flags={"read_only": True}, + ) + _schema_on_200.saas_subscription_status = AAZStrType( + serialized_name="saasSubscriptionStatus", + flags={"read_only": True}, + ) + _schema_on_200.subscription_name = AAZStrType( + serialized_name="subscriptionName", + flags={"read_only": True}, + ) + _schema_on_200.term_unit = AAZStrType( + serialized_name="termUnit", + flags={"read_only": True}, + ) + _schema_on_200.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListSaasSubscriptionDetailHelper: + """Helper class for ListSaasSubscriptionDetail""" + + +__all__ = ["ListSaasSubscriptionDetail"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_show.py new file mode 100644 index 00000000000..f6767b25773 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_show.py @@ -0,0 +1,228 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription show", +) +class Show(AAZCommand): + """Get a OracleSubscription + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2025-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.OracleSubscriptionsGet(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 OracleSubscriptionsGet(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/Oracle.Database/oracleSubscriptions/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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.add_subscription_operation_state = AAZStrType( + serialized_name="addSubscriptionOperationState", + flags={"read_only": True}, + ) + properties.azure_subscription_ids = AAZListType( + serialized_name="azureSubscriptionIds", + flags={"read_only": True}, + ) + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + flags={"read_only": True}, + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + flags={"read_only": True}, + ) + properties.last_operation_status_detail = AAZStrType( + serialized_name="lastOperationStatusDetail", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + azure_subscription_ids = cls._schema_on_200.properties.azure_subscription_ids + azure_subscription_ids.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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_update.py new file mode 100644 index 00000000000..3f74a48f3c3 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_update.py @@ -0,0 +1,522 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription update", +) +class Update(AAZCommand): + """Update a OracleSubscription + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2025-09-01"], + ] + } + + 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 "" + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.intent = AAZStrArg( + options=["--intent"], + arg_group="Properties", + help="Intent for the update operation", + nullable=True, + enum={"Reset": "Reset", "Retain": "Retain"}, + ) + _args_schema.product_code = AAZStrArg( + options=["--product-code"], + arg_group="Properties", + help="Product code for the term unit", + nullable=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.plan = AAZObjectArg( + options=["--plan"], + arg_group="Resource", + help="Details of the resource plan.", + nullable=True, + ) + + plan = cls._args_schema.plan + plan.name = AAZStrArg( + options=["name"], + help="A user defined name of the 3rd Party Artifact that is being procured.", + ) + plan.product = AAZStrArg( + options=["product"], + help="The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + ) + plan.promotion_code = AAZStrArg( + options=["promotion-code"], + help="A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + nullable=True, + ) + plan.publisher = AAZStrArg( + options=["publisher"], + help="The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + ) + plan.version = AAZStrArg( + options=["version"], + help="The version of the desired product/artifact.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.OracleSubscriptionsGet(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.OracleSubscriptionsCreateOrUpdate(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 OracleSubscriptionsGet(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/Oracle.Database/oracleSubscriptions/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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.add_subscription_operation_state = AAZStrType( + serialized_name="addSubscriptionOperationState", + flags={"read_only": True}, + ) + properties.azure_subscription_ids = AAZListType( + serialized_name="azureSubscriptionIds", + flags={"read_only": True}, + ) + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + flags={"read_only": True}, + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + flags={"read_only": True}, + ) + properties.last_operation_status_detail = AAZStrType( + serialized_name="lastOperationStatusDetail", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + azure_subscription_ids = cls._schema_on_200.properties.azure_subscription_ids + azure_subscription_ids.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 OracleSubscriptionsCreateOrUpdate(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}/providers/Oracle.Database/oracleSubscriptions/default", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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() + + _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.plan = AAZObjectType() + _schema_on_200_201.properties = AAZObjectType() + _schema_on_200_201.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200_201.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200_201.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200_201.properties + properties.add_subscription_operation_state = AAZStrType( + serialized_name="addSubscriptionOperationState", + flags={"read_only": True}, + ) + properties.azure_subscription_ids = AAZListType( + serialized_name="azureSubscriptionIds", + flags={"read_only": True}, + ) + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + flags={"read_only": True}, + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + flags={"read_only": True}, + ) + properties.last_operation_status_detail = AAZStrType( + serialized_name="lastOperationStatusDetail", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + azure_subscription_ids = cls._schema_on_200_201.properties.azure_subscription_ids + azure_subscription_ids.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 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("plan", AAZObjectType, ".plan") + _builder.set_prop("properties", AAZObjectType) + + plan = _builder.get(".plan") + if plan is not None: + plan.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("product", AAZStrType, ".product", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("promotionCode", AAZStrType, ".promotion_code") + plan.set_prop("publisher", AAZStrType, ".publisher", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("version", AAZStrType, ".version") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("intent", AAZStrType, ".intent") + properties.set_prop("productCode", AAZStrType, ".product_code") + + 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""" + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_wait.py new file mode 100644 index 00000000000..00735e2d1fb --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/_wait.py @@ -0,0 +1,227 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2025-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.OracleSubscriptionsGet(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 OracleSubscriptionsGet(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/Oracle.Database/oracleSubscriptions/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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType() + _schema_on_200.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _schema_on_200.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.add_subscription_operation_state = AAZStrType( + serialized_name="addSubscriptionOperationState", + flags={"read_only": True}, + ) + properties.azure_subscription_ids = AAZListType( + serialized_name="azureSubscriptionIds", + flags={"read_only": True}, + ) + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + flags={"read_only": True}, + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + flags={"read_only": True}, + ) + properties.last_operation_status_detail = AAZStrType( + serialized_name="lastOperationStatusDetail", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + azure_subscription_ids = cls._schema_on_200.properties.azure_subscription_ids + azure_subscription_ids.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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/__cmd_group.py new file mode 100644 index 00000000000..ee4acdee2c7 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/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( + "oracle-database oracle-subscription default", +) +class __CMDGroup(AAZCommandGroup): + """Oracle Subscriptions + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/__init__.py new file mode 100644 index 00000000000..5cbd1b423bf --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/__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 ._list_activation_link import * +from ._list_cloud_account_detail import * +from ._list_saas_subscription_detail import * +from ._show import * +from ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_create.py new file mode 100644 index 00000000000..cfc71c66954 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_create.py @@ -0,0 +1,300 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription default create", +) +class Create(AAZCommand): + """Create a OracleSubscription + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2023-09-01"], + ] + } + + 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 "" + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.term_unit = AAZStrArg( + options=["--term-unit"], + arg_group="Properties", + help="Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601", + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.plan = AAZObjectArg( + options=["--plan"], + arg_group="Resource", + help="Details of the resource plan.", + ) + + plan = cls._args_schema.plan + plan.name = AAZStrArg( + options=["name"], + help="A user defined name of the 3rd Party Artifact that is being procured.", + required=True, + ) + plan.product = AAZStrArg( + options=["product"], + help="The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + required=True, + ) + plan.promotion_code = AAZStrArg( + options=["promotion-code"], + help="A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + ) + plan.publisher = AAZStrArg( + options=["publisher"], + help="The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + required=True, + ) + plan.version = AAZStrArg( + options=["version"], + help="The version of the desired product/artifact.", + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsCreateOrUpdate(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 OracleSubscriptionsCreateOrUpdate(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}/providers/Oracle.Database/oracleSubscriptions/default", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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("plan", AAZObjectType, ".plan") + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + plan = _builder.get(".plan") + if plan is not None: + plan.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("product", AAZStrType, ".product", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("promotionCode", AAZStrType, ".promotion_code") + plan.set_prop("publisher", AAZStrType, ".publisher", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("version", AAZStrType, ".version") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("termUnit", AAZStrType, ".term_unit") + + 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.plan = AAZObjectType() + _schema_on_200_201.properties = AAZObjectType( + flags={"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}, + ) + + plan = cls._schema_on_200_201.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200_201.properties + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_delete.py new file mode 100644 index 00000000000..2a3618ec92f --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_delete.py @@ -0,0 +1,141 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription default delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a OracleSubscription + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2023-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class OracleSubscriptionsDelete(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": "location"}, + 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": "location"}, + 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": "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}/providers/Oracle.Database/oracleSubscriptions/default", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_activation_link.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_activation_link.py new file mode 100644 index 00000000000..0fd7d4bc379 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_activation_link.py @@ -0,0 +1,167 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription default list-activation-link", +) +class ListActivationLink(AAZCommand): + """List Activation Links + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default/listactivationlinks", "2023-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsListActivationLinks(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 OracleSubscriptionsListActivationLinks(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": "location"}, + 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": "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}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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.existing_cloud_account_activation_link = AAZStrType( + serialized_name="existingCloudAccountActivationLink", + flags={"read_only": True}, + ) + _schema_on_200.new_cloud_account_activation_link = AAZStrType( + serialized_name="newCloudAccountActivationLink", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListActivationLinkHelper: + """Helper class for ListActivationLink""" + + +__all__ = ["ListActivationLink"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_cloud_account_detail.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_cloud_account_detail.py new file mode 100644 index 00000000000..13caf366ac7 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_cloud_account_detail.py @@ -0,0 +1,167 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription default list-cloud-account-detail", +) +class ListCloudAccountDetail(AAZCommand): + """List Cloud Account Details + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default/listcloudaccountdetails", "2023-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsListCloudAccountDetails(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 OracleSubscriptionsListCloudAccountDetails(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": "location"}, + 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": "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}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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.cloud_account_home_region = AAZStrType( + serialized_name="cloudAccountHomeRegion", + flags={"read_only": True}, + ) + _schema_on_200.cloud_account_name = AAZStrType( + serialized_name="cloudAccountName", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListCloudAccountDetailHelper: + """Helper class for ListCloudAccountDetail""" + + +__all__ = ["ListCloudAccountDetail"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_saas_subscription_detail.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_saas_subscription_detail.py new file mode 100644 index 00000000000..06ff878595a --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_list_saas_subscription_detail.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription default list-saas-subscription-detail", +) +class ListSaasSubscriptionDetail(AAZCommand): + """List Saas Subscription Details + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default/listsaassubscriptiondetails", "2023-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.OracleSubscriptionsListSaasSubscriptionDetails(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 OracleSubscriptionsListSaasSubscriptionDetails(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": "location"}, + 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": "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}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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.is_auto_renew = AAZBoolType( + serialized_name="isAutoRenew", + flags={"read_only": True}, + ) + _schema_on_200.is_free_trial = AAZBoolType( + serialized_name="isFreeTrial", + flags={"read_only": True}, + ) + _schema_on_200.offer_id = AAZStrType( + serialized_name="offerId", + flags={"read_only": True}, + ) + _schema_on_200.plan_id = AAZStrType( + serialized_name="planId", + flags={"read_only": True}, + ) + _schema_on_200.publisher_id = AAZStrType( + serialized_name="publisherId", + flags={"read_only": True}, + ) + _schema_on_200.purchaser_email_id = AAZStrType( + serialized_name="purchaserEmailId", + flags={"read_only": True}, + ) + _schema_on_200.purchaser_tenant_id = AAZStrType( + serialized_name="purchaserTenantId", + flags={"read_only": True}, + ) + _schema_on_200.saas_subscription_status = AAZStrType( + serialized_name="saasSubscriptionStatus", + flags={"read_only": True}, + ) + _schema_on_200.subscription_name = AAZStrType( + serialized_name="subscriptionName", + flags={"read_only": True}, + ) + _schema_on_200.term_unit = AAZStrType( + serialized_name="termUnit", + flags={"read_only": True}, + ) + _schema_on_200.time_created = AAZStrType( + serialized_name="timeCreated", + flags={"read_only": True}, + ) + + return cls._schema_on_200 + + +class _ListSaasSubscriptionDetailHelper: + """Helper class for ListSaasSubscriptionDetail""" + + +__all__ = ["ListSaasSubscriptionDetail"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_show.py new file mode 100644 index 00000000000..a4e2dd7a6a8 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_show.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( + "oracle-database oracle-subscription default show", +) +class Show(AAZCommand): + """Get a OracleSubscription + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2023-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.OracleSubscriptionsGet(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 OracleSubscriptionsGet(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/Oracle.Database/oracleSubscriptions/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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType( + flags={"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}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_update.py new file mode 100644 index 00000000000..ad91b7cc8c0 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_update.py @@ -0,0 +1,443 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription default update", +) +class Update(AAZCommand): + """Update a OracleSubscription + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2023-09-01"], + ] + } + + 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 "" + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.intent = AAZStrArg( + options=["--intent"], + arg_group="Properties", + help="Intent for the update operation", + nullable=True, + enum={"Reset": "Reset", "Retain": "Retain"}, + ) + _args_schema.product_code = AAZStrArg( + options=["--product-code"], + arg_group="Properties", + help="Product code for the term unit", + nullable=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.plan = AAZObjectArg( + options=["--plan"], + arg_group="Resource", + help="Details of the resource plan.", + nullable=True, + ) + + plan = cls._args_schema.plan + plan.name = AAZStrArg( + options=["name"], + help="A user defined name of the 3rd Party Artifact that is being procured.", + ) + plan.product = AAZStrArg( + options=["product"], + help="The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. ", + ) + plan.promotion_code = AAZStrArg( + options=["promotion-code"], + help="A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + nullable=True, + ) + plan.publisher = AAZStrArg( + options=["publisher"], + help="The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + ) + plan.version = AAZStrArg( + options=["version"], + help="The version of the desired product/artifact.", + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.OracleSubscriptionsGet(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.OracleSubscriptionsCreateOrUpdate(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 OracleSubscriptionsGet(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/Oracle.Database/oracleSubscriptions/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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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_oracle_subscription_read(cls._schema_on_200) + + return cls._schema_on_200 + + class OracleSubscriptionsCreateOrUpdate(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}/providers/Oracle.Database/oracleSubscriptions/default", + **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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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_oracle_subscription_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("plan", AAZObjectType, ".plan") + _builder.set_prop("properties", AAZObjectType, typ_kwargs={"flags": {"client_flatten": True}}) + + plan = _builder.get(".plan") + if plan is not None: + plan.set_prop("name", AAZStrType, ".name", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("product", AAZStrType, ".product", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("promotionCode", AAZStrType, ".promotion_code") + plan.set_prop("publisher", AAZStrType, ".publisher", typ_kwargs={"flags": {"required": True}}) + plan.set_prop("version", AAZStrType, ".version") + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("intent", AAZStrType, ".intent") + properties.set_prop("productCode", AAZStrType, ".product_code") + + 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_oracle_subscription_read = None + + @classmethod + def _build_schema_oracle_subscription_read(cls, _schema): + if cls._schema_oracle_subscription_read is not None: + _schema.id = cls._schema_oracle_subscription_read.id + _schema.name = cls._schema_oracle_subscription_read.name + _schema.plan = cls._schema_oracle_subscription_read.plan + _schema.properties = cls._schema_oracle_subscription_read.properties + _schema.system_data = cls._schema_oracle_subscription_read.system_data + _schema.type = cls._schema_oracle_subscription_read.type + return + + cls._schema_oracle_subscription_read = _schema_oracle_subscription_read = AAZObjectType() + + oracle_subscription_read = _schema_oracle_subscription_read + oracle_subscription_read.id = AAZStrType( + flags={"read_only": True}, + ) + oracle_subscription_read.name = AAZStrType( + flags={"read_only": True}, + ) + oracle_subscription_read.plan = AAZObjectType() + oracle_subscription_read.properties = AAZObjectType( + flags={"client_flatten": True}, + ) + oracle_subscription_read.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + oracle_subscription_read.type = AAZStrType( + flags={"read_only": True}, + ) + + plan = _schema_oracle_subscription_read.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = _schema_oracle_subscription_read.properties + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + system_data = _schema_oracle_subscription_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_oracle_subscription_read.id + _schema.name = cls._schema_oracle_subscription_read.name + _schema.plan = cls._schema_oracle_subscription_read.plan + _schema.properties = cls._schema_oracle_subscription_read.properties + _schema.system_data = cls._schema_oracle_subscription_read.system_data + _schema.type = cls._schema_oracle_subscription_read.type + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_wait.py new file mode 100644 index 00000000000..2a5a8f9aacb --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/oracle_subscription/default/_wait.py @@ -0,0 +1,212 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database oracle-subscription default wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/oraclesubscriptions/default", "2023-09-01"], + ] + } + + 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 "" + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.OracleSubscriptionsGet(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 OracleSubscriptionsGet(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/Oracle.Database/oracleSubscriptions/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( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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.plan = AAZObjectType() + _schema_on_200.properties = AAZObjectType( + flags={"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}, + ) + + plan = cls._schema_on_200.plan + plan.name = AAZStrType( + flags={"required": True}, + ) + plan.product = AAZStrType( + flags={"required": True}, + ) + plan.promotion_code = AAZStrType( + serialized_name="promotionCode", + ) + plan.publisher = AAZStrType( + flags={"required": True}, + ) + plan.version = AAZStrType() + + properties = cls._schema_on_200.properties + properties.cloud_account_id = AAZStrType( + serialized_name="cloudAccountId", + ) + properties.cloud_account_state = AAZStrType( + serialized_name="cloudAccountState", + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.saas_subscription_id = AAZStrType( + serialized_name="saasSubscriptionId", + flags={"read_only": True}, + ) + properties.term_unit = AAZStrType( + serialized_name="termUnit", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/__cmd_group.py new file mode 100644 index 00000000000..6ccc29942ee --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/__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( + "oracle-database resource-anchor", +) +class __CMDGroup(AAZCommandGroup): + """Manage Resource Anchor + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_create.py new file mode 100644 index 00000000000..6e869ed429f --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_create.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( + "oracle-database resource-anchor create", +) +class Create(AAZCommand): + """Create a ResourceAnchor + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/resourceanchors/{}", "2025-09-01"], + ] + } + + 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.resource_anchor_name = AAZStrArg( + options=["-n", "--name", "--resource-anchor-name"], + help="The name of the ResourceAnchor", + required=True, + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _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.", + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg() + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ResourceAnchorsCreateOrUpdate(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 ResourceAnchorsCreateOrUpdate(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/Oracle.Database/resourceAnchors/{resourceAnchorName}", + **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( + "resourceAnchorName", self.ctx.args.resource_anchor_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", "2025-09-01", + 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("location", AAZStrType, ".location", typ_kwargs={"flags": {"required": True}}) + _builder.set_prop("tags", AAZDictType, ".tags") + + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200_201.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200_201.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200_201.properties + properties.linked_compartment_id = AAZStrType( + serialized_name="linkedCompartmentId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": 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", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_delete.py new file mode 100644 index 00000000000..f104de4c106 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_delete.py @@ -0,0 +1,163 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database resource-anchor delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a ResourceAnchor + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/resourceanchors/{}", "2025-09-01"], + ] + } + + 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.resource_anchor_name = AAZStrArg( + options=["-n", "--name", "--resource-anchor-name"], + help="The name of the ResourceAnchor", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.ResourceAnchorsDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class ResourceAnchorsDelete(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": "location"}, + 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": "location"}, + 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": "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/Oracle.Database/resourceAnchors/{resourceAnchorName}", + **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( + "resourceAnchorName", self.ctx.args.resource_anchor_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", "2025-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_list.py new file mode 100644 index 00000000000..018a5597194 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_list.py @@ -0,0 +1,357 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database resource-anchor list", +) +class List(AAZCommand): + """List ResourceAnchor resources by subscription ID + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/resourceanchors", "2025-09-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/resourceanchors", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.subscription_id) and has_value(self.ctx.args.resource_group) is not True + condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id) + if condition_0: + self.ResourceAnchorsListBySubscription(ctx=self.ctx)() + if condition_1: + self.ResourceAnchorsListByResourceGroup(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 ResourceAnchorsListBySubscription(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/Oracle.Database/resourceAnchors", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.linked_compartment_id = AAZStrType( + serialized_name="linkedCompartmentId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200.value.Element.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class ResourceAnchorsListByResourceGroup(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/Oracle.Database/resourceAnchors", + **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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _element.name = AAZStrType( + flags={"read_only": True}, + ) + _element.properties = AAZObjectType() + _element.system_data = AAZObjectType( + serialized_name="systemData", + flags={"read_only": True}, + ) + _element.tags = AAZDictType() + _element.type = AAZStrType( + flags={"read_only": True}, + ) + + properties = cls._schema_on_200.value.Element.properties + properties.linked_compartment_id = AAZStrType( + serialized_name="linkedCompartmentId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": 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", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_show.py new file mode 100644 index 00000000000..29b003f570d --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_show.py @@ -0,0 +1,215 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database resource-anchor show", +) +class Show(AAZCommand): + """Get a ResourceAnchor + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/resourceanchors/{}", "2025-09-01"], + ] + } + + 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.resource_anchor_name = AAZStrArg( + options=["-n", "--name", "--resource-anchor-name"], + help="The name of the ResourceAnchor", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ResourceAnchorsGet(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 ResourceAnchorsGet(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/Oracle.Database/resourceAnchors/{resourceAnchorName}", + **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( + "resourceAnchorName", self.ctx.args.resource_anchor_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200.properties + properties.linked_compartment_id = AAZStrType( + serialized_name="linkedCompartmentId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": 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", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_update.py new file mode 100644 index 00000000000..a11975f24a6 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_update.py @@ -0,0 +1,436 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database resource-anchor update", +) +class Update(AAZCommand): + """Update a ResourceAnchor + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/resourceanchors/{}", "2025-09-01"], + ] + } + + 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.resource_anchor_name = AAZStrArg( + options=["-n", "--name", "--resource-anchor-name"], + help="The name of the ResourceAnchor", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + + # define Arg Group "Resource" + + _args_schema = cls._args_schema + _args_schema.tags = AAZDictArg( + options=["--tags"], + arg_group="Resource", + help="Resource tags.", + nullable=True, + ) + + tags = cls._args_schema.tags + tags.Element = AAZStrArg( + nullable=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ResourceAnchorsGet(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.ResourceAnchorsCreateOrUpdate(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 ResourceAnchorsGet(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/Oracle.Database/resourceAnchors/{resourceAnchorName}", + **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( + "resourceAnchorName", self.ctx.args.resource_anchor_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200.properties + properties.linked_compartment_id = AAZStrType( + serialized_name="linkedCompartmentId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200.tags + tags.Element = AAZStrType() + + return cls._schema_on_200 + + class ResourceAnchorsCreateOrUpdate(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/Oracle.Database/resourceAnchors/{resourceAnchorName}", + **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( + "resourceAnchorName", self.ctx.args.resource_anchor_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", "2025-09-01", + 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() + + _schema_on_200_201 = cls._schema_on_200_201 + _schema_on_200_201.id = AAZStrType( + flags={"read_only": True}, + ) + _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() + _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}, + ) + + properties = cls._schema_on_200_201.properties + properties.linked_compartment_id = AAZStrType( + serialized_name="linkedCompartmentId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": 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", + ) + + tags = cls._schema_on_200_201.tags + tags.Element = AAZStrType() + + 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("tags", AAZDictType, ".tags") + + 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""" + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_wait.py new file mode 100644 index 00000000000..df4ba20b99e --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/resource_anchor/_wait.py @@ -0,0 +1,214 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database resource-anchor wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/resourceanchors/{}", "2025-09-01"], + ] + } + + 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.resource_anchor_name = AAZStrArg( + options=["-n", "--name", "--resource-anchor-name"], + help="The name of the ResourceAnchor", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern="^[a-zA-Z0-9-]{3,24}$", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.ResourceAnchorsGet(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 ResourceAnchorsGet(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/Oracle.Database/resourceAnchors/{resourceAnchorName}", + **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( + "resourceAnchorName", self.ctx.args.resource_anchor_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", "2025-09-01", + 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.location = AAZStrType( + flags={"required": True}, + ) + _schema_on_200.name = AAZStrType( + flags={"read_only": True}, + ) + _schema_on_200.properties = AAZObjectType() + _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}, + ) + + properties = cls._schema_on_200.properties + properties.linked_compartment_id = AAZStrType( + serialized_name="linkedCompartmentId", + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": 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", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/__cmd_group.py new file mode 100644 index 00000000000..85ae873cf6f --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/__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( + "oracle-database system-version", +) +class __CMDGroup(AAZCommandGroup): + """System Version + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/__init__.py new file mode 100644 index 00000000000..2df85698253 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/__init__.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: skip-file +# flake8: noqa + +from .__cmd_group import * +from ._list import * +from ._show import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/_list.py new file mode 100644 index 00000000000..d06aaafdd85 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/_list.py @@ -0,0 +1,206 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database system-version list", +) +class List(AAZCommand): + """List SystemVersion resources by Location + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/systemversions", "2023-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.location = AAZResourceLocationArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SystemVersionsListByLocation(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 SystemVersionsListByLocation(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/Oracle.Database/locations/{location}/systemVersions", + **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( + "location", self.ctx.args.location, + 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", "2023-09-01", + 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={"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.system_version = AAZStrType( + serialized_name="systemVersion", + flags={"required": True, "read_only": 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/_show.py new file mode 100644 index 00000000000..ba191f2b7bc --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/system_version/_show.py @@ -0,0 +1,207 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database system-version show", +) +class Show(AAZCommand): + """Get a SystemVersion + """ + + _aaz_info = { + "version": "2023-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/providers/oracle.database/locations/{}/systemversions/{}", "2023-09-01"], + ] + } + + 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.location = AAZResourceLocationArg( + required=True, + id_part="name", + ) + _args_schema.systemversionname = AAZStrArg( + options=["-n", "--name", "--systemversionname"], + help="SystemVersion name", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.SystemVersionsGet(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 SystemVersionsGet(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/Oracle.Database/locations/{location}/systemVersions/{systemversionname}", + **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( + "location", self.ctx.args.location, + required=True, + ), + **self.serialize_url_param( + "subscriptionId", self.ctx.subscription_id, + required=True, + ), + **self.serialize_url_param( + "systemversionname", self.ctx.args.systemversionname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2023-09-01", + 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={"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.system_version = AAZStrType( + serialized_name="systemVersion", + flags={"required": True, "read_only": 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/__cmd_group.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/__cmd_group.py new file mode 100644 index 00000000000..815dc870e43 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/__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( + "oracle-database virtual-network-address", +) +class __CMDGroup(AAZCommandGroup): + """Virtual Network Address + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/__init__.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/__init__.py new file mode 100644 index 00000000000..db73033039b --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/__init__.py @@ -0,0 +1,17 @@ +# -------------------------------------------------------------------------------------------- +# 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 ._update import * +from ._wait import * diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_create.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_create.py new file mode 100644 index 00000000000..0895146b0fd --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_create.py @@ -0,0 +1,298 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database virtual-network-address create", +) +class Create(AAZCommand): + """Create a VirtualNetworkAddress + + :example: Create Virtual Network Address + az oracle-database cloud-vm-cluster virtual-network-address create --cloudvmclustername --resource-group --name --ip-address --vm-ocid + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2025-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + + # define Arg Group "Properties" + + _args_schema = cls._args_schema + _args_schema.ip_address = AAZStrArg( + options=["--ip-address"], + arg_group="Properties", + help="Virtual network Address address.", + ) + _args_schema.vm_ocid = AAZStrArg( + options=["--vm-ocid"], + arg_group="Properties", + help="Virtual Machine OCID.", + fmt=AAZStrArgFormat( + max_length=255, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VirtualNetworkAddressesCreateOrUpdate(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 VirtualNetworkAddressesCreateOrUpdate(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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) + + properties = _builder.get(".properties") + if properties is not None: + properties.set_prop("ipAddress", AAZStrType, ".ip_address") + properties.set_prop("vmOcid", AAZStrType, ".vm_ocid") + + 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() + _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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_delete.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_delete.py new file mode 100644 index 00000000000..b083717df95 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_delete.py @@ -0,0 +1,181 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database virtual-network-address delete", + confirmation="Are you sure you want to perform this operation?", +) +class Delete(AAZCommand): + """Delete a VirtualNetworkAddress + + :example: Delete Virtual Network Address + az oracle-database cloud-vm-cluster virtual-network-address delete --cloudvmclustername --resource-group --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2025-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + yield self.VirtualNetworkAddressesDelete(ctx=self.ctx)() + self.post_operations() + + @register_callback + def pre_operations(self): + pass + + @register_callback + def post_operations(self): + pass + + class VirtualNetworkAddressesDelete(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": "location"}, + 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": "location"}, + 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": "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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + required=True, + ), + } + return parameters + + def on_204(self, session): + pass + + def on_200_201(self, session): + pass + + +class _DeleteHelper: + """Helper class for Delete""" + + +__all__ = ["Delete"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_list.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_list.py new file mode 100644 index 00000000000..22aca843cb1 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_list.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( + "oracle-database virtual-network-address list", +) +class List(AAZCommand): + """List VirtualNetworkAddress resources by CloudVmCluster + + :example: List Virtual Network Address + az oracle-database cloud-vm-cluster virtual-network-address list --cloudvmclustername --resource-group + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses", "2025-09-01"], + ] + } + + AZ_SUPPORT_PAGINATION = True + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworkAddressesListByParent(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 VirtualNetworkAddressesListByParent(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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", "2025-09-01", + 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() + _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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_show.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_show.py new file mode 100644 index 00000000000..28d548fc81e --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_show.py @@ -0,0 +1,246 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database virtual-network-address show", +) +class Show(AAZCommand): + """Get a VirtualNetworkAddress + + :example: Get Vnet address + az oracle-database cloud-vm-cluster virtual-network-address show --cloudvmclustername --resource-group --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2025-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworkAddressesGet(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 VirtualNetworkAddressesGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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() + _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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_update.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_update.py new file mode 100644 index 00000000000..075224cca47 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_update.py @@ -0,0 +1,464 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database virtual-network-address update", +) +class Update(AAZCommand): + """Update a VirtualNetworkAddress + + :example: Update Vnet address + az oracle-database cloud-vm-cluster virtual-network-address update --cloudvmclustername --resource-group --name + """ + + _aaz_info = { + "version": "2025-09-01", + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2025-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworkAddressesGet(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.VirtualNetworkAddressesCreateOrUpdate(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 VirtualNetworkAddressesGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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() + _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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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 VirtualNetworkAddressesCreateOrUpdate(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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() + + _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() + _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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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 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 + ) + + 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""" + + +__all__ = ["Update"] diff --git a/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_wait.py b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_wait.py new file mode 100644 index 00000000000..ba5c7258ea9 --- /dev/null +++ b/src/oracle-database/azext_oracle_database/aaz/latest/oracle_database/virtual_network_address/_wait.py @@ -0,0 +1,242 @@ +# -------------------------------------------------------------------------------------------- +# 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( + "oracle-database virtual-network-address wait", +) +class Wait(AAZWaitCommand): + """Place the CLI in a waiting state until a condition is met. + """ + + _aaz_info = { + "resources": [ + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/oracle.database/cloudvmclusters/{}/virtualnetworkaddresses/{}", "2025-09-01"], + ] + } + + 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.cloudvmclustername = AAZStrArg( + options=["--cloudvmclustername"], + help="CloudVmCluster name", + required=True, + id_part="name", + fmt=AAZStrArgFormat( + pattern=".*", + ), + ) + _args_schema.resource_group = AAZResourceGroupNameArg( + required=True, + ) + _args_schema.virtualnetworkaddressname = AAZStrArg( + options=["-n", "--name", "--virtualnetworkaddressname"], + help="Virtual IP address hostname.", + required=True, + id_part="child_name_1", + fmt=AAZStrArgFormat( + pattern=".*", + max_length=63, + min_length=1, + ), + ) + return cls._args_schema + + def _execute_operations(self): + self.pre_operations() + self.VirtualNetworkAddressesGet(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 VirtualNetworkAddressesGet(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/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", + **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( + "cloudvmclustername", self.ctx.args.cloudvmclustername, + 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, + ), + **self.serialize_url_param( + "virtualnetworkaddressname", self.ctx.args.virtualnetworkaddressname, + required=True, + ), + } + return parameters + + @property + def query_parameters(self): + parameters = { + **self.serialize_query_param( + "api-version", "2025-09-01", + 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() + _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.domain = AAZStrType( + flags={"read_only": True}, + ) + properties.ip_address = AAZStrType( + serialized_name="ipAddress", + ) + properties.lifecycle_details = AAZStrType( + serialized_name="lifecycleDetails", + flags={"read_only": True}, + ) + properties.lifecycle_state = AAZStrType( + serialized_name="lifecycleState", + flags={"read_only": True}, + ) + properties.ocid = AAZStrType( + flags={"read_only": True}, + ) + properties.provisioning_state = AAZStrType( + serialized_name="provisioningState", + flags={"read_only": True}, + ) + properties.time_assigned = AAZStrType( + serialized_name="timeAssigned", + flags={"read_only": True}, + ) + properties.vm_ocid = AAZStrType( + serialized_name="vmOcid", + ) + + 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/oracle-database/azext_oracle_database/azext_metadata.json b/src/oracle-database/azext_oracle_database/azext_metadata.json index 34f7fac3fed..06012c7c942 100644 --- a/src/oracle-database/azext_oracle_database/azext_metadata.json +++ b/src/oracle-database/azext_oracle_database/azext_metadata.json @@ -1,3 +1,3 @@ { - "azext.minCliCoreVersion": "2.57.0" + "azext.minCliCoreVersion": "2.75.0" } \ No newline at end of file diff --git a/src/oracle-database/azext_oracle_database/tests/latest/recordings/test_oracledatabase_exadata.yaml b/src/oracle-database/azext_oracle_database/tests/latest/recordings/test_oracledatabase_exadata.yaml index e202865478a..3dc8ca232d1 100644 --- a/src/oracle-database/azext_oracle_database/tests/latest/recordings/test_oracledatabase_exadata.yaml +++ b/src/oracle-database/azext_oracle_database/tests/latest/recordings/test_oracledatabase_exadata.yaml @@ -1,55 +1,62 @@ interactions: - request: body: '{"location": "eastus", "properties": {"computeCount": 2, "displayName": - "OFake_Infra_AzCLI", "shape": "Exadata.X9M", "storageCount": 3}, "zones": ["2"]}' + "OFake_Infra_AzCLINew", "shape": "Exadata.X9M", "storageCount": 3}, "zones": + ["2"]}' headers: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, zstd CommandName: - oracle-database cloud-exadata-infrastructure create Connection: - keep-alive Content-Length: - - '152' + - '155' Content-Type: - application/json ParameterSetName: - --resource-group --name --zones --compute-count --display-name --shape --location --storage-count --no-wait User-Agent: - - AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.9.13 (macOS-10.16-x86_64-i386-64bit) + - AZURECLI/2.79.0 azsdk-python-core/1.35.0 Python/3.14.0 (macOS-15.7.2-arm64-arm-64bit-Mach-O) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_odba_rg000001/providers/Oracle.Database/cloudExadataInfrastructures/OFake_Infra_AzCLI?api-version=2023-09-01 + uri: https://www-proxy-adcq7-new.us.oracle.com:80/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testAzureCLi/providers/Oracle.Database/cloudExadataInfrastructures/OFake_Infra_AzCLINew?api-version=2025-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_odba_rg000001/providers/Oracle.Database/cloudExadataInfrastructures/OFake_Infra_AzCLI","name":"OFake_Infra_AzCLI","type":"oracle.database/cloudexadatainfrastructures","location":"eastus","zones":["2"],"systemData":{"createdBy":"ramakrishnan.vilathur.sriniva@oracle.com","createdByType":"User","createdAt":"2024-07-05T10:29:23.9562785Z","lastModifiedBy":"ramakrishnan.vilathur.sriniva@oracle.com","lastModifiedByType":"User","lastModifiedAt":"2024-07-05T10:29:23.9562785Z"},"properties":{"ocid":null,"computeCount":2,"storageCount":3,"totalStorageSizeInGbs":null,"availableStorageSizeInGbs":null,"timeCreated":null,"lifecycleDetails":null,"maintenanceWindow":null,"estimatedPatchingTime":null,"customerContacts":null,"provisioningState":"Accepted","lifecycleState":null,"shape":"Exadata.X9M","ociUrl":null,"displayName":"OFake_Infra_AzCLI","cpuCount":null,"maxCpuCount":null,"memorySizeInGbs":null,"maxMemoryInGbs":null,"dbNodeStorageSizeInGbs":null,"maxDbNodeStorageSizeInGbs":null,"dataStorageSizeInTbs":null,"maxDataStorageInTbs":null,"dbServerVersion":null,"activatedStorageCount":null,"additionalStorageCount":null,"lastMaintenanceRunId":null,"nextMaintenanceRunId":null,"monthlyDbServerVersion":null,"monthlyStorageServerVersion":null,"storageServerVersion":null}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testAzureCLi/providers/Oracle.Database/cloudExadataInfrastructures/OFake_Infra_AzCLINew","name":"OFake_Infra_AzCLINew","type":"oracle.database/cloudexadatainfrastructures","location":"eastus","zones":["2"],"systemData":{"createdBy":"mihret.kidane@oracle.com","createdByType":"User","createdAt":"2025-11-18T16:46:20.1488289Z","lastModifiedBy":"mihret.kidane@oracle.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-18T16:46:20.1488289Z"},"properties":{"definedFileSystemConfiguration":null,"ocid":null,"computeCount":2,"storageCount":3,"totalStorageSizeInGbs":null,"availableStorageSizeInGbs":null,"timeCreated":null,"lifecycleDetails":null,"maintenanceWindow":null,"estimatedPatchingTime":null,"customerContacts":null,"provisioningState":"Accepted","lifecycleState":null,"shape":"Exadata.X9M","ociUrl":null,"displayName":"OFake_Infra_AzCLINew","cpuCount":null,"maxCpuCount":null,"memorySizeInGbs":null,"maxMemoryInGbs":null,"dbNodeStorageSizeInGbs":null,"maxDbNodeStorageSizeInGbs":null,"dataStorageSizeInTbs":null,"maxDataStorageInTbs":null,"dbServerVersion":null,"activatedStorageCount":null,"additionalStorageCount":null,"lastMaintenanceRunId":null,"nextMaintenanceRunId":null,"monthlyDbServerVersion":null,"monthlyStorageServerVersion":null,"storageServerVersion":null,"databaseServerType":null,"storageServerType":null,"computeModel":null,"exascaleConfig":null}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/096b7900-9905-4e58-ad0c-1b685bf07f3d*D0B3A2377C0E8BE5806980C29649A929673E694AEA35B06B67D3E632A59B93F7?api-version=2023-09-01&t=638557721706124656&c=MIIHhzCCBm-gAwIBAgITHgTGa31qslIh2UBmkAAABMZrfTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDYwHhcNMjQwNjIxMDkxMjA1WhcNMjUwNjE2MDkxMjA1WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALn834uDqgCOixiO8GRfVCjdOSupM2mspf7A4DxVqhAZOL8zaMDjFkxtx33wm6cpNnNPdJtVugOQpatgZbDHp53nm17ZRJmyTZu_5z53RacbNkdHn-1M5XSVR5Gog-YVsO3all2PlVdOg1eoSOD8ITK-TstsekGcOi-2bqgxdMy4G9xiwN1uqztQs-uuOT2M0DGCBvuLm5PRftyk3A6tocQSz4e0JBhb08J-V5He6t4zq4AM6kwBE0iJR7dJEfSfDddwSZIAz6h35rU5QUFAFgtNoGNOoeq-2PAvP1ID_2_k6czxhuVUXChGs9wtj36-SmcXHwK4Di51_jZCza6EA6ECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAyLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA2LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMi5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNi5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDIuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3J0MB0GA1UdDgQWBBSiHY0qE8dJDl1-fBkPIyhmBEoAXDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDYuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBTxRmjG8cPwKy19i2rhsvm-NfzRQTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAMkBnjIQiIoLSg9zciJxXH1ylOKB4FJPrPFj52jXEgVo32cghlQhqYin74eWIrBybErBVKH1YhQnwolzlfQ2ghTU7DmQyx9TLA44sJzrc0cDQQvDaKmmJckNZtPzpYqro72RpHWATCjOWVE22NKpCRrNQKotMUbDebsE_RuzsGqcGKqaLGbwC6LP0aiK1KrOKORCDvOCtJic28Xn5HGJmYZ6U6xh6ClEm4t8nBn4CcVROGsAZ9wINYtuPZwHvI2zTH7u7kNlNWT935tT9aEKf_vyg22rc23EdwsVKQZSO42x8QVwYSwuL-2AF2Zh5SFZp1lvK5TIyNgVewww93mkdE&s=RhZv8L6zt8IGz3bsolBnnmEaHAmUQekOu6v3G9HV4oZJVIyv3_0OgM74ZTwhvnqajWawgG3rk0b0Yv7exgko-QM5tTyXGt0KB60YJADYOnISwRdTLM-Klr8YqZV7jT8_L86abSBhz23OTSfgrJ4-jsc6Lk4jSMIcDI6hwQ6sn4HixUiwBPgWp_8yHcN4bgaNP-WXrxDJfKfEchNUQz9azEZzvV_NDDFGpohDGVgcL7J_UTa3VPJLhXcCww_2zvfnPUbIY9WIeuVPTx3r1iHPRirzBuw-7dGg-g0-dNWd-0VqcD2f0uYruN9E_JT8AVGnhxgq-9REiUyQ1Cbkhp73ow&h=tfmpSwOBWhvgrgMVUWtDwDi1ydaEKc7SDnaE7E82L7k + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/e1991822-3052-4b16-8d19-70808dbfe26e*3DFA27DDE0FAE846F528AD44DB7530A6C90FBDB327F9754EAAFFEDF8F9DECEA9?api-version=2025-09-01&t=638990811913520805&c=MIIHhzCCBm-gAwIBAgITfAla5jyv8QRP_5ow7AAACVrmPDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUxMDIwMDQzNjIzWhcNMjYwNDE4MDQzNjIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMddVfpiBdDmUhIBJwKZ3KQON7oBNDWmOOmY4g1ElyXgEkjon3Gv6o2iUWBTlxPP_EZQJhupEuO2DlNcI72qn4SyWwWct2tCEYRZJerV4rv1id9sCDj3fEamCo4QEH3xMKcGXqtPe3f3eb4VUSK8a2gJFqPiH-B-2oetOTm_-t1_J9TkLUFEUdYIHsylTl0OH2FEQVYAAgRXhe4lJ-WGzZ1ffooW6zFScKcbHC-ij1AA2xiuPbLogZIDjkgpOYoQbn9dJCcXDjro2GtBWEIEIaRIheA5TONmvBvNjwgvM95OihgVouEt3T1X5Jz2jgZVe8XVf5WuHz-a-o1TsKrZzcECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBSklsMGrs_eAsv_RTi_q4qgDc9qNDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJ51PdAaul136rrBMSwKBqaPsalRACK88HnU3-MuFwPY3EKcBNfr_DcyIemG6qcdAt6oBTDGXSVm8qGYJ2eHSVBH91yTQvJd5-a7_b9xta0wy4EJYoK-Olj6bE5ygF6klhRzpEyjfq2vFjpc2SF6xPxtXMaj4I7ACMq2QHy3CO_thX0U9_MhBYBb-v3ICmOFIZIBb4wOpeX0BsfrYbqwos0TpMW5k0T0RtCs4mpGUt-7YgEXCPIwlt7JN4fLqGTiEElAPaYcSl4-0aYA_RVN98y83vlGlM0kIjglh8_t1QOAUw0jy8LA4CNtMdgL_ncOt66gFr9ocwuFusQMx11WpTM&s=nOKPRDP-5cj8XklvEkKN_YoSnZ6GuLH_k55jhR6mBF6zPcHE6QRRhlPQ8DBZ7ftTqvxvL8Al-0cD06Zm_okUy3cFrBvOk4ukmxInNG-rpCpMeE73MZWTEiMuXzHOkQKZgCtPLWWKe6bV31zQzr2h35lgZAplfg2bDXHMjGbk9SvK2U2kyDWFJ8q-rSlrECuoplkwf-3Z97FrhTSG6YLTv1ul5yg79nGgNJcU4Rbd8NsDH3BZgK9ZZyISIz8nMLKUVtAKRoZPgQP2Nw2QCCFESytJeRkXuasSchm1hBqE0MeEena-sI0-IBgD9NTSHXqEJALck5lsn6X9YXme93GD5A&h=MpHHUfK6AphE1UMq1pQTlBdAlxW_FTjg-9azLpfcRwA cache-control: - no-cache content-length: - - '1352' + - '1450' content-type: - application/json; charset=utf-8 date: - - Fri, 05 Jul 2024 10:29:30 GMT + - Tue, 18 Nov 2025 16:46:30 GMT etag: - - '"34016002-0000-0100-0000-6687cb0a0000"' + - '"0602d957-0000-0100-0000-691ca2e70000"' expires: - '-1' opc-request-id: - - /D03CB64528C269543CDD68FE683F71D1/82407AB52D0F324CE4DA6B6100FD6861 + - oci-B2C595470F37A42-202511181646/04EE6AA4044D9A9EDCA21C69494144C5/B317E2C7F10FF87FD683E69947718CDA pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + vary: + - Origin,Accept-Encoding x-cache: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-async-operation-timeout: + - P1D + x-ms-operation-identifier: + - tenantId=9ef05df2-ad7c-4737-aba9-a5e1b3fa5ae1,objectId=ed0404db-6d52-44c6-a09d-182ac122b912/westus/deed7794-b150-475e-b8bb-cd2f6563bce6 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -57,7 +64,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: 9260049E558C4A7299D3C5846A447668 Ref B: AMS231020512035 Ref C: 2024-07-05T10:29:22Z' + - 'Ref A: 5BFFCF1F707746D0BDFACB4AE51516A2 Ref B: BY1AA1072319031 Ref C: 2025-11-18T16:46:18Z' status: code: 201 message: Created @@ -67,7 +74,7 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, zstd CommandName: - oracle-database cloud-exadata-infrastructure show Connection: @@ -75,23 +82,23 @@ interactions: ParameterSetName: - --resource-group --name User-Agent: - - AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.9.13 (macOS-10.16-x86_64-i386-64bit) + - AZURECLI/2.79.0 azsdk-python-core/1.35.0 Python/3.14.0 (macOS-15.7.2-arm64-arm-64bit-Mach-O) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra?api-version=2023-09-01 + uri: https://www-proxy-adcq7-new.us.oracle.com:80/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra?api-version=2025-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra","name":"OFake_PowerShellTestExaInfra","type":"oracle.database/cloudexadatainfrastructures","location":"eastus","zones":["2"],"tags":{},"systemData":{"createdBy":"jamie.c.cheung@oracle.com","createdByType":"User","createdAt":"2024-07-04T13:20:00.3149197Z","lastModifiedBy":"857ad006-4380-4712-ba4c-22f7c64d84e7","lastModifiedByType":"Application","lastModifiedAt":"2024-07-05T10:18:29.9979593Z"},"properties":{"ocid":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q","computeCount":3,"storageCount":3,"totalStorageSizeInGbs":196608,"availableStorageSizeInGbs":0,"timeCreated":"2024-07-04T13:20:13.877Z","maintenanceWindow":{"preference":"NoPreference","leadTimeInWeeks":0,"patchingMode":"Rolling","customActionTimeoutInMins":0,"isCustomActionTimeoutEnabled":false},"provisioningState":"Succeeded","lifecycleState":"Available","shape":"Exadata.X9M","ociUrl":"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua","displayName":"OFake_PowerShellTestExaInfra","cpuCount":4,"maxCpuCount":378,"memorySizeInGbs":90,"maxMemoryInGbs":4170,"dbNodeStorageSizeInGbs":938,"maxDbNodeStorageSizeInGbs":6729,"dataStorageSizeInTbs":2.0,"maxDataStorageInTbs":192.0,"dbServerVersion":"23.1.13.0.0.240410.1","activatedStorageCount":3,"additionalStorageCount":0,"storageServerVersion":"21.1.0.0.0"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra","name":"OFake_PowerShellExaInfra","type":"oracle.database/cloudexadatainfrastructures","location":"eastus","zones":["2"],"tags":{},"systemData":{"createdBy":"mihret.kidane@oracle.com","createdByType":"User","createdAt":"2025-10-13T16:44:20.8788549Z","lastModifiedBy":"a50e6610-5416-4c2a-88b6-172c7f376f7d","lastModifiedByType":"Application","lastModifiedAt":"2025-11-18T16:22:50.6028029Z"},"properties":{"definedFileSystemConfiguration":[{"isBackupPartition":true,"isResizable":true,"minSizeGb":15,"mountPoint":"/"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":250,"mountPoint":"/u01"},{"isBackupPartition":true,"isResizable":true,"minSizeGb":10,"mountPoint":"/tmp"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":10,"mountPoint":"/var"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":30,"mountPoint":"/var/log"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":4,"mountPoint":"/home"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":10,"mountPoint":"/var/log/audit"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":9,"mountPoint":"reserved"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":16,"mountPoint":"swap"}],"ocid":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljt2edokzyanlm76ygtn4apzxcfkuxhpomuesugjwus3im3yhxzxz2a","computeCount":2,"storageCount":3,"totalStorageSizeInGbs":196608,"availableStorageSizeInGbs":196608,"timeCreated":"2025-10-13T16:44:55.854Z","maintenanceWindow":{"preference":"NoPreference","leadTimeInWeeks":0,"patchingMode":"Rolling","customActionTimeoutInMins":0,"isCustomActionTimeoutEnabled":false},"provisioningState":"Succeeded","lifecycleState":"Available","shape":"Exadata.X9M","ociUrl":"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljt2edokzyanlm76ygtn4apzxcfkuxhpomuesugjwus3im3yhxzxz2a?region=us-ashburn-1&tenant=orpsandbox7&compartmentId=ocid1.compartment.oc1..aaaaaaaadep52emiauprgkax4zmj4jycppdafs2tg7pnttdyhfldg2v3i5ea","displayName":"OFake_PowerShellExaInfra","cpuCount":0,"maxCpuCount":252,"memorySizeInGbs":0,"maxMemoryInGbs":2780,"dbNodeStorageSizeInGbs":0,"maxDbNodeStorageSizeInGbs":4486,"dataStorageSizeInTbs":0,"maxDataStorageInTbs":192,"dbServerVersion":"25.1.2.0.0.250213.1","activatedStorageCount":3,"additionalStorageCount":0,"storageServerVersion":"25.1.2.0.0.250213.1","computeModel":"OCPU","nextMaintenanceRunId":"ocid1.dbmaintenancerun.oc1.iad.anuwcljt2edokzyadf3wqanhuo2ebwwidmu5db6hqcubehwvqiesqtd5yhqa"}}' headers: cache-control: - no-cache content-length: - - '1752' + - '2673' content-type: - application/json; charset=utf-8 date: - - Fri, 05 Jul 2024 10:29:31 GMT + - Tue, 18 Nov 2025 16:46:31 GMT etag: - - '"330106d9-0000-0100-0000-6687c8760000"' + - '"0502cfec-0000-0100-0000-691c9d5a0000"' expires: - '-1' pragma: @@ -107,7 +114,7 @@ interactions: x-ms-ratelimit-remaining-subscription-global-reads: - '3749' x-msedge-ref: - - 'Ref A: A01B89FF1CF74E38BEA775AC96D2E507 Ref B: AMS231020615031 Ref C: 2024-07-05T10:29:30Z' + - 'Ref A: DA34F3E33DE344C296635E364CCD5C5C Ref B: SJC211051203047 Ref C: 2025-11-18T16:46:32Z' status: code: 200 message: OK @@ -117,7 +124,7 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, zstd CommandName: - oracle-database cloud-exadata-infrastructure list Connection: @@ -125,21 +132,21 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.9.13 (macOS-10.16-x86_64-i386-64bit) + - AZURECLI/2.79.0 azsdk-python-core/1.35.0 Python/3.14.0 (macOS-15.7.2-arm64-arm-64bit-Mach-O) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures?api-version=2023-09-01 + uri: https://www-proxy-adcq7-new.us.oracle.com:80/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures?api-version=2025-09-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra","name":"OFake_PowerShellTestExaInfra","type":"oracle.database/cloudexadatainfrastructures","location":"eastus","zones":["2"],"tags":{},"systemData":{"createdBy":"jamie.c.cheung@oracle.com","createdByType":"User","createdAt":"2024-07-04T13:20:00.3149197Z","lastModifiedBy":"857ad006-4380-4712-ba4c-22f7c64d84e7","lastModifiedByType":"Application","lastModifiedAt":"2024-07-05T10:18:29.9979593Z"},"properties":{"ocid":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q","computeCount":3,"storageCount":3,"totalStorageSizeInGbs":196608,"availableStorageSizeInGbs":0,"timeCreated":"2024-07-04T13:20:13.877Z","maintenanceWindow":{"preference":"NoPreference","leadTimeInWeeks":0,"patchingMode":"Rolling","customActionTimeoutInMins":0,"isCustomActionTimeoutEnabled":false},"provisioningState":"Succeeded","lifecycleState":"Available","shape":"Exadata.X9M","ociUrl":"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q?region=us-ashburn-1&tenant=orpsandbox3&compartmentId=ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua","displayName":"OFake_PowerShellTestExaInfra","cpuCount":4,"maxCpuCount":378,"memorySizeInGbs":90,"maxMemoryInGbs":4170,"dbNodeStorageSizeInGbs":938,"maxDbNodeStorageSizeInGbs":6729,"dataStorageSizeInTbs":2.0,"maxDataStorageInTbs":192.0,"dbServerVersion":"23.1.13.0.0.240410.1","activatedStorageCount":3,"additionalStorageCount":0,"storageServerVersion":"21.1.0.0.0"}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OfakeExaDND","name":"OfakeExaDND","type":"oracle.database/cloudexadatainfrastructures","location":"eastus","zones":["2"],"tags":{},"systemData":{"createdBy":"mihret.kidane@oracle.com","createdByType":"User","createdAt":"2025-06-26T05:58:15.8831698Z","lastModifiedBy":"a50e6610-5416-4c2a-88b6-172c7f376f7d","lastModifiedByType":"Application","lastModifiedAt":"2025-11-18T16:22:52.7907633Z"},"properties":{"definedFileSystemConfiguration":[{"isBackupPartition":true,"isResizable":true,"minSizeGb":15,"mountPoint":"/"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":250,"mountPoint":"/u01"},{"isBackupPartition":true,"isResizable":true,"minSizeGb":10,"mountPoint":"/tmp"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":10,"mountPoint":"/var"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":30,"mountPoint":"/var/log"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":4,"mountPoint":"/home"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":10,"mountPoint":"/var/log/audit"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":9,"mountPoint":"reserved"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":16,"mountPoint":"swap"}],"ocid":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljt2edokzyathomcb7enkv2t2taxunam4qwwwfc2g3fhwd6gdckg4xq","computeCount":3,"storageCount":3,"totalStorageSizeInGbs":196608,"availableStorageSizeInGbs":0,"timeCreated":"2025-06-26T05:58:33.426Z","maintenanceWindow":{"preference":"NoPreference","leadTimeInWeeks":0,"patchingMode":"Rolling","customActionTimeoutInMins":0,"isCustomActionTimeoutEnabled":false},"provisioningState":"Succeeded","lifecycleState":"Available","shape":"Exadata.X9M","ociUrl":"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljt2edokzyathomcb7enkv2t2taxunam4qwwwfc2g3fhwd6gdckg4xq?region=us-ashburn-1&tenant=orpsandbox7&compartmentId=ocid1.compartment.oc1..aaaaaaaadep52emiauprgkax4zmj4jycppdafs2tg7pnttdyhfldg2v3i5ea","displayName":"OfakeExaDND","cpuCount":4,"maxCpuCount":378,"memorySizeInGbs":60,"maxMemoryInGbs":4170,"dbNodeStorageSizeInGbs":878,"maxDbNodeStorageSizeInGbs":6729,"dataStorageSizeInTbs":2,"maxDataStorageInTbs":192,"dbServerVersion":"25.1.2.0.0.250213.1","activatedStorageCount":3,"additionalStorageCount":0,"storageServerVersion":"25.1.2.0.0.250213.1","computeModel":"OCPU","nextMaintenanceRunId":"ocid1.dbmaintenancerun.oc1.iad.anuwcljt2edokzyaqrl73k4ugw4h346r7ve6mfeiedjg2hpbtemrfhqfukzq","lastMaintenanceRunId":"ocid1.dbmaintenancerun.oc1.iad.anuwcljt2edokzyapvwvk552egjsobidec2qcktmgnh2rrumqhmcphfgoaeq"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra","name":"OFake_PowerShellExaInfra","type":"oracle.database/cloudexadatainfrastructures","location":"eastus","zones":["2"],"tags":{},"systemData":{"createdBy":"mihret.kidane@oracle.com","createdByType":"User","createdAt":"2025-10-13T16:44:20.8788549Z","lastModifiedBy":"a50e6610-5416-4c2a-88b6-172c7f376f7d","lastModifiedByType":"Application","lastModifiedAt":"2025-11-18T16:22:50.6028029Z"},"properties":{"definedFileSystemConfiguration":[{"isBackupPartition":true,"isResizable":true,"minSizeGb":15,"mountPoint":"/"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":250,"mountPoint":"/u01"},{"isBackupPartition":true,"isResizable":true,"minSizeGb":10,"mountPoint":"/tmp"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":10,"mountPoint":"/var"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":30,"mountPoint":"/var/log"},{"isBackupPartition":false,"isResizable":true,"minSizeGb":4,"mountPoint":"/home"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":10,"mountPoint":"/var/log/audit"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":9,"mountPoint":"reserved"},{"isBackupPartition":false,"isResizable":false,"minSizeGb":16,"mountPoint":"swap"}],"ocid":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljt2edokzyanlm76ygtn4apzxcfkuxhpomuesugjwus3im3yhxzxz2a","computeCount":2,"storageCount":3,"totalStorageSizeInGbs":196608,"availableStorageSizeInGbs":196608,"timeCreated":"2025-10-13T16:44:55.854Z","maintenanceWindow":{"preference":"NoPreference","leadTimeInWeeks":0,"patchingMode":"Rolling","customActionTimeoutInMins":0,"isCustomActionTimeoutEnabled":false},"provisioningState":"Succeeded","lifecycleState":"Available","shape":"Exadata.X9M","ociUrl":"https://cloud.oracle.com/dbaas/cloudExadataInfrastructures/ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljt2edokzyanlm76ygtn4apzxcfkuxhpomuesugjwus3im3yhxzxz2a?region=us-ashburn-1&tenant=orpsandbox7&compartmentId=ocid1.compartment.oc1..aaaaaaaadep52emiauprgkax4zmj4jycppdafs2tg7pnttdyhfldg2v3i5ea","displayName":"OFake_PowerShellExaInfra","cpuCount":0,"maxCpuCount":252,"memorySizeInGbs":0,"maxMemoryInGbs":2780,"dbNodeStorageSizeInGbs":0,"maxDbNodeStorageSizeInGbs":4486,"dataStorageSizeInTbs":0,"maxDataStorageInTbs":192,"dbServerVersion":"25.1.2.0.0.250213.1","activatedStorageCount":3,"additionalStorageCount":0,"storageServerVersion":"25.1.2.0.0.250213.1","computeModel":"OCPU","nextMaintenanceRunId":"ocid1.dbmaintenancerun.oc1.iad.anuwcljt2edokzyadf3wqanhuo2ebwwidmu5db6hqcubehwvqiesqtd5yhqa"}}]}' headers: cache-control: - no-cache content-length: - - '1764' + - '5435' content-type: - application/json; charset=utf-8 date: - - Fri, 05 Jul 2024 10:29:31 GMT + - Tue, 18 Nov 2025 16:46:33 GMT expires: - '-1' pragma: @@ -150,12 +157,14 @@ interactions: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-original-request-ids: + - d5fb9f19-5929-4b02-b94f-c48a8c0652d8 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-reads: - '3749' x-msedge-ref: - - 'Ref A: 94FED8C2AFEF48248E5EA89D78107A73 Ref B: AMS231020512027 Ref C: 2024-07-05T10:29:31Z' + - 'Ref A: BB806D3D2E0A4EF99C7CE6E21302E138 Ref B: BY1AA1072319040 Ref C: 2025-11-18T16:46:33Z' status: code: 200 message: OK @@ -165,7 +174,7 @@ interactions: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, zstd CommandName: - oracle-database cloud-exadata-infrastructure database-server list Connection: @@ -173,62 +182,67 @@ interactions: ParameterSetName: - --cloudexadatainfrastructurename --resource-group User-Agent: - - AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.9.13 (macOS-10.16-x86_64-i386-64bit) + - AZURECLI/2.79.0 azsdk-python-core/1.35.0 Python/3.14.0 (macOS-15.7.2-arm64-arm-64bit-Mach-O) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers?api-version=2023-09-01 + uri: https://www-proxy-adcq7-new.us.oracle.com:80/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra/dbServers?api-version=2025-09-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq","name":"dbServer-2","type":"Oracle.Database/cloudExadataInfrastructures/dbServers","properties":{"ocid":"ocid1.dbserver.oc1.iad.anuwcljrowjpydqaoklexltoygidco5rxfo5zusgnblo2ayvaczyqg7sqtjq","displayName":"dbServer-2","compartmentId":"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua","exadataInfrastructureId":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q","cpuCoreCount":2,"maxMemoryInGbs":1390,"dbNodeStorageSizeInGbs":469,"vmClusterIds":["ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq"],"dbNodeIds":["ocid1.dbnode.oc1.iad.anuwcljrnirvylqaqm24luvmhsaaz2wtiq3ggddpsemx6gn66vff5rulsgnq"],"provisioningState":"Available","lifecycleState":null,"dbServerPatchingDetails":{"estimatedPatchDuration":90,"patchingStatus":"Scheduled","timePatchingEnded":null,"timePatchingStarted":null},"maxCpuCount":126,"autonomousVmClusterIds":[],"autonomousVirtualMachineIds":[],"maxDbNodeStorageInGbs":2243,"memorySizeInGbs":45,"shape":null,"timeCreated":"2024-07-04T13:20:13.889Z","lifecycleDetails":null}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq","name":"dbServer-3","type":"Oracle.Database/cloudExadataInfrastructures/dbServers","properties":{"ocid":"ocid1.dbserver.oc1.iad.anuwcljrowjpydqar5ljy52di4siacvp4h4hzwp6jcz7yrmkiaglyi7nfwdq","displayName":"dbServer-3","compartmentId":"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua","exadataInfrastructureId":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q","cpuCoreCount":2,"maxMemoryInGbs":1390,"dbNodeStorageSizeInGbs":469,"vmClusterIds":["ocid1.cloudvmcluster.oc1.iad.anuwcljrnirvylqanh37nglmlhotsnvzwivsfnomoa6lc7t6l5gwwocoovcq"],"dbNodeIds":["ocid1.dbnode.oc1.iad.anuwcljrnirvylqapfxspunpsxyaehha5wwz22lazevdaoiye7bh4iy2nwfa"],"provisioningState":"Available","lifecycleState":null,"dbServerPatchingDetails":{"estimatedPatchDuration":90,"patchingStatus":"Scheduled","timePatchingEnded":null,"timePatchingStarted":null},"maxCpuCount":126,"autonomousVmClusterIds":[],"autonomousVirtualMachineIds":[],"maxDbNodeStorageInGbs":2243,"memorySizeInGbs":45,"shape":null,"timeCreated":"2024-07-04T13:20:13.890Z","lifecycleDetails":null}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellTestExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljrowjpydqazy4bp745fsrnje5pbp2ffdffmizmglwvytvymld4bcyq","name":"dbServer-1","type":"Oracle.Database/cloudExadataInfrastructures/dbServers","properties":{"ocid":"ocid1.dbserver.oc1.iad.anuwcljrowjpydqazy4bp745fsrnje5pbp2ffdffmizmglwvytvymld4bcyq","displayName":"dbServer-1","compartmentId":"ocid1.compartment.oc1..aaaaaaaazcet2jt2uowjtgxsae5uositfy2thngqgokwdifyzmyygdpckeua","exadataInfrastructureId":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljrnirvylqajp6lgcommbx5qbuuk7dsm4y5ioehfdqa6l66htw7mj6q","cpuCoreCount":0,"maxMemoryInGbs":1390,"dbNodeStorageSizeInGbs":0,"vmClusterIds":[],"dbNodeIds":[],"provisioningState":"Available","lifecycleState":null,"dbServerPatchingDetails":{"estimatedPatchDuration":90,"patchingStatus":"Scheduled","timePatchingEnded":null,"timePatchingStarted":null},"maxCpuCount":126,"autonomousVmClusterIds":[],"autonomousVirtualMachineIds":[],"maxDbNodeStorageInGbs":2243,"memorySizeInGbs":0,"shape":null,"timeCreated":"2024-07-04T13:20:13.888Z","lifecycleDetails":null}}]}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yaaqsjbublndya2sya52aaggapq6adfjfv5vglphfr6pwa","name":"dbServer-2","type":"Oracle.Database/cloudExadataInfrastructures/dbServers","properties":{"ocid":"ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yaaqsjbublndya2sya52aaggapq6adfjfv5vglphfr6pwa","displayName":"dbServer-2","compartmentId":"ocid1.compartment.oc1..aaaaaaaadep52emiauprgkax4zmj4jycppdafs2tg7pnttdyhfldg2v3i5ea","exadataInfrastructureId":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljt2edokzyanlm76ygtn4apzxcfkuxhpomuesugjwus3im3yhxzxz2a","cpuCoreCount":0,"maxMemoryInGbs":1390,"dbNodeStorageSizeInGbs":0,"vmClusterIds":[],"dbNodeIds":[],"provisioningState":"Available","dbServerPatchingDetails":{"estimatedPatchDuration":90,"patchingStatus":"Scheduled"},"maxCpuCount":126,"autonomousVmClusterIds":[],"autonomousVirtualMachineIds":[],"maxDbNodeStorageInGbs":2243,"memorySizeInGbs":0,"timeCreated":"2025-10-13T16:44:55.862Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra/dbServers/ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yavhxxltixijkexwgvdiez3rjzajlt4p422ajm2ojfdgaa","name":"dbServer-1","type":"Oracle.Database/cloudExadataInfrastructures/dbServers","properties":{"ocid":"ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yavhxxltixijkexwgvdiez3rjzajlt4p422ajm2ojfdgaa","displayName":"dbServer-1","compartmentId":"ocid1.compartment.oc1..aaaaaaaadep52emiauprgkax4zmj4jycppdafs2tg7pnttdyhfldg2v3i5ea","exadataInfrastructureId":"ocid1.cloudexadatainfrastructure.oc1.iad.anuwcljt2edokzyanlm76ygtn4apzxcfkuxhpomuesugjwus3im3yhxzxz2a","cpuCoreCount":0,"maxMemoryInGbs":1390,"dbNodeStorageSizeInGbs":0,"vmClusterIds":[],"dbNodeIds":[],"provisioningState":"Available","dbServerPatchingDetails":{"estimatedPatchDuration":90,"patchingStatus":"Scheduled"},"maxCpuCount":126,"autonomousVmClusterIds":[],"autonomousVirtualMachineIds":[],"maxDbNodeStorageInGbs":2243,"memorySizeInGbs":0,"timeCreated":"2025-10-13T16:44:55.859Z"}}]}' headers: cache-control: - no-cache content-length: - - '4013' + - '2213' content-type: - application/json; charset=utf-8 date: - - Fri, 05 Jul 2024 10:29:33 GMT + - Tue, 18 Nov 2025 16:46:35 GMT expires: - '-1' opc-request-id: - - /FE5E6AC84C3DA84EB72AA3B9F3367DDA/BBE8BC5163B232C09BA0AA2E751258C9 + - oci-AF097C61A505A6C-202511181646/81F0427CEC78187CEAA21C69494144FB/A2E35B1C4C3EA4925548C8E4BC6C4465 pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + vary: + - Origin,Accept-Encoding x-cache: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-operation-identifier: + - tenantId=9ef05df2-ad7c-4737-aba9-a5e1b3fa5ae1,objectId=ed0404db-6d52-44c6-a09d-182ac122b912/eastus/c5d43448-bccf-4572-b466-4fbe831c5e68 x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-reads: - '3749' x-msedge-ref: - - 'Ref A: 28F2D7A6A7E3427A864E8EDB6AC3E5F2 Ref B: AMS231020512027 Ref C: 2024-07-05T10:29:32Z' + - 'Ref A: E1F0C590A8B04943B6726481A0BBD426 Ref B: SJC211051203027 Ref C: 2025-11-18T16:46:34Z' status: code: 200 message: OK - request: - body: '{"location": "eastus", "properties": {"cloudExadataInfrastructureId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Oracle.Database/cloudExadataInfrastructures/DemoExaInfra", + body: '{"location": "eastus", "properties": {"cloudExadataInfrastructureId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra", "cpuCoreCount": 6, "dataStoragePercentage": 80, "dataStorageSizeInTbs": 2.0, - "dbNodeStorageSizeInGbs": 120, "dbServers": ["ocid1.dbserver.oc1.iad.xxxxx", - "ocid1.dbserver.oc1.iad.xxxxx", "ocid1.dbserver.oc1.iad.xxxxx"], "displayName": - "OFake_VMC_AzCLI3", "giVersion": "19.0.0.0", "hostname": "rvilathu", "isLocalBackupEnabled": - false, "isSparseDiskgroupEnabled": false, "licenseModel": "LicenseIncluded", - "memorySizeInGbs": 60, "sshPublicKeys": ["ssh-rsa keykeykeykeykey generated-by-azure"], "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Microsoft.Network/virtualNetworks/SDKVnet/subnets/SDKSubnet", - "timeZone": "UTC", "vnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Microsoft.Network/virtualNetworks/SDKVnet"}}' + "dbNodeStorageSizeInGbs": 120, "dbServers": ["ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yaaqsjbublndya2sya52aaggapq6adfjfv5vglphfr6pwa", + "ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yavhxxltixijkexwgvdiez3rjzajlt4p422ajm2ojfdgaa"], + "displayName": "OFake_VMC_AzCLI3", "giVersion": "19.0.0.0", "hostname": "rvilathu", + "isLocalBackupEnabled": false, "isSparseDiskgroupEnabled": false, "licenseModel": + "LicenseIncluded", "memorySizeInGbs": 60, "sshPublicKeys": ["ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHJDAu814QnRaYFbuFswJX1IdpFAa8yVk4sneI3Q+QLoTyE4W5GR5f6TR5FqA03zxp41chkvjLysnc+EYJmjXQIbvrsEfaUenGu2AbYE3szBK9v+8iUy8JLgjoGuuxTU3BNCvMlTd00yw/qrOYbEDU9ZBnZVY/0nv2E03AzGUUObZJ8IUgNRUmNdWVFQiVUcmkRRM+XsIEUpuh0S6YJLLweZd+H50Y1mhKWXnZZH8Ed/5EmkSr7cO5WEKU2O/KSbavybkjUVWi6dcQMfwmNLBH9aByqAW8QvcZkZDvxLmimLnm3Jd/QDVvGesjyLbUrWfpbsaDXs+DgjTlFlxyqLPYMON5cfSg8wBj3Y176yWxwmrPnkro8X1Y93poSDQZb9SU68DsTrgVa6FoXWPkbUXz/nZX9GkTwE1Nhy2EPL4J+J50ZUZWG0bK25dFTKrzimLn1Qmvrx3so9qDId9LWbpYI6cJYxDTkGdGpuaHqDqGAi+5HeeXxx3/zO8pErPxy20= + generated-by-azure"], "subnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated", + "timeZone": "UTC", "vnetId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet"}}' headers: Accept: - application/json Accept-Encoding: - - gzip, deflate + - gzip, deflate, zstd CommandName: - oracle-database cloud-vm-cluster create Connection: - keep-alive Content-Length: - - '1561' + - '1678' Content-Type: - application/json ParameterSetName: @@ -238,38 +252,45 @@ interactions: --is-sparse-diskgroup-enabled --license-model --memory-size-in-gbs --ssh-public-keys --subnet-id --time-zone --vnet-id --no-wait User-Agent: - - AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.9.13 (macOS-10.16-x86_64-i386-64bit) + - AZURECLI/2.79.0 azsdk-python-core/1.35.0 Python/3.14.0 (macOS-15.7.2-arm64-arm-64bit-Mach-O) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Oracle.Database/cloudVmClusters/OFake_VMC_AzCLI3?api-version=2023-09-01 + uri: https://www-proxy-adcq7-new.us.oracle.com:80/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_VMC_AzCLI3?api-version=2025-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Oracle.Database/cloudVmClusters/OFake_VMC_AzCLI3","name":"OFake_VMC_AzCLI3","type":"oracle.database/cloudvmclusters","location":"eastus","systemData":{"createdBy":"ramakrishnan.vilathur.sriniva@oracle.com","createdByType":"User","createdAt":"2024-07-05T10:29:34.9262789Z","lastModifiedBy":"ramakrishnan.vilathur.sriniva@oracle.com","lastModifiedByType":"User","lastModifiedAt":"2024-07-05T10:29:34.9262789Z"},"properties":{"ocid":null,"listenerPort":null,"nodeCount":null,"storageSizeInGbs":null,"dataStorageSizeInTbs":2.0,"dbNodeStorageSizeInGbs":120,"memorySizeInGbs":60,"timeCreated":null,"lifecycleDetails":null,"timeZone":"UTC","zoneId":null,"hostname":"rvilathu","domain":null,"cpuCoreCount":6,"ocpuCount":null,"clusterName":null,"dataStoragePercentage":80,"isLocalBackupEnabled":false,"cloudExadataInfrastructureId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Oracle.Database/cloudExadataInfrastructures/DemoExaInfra","isSparseDiskgroupEnabled":false,"systemVersion":null,"sshPublicKeys":["ssh-rsa - keykeykeykeykey generated-by-azure"],"licenseModel":"LicenseIncluded","diskRedundancy":null,"scanIpIds":null,"vipIds":null,"scanDnsName":null,"scanListenerPortTcp":null,"scanListenerPortTcpSsl":null,"scanDnsRecordId":null,"shape":null,"provisioningState":"Accepted","lifecycleState":null,"vnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Microsoft.Network/virtualNetworks/SDKVnet","giVersion":"19.0.0.0","ociUrl":null,"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Microsoft.Network/virtualNetworks/SDKVnet/subnets/SDKSubnet","dataCollectionOptions":null,"displayName":"OFake_VMC_AzCLI3","iormConfigCache":null,"lastUpdateHistoryEntryId":null,"dbServers":["ocid1.dbserver.oc1.iad.xxxxx","ocid1.dbserver.oc1.iad.xxxxx","ocid1.dbserver.oc1.iad.xxxxx"],"compartmentId":null,"subnetOcid":null,"nsgCidrs":null,"nsgUrl":null}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudVmClusters/OFake_VMC_AzCLI3","name":"OFake_VMC_AzCLI3","type":"oracle.database/cloudvmclusters","location":"eastus","systemData":{"createdBy":"mihret.kidane@oracle.com","createdByType":"User","createdAt":"2025-11-18T16:46:38.2644361Z","lastModifiedBy":"mihret.kidane@oracle.com","lastModifiedByType":"User","lastModifiedAt":"2025-11-18T16:46:38.2644361Z"},"properties":{"ocid":null,"listenerPort":null,"nodeCount":null,"storageSizeInGbs":null,"fileSystemConfigurationDetails":null,"dataStorageSizeInTbs":2.0,"dbNodeStorageSizeInGbs":120,"memorySizeInGbs":60,"timeCreated":null,"lifecycleDetails":null,"timeZone":"UTC","zoneId":null,"hostname":"rvilathu","domain":null,"cpuCoreCount":6,"ocpuCount":null,"clusterName":null,"dataStoragePercentage":80,"isLocalBackupEnabled":false,"cloudExadataInfrastructureId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra","isSparseDiskgroupEnabled":false,"systemVersion":null,"sshPublicKeys":["ssh-rsa + AAAAB3NzaC1yc2EAAAADAQABAAABgQDHJDAu814QnRaYFbuFswJX1IdpFAa8yVk4sneI3Q+QLoTyE4W5GR5f6TR5FqA03zxp41chkvjLysnc+EYJmjXQIbvrsEfaUenGu2AbYE3szBK9v+8iUy8JLgjoGuuxTU3BNCvMlTd00yw/qrOYbEDU9ZBnZVY/0nv2E03AzGUUObZJ8IUgNRUmNdWVFQiVUcmkRRM+XsIEUpuh0S6YJLLweZd+H50Y1mhKWXnZZH8Ed/5EmkSr7cO5WEKU2O/KSbavybkjUVWi6dcQMfwmNLBH9aByqAW8QvcZkZDvxLmimLnm3Jd/QDVvGesjyLbUrWfpbsaDXs+DgjTlFlxyqLPYMON5cfSg8wBj3Y176yWxwmrPnkro8X1Y93poSDQZb9SU68DsTrgVa6FoXWPkbUXz/nZX9GkTwE1Nhy2EPL4J+J50ZUZWG0bK25dFTKrzimLn1Qmvrx3so9qDId9LWbpYI6cJYxDTkGdGpuaHqDqGAi+5HeeXxx3/zO8pErPxy20= + generated-by-azure"],"licenseModel":"LicenseIncluded","diskRedundancy":null,"scanIpIds":null,"vipIds":null,"scanDnsName":null,"scanListenerPortTcp":null,"scanListenerPortTcpSsl":null,"scanDnsRecordId":null,"shape":null,"provisioningState":"Accepted","lifecycleState":null,"vnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet","giVersion":"19.0.0.0","ociUrl":null,"subnetId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated","dataCollectionOptions":null,"displayName":"OFake_VMC_AzCLI3","iormConfigCache":null,"lastUpdateHistoryEntryId":null,"dbServers":["ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yaaqsjbublndya2sya52aaggapq6adfjfv5vglphfr6pwa","ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yavhxxltixijkexwgvdiez3rjzajlt4p422ajm2ojfdgaa"],"compartmentId":null,"subnetOcid":null,"nsgCidrs":null,"nsgUrl":null,"exascaleDbStorageVaultId":null,"storageManagementType":null}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/0ef4e4a5-2444-427a-9960-ab7ad19a0529*24B8623C1B8CDA8BCC4FE48B2AF3BAE412B444ECC77C472EB162968716D86926?api-version=2023-09-01&t=638557721796606923&c=MIIHpTCCBo2gAwIBAgITfwN4zzUuivvTBCLCCQAEA3jPNTANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDIwHhcNMjQwNjI0MTEyOTU2WhcNMjUwNjE5MTEyOTU2WjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANvVWo1xOJRhTabFDg9tH83KxBFFsI-8hXpNc70gVGUo9vdR_GCto5GXht5Nk15RV9Eui7tLs-n7VOqRt4ZJ5VAjpwORPU0ibxKV9KxuriafJTjL7Qrk0JaSp7WGJqPW-J-Pd5L3tP1bFJur8kjM0bafBsjx64XEFWORLz5Fn2lp6TrN09Jd5b8K0HSCXKW2e3XMjLsNhXY8nqovBeHTMKNIUXpy2nH5fjVOimZk6Q4T6__1OhvvEVJZsCL05KUdxdO_hsLWYu-CjOT4AShuIDdibMapH2IdzaeWrawQNPVXKZ_KeKth7kpbOhSv1QWmfPOy3V9F2YLccUW5EGnQeZUCAwEAAaOCBJIwggSOMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFggvX2K4Py0SACAWQCAQowggHaBggrBgEFBQcBAQSCAcwwggHIMGYGCCsGAQUFBzAChlpodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MFYGCCsGAQUFBzAChkpodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9CTDJQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDAyKDQpLmNydDBWBggrBgEFBQcwAoZKaHR0cDovL2NybDMuYW1lLmdibC9haWEvQkwyUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwMig0KS5jcnQwVgYIKwYBBQUHMAKGSmh0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0JMMlBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3J0MB0GA1UdDgQWBBQo83UWtIVJoZyZu85mKVA3wYeN-TAOBgNVHQ8BAf8EBAMCBaAwggE1BgNVHR8EggEsMIIBKDCCASSgggEgoIIBHIZCaHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JshjRodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDIoNCkuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwEwDAYKKwYBBAGCN3sEATAfBgNVHSMEGDAWgBSuecJrXSWIEwb2BwnDl3x7l48dVTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAAIjL4XB6DpRu-qyv5OqJYhIEmeI3Qe1UttC_KzpXoBWbVudKDV9CE0p6ofXSgAL0ecWXtRLq-_0Fc7jpgUBZrqam1Kegg-ApMr78hSiTUCMxHgWpUKN7_6b26skb5WN_0GWObM78VwcVTyKQ7K4Axw_Iik9WglVk9QKreZ9lSNPWhI6DX1bb-Pl2gRDXKY1bw3t_3-FiYyzROsU-9IAJozqZs_m-J3bfkcJ01J8Eg21vEdK-9_4uHA1qfGU7aJr9APH4fc5S9AonGi9UeSEiqG3Bas997LqgN_Wd49UeSnfabQl54UewiQjaFThlNO5qQ9xQ7IuuGjkqAH6M9R_uIo&s=Y6tWPORxqS3_yw_u5TnaWGdCKW7XhPmIpNAqt8IxUIwhIQCcs7ZF5-aKRrhBg7mfFy939ASSIyPtmAyDTEovw1WhaLpL03NJmN7-jhLt9zizNEgu7qtdATdWgh6-VOThJXWRHFJ6AJYCKLI7AXUrLH9AYQjU0ffAcjY7uwOlOcA-ys3KiqqEc4ezAPmMhthH11juCWxXQV1iszN-TzKo-8Bs4oWWtJuVfsqRviaHibns-HYBo3IuyC-w_TaghVuSBlRAtmHOJsqb6eJ3zfJNZFZS0b4YOz7DI8XIn28ecFJnFpYUbX7bwWj2bremjMCl6gYC38VCkW-0uoDzos8tbg&h=HGeJJuu36pTWAC-k7wXqJ34zOxRRFAwSb7Gu2VNbRP8 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/locations/EASTUS/operationStatuses/bf95795f-9932-4216-8374-36d46c01d1d2*762169479DBC53967D71890F36845FACA697876293C704F6B8593522DB8F12B8?api-version=2025-09-01&t=638990812023116162&c=MIIHhzCCBm-gAwIBAgITfAla5jyv8QRP_5ow7AAACVrmPDANBgkqhkiG9w0BAQsFADBEMRMwEQYKCZImiZPyLGQBGRYDR0JMMRMwEQYKCZImiZPyLGQBGRYDQU1FMRgwFgYDVQQDEw9BTUUgSW5mcmEgQ0EgMDUwHhcNMjUxMDIwMDQzNjIzWhcNMjYwNDE4MDQzNjIzWjBAMT4wPAYDVQQDEzVhc3luY29wZXJhdGlvbnNpZ25pbmdjZXJ0aWZpY2F0ZS5tYW5hZ2VtZW50LmF6dXJlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMddVfpiBdDmUhIBJwKZ3KQON7oBNDWmOOmY4g1ElyXgEkjon3Gv6o2iUWBTlxPP_EZQJhupEuO2DlNcI72qn4SyWwWct2tCEYRZJerV4rv1id9sCDj3fEamCo4QEH3xMKcGXqtPe3f3eb4VUSK8a2gJFqPiH-B-2oetOTm_-t1_J9TkLUFEUdYIHsylTl0OH2FEQVYAAgRXhe4lJ-WGzZ1ffooW6zFScKcbHC-ij1AA2xiuPbLogZIDjkgpOYoQbn9dJCcXDjro2GtBWEIEIaRIheA5TONmvBvNjwgvM95OihgVouEt3T1X5Jz2jgZVe8XVf5WuHz-a-o1TsKrZzcECAwEAAaOCBHQwggRwMCcGCSsGAQQBgjcVCgQaMBgwCgYIKwYBBQUHAwEwCgYIKwYBBQUHAwIwPQYJKwYBBAGCNxUHBDAwLgYmKwYBBAGCNxUIhpDjDYTVtHiE8Ys-hZvdFs6dEoFghfmRS4WsmTQCAWQCAQcwggHLBggrBgEFBQcBAQSCAb0wggG5MGMGCCsGAQUFBzAChldodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpaW5mcmEvQ2VydHMvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmwxLmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MFMGCCsGAQUFBzAChkdodHRwOi8vY3JsMi5hbWUuZ2JsL2FpYS9DTzFQS0lJTlRDQTAxLkFNRS5HQkxfQU1FJTIwSW5mcmElMjBDQSUyMDA1LmNydDBTBggrBgEFBQcwAoZHaHR0cDovL2NybDMuYW1lLmdibC9haWEvQ08xUEtJSU5UQ0EwMS5BTUUuR0JMX0FNRSUyMEluZnJhJTIwQ0ElMjAwNS5jcnQwUwYIKwYBBQUHMAKGR2h0dHA6Ly9jcmw0LmFtZS5nYmwvYWlhL0NPMVBLSUlOVENBMDEuQU1FLkdCTF9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3J0MB0GA1UdDgQWBBSklsMGrs_eAsv_RTi_q4qgDc9qNDAOBgNVHQ8BAf8EBAMCBaAwggEmBgNVHR8EggEdMIIBGTCCARWgggERoIIBDYY_aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraWluZnJhL0NSTC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMS5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMi5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsMy5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JshjFodHRwOi8vY3JsNC5hbWUuZ2JsL2NybC9BTUUlMjBJbmZyYSUyMENBJTIwMDUuY3JsMIGdBgNVHSAEgZUwgZIwDAYKKwYBBAGCN3sBATBmBgorBgEEAYI3ewICMFgwVgYIKwYBBQUHAgIwSh5IADMAMwBlADAAMQA5ADIAMQAtADQAZAA2ADQALQA0AGYAOABjAC0AYQAwADUANQAtADUAYgBkAGEAZgBmAGQANQBlADMAMwBkMAwGCisGAQQBgjd7AwIwDAYKKwYBBAGCN3sEAjAfBgNVHSMEGDAWgBR61hmFKHlscXYeYPjzS--iBUIWHTAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggEBAJ51PdAaul136rrBMSwKBqaPsalRACK88HnU3-MuFwPY3EKcBNfr_DcyIemG6qcdAt6oBTDGXSVm8qGYJ2eHSVBH91yTQvJd5-a7_b9xta0wy4EJYoK-Olj6bE5ygF6klhRzpEyjfq2vFjpc2SF6xPxtXMaj4I7ACMq2QHy3CO_thX0U9_MhBYBb-v3ICmOFIZIBb4wOpeX0BsfrYbqwos0TpMW5k0T0RtCs4mpGUt-7YgEXCPIwlt7JN4fLqGTiEElAPaYcSl4-0aYA_RVN98y83vlGlM0kIjglh8_t1QOAUw0jy8LA4CNtMdgL_ncOt66gFr9ocwuFusQMx11WpTM&s=urCNpN9ZvN8BUw-mbDSF8Yjna5wdPq8t-rZjwi30CnLQQfIyBdJWjDI7kOO_xeLBhvHZBOGFM-sEfqG7-6Aw9pf4V96ZwQJAiyjqjW2PKUKd0n65DZWYcUDHlC4EJyg6ad71_hl_e-H_6xMLlDSE0oRzOJuWbTiKjh6JCiDJd8iTVLDSJrUMbnTQrEPX2cnjHXL-TjEW_2EMsh_1LKBNG4UrESGKDVo5MEBIUSQiQLqcqjOhOBpArv6BMvV1gEwt6oBeTlZpBQpHK_vvy0NyorMFhdp0yHMDL71RG-pJnN0xdjae7K0qD01FgCWT-BUWopStJ6h5J_WLRLKIz_Wk-w&h=xhjztFZyTM1uvpj0io2nNcq6GhmOluBH2GwvHOwXXmw cache-control: - no-cache content-length: - - '2591' + - '2783' content-type: - application/json; charset=utf-8 date: - - Fri, 05 Jul 2024 10:29:38 GMT + - Tue, 18 Nov 2025 16:46:42 GMT etag: - - '"6c0339fe-0000-0100-0000-6687cb130000"' + - '"ae05a02c-0000-0100-0000-691ca2f20000"' expires: - '-1' opc-request-id: - - /88014BD80C78B5D03D0F65BC9B29A796/A27884F05D4023F868EBAB876B6226EC + - oci-DD42585ACE2DD2C-202511181646/C45C040E358A8132EEA21C6949414460/0CEFB95EB4FBC053F342BA71A80A196C pragma: - no-cache strict-transport-security: - max-age=31536000; includeSubDomains + vary: + - Origin,Accept-Encoding x-cache: - CONFIG_NOCACHE x-content-type-options: - nosniff + x-ms-async-operation-timeout: + - P1D + x-ms-operation-identifier: + - tenantId=9ef05df2-ad7c-4737-aba9-a5e1b3fa5ae1,objectId=ed0404db-6d52-44c6-a09d-182ac122b912/westus/f306a05f-4d8f-4495-9cd3-526510205fae x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-global-writes: @@ -277,7 +298,7 @@ interactions: x-ms-ratelimit-remaining-subscription-writes: - '199' x-msedge-ref: - - 'Ref A: DDAC6D63C9024D00B82495531718124C Ref B: AMS231032608045 Ref C: 2024-07-05T10:29:33Z' + - 'Ref A: 3102E4A565994513A35BC5E7A397DC73 Ref B: SJC211051205039 Ref C: 2025-11-18T16:46:36Z' status: code: 201 message: Created diff --git a/src/oracle-database/azext_oracle_database/tests/latest/test_oracle_database.py b/src/oracle-database/azext_oracle_database/tests/latest/test_oracle_database.py index 9142a281a72..9fcd78380ab 100644 --- a/src/oracle-database/azext_oracle_database/tests/latest/test_oracle_database.py +++ b/src/oracle-database/azext_oracle_database/tests/latest/test_oracle_database.py @@ -17,13 +17,13 @@ class OracleDatabaseScenario(ScenarioTest): def test_oracledatabase_exadata(self, resource_group): subscription_id = self.get_subscription_id() self.kwargs.update({ - 'infra_name': 'OFake_Infra_AzCLI', + 'infra_name': 'OFake_Infra_AzCLINew', 'location': 'eastus', 'shape': 'Exadata.X9M', 'tags': '{tagk1:tagv1}' }) self.cmd('az oracle-database cloud-exadata-infrastructure create ' - '--resource-group {rg} ' + '--resource-group testAzureCLi ' '--name {infra_name} ' '--zones 2 ' '--compute-count 2 ' @@ -33,21 +33,21 @@ def test_oracledatabase_exadata(self, resource_group): '--storage-count 3 --no-wait') self.cmd('az oracle-database cloud-exadata-infrastructure show ' '--resource-group PowerShellTestRg ' - '--name OFake_PowerShellTestExaInfra ') + '--name OFake_PowerShellExaInfra ') self.cmd('az oracle-database cloud-exadata-infrastructure list ' '--resource-group PowerShellTestRg ') self.cmd('az oracle-database cloud-exadata-infrastructure database-server list ' - '--cloudexadatainfrastructurename OFake_PowerShellTestExaInfra ' + '--cloudexadatainfrastructurename OFake_PowerShellExaInfra ' '--resource-group PowerShellTestRg ') self.cmd('az oracle-database cloud-vm-cluster create ' - '--cloud-exadata-infrastructure-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Oracle.Database/cloudExadataInfrastructures/DemoExaInfra ' - '--resource-group SDKTestRG ' + '--cloud-exadata-infrastructure-id /subscriptions/fd42b73d-5f28-4a23-ae7c-ca08c625fe07/resourceGroups/PowerShellTestRg/providers/Oracle.Database/cloudExadataInfrastructures/OFake_PowerShellExaInfra ' + '--resource-group PowerShellTestRg ' '--location eastus ' '--cpu-core-count 6 ' '--data-storage-percentage 80 ' '--data-storage-size-in-tbs 2 ' '--db-node-storage-size-in-gbs 120 ' - '--db-servers [\'ocid1.dbserver.oc1.iad.xxxxx\',\'ocid1.dbserver.oc1.iad.xxxxx\',\'ocid1.dbserver.oc1.iad.xxxxx\'] ' + '--db-servers [\'ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yaaqsjbublndya2sya52aaggapq6adfjfv5vglphfr6pwa\',\'ocid1.dbserver.oc1.iad.anuwcljt2xgsw2yavhxxltixijkexwgvdiez3rjzajlt4p422ajm2ojfdgaa\'] ' '--display-name OFake_VMC_AzCLI3 ' '--name OFake_VMC_AzCLI3 ' '--gi-version 19.0.0.0 ' @@ -56,9 +56,9 @@ def test_oracledatabase_exadata(self, resource_group): '--is-sparse-diskgroup-enabled False ' '--license-model LicenseIncluded ' '--memory-size-in-gbs 60 ' - '--ssh-public-keys \'ssh-rsa keykeykeykeykey generated-by-azure\' ' - '--subnet-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Microsoft.Network/virtualNetworks/SDKVnet/subnets/SDKSubnet ' + '--ssh-public-keys \'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHJDAu814QnRaYFbuFswJX1IdpFAa8yVk4sneI3Q+QLoTyE4W5GR5f6TR5FqA03zxp41chkvjLysnc+EYJmjXQIbvrsEfaUenGu2AbYE3szBK9v+8iUy8JLgjoGuuxTU3BNCvMlTd00yw/qrOYbEDU9ZBnZVY/0nv2E03AzGUUObZJ8IUgNRUmNdWVFQiVUcmkRRM+XsIEUpuh0S6YJLLweZd+H50Y1mhKWXnZZH8Ed/5EmkSr7cO5WEKU2O/KSbavybkjUVWi6dcQMfwmNLBH9aByqAW8QvcZkZDvxLmimLnm3Jd/QDVvGesjyLbUrWfpbsaDXs+DgjTlFlxyqLPYMON5cfSg8wBj3Y176yWxwmrPnkro8X1Y93poSDQZb9SU68DsTrgVa6FoXWPkbUXz/nZX9GkTwE1Nhy2EPL4J+J50ZUZWG0bK25dFTKrzimLn1Qmvrx3so9qDId9LWbpYI6cJYxDTkGdGpuaHqDqGAi+5HeeXxx3/zO8pErPxy20= generated-by-azure\' ' + '--subnet-id /subscriptions/fd42b73d-5f28-4a23-ae7c-ca08c625fe07/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet/subnets/delegated ' '--time-zone UTC ' - '--vnet-id /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SDKTestRG/providers/Microsoft.Network/virtualNetworks/SDKVnet ' + '--vnet-id /subscriptions/fd42b73d-5f28-4a23-ae7c-ca08c625fe07/resourceGroups/PowerShellTestRg/providers/Microsoft.Network/virtualNetworks/PSTestVnet ' '--no-wait ') From 5dd64428fee73340b16fcffecf0a00d85f3c0b61 Mon Sep 17 00:00:00 2001 From: mihret Date: Thu, 20 Nov 2025 10:39:14 -0600 Subject: [PATCH 2/2] linter exclusion --- src/oracle-database/linter_exclusions.yml | 115 ++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100644 src/oracle-database/linter_exclusions.yml diff --git a/src/oracle-database/linter_exclusions.yml b/src/oracle-database/linter_exclusions.yml new file mode 100644 index 00000000000..35fd5794760 --- /dev/null +++ b/src/oracle-database/linter_exclusions.yml @@ -0,0 +1,115 @@ +oracle-database autonomous-database change-disaster-recovery-configuration: + parameters: + is_replicate_automatic_backups: + rule_exclusions: + - option_length_too_long + time_snapshot_standby_enabled_till: + rule_exclusions: + - option_length_too_long +oracle-database autonomous-database create: + parameters: + clone_from_backup_timestamp: + rule_exclusions: + - option_length_too_long + cross_region_disaster_recovery: + rule_exclusions: + - option_length_too_long + scheduled_operations_list: + rule_exclusions: + - option_length_too_long +oracle-database autonomous-database update: + parameters: + clone_from_backup_timestamp: + rule_exclusions: + - option_length_too_long + cross_region_disaster_recovery: + rule_exclusions: + - option_length_too_long + scheduled_operations_list: + rule_exclusions: + - option_length_too_long +oracle-database cloud-exadata-infrastructure add-storage-capacity: + parameters: + cloudexadatainfrastructurename: + rule_exclusions: + - option_length_too_long +oracle-database cloud-exadata-infrastructure configure-exascale: + parameters: + cloudexadatainfrastructurename: + rule_exclusions: + - option_length_too_long +oracle-database cloud-exadata-infrastructure database-server show: + parameters: + cloudexadatainfrastructurename: + rule_exclusions: + - option_length_too_long +oracle-database cloud-vm-cluster create: + parameters: + exascale_db_storage_vault_id: + rule_exclusions: + - option_length_too_long +oracle-database cloud-vm-cluster update: + parameters: + file_system_configuration_details: + rule_exclusions: + - option_length_too_long +oracle-database db-system create: + parameters: + initial_data_storage_size_in_gb: + rule_exclusions: + - option_length_too_long + storage_volume_performance_mode: + rule_exclusions: + - option_length_too_long +oracle-database db-system-db-version list: + parameters: + is_database_software_image_supported: + rule_exclusions: + - option_length_too_long +oracle-database exadb-vm-cluster create: + parameters: + data_collection_options: + rule_exclusions: + - option_length_too_long + exascale_db_storage_vault_id: + rule_exclusions: + - option_length_too_long + scan_listener_port_tcp_ssl: + rule_exclusions: + - option_length_too_long +oracle-database exascale-db-storage-vault create: + parameters: + additional_flash_cache_in_percent: + rule_exclusions: + - option_length_too_long + exadata_infrastructure_id: + rule_exclusions: + - option_length_too_long + high_capacity_database_storage_input: + rule_exclusions: + - option_length_too_long +oracle-database network-anchor create: + parameters: + dns_listening_endpoint_allowed_cidrs: + rule_exclusions: + - option_length_too_long + is_oracle_dns_forwarding_endpoint_enabled: + rule_exclusions: + - option_length_too_long + is_oracle_dns_listening_endpoint_enabled: + rule_exclusions: + - option_length_too_long + is_oracle_to_azure_dns_zone_sync_enabled: + rule_exclusions: + - option_length_too_long +oracle-database network-anchor update: + parameters: + is_oracle_dns_forwarding_endpoint_enabled: + rule_exclusions: + - option_length_too_long + is_oracle_dns_listening_endpoint_enabled: + rule_exclusions: + - option_length_too_long + is_oracle_to_azure_dns_zone_sync_enabled: + rule_exclusions: + - option_length_too_long \ No newline at end of file