diff --git a/sdk/containerservice/azure-mgmt-containerservice/_meta.json b/sdk/containerservice/azure-mgmt-containerservice/_meta.json index 1a836bdda223..4436f9a70890 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/_meta.json +++ b/sdk/containerservice/azure-mgmt-containerservice/_meta.json @@ -1,12 +1,12 @@ { - "commit": "c8b7a0090e6cd089110c9ed46ef884ebff32c047", + "commit": "dc8e57407efc3c2557cf6aaa1e6384df590bf2b3", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest": "3.9.6", "use": [ "@autorest/python@6.6.0", "@autorest/modelerfour@4.26.2" ], - "autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.26.2 --version=3.9.6 --version-tolerant=False", + "autorest_command": "autorest specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.6.0 --use=@autorest/modelerfour@4.26.2 --version=3.9.6 --version-tolerant=False", "readme": "specification/containerservice/resource-manager/Microsoft.ContainerService/aks/readme.md", "package-2023-06": "2023-07-21 03:39:44 +0800 e413760a8ba680c5d71dea6a47ce021af5dab6e2 stable/2023-06-01/managedClusters.json", "package-2023-05": "2023-06-28 14:33:18 +1200 e7db720b9842d971cd008d16b7cdb579e7b802f2 stable/2023-05-01/managedClusters.json", diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py deleted file mode 100644 index 10d98555e27d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_abort_operation.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_abort_operation.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.agent_pools.begin_abort_latest_operation( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsAbortOperation.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py deleted file mode 100644 index 268d706eee7d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_custom_node_config.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_custom_node_config.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "kubeletConfig": { - "allowedUnsafeSysctls": ["kernel.msg*", "net.core.somaxconn"], - "cpuCfsQuota": True, - "cpuCfsQuotaPeriod": "200ms", - "cpuManagerPolicy": "static", - "failSwapOn": False, - "imageGcHighThreshold": 90, - "imageGcLowThreshold": 70, - "topologyManagerPolicy": "best-effort", - }, - "linuxOSConfig": { - "swapFileSizeMB": 1500, - "sysctls": { - "kernelThreadsMax": 99999, - "netCoreWmemDefault": 12345, - "netIpv4IpLocalPortRange": "20000 60000", - "netIpv4TcpTwReuse": True, - }, - "transparentHugePageDefrag": "madvise", - "transparentHugePageEnabled": "always", - }, - "orchestratorVersion": "", - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_CustomNodeConfig.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py deleted file mode 100644 index 33322b9400a2..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_dedicated_host_group.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_dedicated_host_group.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "hostGroupID": "/subscriptions/subid1/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1", - "orchestratorVersion": "", - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_DedicatedHostGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py deleted file mode 100644 index 733720ad7741..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_encryption_at_host.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_enable_encryption_at_host.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "enableEncryptionAtHost": True, - "orchestratorVersion": "", - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_EnableEncryptionAtHost.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py deleted file mode 100644 index 863e55c89f1f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_fips.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_enable_fips.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "enableFIPS": True, - "orchestratorVersion": "", - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_EnableFIPS.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py deleted file mode 100644 index c533fd975ee6..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_enable_ultra_ssd.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_enable_ultra_ssd.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "enableUltraSSD": True, - "orchestratorVersion": "", - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_EnableUltraSSD.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py deleted file mode 100644 index 73e35abddd00..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ephemeral.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_ephemeral.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "orchestratorVersion": "", - "osDiskSizeGB": 64, - "osDiskType": "Ephemeral", - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_Ephemeral.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py deleted file mode 100644 index ac61386c412f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_gpumig.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_gpumig.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "gpuInstanceProfile": "MIG2g", - "kubeletConfig": { - "allowedUnsafeSysctls": ["kernel.msg*", "net.core.somaxconn"], - "cpuCfsQuota": True, - "cpuCfsQuotaPeriod": "200ms", - "cpuManagerPolicy": "static", - "failSwapOn": False, - "imageGcHighThreshold": 90, - "imageGcLowThreshold": 70, - "topologyManagerPolicy": "best-effort", - }, - "linuxOSConfig": { - "swapFileSizeMB": 1500, - "sysctls": { - "kernelThreadsMax": 99999, - "netCoreWmemDefault": 12345, - "netIpv4IpLocalPortRange": "20000 60000", - "netIpv4TcpTwReuse": True, - }, - "transparentHugePageDefrag": "madvise", - "transparentHugePageEnabled": "always", - }, - "orchestratorVersion": "", - "osType": "Linux", - "vmSize": "Standard_ND96asr_v4", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_GPUMIG.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py deleted file mode 100644 index 786950b9b7f1..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ossku.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_ossku.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "kubeletConfig": { - "allowedUnsafeSysctls": ["kernel.msg*", "net.core.somaxconn"], - "cpuCfsQuota": True, - "cpuCfsQuotaPeriod": "200ms", - "cpuManagerPolicy": "static", - "failSwapOn": False, - "imageGcHighThreshold": 90, - "imageGcLowThreshold": 70, - "topologyManagerPolicy": "best-effort", - }, - "linuxOSConfig": { - "swapFileSizeMB": 1500, - "sysctls": { - "kernelThreadsMax": 99999, - "netCoreWmemDefault": 12345, - "netIpv4IpLocalPortRange": "20000 60000", - "netIpv4TcpTwReuse": True, - }, - "transparentHugePageDefrag": "madvise", - "transparentHugePageEnabled": "always", - }, - "orchestratorVersion": "", - "osSKU": "AzureLinux", - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_OSSKU.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py deleted file mode 100644 index 3172d84b8098..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_ppg.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_ppg.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "orchestratorVersion": "", - "osType": "Linux", - "proximityPlacementGroupID": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_PPG.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py deleted file mode 100644 index 95ec62f8f305..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_snapshot.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_snapshot.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "creationData": { - "sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" - }, - "enableFIPS": True, - "orchestratorVersion": "", - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_Snapshot.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py deleted file mode 100644 index 4688282b47b2..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_spot.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_spot.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "nodeLabels": {"key1": "val1"}, - "nodeTaints": ["Key1=Value1:NoSchedule"], - "orchestratorVersion": "", - "osType": "Linux", - "scaleSetEvictionPolicy": "Delete", - "scaleSetPriority": "Spot", - "tags": {"name1": "val1"}, - "vmSize": "Standard_DS1_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_Spot.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py deleted file mode 100644 index 2b8014ea6bd1..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_update.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "mode": "User", - "nodeLabels": {"key1": "val1"}, - "nodeTaints": ["Key1=Value1:NoSchedule"], - "orchestratorVersion": "", - "osType": "Linux", - "scaleSetEvictionPolicy": "Delete", - "scaleSetPriority": "Spot", - "tags": {"name1": "val1"}, - "vmSize": "Standard_DS1_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py deleted file mode 100644 index ba8cea1d02bc..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_wasm_wasi.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_wasm_wasi.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "mode": "User", - "orchestratorVersion": "", - "osDiskSizeGB": 64, - "osType": "Linux", - "vmSize": "Standard_DS2_v2", - "workloadRuntime": "WasmWasi", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_WasmWasi.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py deleted file mode 100644 index f040c7d7eb8e..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_create_windows_ossku.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_create_windows_ossku.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="wnp2", - parameters={ - "properties": { - "count": 3, - "orchestratorVersion": "1.23.3", - "osSKU": "Windows2022", - "osType": "Windows", - "vmSize": "Standard_D4s_v3", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsCreate_WindowsOSSKU.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py deleted file mode 100644 index e8bdafce61a5..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.agent_pools.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py deleted file mode 100644 index fb2fc1a04cb9..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.get( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py deleted file mode 100644 index d33fdfb8325b..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_agent_pool_available_versions.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_get_agent_pool_available_versions.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.get_available_agent_pool_versions( - resource_group_name="rg1", - resource_name="clustername1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsGetAgentPoolAvailableVersions.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py deleted file mode 100644 index 5e2d5fb52558..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_get_upgrade_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_get_upgrade_profile.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.get_upgrade_profile( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsGetUpgradeProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py deleted file mode 100644 index a5ebae982ffa..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.list( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py deleted file mode 100644 index c0a94ddc5315..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_start.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_start.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={"properties": {"powerState": {"code": "Running"}}}, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPools_Start.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py deleted file mode 100644 index 854afb4925fb..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_stop.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_stop.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={"properties": {"powerState": {"code": "Stopped"}}}, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPools_Stop.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py deleted file mode 100644 index 6add11c8a062..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_update.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - parameters={ - "properties": { - "count": 3, - "enableAutoScaling": True, - "maxCount": 2, - "minCount": 2, - "nodeTaints": ["Key1=Value1:NoSchedule"], - "orchestratorVersion": "", - "osType": "Linux", - "scaleSetEvictionPolicy": "Delete", - "scaleSetPriority": "Spot", - "vmSize": "Standard_DS1_v2", - } - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPools_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py deleted file mode 100644 index 403a36b3791f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/agent_pools_upgrade_node_image_version.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python agent_pools_upgrade_node_image_version.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.agent_pools.begin_upgrade_node_image_version( - resource_group_name="rg1", - resource_name="clustername1", - agent_pool_name="agentpool1", - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/AgentPoolsUpgradeNodeImageVersion.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/container_service_get_os_options.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/container_service_get_os_options.py deleted file mode 100644 index a7d27335c621..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/container_service_get_os_options.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python container_service_get_os_options.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.get_os_options( - location="location1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ContainerServiceGetOSOptions.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py deleted file mode 100644 index 44d8374cd533..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/kubernetes_versions_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python kubernetes_versions_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.list_kubernetes_versions( - location="location1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/KubernetesVersions_List.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update.py deleted file mode 100644 index 955f39708bd6..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python maintenance_configurations_create_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.maintenance_configurations.create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - config_name="default", - parameters={ - "properties": { - "notAllowedTime": [{"end": "2020-11-30T12:00:00Z", "start": "2020-11-26T03:00:00Z"}], - "timeInWeek": [{"day": "Monday", "hourSlots": [1, 2]}], - } - }, - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/MaintenanceConfigurationsCreate_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py deleted file mode 100644 index f013f4d26f85..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_create_update_maintenance_window.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python maintenance_configurations_create_update_maintenance_window.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.maintenance_configurations.create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - config_name="aksManagedAutoUpgradeSchedule", - parameters={ - "properties": { - "maintenanceWindow": { - "durationHours": 10, - "notAllowedDates": [ - {"end": "2023-02-25", "start": "2023-02-18"}, - {"end": "2024-01-05", "start": "2023-12-23"}, - ], - "schedule": {"relativeMonthly": {"dayOfWeek": "Monday", "intervalMonths": 3, "weekIndex": "First"}}, - "startDate": "2023-01-01", - "startTime": "08:30", - "utcOffset": "+05:30", - } - } - }, - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/MaintenanceConfigurationsCreate_Update_MaintenanceWindow.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete.py deleted file mode 100644 index 98898e0a14fd..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python maintenance_configurations_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.maintenance_configurations.delete( - resource_group_name="rg1", - resource_name="clustername1", - config_name="default", - ) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/MaintenanceConfigurationsDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py deleted file mode 100644 index 990745a28620..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_delete_maintenance_window.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python maintenance_configurations_delete_maintenance_window.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.maintenance_configurations.delete( - resource_group_name="rg1", - resource_name="clustername1", - config_name="aksManagedNodeOSUpgradeSchedule", - ) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/MaintenanceConfigurationsDelete_MaintenanceWindow.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get.py deleted file mode 100644 index f4b43b1acf4a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python maintenance_configurations_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.maintenance_configurations.get( - resource_group_name="rg1", - resource_name="clustername1", - config_name="default", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/MaintenanceConfigurationsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py deleted file mode 100644 index 537ee1a997e1..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_get_maintenance_window.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python maintenance_configurations_get_maintenance_window.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.maintenance_configurations.get( - resource_group_name="rg1", - resource_name="clustername1", - config_name="aksManagedNodeOSUpgradeSchedule", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/MaintenanceConfigurationsGet_MaintenanceWindow.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list.py deleted file mode 100644 index e4beeffaf490..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python maintenance_configurations_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.maintenance_configurations.list_by_managed_cluster( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/MaintenanceConfigurationsList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py deleted file mode 100644 index e1b92d20c20e..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/maintenance_configurations_list_maintenance_window.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python maintenance_configurations_list_maintenance_window.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.maintenance_configurations.list_by_managed_cluster( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/MaintenanceConfigurationsList_MaintenanceWindow.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py deleted file mode 100644 index 4031bde7d387..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_abort_operation.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_abort_operation.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.managed_clusters.begin_abort_latest_operation( - resource_group_name="rg1", - resource_name="clustername1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersAbortOperation.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py deleted file mode 100644 index f265c340e702..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_azure_keyvault_secrets_provider.py +++ /dev/null @@ -1,79 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_azure_keyvault_secrets_provider.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": { - "azureKeyvaultSecretsProvider": { - "config": {"enableSecretRotation": "true", "rotationPollInterval": "2m"}, - "enabled": True, - } - }, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_AzureKeyvaultSecretsProvider.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py deleted file mode 100644 index d3bc61bde2bb..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dedicated_host_group.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_dedicated_host_group.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "hostGroupID": "/subscriptions/subid1/resourcegroups/rg/providers/Microsoft.Compute/hostGroups/hostgroup1", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": False, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_DedicatedHostGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py deleted file mode 100644 index d12a83e2cf6a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_disable_run_command.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_disable_run_command.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableEncryptionAtHost": True, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "apiServerAccessProfile": {"disableRunCommand": True}, - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_DisableRunCommand.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py deleted file mode 100644 index 908203fe4361..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_dual_stack_networking.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_dual_stack_networking.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} - }, - }, - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "availabilityZones": ["1", "2", "3"], - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "scaleDownMode": "Deallocate", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS1_v2", - } - ], - "autoScalerProfile": { - "balance-similar-node-groups": "true", - "expander": "priority", - "max-node-provision-time": "15m", - "new-pod-scale-up-delay": "1m", - "scale-down-delay-after-add": "15m", - "scan-interval": "20s", - "skip-nodes-with-system-pods": "false", - }, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "ipFamilies": ["IPv4", "IPv6"], - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_DualStackNetworking.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py deleted file mode 100644 index c9fedf577aef..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_encryption_at_host.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_enable_encryption_at_host.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableEncryptionAtHost": True, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_EnableEncryptionAtHost.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py deleted file mode 100644 index dae5f304ec15..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enable_ultra_ssd.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_enable_ultra_ssd.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "enableUltraSSD": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_EnableUltraSSD.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py deleted file mode 100644 index 27d90b310e10..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_enabled_fips.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_enabled_fips.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableFIPS": True, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": False, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_EnabledFIPS.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py deleted file mode 100644 index 65978086e51d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_gpumig.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_gpumig.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "gpuInstanceProfile": "MIG3g", - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_ND96asr_v4", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "httpProxyConfig": { - "httpProxy": "http://myproxy.server.com:8080", - "httpsProxy": "https://myproxy.server.com:8080", - "noProxy": ["localhost", "127.0.0.1"], - "trustedCa": "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=", - }, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_GPUMIG.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py deleted file mode 100644 index 7e289d00b142..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_httpproxy.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_httpproxy.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "httpProxyConfig": { - "httpProxy": "http://myproxy.server.com:8080", - "httpsProxy": "https://myproxy.server.com:8080", - "noProxy": ["localhost", "127.0.0.1"], - "trustedCa": "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=", - }, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_HTTPProxy.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py deleted file mode 100644 index 135fcb6c646f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_managed_nat_gateway.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_managed_nat_gateway.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": False, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerSku": "standard", - "natGatewayProfile": {"managedOutboundIPProfile": {"count": 2}}, - "outboundType": "managedNATGateway", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_ManagedNATGateway.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py deleted file mode 100644 index 6781c95f9511..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_node_public_ip_prefix.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_node_public_ip_prefix.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "nodePublicIPPrefixID": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/publicIPPrefixes/public-ip-prefix", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_NodePublicIPPrefix.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py deleted file mode 100644 index 8a8b9c032d6e..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ossku.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_ossku.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osSKU": "AzureLinux", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "httpProxyConfig": { - "httpProxy": "http://myproxy.server.com:8080", - "httpsProxy": "https://myproxy.server.com:8080", - "noProxy": ["localhost", "127.0.0.1"], - "trustedCa": "Q29uZ3JhdHMhIFlvdSBoYXZlIGZvdW5kIGEgaGlkZGVuIG1lc3NhZ2U=", - }, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_OSSKU.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py deleted file mode 100644 index 5510257f7e3d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_pod_identity.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_pod_identity.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "podIdentityProfile": {"allowNetworkPluginKubenet": True, "enabled": True}, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_PodIdentity.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py deleted file mode 100644 index f96e48a15150..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_ppg.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_ppg.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "proximityPlacementGroupID": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Compute/proximityPlacementGroups/ppg1", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_PPG.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py deleted file mode 100644 index 97faf7842113..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_premium.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_premium.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableEncryptionAtHost": True, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "apiServerAccessProfile": {"disableRunCommand": True}, - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "supportPlan": "AKSLongTermSupport", - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Base", "tier": "Premium"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_Premium.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py deleted file mode 100644 index 872860e77f8f..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_fqdn_subdomain.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_private_cluster_fqdn_subdomain.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableEncryptionAtHost": True, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "apiServerAccessProfile": { - "enablePrivateCluster": True, - "privateDNSZone": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.Network/privateDnsZones/privatelink.location1.azmk8s.io", - }, - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "fqdnSubdomain": "domain1", - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_PrivateClusterFQDNSubdomain.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py deleted file mode 100644 index f60d624ba7c5..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_private_cluster_public_fqdn.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_private_cluster_public_fqdn.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableEncryptionAtHost": True, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "apiServerAccessProfile": {"enablePrivateCluster": True, "enablePrivateClusterPublicFQDN": True}, - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_PrivateClusterPublicFQDN.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py deleted file mode 100644 index 7a32e868c517..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_security_profile.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_security_profile.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "dnsPrefix": "dnsprefix1", - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "securityProfile": { - "defender": { - "logAnalyticsWorkspaceResourceId": "/subscriptions/SUB_ID/resourcegroups/RG_NAME/providers/microsoft.operationalinsights/workspaces/WORKSPACE_NAME", - "securityMonitoring": {"enabled": True}, - }, - "workloadIdentity": {"enabled": True}, - }, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_SecurityProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py deleted file mode 100644 index c9815b87e12a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_snapshot.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_snapshot.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "creationData": { - "sourceResourceId": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.ContainerService/snapshots/snapshot1" - }, - "enableFIPS": True, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": False, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_Snapshot.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py deleted file mode 100644 index 934ce481f77a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} - }, - }, - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "availabilityZones": ["1", "2", "3"], - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "scaleDownMode": "Deallocate", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS1_v2", - } - ], - "autoScalerProfile": { - "balance-similar-node-groups": "true", - "expander": "priority", - "max-node-provision-time": "15m", - "new-pod-scale-up-delay": "1m", - "scale-down-delay-after-add": "15m", - "scan-interval": "20s", - "skip-nodes-with-system-pods": "false", - }, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_Update.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py deleted file mode 100644 index 9152ea8fd1d2..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_windows_gmsa.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_update_windows_gmsa.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} - }, - }, - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "availabilityZones": ["1", "2", "3"], - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS1_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": { - "adminPassword": "replacePassword1234$", - "adminUsername": "azureuser", - "gmsaProfile": {"enabled": True}, - }, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_UpdateWindowsGmsa.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py deleted file mode 100644 index 58d9c0c87dc4..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_ahub.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_update_with_ahub.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "identity": { - "type": "UserAssigned", - "userAssignedIdentities": { - "/subscriptions/subid1/resourceGroups/rgName1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1": {} - }, - }, - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "availabilityZones": ["1", "2", "3"], - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS1_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": { - "adminPassword": "replacePassword1234$", - "adminUsername": "azureuser", - "licenseType": "Windows_Server", - }, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_UpdateWithAHUB.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py deleted file mode 100644 index c172d724d184..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_update_with_enable_azure_rbac.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_update_with_enable_azure_rbac.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "aadProfile": {"enableAzureRBAC": True, "managed": True}, - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "availabilityZones": ["1", "2", "3"], - "count": 3, - "enableNodePublicIP": True, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS1_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": { - "loadBalancerProfile": {"managedOutboundIPs": {"count": 2}}, - "loadBalancerSku": "standard", - "outboundType": "loadBalancer", - }, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_UpdateWithEnableAzureRBAC.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py deleted file mode 100644 index 351852f15f53..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_create_user_assigned_nat_gateway.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_create_user_assigned_nat_gateway.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_create_or_update( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "location": "location1", - "properties": { - "addonProfiles": {}, - "agentPoolProfiles": [ - { - "count": 3, - "enableNodePublicIP": False, - "mode": "System", - "name": "nodepool1", - "osType": "Linux", - "type": "VirtualMachineScaleSets", - "vmSize": "Standard_DS2_v2", - } - ], - "autoScalerProfile": {"scale-down-delay-after-add": "15m", "scan-interval": "20s"}, - "diskEncryptionSetID": "/subscriptions/subid1/resourceGroups/rg1/providers/Microsoft.Compute/diskEncryptionSets/des", - "dnsPrefix": "dnsprefix1", - "enablePodSecurityPolicy": True, - "enableRBAC": True, - "kubernetesVersion": "", - "linuxProfile": {"adminUsername": "azureuser", "ssh": {"publicKeys": [{"keyData": "keydata"}]}}, - "networkProfile": {"loadBalancerSku": "standard", "outboundType": "userAssignedNATGateway"}, - "servicePrincipalProfile": {"clientId": "clientid", "secret": "secret"}, - "windowsProfile": {"adminPassword": "replacePassword1234$", "adminUsername": "azureuser"}, - }, - "sku": {"name": "Basic", "tier": "Free"}, - "tags": {"archv2": "", "tier": "production"}, - }, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersCreate_UserAssignedNATGateway.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py deleted file mode 100644 index 7d94ec7e1ec7..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.managed_clusters.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py deleted file mode 100644 index b23b9f40744d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.get( - resource_group_name="rg1", - resource_name="clustername1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersGet.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py deleted file mode 100644 index f179ed911837..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_access_profile.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_get_access_profile.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.get_access_profile( - resource_group_name="rg1", - resource_name="clustername1", - role_name="clusterUser", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersGetAccessProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py deleted file mode 100644 index 31c958793f8c..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_get_upgrade_profile.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_get_upgrade_profile.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.get_upgrade_profile( - resource_group_name="rg1", - resource_name="clustername1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersGetUpgradeProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py deleted file mode 100644 index a06dae67b994..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py deleted file mode 100644 index 8110394a151b..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_list_by_resource_group.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py deleted file mode 100644 index 655e65884d76..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_admin_credentials.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_list_cluster_admin_credentials.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.list_cluster_admin_credentials( - resource_group_name="rg1", - resource_name="clustername1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersListClusterAdminCredentials.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py deleted file mode 100644 index 696f3ad8f38c..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_monitoring_user_credentials.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_list_cluster_monitoring_user_credentials.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.list_cluster_monitoring_user_credentials( - resource_group_name="rg1", - resource_name="clustername1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersListClusterMonitoringUserCredentials.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py deleted file mode 100644 index b7da4de52e48..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_list_cluster_user_credentials.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_list_cluster_user_credentials.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.list_cluster_user_credentials( - resource_group_name="rg1", - resource_name="clustername1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersListClusterUserCredentials.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py deleted file mode 100644 index 3497c8677c48..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_aad_profile.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_reset_aad_profile.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.managed_clusters.begin_reset_aad_profile( - resource_group_name="rg1", - resource_name="clustername1", - parameters={ - "clientAppID": "clientappid", - "serverAppID": "serverappid", - "serverAppSecret": "serverappsecret", - "tenantID": "tenantid", - }, - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersResetAADProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py deleted file mode 100644 index ff2f9c4ea68a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_reset_service_principal_profile.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_reset_service_principal_profile.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.managed_clusters.begin_reset_service_principal_profile( - resource_group_name="rg1", - resource_name="clustername1", - parameters={"clientId": "clientid", "secret": "secret"}, - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersResetServicePrincipalProfile.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py deleted file mode 100644 index 5befa35b7102..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_cluster_certificates.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_rotate_cluster_certificates.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.managed_clusters.begin_rotate_cluster_certificates( - resource_group_name="rg1", - resource_name="clustername1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersRotateClusterCertificates.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py deleted file mode 100644 index 6b389730c815..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_rotate_service_account_signing_keys.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_rotate_service_account_signing_keys.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.managed_clusters.begin_rotate_service_account_signing_keys( - resource_group_name="rg1", - resource_name="clustername1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersRotateServiceAccountSigningKeys.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py deleted file mode 100644 index b68d4dc3ab35..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_start.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_start.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.managed_clusters.begin_start( - resource_group_name="rg1", - resource_name="clustername1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersStart.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py deleted file mode 100644 index 0da769abddf1..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_stop.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_stop.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.managed_clusters.begin_stop( - resource_group_name="rg1", - resource_name="clustername1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersStop.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py deleted file mode 100644 index 21a1eadfd3c6..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/managed_clusters_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python managed_clusters_update_tags.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_update_tags( - resource_group_name="rg1", - resource_name="clustername1", - parameters={"tags": {"archv3": "", "tier": "testing"}}, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ManagedClustersUpdateTags.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py deleted file mode 100644 index 938b52489528..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/operation_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python operation_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="SUBSCRIPTION_ID", - ) - - response = client.operations.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/Operation_List.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py deleted file mode 100644 index 63d1731a7dc8..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/outbound_network_dependencies_endpoints_list.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python outbound_network_dependencies_endpoints_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.list_outbound_network_dependencies_endpoints( - resource_group_name="rg1", - resource_name="clustername1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/OutboundNetworkDependenciesEndpointsList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py deleted file mode 100644 index ec885b56e4d5..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_delete.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python private_endpoint_connections_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.private_endpoint_connections.begin_delete( - resource_group_name="rg1", - resource_name="clustername1", - private_endpoint_connection_name="privateendpointconnection1", - ).result() - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/PrivateEndpointConnectionsDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py deleted file mode 100644 index 28bf2b01bdb8..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_get.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python private_endpoint_connections_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.private_endpoint_connections.get( - resource_group_name="rg1", - resource_name="clustername1", - private_endpoint_connection_name="privateendpointconnection1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/PrivateEndpointConnectionsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py deleted file mode 100644 index 13b92265f71d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python private_endpoint_connections_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.private_endpoint_connections.list( - resource_group_name="rg1", - resource_name="clustername1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/PrivateEndpointConnectionsList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py deleted file mode 100644 index 10ea4bd5653d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_endpoint_connections_update.py +++ /dev/null @@ -1,43 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python private_endpoint_connections_update.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.private_endpoint_connections.update( - resource_group_name="rg1", - resource_name="clustername1", - private_endpoint_connection_name="privateendpointconnection1", - parameters={"properties": {"privateLinkServiceConnectionState": {"status": "Approved"}}}, - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/PrivateEndpointConnectionsUpdate.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py deleted file mode 100644 index db2ab28c7975..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/private_link_resources_list.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python private_link_resources_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.private_link_resources.list( - resource_group_name="rg1", - resource_name="clustername1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/PrivateLinkResourcesList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py deleted file mode 100644 index 9331b7e2ba4e..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/resolve_private_link_service_id.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python resolve_private_link_service_id.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.resolve_private_link_service_id.post( - resource_group_name="rg1", - resource_name="clustername1", - parameters={"name": "management"}, - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/ResolvePrivateLinkServiceId.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py deleted file mode 100644 index 297e4860e59b..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_request.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python run_command_request.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.begin_run_command( - resource_group_name="rg1", - resource_name="clustername1", - request_payload={"clusterToken": "", "command": "kubectl apply -f ns.yaml", "context": ""}, - ).result() - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/RunCommandRequest.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py deleted file mode 100644 index 5e93d3ac1ca2..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_failed.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python run_command_result_failed.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.get_command_result( - resource_group_name="rg1", - resource_name="clustername1", - command_id="def7b3ea71bd4f7e9d226ddbc0f00ad9", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/RunCommandResultFailed.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py deleted file mode 100644 index d18b312337f0..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/run_command_result_succeed.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python run_command_result_succeed.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.managed_clusters.get_command_result( - resource_group_name="rg1", - resource_name="clustername1", - command_id="def7b3ea71bd4f7e9d226ddbc0f00ad9", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/RunCommandResultSucceed.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py deleted file mode 100644 index 892e05997c61..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_create.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python snapshots_create.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.snapshots.create_or_update( - resource_group_name="rg1", - resource_name="snapshot1", - parameters={ - "location": "westus", - "properties": { - "creationData": { - "sourceResourceId": "/subscriptions/subid1/resourcegroups/rg1/providers/Microsoft.ContainerService/managedClusters/cluster1/agentPools/pool0" - } - }, - "tags": {"key1": "val1", "key2": "val2"}, - }, - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/SnapshotsCreate.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py deleted file mode 100644 index 1b0b4c6cba2a..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_delete.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python snapshots_delete.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - client.snapshots.delete( - resource_group_name="rg1", - resource_name="snapshot1", - ) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/SnapshotsDelete.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py deleted file mode 100644 index 9bbfd243931d..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_get.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python snapshots_get.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.snapshots.get( - resource_group_name="rg1", - resource_name="snapshot1", - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/SnapshotsGet.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py deleted file mode 100644 index 602d1dfdb62b..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python snapshots_list.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.snapshots.list() - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/SnapshotsList.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py deleted file mode 100644 index 7ba7c4b56d81..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_list_by_resource_group.py +++ /dev/null @@ -1,41 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python snapshots_list_by_resource_group.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.snapshots.list_by_resource_group( - resource_group_name="rg1", - ) - for item in response: - print(item) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/SnapshotsListByResourceGroup.json -if __name__ == "__main__": - main() diff --git a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py b/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py deleted file mode 100644 index f1ab289e5c20..000000000000 --- a/sdk/containerservice/azure-mgmt-containerservice/generated_samples/snapshots_update_tags.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.identity import DefaultAzureCredential -from azure.mgmt.containerservice import ContainerServiceClient - -""" -# PREREQUISITES - pip install azure-identity - pip install azure-mgmt-containerservice -# USAGE - python snapshots_update_tags.py - - Before run the sample, please set the values of the client ID, tenant ID and client secret - of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID, - AZURE_CLIENT_SECRET. For more info about how to get the value, please see: - https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal -""" - - -def main(): - client = ContainerServiceClient( - credential=DefaultAzureCredential(), - subscription_id="subid1", - ) - - response = client.snapshots.update_tags( - resource_group_name="rg1", - resource_name="snapshot1", - parameters={"tags": {"key2": "new-val2", "key3": "val3"}}, - ) - print(response) - - -# x-ms-original-file: specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-06-01/examples/SnapshotsUpdateTags.json -if __name__ == "__main__": - main()