Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_36.0.0/sdk/compute/azure-mgmt-compute/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.compute import ComputeManagementClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python availability_set_cancel_migration_to_virtual_machine_scale_set.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 = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)

client.availability_sets.cancel_migration_to_virtual_machine_scale_set(
resource_group_name="rgcompute",
availability_set_name="myAvailabilitySet",
)


# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/examples/availabilitySetExamples/AvailabilitySet_CancelMigrationToVirtualMachineScaleSet.json
if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.compute import ComputeManagementClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python availability_set_convert_to_virtual_machine_scale_set.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 = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)

client.availability_sets.begin_convert_to_virtual_machine_scale_set(
resource_group_name="rgcompute",
availability_set_name="myAvailabilitySet",
).result()


# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/examples/availabilitySetExamples/AvailabilitySet_ConvertToVirtualMachineScaleSet.json
if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.compute import ComputeManagementClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python availability_set_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 = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)

response = client.availability_sets.create_or_update(
resource_group_name="myResourceGroup",
availability_set_name="myAvailabilitySet",
parameters={
"location": "westus",
"properties": {"platformFaultDomainCount": 2, "platformUpdateDomainCount": 20},
},
)
print(response)


# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/examples/availabilitySetExamples/AvailabilitySet_Create.json
if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.compute import ComputeManagementClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python availability_set_create_with_scheduled_event_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 = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)

response = client.availability_sets.create_or_update(
resource_group_name="myResourceGroup",
availability_set_name="myAvailabilitySet",
parameters={
"location": "westus",
"properties": {"platformFaultDomainCount": 2, "platformUpdateDomainCount": 20},
},
)
print(response)


# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/examples/availabilitySetExamples/AvailabilitySet_Create_WithScheduledEventProfile.json
if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.compute import ComputeManagementClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-compute
# USAGE
python availability_set_delete_maximum_set_gen.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 = ComputeManagementClient(
credential=DefaultAzureCredential(),
subscription_id="{subscription-id}",
)

client.availability_sets.delete(
resource_group_name="rgcompute",
availability_set_name="aaaaaaaaaaaaaaaaaaaa",
)


# x-ms-original-file: specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2025-04-01/examples/availabilitySetExamples/AvailabilitySet_Delete_MaximumSet_Gen.json
if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-compute_37.0.0/sdk/compute/azure-mgmt-compute/README.md"}
Loading