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,38 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_CreateOrUpdate_MaximumSet.json
// this example is just showing the usage of "Agent_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverResource created on azure
// for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName);
StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId);

// get the collection of this StorageMoverAgentResource
StorageMoverAgentCollection collection = storageMover.GetStorageMoverAgents();

// invoke the operation
string agentName = "examples-agentName";
StorageMoverAgentData data = new StorageMoverAgentData(null, null);
ArmOperation<StorageMoverAgentResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, agentName, data);
StorageMoverAgentResource result = lro.Value;

// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
StorageMoverAgentData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_CreateOrUpdate_MinimumSet.json
// this example is just showing the usage of "Agent_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverResource created on azure
// for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName);
StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId);

// get the collection of this StorageMoverAgentResource
StorageMoverAgentCollection collection = storageMover.GetStorageMoverAgents();

// invoke the operation
string agentName = "examples-agentName";
StorageMoverAgentData data = new StorageMoverAgentData(null, null);
ArmOperation<StorageMoverAgentResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, agentName, data);
StorageMoverAgentResource result = lro.Value;

// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
StorageMoverAgentData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_CreateOrUpdate_UploadLimitSchedule_Overnight.json
// this example is just showing the usage of "Agent_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverResource created on azure
// for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName);
StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId);

// get the collection of this StorageMoverAgentResource
StorageMoverAgentCollection collection = storageMover.GetStorageMoverAgents();

// invoke the operation
string agentName = "examples-agentName";
StorageMoverAgentData data = new StorageMoverAgentData(null, null);
ArmOperation<StorageMoverAgentResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, agentName, data);
StorageMoverAgentResource result = lro.Value;

// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
StorageMoverAgentData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover.Models;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_Delete.json
// this example is just showing the usage of "Agent_Delete" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverAgentResource created on azure
// for more information of creating StorageMoverAgentResource, please refer to the document of StorageMoverAgentResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
string agentName = "examples-agentName";
ResourceIdentifier storageMoverAgentResourceId = StorageMoverAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, agentName);
StorageMoverAgentResource storageMoverAgent = client.GetStorageMoverAgentResource(storageMoverAgentResourceId);

// invoke the operation
await storageMoverAgent.DeleteAsync(WaitUntil.Completed);

Console.WriteLine("Succeeded");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover.Models;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_Get_MaximumSet.json
// this example is just showing the usage of "Agent_Get" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverAgentResource created on azure
// for more information of creating StorageMoverAgentResource, please refer to the document of StorageMoverAgentResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
string agentName = "examples-agentName";
ResourceIdentifier storageMoverAgentResourceId = StorageMoverAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, agentName);
StorageMoverAgentResource storageMoverAgent = client.GetStorageMoverAgentResource(storageMoverAgentResourceId);

// invoke the operation
StorageMoverAgentResource result = await storageMoverAgent.GetAsync();

// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
StorageMoverAgentData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover.Models;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_Get_MinimumSet.json
// this example is just showing the usage of "Agent_Get" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverAgentResource created on azure
// for more information of creating StorageMoverAgentResource, please refer to the document of StorageMoverAgentResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
string agentName = "examples-agentName";
ResourceIdentifier storageMoverAgentResourceId = StorageMoverAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, agentName);
StorageMoverAgentResource storageMoverAgent = client.GetStorageMoverAgentResource(storageMoverAgentResourceId);

// invoke the operation
StorageMoverAgentResource result = await storageMoverAgent.GetAsync();

// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
StorageMoverAgentData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_List_MaximumSet.json
// this example is just showing the usage of "Agent_List" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverResource created on azure
// for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName);
StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId);

// get the collection of this StorageMoverAgentResource
StorageMoverAgentCollection collection = storageMover.GetStorageMoverAgents();

// invoke the operation and iterate over the result
await foreach (StorageMoverAgentResource item in collection.GetAllAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
StorageMoverAgentData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}

Console.WriteLine("Succeeded");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_List_MinimumSet.json
// this example is just showing the usage of "Agent_List" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverResource created on azure
// for more information of creating StorageMoverResource, please refer to the document of StorageMoverResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
ResourceIdentifier storageMoverResourceId = StorageMoverResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName);
StorageMoverResource storageMover = client.GetStorageMoverResource(storageMoverResourceId);

// get the collection of this StorageMoverAgentResource
StorageMoverAgentCollection collection = storageMover.GetStorageMoverAgents();

// invoke the operation and iterate over the result
await foreach (StorageMoverAgentResource item in collection.GetAllAsync())
{
// the variable item is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
StorageMoverAgentData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}

Console.WriteLine("Succeeded");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.StorageMover.Models;
using Azure.ResourceManager.StorageMover;

// Generated from example definition: 2025-07-01/Agents_Update.json
// this example is just showing the usage of "Agent_Update" operation, for the dependent resources, they will have to be created separately.

// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);

// this example assumes you already have this StorageMoverAgentResource created on azure
// for more information of creating StorageMoverAgentResource, please refer to the document of StorageMoverAgentResource
string subscriptionId = "60bcfc77-6589-4da2-b7fd-f9ec9322cf95";
string resourceGroupName = "examples-rg";
string storageMoverName = "examples-storageMoverName";
string agentName = "examples-agentName";
ResourceIdentifier storageMoverAgentResourceId = StorageMoverAgentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, storageMoverName, agentName);
StorageMoverAgentResource storageMoverAgent = client.GetStorageMoverAgentResource(storageMoverAgentResourceId);

// invoke the operation
StorageMoverAgentPatch patch = new StorageMoverAgentPatch();
StorageMoverAgentResource result = await storageMoverAgent.UpdateAsync(patch);

// the variable result is a resource, you could call other operations on this instance as well
// but just for demo, we get its data from this resource instance
StorageMoverAgentData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.StorageMover_1.3.0/sdk/storagemover/Azure.ResourceManager.StorageMover/README.md"}
Loading