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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.storagemover import StorageMoverMgmtClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storagemover
# USAGE
python agents_create_or_update_maximum_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 = StorageMoverMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)

response = client.agents.create_or_update(
resource_group_name="examples-rg",
storage_mover_name="examples-storageMoverName",
agent_name="examples-agentName",
agent={
"properties": {
"arcResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName",
"arcVmUuid": "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9",
"description": "Example Agent Description",
"uploadLimitSchedule": {
"weeklyRecurrences": [
{
"days": ["Monday"],
"endTime": {"hour": 18, "minute": 30},
"limitInMbps": 2000,
"startTime": {"hour": 9, "minute": 0},
}
]
},
}
},
)
print(response)


# x-ms-original-file: 2025-07-01/Agents_CreateOrUpdate_MaximumSet.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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.storagemover import StorageMoverMgmtClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storagemover
# USAGE
python agents_create_or_update_minimum_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 = StorageMoverMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)

response = client.agents.create_or_update(
resource_group_name="examples-rg",
storage_mover_name="examples-storageMoverName",
agent_name="examples-agentName",
agent={
"properties": {
"arcResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName",
"arcVmUuid": "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9",
}
},
)
print(response)


# x-ms-original-file: 2025-07-01/Agents_CreateOrUpdate_MinimumSet.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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.storagemover import StorageMoverMgmtClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storagemover
# USAGE
python agents_create_or_update_upload_limit_schedule_overnight.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 = StorageMoverMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)

response = client.agents.create_or_update(
resource_group_name="examples-rg",
storage_mover_name="examples-storageMoverName",
agent_name="examples-agentName",
agent={
"properties": {
"arcResourceId": "/subscriptions/60bcfc77-6589-4da2-b7fd-f9ec9322cf95/resourceGroups/examples-rg/providers/Microsoft.HybridCompute/machines/examples-hybridComputeName",
"arcVmUuid": "3bb2c024-eba9-4d18-9e7a-1d772fcc5fe9",
"uploadLimitSchedule": {
"weeklyRecurrences": [
{
"days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
"endTime": {"hour": 24, "minute": 0},
"limitInMbps": 2000,
"startTime": {"hour": 18, "minute": 0},
},
{
"days": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
"endTime": {"hour": 9, "minute": 0},
"limitInMbps": 2000,
"startTime": {"hour": 0, "minute": 0},
},
]
},
}
},
)
print(response)


# x-ms-original-file: 2025-07-01/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.storagemover import StorageMoverMgmtClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storagemover
# USAGE
python agents_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 = StorageMoverMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)

client.agents.begin_delete(
resource_group_name="examples-rg",
storage_mover_name="examples-storageMoverName",
agent_name="examples-agentName",
).result()


# x-ms-original-file: 2025-07-01/Agents_Delete.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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.storagemover import StorageMoverMgmtClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storagemover
# USAGE
python agents_get_maximum_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 = StorageMoverMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)

response = client.agents.get(
resource_group_name="examples-rg",
storage_mover_name="examples-storageMoverName",
agent_name="examples-agentName",
)
print(response)


# x-ms-original-file: 2025-07-01/Agents_Get_MaximumSet.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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.storagemover import StorageMoverMgmtClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storagemover
# USAGE
python agents_get_minimum_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 = StorageMoverMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)

response = client.agents.get(
resource_group_name="examples-rg",
storage_mover_name="examples-storageMoverName",
agent_name="examples-agentName",
)
print(response)


# x-ms-original-file: 2025-07-01/Agents_Get_MinimumSet.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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.storagemover import StorageMoverMgmtClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storagemover
# USAGE
python agents_list_maximum_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 = StorageMoverMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)

response = client.agents.list(
resource_group_name="examples-rg",
storage_mover_name="examples-storageMoverName",
)
for item in response:
print(item)


# x-ms-original-file: 2025-07-01/Agents_List_MaximumSet.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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from azure.identity import DefaultAzureCredential

from azure.mgmt.storagemover import StorageMoverMgmtClient

"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-storagemover
# USAGE
python agents_list_minimum_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 = StorageMoverMgmtClient(
credential=DefaultAzureCredential(),
subscription_id="SUBSCRIPTION_ID",
)

response = client.agents.list(
resource_group_name="examples-rg",
storage_mover_name="examples-storageMoverName",
)
for item in response:
print(item)


# x-ms-original-file: 2025-07-01/Agents_List_MinimumSet.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-storagemover_3.0.0/sdk/storagemover/azure-mgmt-storagemover/README.md"}
Loading