Skip to content

Commit bbc6082

Browse files
author
SDKAuto
committed
CodeGen from PR 33466 in Azure/azure-rest-api-specs
Merge b300951676a40a8259974db5b182a15af9e015d9 into f8b3f529b8a656bca434a48d1b46bb5c8cb00108
1 parent 741181a commit bbc6082

File tree

107 files changed

+46146
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+46146
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python autonomous_database_change_disaster_recovery_configuration.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.autonomous_databases.begin_change_disaster_recovery_configuration(
31+
resource_group_name='rg000',
32+
autonomousdatabasename='databasedb1',
33+
body={'disasterRecoveryType': 'Adg', 'isReplicateAutomaticBackups': False},
34+
).result()
35+
print(response)
36+
37+
# x-ms-original-file: 2025-03-01/autonomousDatabase_changeDisasterRecoveryConfiguration.json
38+
if __name__ == "__main__":
39+
main()
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python autonomous_database_failover.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.autonomous_databases.begin_failover(
31+
resource_group_name='rg000',
32+
autonomousdatabasename='databasedb1',
33+
body={'peerDbId': 'peerDbId'},
34+
).result()
35+
print(response)
36+
37+
# x-ms-original-file: 2025-03-01/autonomousDatabase_failover.json
38+
if __name__ == "__main__":
39+
main()
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python autonomous_database_generate_wallet.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.autonomous_databases.generate_wallet(
31+
resource_group_name='rg000',
32+
autonomousdatabasename='databasedb1',
33+
body={'generateType': 'Single', 'isRegional': False, 'password': '********'},
34+
)
35+
print(response)
36+
37+
# x-ms-original-file: 2025-03-01/autonomousDatabase_generateWallet.json
38+
if __name__ == "__main__":
39+
main()
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python autonomous_database_restore.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.autonomous_databases.begin_restore(
31+
resource_group_name='rg000',
32+
autonomousdatabasename='databasedb1',
33+
body={'timestamp': '2024-04-23T00:00:00.000Z'},
34+
).result()
35+
print(response)
36+
37+
# x-ms-original-file: 2025-03-01/autonomousDatabase_restore.json
38+
if __name__ == "__main__":
39+
main()
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python autonomous_database_switchover.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.autonomous_databases.begin_switchover(
31+
resource_group_name='rg000',
32+
autonomousdatabasename='databasedb1',
33+
body={'peerDbId': 'peerDbId'},
34+
).result()
35+
print(response)
36+
37+
# x-ms-original-file: 2025-03-01/autonomousDatabase_switchover.json
38+
if __name__ == "__main__":
39+
main()
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python db_nodes_action.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.db_nodes.begin_action(
31+
resource_group_name='rg000',
32+
cloudvmclustername='cluster1',
33+
dbnodeocid='ocid1....aaaaaa',
34+
body={'action': 'Start'},
35+
).result()
36+
print(response)
37+
38+
# x-ms-original-file: 2025-03-01/dbNodes_action.json
39+
if __name__ == "__main__":
40+
main()
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python db_system_shapes_list_by_location.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.db_system_shapes.list_by_location(
31+
location='eastus',
32+
)
33+
for item in response:
34+
print(item)
35+
36+
# x-ms-original-file: 2025-03-01/dbSystemShapes_listByLocation.json
37+
if __name__ == "__main__":
38+
main()
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python exa_infra_add_storage_capacity.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.cloud_exadata_infrastructures.begin_add_storage_capacity(
31+
resource_group_name='rg000',
32+
cloudexadatainfrastructurename='infra1',
33+
).result()
34+
print(response)
35+
36+
# x-ms-original-file: 2025-03-01/exaInfra_addStorageCapacity.json
37+
if __name__ == "__main__":
38+
main()
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python exadb_vm_clusters_remove_vms_maximum_set_gen.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.exadb_vm_clusters.begin_remove_vms(
31+
resource_group_name='rgopenapi',
32+
exadb_vm_cluster_name='vmClusterName',
33+
body={'dbNodes': [{'dbNodeId': '/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName'}]},
34+
).result()
35+
print(response)
36+
37+
# x-ms-original-file: 2025-03-01/ExadbVmClusters_RemoveVms_MaximumSet_Gen.json
38+
if __name__ == "__main__":
39+
main()
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) Python Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
9+
from azure.identity import DefaultAzureCredential
10+
11+
from azure.mgmt.oracledatabase import OracleDatabaseMgmtClient
12+
"""
13+
# PREREQUISITES
14+
pip install azure-identity
15+
pip install azure-mgmt-oracledatabase
16+
# USAGE
17+
python exascale_db_nodes_action_maximum_set_gen.py
18+
19+
Before run the sample, please set the values of the client ID, tenant ID and client secret
20+
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
21+
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
22+
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
23+
"""
24+
def main():
25+
client = OracleDatabaseMgmtClient(
26+
credential=DefaultAzureCredential(),
27+
subscription_id="SUBSCRIPTION_ID",
28+
)
29+
30+
response = client.exascale_db_nodes.begin_action(
31+
resource_group_name='rgopenapi',
32+
exadb_vm_cluster_name='vmClusterName',
33+
exascale_db_node_name='dbNodeName',
34+
body={'action': 'Start'},
35+
).result()
36+
print(response)
37+
38+
# x-ms-original-file: 2025-03-01/ExascaleDbNodes_Action_MaximumSet_Gen.json
39+
if __name__ == "__main__":
40+
main()

0 commit comments

Comments
 (0)