[Automation] Collect examples from azure-sdk-for-net#Azure.ResourceManager.MobileNetwork_1.2.0

This commit is contained in:
Azure SDK Bot 2024-07-19 07:03:39 -04:00 коммит произвёл GitHub
Родитель 377c319768
Коммит 5123085044
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
160 изменённых файлов: 3349 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,77 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/AttachedDataNetworkCreate.json
// this example is just showing the usage of "AttachedDataNetworks_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 PacketCoreDataPlaneResource created on azure
// for more information of creating PacketCoreDataPlaneResource, please refer to the document of PacketCoreDataPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCoreDataPlaneName = "TestPacketCoreDP";
ResourceIdentifier packetCoreDataPlaneResourceId = PacketCoreDataPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName);
PacketCoreDataPlaneResource packetCoreDataPlane = client.GetPacketCoreDataPlaneResource(packetCoreDataPlaneResourceId);
// get the collection of this MobileAttachedDataNetworkResource
MobileAttachedDataNetworkCollection collection = packetCoreDataPlane.GetMobileAttachedDataNetworks();
// invoke the operation
string attachedDataNetworkName = "TestAttachedDataNetwork";
MobileAttachedDataNetworkData data = new MobileAttachedDataNetworkData(new AzureLocation("eastus"), new MobileNetworkInterfaceProperties()
{
Name = "N6",
}, new string[]
{
"1.1.1.1"
})
{
NaptConfiguration = new NaptConfiguration()
{
Enabled = NaptState.Enabled,
PortRange = new MobileNetworkPortRange()
{
MinPort = 1024,
MaxPort = 49999,
},
PortReuseHoldTime = new MobileNetworkPortReuseHoldTimes()
{
Tcp = 120,
Udp = 60,
},
PinholeLimits = 65536,
PinholeTimeouts = new PinholeTimeouts()
{
Tcp = 180,
Udp = 30,
Icmp = 30,
},
},
UserEquipmentAddressPoolPrefix =
{
"2.2.0.0/16"
},
UserEquipmentStaticAddressPoolPrefix =
{
"2.4.0.0/16"
},
};
ArmOperation<MobileAttachedDataNetworkResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, attachedDataNetworkName, data);
MobileAttachedDataNetworkResource 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
MobileAttachedDataNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,31 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/AttachedDataNetworkDelete.json
// this example is just showing the usage of "AttachedDataNetworks_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 MobileAttachedDataNetworkResource created on azure
// for more information of creating MobileAttachedDataNetworkResource, please refer to the document of MobileAttachedDataNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCoreDataPlaneName = "TestPacketCoreDP";
string attachedDataNetworkName = "TestAttachedDataNetwork";
ResourceIdentifier mobileAttachedDataNetworkResourceId = MobileAttachedDataNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName);
MobileAttachedDataNetworkResource mobileAttachedDataNetwork = client.GetMobileAttachedDataNetworkResource(mobileAttachedDataNetworkResourceId);
// invoke the operation
await mobileAttachedDataNetwork.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/AttachedDataNetworkGet.json
// this example is just showing the usage of "AttachedDataNetworks_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 MobileAttachedDataNetworkResource created on azure
// for more information of creating MobileAttachedDataNetworkResource, please refer to the document of MobileAttachedDataNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCoreDataPlaneName = "TestPacketCoreDP";
string attachedDataNetworkName = "TestAttachedDataNetwork";
ResourceIdentifier mobileAttachedDataNetworkResourceId = MobileAttachedDataNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName);
MobileAttachedDataNetworkResource mobileAttachedDataNetwork = client.GetMobileAttachedDataNetworkResource(mobileAttachedDataNetworkResourceId);
// invoke the operation
MobileAttachedDataNetworkResource result = await mobileAttachedDataNetwork.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
MobileAttachedDataNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,40 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/AttachedDataNetworkListByPacketCoreDataPlane.json
// this example is just showing the usage of "AttachedDataNetworks_ListByPacketCoreDataPlane" 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 PacketCoreDataPlaneResource created on azure
// for more information of creating PacketCoreDataPlaneResource, please refer to the document of PacketCoreDataPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCoreDataPlaneName = "TestPacketCoreDP";
ResourceIdentifier packetCoreDataPlaneResourceId = PacketCoreDataPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName);
PacketCoreDataPlaneResource packetCoreDataPlane = client.GetPacketCoreDataPlaneResource(packetCoreDataPlaneResourceId);
// get the collection of this MobileAttachedDataNetworkResource
MobileAttachedDataNetworkCollection collection = packetCoreDataPlane.GetMobileAttachedDataNetworks();
// invoke the operation and iterate over the result
await foreach (MobileAttachedDataNetworkResource 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
MobileAttachedDataNetworkData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,43 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/AttachedDataNetworkUpdateTags.json
// this example is just showing the usage of "AttachedDataNetworks_UpdateTags" 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 MobileAttachedDataNetworkResource created on azure
// for more information of creating MobileAttachedDataNetworkResource, please refer to the document of MobileAttachedDataNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCoreDataPlaneName = "TestPacketCoreDP";
string attachedDataNetworkName = "TestAttachedDataNetwork";
ResourceIdentifier mobileAttachedDataNetworkResourceId = MobileAttachedDataNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName, attachedDataNetworkName);
MobileAttachedDataNetworkResource mobileAttachedDataNetwork = client.GetMobileAttachedDataNetworkResource(mobileAttachedDataNetworkResourceId);
// invoke the operation
MobileNetworkTagsPatch patch = new MobileNetworkTagsPatch()
{
Tags =
{
["tag1"] = "value1",
["tag2"] = "value2",
},
};
MobileAttachedDataNetworkResource result = await mobileAttachedDataNetwork.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
MobileAttachedDataNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,41 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DataNetworkCreate.json
// this example is just showing the usage of "DataNetworks_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 MobileNetworkResource created on azure
// for more information of creating MobileNetworkResource, please refer to the document of MobileNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
ResourceIdentifier mobileNetworkResourceId = MobileNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName);
MobileNetworkResource mobileNetwork = client.GetMobileNetworkResource(mobileNetworkResourceId);
// get the collection of this MobileDataNetworkResource
MobileDataNetworkCollection collection = mobileNetwork.GetMobileDataNetworks();
// invoke the operation
string dataNetworkName = "testDataNetwork";
MobileDataNetworkData data = new MobileDataNetworkData(new AzureLocation("eastus"))
{
Description = "myFavouriteDataNetwork",
};
ArmOperation<MobileDataNetworkResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataNetworkName, data);
MobileDataNetworkResource 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
MobileDataNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,30 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DataNetworkDelete.json
// this example is just showing the usage of "DataNetworks_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 MobileDataNetworkResource created on azure
// for more information of creating MobileDataNetworkResource, please refer to the document of MobileDataNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
string dataNetworkName = "testDataNetwork";
ResourceIdentifier mobileDataNetworkResourceId = MobileDataNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName, dataNetworkName);
MobileDataNetworkResource mobileDataNetwork = client.GetMobileDataNetworkResource(mobileDataNetworkResourceId);
// invoke the operation
await mobileDataNetwork.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,44 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DataNetworkGet.json
// this example is just showing the usage of "DataNetworks_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 MobileNetworkResource created on azure
// for more information of creating MobileNetworkResource, please refer to the document of MobileNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
ResourceIdentifier mobileNetworkResourceId = MobileNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName);
MobileNetworkResource mobileNetwork = client.GetMobileNetworkResource(mobileNetworkResourceId);
// get the collection of this MobileDataNetworkResource
MobileDataNetworkCollection collection = mobileNetwork.GetMobileDataNetworks();
// invoke the operation
string dataNetworkName = "testDataNetwork";
NullableResponse<MobileDataNetworkResource> response = await collection.GetIfExistsAsync(dataNetworkName);
MobileDataNetworkResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
MobileDataNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,38 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DataNetworkListByMobileNetwork.json
// this example is just showing the usage of "DataNetworks_ListByMobileNetwork" 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 MobileNetworkResource created on azure
// for more information of creating MobileNetworkResource, please refer to the document of MobileNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
ResourceIdentifier mobileNetworkResourceId = MobileNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName);
MobileNetworkResource mobileNetwork = client.GetMobileNetworkResource(mobileNetworkResourceId);
// get the collection of this MobileDataNetworkResource
MobileDataNetworkCollection collection = mobileNetwork.GetMobileDataNetworks();
// invoke the operation and iterate over the result
await foreach (MobileDataNetworkResource 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
MobileDataNetworkData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,42 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DataNetworkUpdateTags.json
// this example is just showing the usage of "DataNetworks_UpdateTags" 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 MobileDataNetworkResource created on azure
// for more information of creating MobileDataNetworkResource, please refer to the document of MobileDataNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
string dataNetworkName = "testDataNetwork";
ResourceIdentifier mobileDataNetworkResourceId = MobileDataNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName, dataNetworkName);
MobileDataNetworkResource mobileDataNetwork = client.GetMobileDataNetworkResource(mobileDataNetworkResourceId);
// invoke the operation
MobileNetworkTagsPatch patch = new MobileNetworkTagsPatch()
{
Tags =
{
["tag1"] = "value1",
["tag2"] = "value2",
},
};
MobileDataNetworkResource result = await mobileDataNetwork.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
MobileDataNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,37 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DiagnosticsPackageCreate.json
// this example is just showing the usage of "DiagnosticsPackages_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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// get the collection of this MobileNetworkDiagnosticsPackageResource
MobileNetworkDiagnosticsPackageCollection collection = packetCoreControlPlane.GetMobileNetworkDiagnosticsPackages();
// invoke the operation
string diagnosticsPackageName = "dp1";
ArmOperation<MobileNetworkDiagnosticsPackageResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, diagnosticsPackageName);
MobileNetworkDiagnosticsPackageResource 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
MobileNetworkDiagnosticsPackageData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,29 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DiagnosticsPackageDelete.json
// this example is just showing the usage of "DiagnosticsPackages_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 MobileNetworkDiagnosticsPackageResource created on azure
// for more information of creating MobileNetworkDiagnosticsPackageResource, please refer to the document of MobileNetworkDiagnosticsPackageResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string diagnosticsPackageName = "dp1";
ResourceIdentifier mobileNetworkDiagnosticsPackageResourceId = MobileNetworkDiagnosticsPackageResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, diagnosticsPackageName);
MobileNetworkDiagnosticsPackageResource mobileNetworkDiagnosticsPackage = client.GetMobileNetworkDiagnosticsPackageResource(mobileNetworkDiagnosticsPackageResourceId);
// invoke the operation
await mobileNetworkDiagnosticsPackage.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,44 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DiagnosticsPackageGet.json
// this example is just showing the usage of "DiagnosticsPackages_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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// get the collection of this MobileNetworkDiagnosticsPackageResource
MobileNetworkDiagnosticsPackageCollection collection = packetCoreControlPlane.GetMobileNetworkDiagnosticsPackages();
// invoke the operation
string diagnosticsPackageName = "dp1";
NullableResponse<MobileNetworkDiagnosticsPackageResource> response = await collection.GetIfExistsAsync(diagnosticsPackageName);
MobileNetworkDiagnosticsPackageResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
MobileNetworkDiagnosticsPackageData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,38 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/DiagnosticsPackageListByPacketCoreControlPlane.json
// this example is just showing the usage of "DiagnosticsPackages_ListByPacketCoreControlPlane" 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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// get the collection of this MobileNetworkDiagnosticsPackageResource
MobileNetworkDiagnosticsPackageCollection collection = packetCoreControlPlane.GetMobileNetworkDiagnosticsPackages();
// invoke the operation and iterate over the result
await foreach (MobileNetworkDiagnosticsPackageResource 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
MobileNetworkDiagnosticsPackageData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,33 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/ExtendedUeInfo4GGet.json
// this example is just showing the usage of "ExtendedUeInformation_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 ExtendedUEInfoResource created on azure
// for more information of creating ExtendedUEInfoResource, please refer to the document of ExtendedUEInfoResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string ueId = "84449105622";
ResourceIdentifier extendedUEInfoResourceId = ExtendedUEInfoResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, ueId);
ExtendedUEInfoResource extendedUEInfo = client.GetExtendedUEInfoResource(extendedUEInfoResourceId);
// invoke the operation
ExtendedUEInfoResource result = await extendedUEInfo.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
ExtendedUEInfoData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,33 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/ExtendedUeInfo5GGet.json
// this example is just showing the usage of "ExtendedUeInformation_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 ExtendedUEInfoResource created on azure
// for more information of creating ExtendedUEInfoResource, please refer to the document of ExtendedUEInfoResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string ueId = "84449105622";
ResourceIdentifier extendedUEInfoResourceId = ExtendedUEInfoResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, ueId);
ExtendedUEInfoResource extendedUEInfo = client.GetExtendedUEInfoResource(extendedUEInfoResourceId);
// invoke the operation
ExtendedUEInfoResource result = await extendedUEInfo.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
ExtendedUEInfoData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,67 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/MobileNetworkCreate.json
// this example is just showing the usage of "MobileNetworks_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this MobileNetworkResource
MobileNetworkCollection collection = resourceGroupResource.GetMobileNetworks();
// invoke the operation
string mobileNetworkName = "testMobileNetwork";
MobileNetworkData data = new MobileNetworkData(new AzureLocation("eastus"), new MobileNetworkPlmnId("001", "01"))
{
PublicLandMobileNetworks =
{
new PublicLandMobileNetwork("001","01")
{
HomeNetworkPublicKeys = new PublicLandMobileNetworkHomeNetworkPublicKeys()
{
ProfileA =
{
new HomeNetworkPublicKey(1)
{
Uri = new Uri("https://contosovault.vault.azure.net/secrets/exampleHnpk"),
},new HomeNetworkPublicKey(2)
{
Uri = new Uri("https://contosovault.vault.azure.net/secrets/exampleHnpk2/5e4876e9140e4e16bfe6e2cf92e0cbd2"),
}
},
ProfileB =
{
new HomeNetworkPublicKey(1)
{
Uri = new Uri("https://contosovault.vault.azure.net/secrets/exampleHnpkProfileB"),
}
},
},
}
},
};
ArmOperation<MobileNetworkResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, mobileNetworkName, data);
MobileNetworkResource 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
MobileNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,30 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/MobileNetworkDelete.json
// this example is just showing the usage of "MobileNetworks_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 MobileNetworkResource created on azure
// for more information of creating MobileNetworkResource, please refer to the document of MobileNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
ResourceIdentifier mobileNetworkResourceId = MobileNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName);
MobileNetworkResource mobileNetwork = client.GetMobileNetworkResource(mobileNetworkResourceId);
// invoke the operation
await mobileNetwork.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,45 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/MobileNetworkGet.json
// this example is just showing the usage of "MobileNetworks_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this MobileNetworkResource
MobileNetworkCollection collection = resourceGroupResource.GetMobileNetworks();
// invoke the operation
string mobileNetworkName = "testMobileNetwork";
NullableResponse<MobileNetworkResource> response = await collection.GetIfExistsAsync(mobileNetworkName);
MobileNetworkResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
MobileNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,39 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/MobileNetworkListByResourceGroup.json
// this example is just showing the usage of "MobileNetworks_ListByResourceGroup" 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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this MobileNetworkResource
MobileNetworkCollection collection = resourceGroupResource.GetMobileNetworks();
// invoke the operation and iterate over the result
await foreach (MobileNetworkResource 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
MobileNetworkData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/MobileNetworkListBySubscription.json
// this example is just showing the usage of "MobileNetworks_ListBySubscription" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
await foreach (MobileNetworkResource item in subscriptionResource.GetMobileNetworksAsync())
{
// 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
MobileNetworkData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,42 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/MobileNetworkUpdateTags.json
// this example is just showing the usage of "MobileNetworks_UpdateTags" 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 MobileNetworkResource created on azure
// for more information of creating MobileNetworkResource, please refer to the document of MobileNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
ResourceIdentifier mobileNetworkResourceId = MobileNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName);
MobileNetworkResource mobileNetwork = client.GetMobileNetworkResource(mobileNetworkResourceId);
// invoke the operation
MobileNetworkResourcePatch patch = new MobileNetworkResourcePatch()
{
Tags =
{
["tag1"] = "value1",
["tag2"] = "value2",
},
};
MobileNetworkResource result = await mobileNetwork.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
MobileNetworkData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,45 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCaptureCreate.json
// this example is just showing the usage of "PacketCaptures_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 MobileNetworkPacketCaptureResource created on azure
// for more information of creating MobileNetworkPacketCaptureResource, please refer to the document of MobileNetworkPacketCaptureResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCaptureName = "pc1";
ResourceIdentifier mobileNetworkPacketCaptureResourceId = MobileNetworkPacketCaptureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCaptureName);
MobileNetworkPacketCaptureResource mobileNetworkPacketCapture = client.GetMobileNetworkPacketCaptureResource(mobileNetworkPacketCaptureResourceId);
// invoke the operation
MobileNetworkPacketCaptureData data = new MobileNetworkPacketCaptureData()
{
NetworkInterfaces =
{
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP","/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/TestPacketCoreCP/packetCoreDataPlanes/TestPacketCoreDP/attachedDataNetworks/TestADN"
},
BytesToCapturePerPacket = 10000,
TotalBytesPerSession = 100000,
TimeLimitInSeconds = 100,
};
ArmOperation<MobileNetworkPacketCaptureResource> lro = await mobileNetworkPacketCapture.UpdateAsync(WaitUntil.Completed, data);
MobileNetworkPacketCaptureResource 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
MobileNetworkPacketCaptureData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,30 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCaptureDelete.json
// this example is just showing the usage of "PacketCaptures_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 MobileNetworkPacketCaptureResource created on azure
// for more information of creating MobileNetworkPacketCaptureResource, please refer to the document of MobileNetworkPacketCaptureResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCaptureName = "pc1";
ResourceIdentifier mobileNetworkPacketCaptureResourceId = MobileNetworkPacketCaptureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCaptureName);
MobileNetworkPacketCaptureResource mobileNetworkPacketCapture = client.GetMobileNetworkPacketCaptureResource(mobileNetworkPacketCaptureResourceId);
// invoke the operation
await mobileNetworkPacketCapture.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCaptureGet.json
// this example is just showing the usage of "PacketCaptures_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 MobileNetworkPacketCaptureResource created on azure
// for more information of creating MobileNetworkPacketCaptureResource, please refer to the document of MobileNetworkPacketCaptureResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCaptureName = "pc1";
ResourceIdentifier mobileNetworkPacketCaptureResourceId = MobileNetworkPacketCaptureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCaptureName);
MobileNetworkPacketCaptureResource mobileNetworkPacketCapture = client.GetMobileNetworkPacketCaptureResource(mobileNetworkPacketCaptureResourceId);
// invoke the operation
MobileNetworkPacketCaptureResource result = await mobileNetworkPacketCapture.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
MobileNetworkPacketCaptureData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,38 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCaptureListByPacketCoreControlPlane.json
// this example is just showing the usage of "PacketCaptures_ListByPacketCoreControlPlane" 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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// get the collection of this MobileNetworkPacketCaptureResource
MobileNetworkPacketCaptureCollection collection = packetCoreControlPlane.GetMobileNetworkPacketCaptures();
// invoke the operation and iterate over the result
await foreach (MobileNetworkPacketCaptureResource 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
MobileNetworkPacketCaptureData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,31 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCaptureStop.json
// this example is just showing the usage of "PacketCaptures_Stop" 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 MobileNetworkPacketCaptureResource created on azure
// for more information of creating MobileNetworkPacketCaptureResource, please refer to the document of MobileNetworkPacketCaptureResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
string packetCaptureName = "pc1";
ResourceIdentifier mobileNetworkPacketCaptureResourceId = MobileNetworkPacketCaptureResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCaptureName);
MobileNetworkPacketCaptureResource mobileNetworkPacketCapture = client.GetMobileNetworkPacketCaptureResource(mobileNetworkPacketCaptureResourceId);
// invoke the operation
ArmOperation<AsyncOperationStatus> lro = await mobileNetworkPacketCapture.StopAsync(WaitUntil.Completed);
AsyncOperationStatus result = lro.Value;
Console.WriteLine($"Succeeded: {result}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,33 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneCollectDiagnosticsPackage.json
// this example is just showing the usage of "PacketCoreControlPlanes_CollectDiagnosticsPackage" 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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// invoke the operation
PacketCoreControlPlaneCollectDiagnosticsPackage packetCoreControlPlaneCollectDiagnosticsPackage = new PacketCoreControlPlaneCollectDiagnosticsPackage(new Uri("https://contosoaccount.blob.core.windows.net/container/diagnosticsPackage.zip"));
ArmOperation<AsyncOperationStatus> lro = await packetCoreControlPlane.CollectDiagnosticsPackageAsync(WaitUntil.Completed, packetCoreControlPlaneCollectDiagnosticsPackage);
AsyncOperationStatus result = lro.Value;
Console.WriteLine($"Succeeded: {result}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,71 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Resources.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneCreate.json
// this example is just showing the usage of "PacketCoreControlPlanes_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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this PacketCoreControlPlaneResource
PacketCoreControlPlaneCollection collection = resourceGroupResource.GetPacketCoreControlPlanes();
// invoke the operation
string packetCoreControlPlaneName = "TestPacketCoreCP";
PacketCoreControlPlaneData data = new PacketCoreControlPlaneData(new AzureLocation("eastus"), new WritableSubResource[]
{
new WritableSubResource()
{
Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.MobileNetwork/mobileNetworks/testMobileNetwork/sites/testSite"),
}
}, new MobileNetworkPlatformConfiguration(MobileNetworkPlatformType.AKSHCI)
{
AzureStackEdgeDeviceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/TestAzureStackEdgeDevice"),
ConnectedClusterId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.Kubernetes/connectedClusters/TestConnectedCluster"),
CustomLocationId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ExtendedLocation/customLocations/TestCustomLocation"),
}, new MobileNetworkInterfaceProperties()
{
Name = "N2",
}, MobileNetworkBillingSku.G0, new MobileNetworkLocalDiagnosticsAccessConfiguration(MobileNetworkAuthenticationType.Aad)
{
HttpsServerCertificate = new MobileNetworkHttpsServerCertificate(new Uri("https://contosovault.vault.azure.net/certificates/ingress")),
})
{
Installation = new MobileNetworkInstallation()
{
DesiredState = DesiredInstallationState.Installed,
},
CoreNetworkTechnology = MobileNetworkCoreNetworkType.FiveGC,
Version = "0.2.0",
UEMtu = 1600,
EventHub = new MobileNetworkEventHubConfiguration(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.EventHub/namespaces/contosoNamespace/eventHubs/contosoHub"))
{
ReportingInterval = 60,
},
NasRerouteMacroMmeGroupId = 1024,
};
ArmOperation<PacketCoreControlPlaneResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, packetCoreControlPlaneName, data);
PacketCoreControlPlaneResource 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
PacketCoreControlPlaneData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,31 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneDelete.json
// this example is just showing the usage of "PacketCoreControlPlanes_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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// invoke the operation
await packetCoreControlPlane.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,35 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneGet.json
// this example is just showing the usage of "PacketCoreControlPlanes_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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// invoke the operation
PacketCoreControlPlaneResource result = await packetCoreControlPlane.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
PacketCoreControlPlaneData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,40 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.Resources.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneListByResourceGroup.json
// this example is just showing the usage of "PacketCoreControlPlanes_ListByResourceGroup" 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 ResourceGroupResource created on azure
// for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this PacketCoreControlPlaneResource
PacketCoreControlPlaneCollection collection = resourceGroupResource.GetPacketCoreControlPlanes();
// invoke the operation and iterate over the result
await foreach (PacketCoreControlPlaneResource 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
PacketCoreControlPlaneData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,36 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneListBySubscription.json
// this example is just showing the usage of "PacketCoreControlPlanes_ListBySubscription" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// invoke the operation and iterate over the result
await foreach (PacketCoreControlPlaneResource item in subscriptionResource.GetPacketCoreControlPlanesAsync())
{
// 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
PacketCoreControlPlaneData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,50 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlanePatch.json
// this example is just showing the usage of "PacketCoreControlPlanes_UpdateTags" 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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// invoke the operation
MobileNetworkResourcePatch patch = new MobileNetworkResourcePatch()
{
UserAssignedIdentity = new MobileNetworkManagedServiceIdentity(MobileNetworkManagedServiceIdentityType.UserAssigned)
{
UserAssignedIdentities =
{
["/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/testUserAssignedManagedIdentity"] = new UserAssignedIdentity(),
},
},
Tags =
{
["tag1"] = "value1",
["tag2"] = "value2",
},
};
PacketCoreControlPlaneResource result = await packetCoreControlPlane.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
PacketCoreControlPlaneData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,32 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneReinstall.json
// this example is just showing the usage of "PacketCoreControlPlanes_Reinstall" 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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// invoke the operation
ArmOperation<AsyncOperationStatus> lro = await packetCoreControlPlane.ReinstallAsync(WaitUntil.Completed);
AsyncOperationStatus result = lro.Value;
Console.WriteLine($"Succeeded: {result}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,32 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneRollback.json
// this example is just showing the usage of "PacketCoreControlPlanes_Rollback" 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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "TestPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// invoke the operation
ArmOperation<AsyncOperationStatus> lro = await packetCoreControlPlane.RollbackAsync(WaitUntil.Completed);
AsyncOperationStatus result = lro.Value;
Console.WriteLine($"Succeeded: {result}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,40 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneVersionGet.json
// this example is just showing the usage of "PacketCoreControlPlaneVersions_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 TenantResource created on azure
// for more information of creating TenantResource, please refer to the document of TenantResource
var tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current;
// get the collection of this TenantPacketCoreControlPlaneVersionResource
TenantPacketCoreControlPlaneVersionCollection collection = tenantResource.GetTenantPacketCoreControlPlaneVersions();
// invoke the operation
string versionName = "PMN-4-11-1";
NullableResponse<TenantPacketCoreControlPlaneVersionResource> response = await collection.GetIfExistsAsync(versionName);
TenantPacketCoreControlPlaneVersionResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
PacketCoreControlPlaneVersionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,43 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneVersionGetBySubscription.json
// this example is just showing the usage of "PacketCoreControlPlaneVersions_GetBySubscription" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionPacketCoreControlPlaneVersionResource
SubscriptionPacketCoreControlPlaneVersionCollection collection = subscriptionResource.GetSubscriptionPacketCoreControlPlaneVersions();
// invoke the operation
string versionName = "PMN-4-11-1";
NullableResponse<SubscriptionPacketCoreControlPlaneVersionResource> response = await collection.GetIfExistsAsync(versionName);
SubscriptionPacketCoreControlPlaneVersionResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
PacketCoreControlPlaneVersionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneVersionList.json
// this example is just showing the usage of "PacketCoreControlPlaneVersions_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 TenantResource created on azure
// for more information of creating TenantResource, please refer to the document of TenantResource
var tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current;
// get the collection of this TenantPacketCoreControlPlaneVersionResource
TenantPacketCoreControlPlaneVersionCollection collection = tenantResource.GetTenantPacketCoreControlPlaneVersions();
// invoke the operation and iterate over the result
await foreach (TenantPacketCoreControlPlaneVersionResource 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
PacketCoreControlPlaneVersionData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,37 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Resources;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreControlPlaneVersionListBySubscription.json
// this example is just showing the usage of "PacketCoreControlPlaneVersions_ListBySubscription" 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 SubscriptionResource created on azure
// for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId);
SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId);
// get the collection of this SubscriptionPacketCoreControlPlaneVersionResource
SubscriptionPacketCoreControlPlaneVersionCollection collection = subscriptionResource.GetSubscriptionPacketCoreControlPlaneVersions();
// invoke the operation and iterate over the result
await foreach (SubscriptionPacketCoreControlPlaneVersionResource 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
PacketCoreControlPlaneVersionData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,42 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreDataPlaneCreate.json
// this example is just showing the usage of "PacketCoreDataPlanes_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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "testPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// get the collection of this PacketCoreDataPlaneResource
PacketCoreDataPlaneCollection collection = packetCoreControlPlane.GetPacketCoreDataPlanes();
// invoke the operation
string packetCoreDataPlaneName = "testPacketCoreDP";
PacketCoreDataPlaneData data = new PacketCoreDataPlaneData(new AzureLocation("eastus"), new MobileNetworkInterfaceProperties()
{
Name = "N3",
});
ArmOperation<PacketCoreDataPlaneResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, packetCoreDataPlaneName, data);
PacketCoreDataPlaneResource 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
PacketCoreDataPlaneData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,30 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreDataPlaneDelete.json
// this example is just showing the usage of "PacketCoreDataPlanes_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 PacketCoreDataPlaneResource created on azure
// for more information of creating PacketCoreDataPlaneResource, please refer to the document of PacketCoreDataPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "testPacketCoreCP";
string packetCoreDataPlaneName = "testPacketCoreDP";
ResourceIdentifier packetCoreDataPlaneResourceId = PacketCoreDataPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName);
PacketCoreDataPlaneResource packetCoreDataPlane = client.GetPacketCoreDataPlaneResource(packetCoreDataPlaneResourceId);
// invoke the operation
await packetCoreDataPlane.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,34 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreDataPlaneGet.json
// this example is just showing the usage of "PacketCoreDataPlanes_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 PacketCoreDataPlaneResource created on azure
// for more information of creating PacketCoreDataPlaneResource, please refer to the document of PacketCoreDataPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "testPacketCoreCP";
string packetCoreDataPlaneName = "testPacketCoreDP";
ResourceIdentifier packetCoreDataPlaneResourceId = PacketCoreDataPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName);
PacketCoreDataPlaneResource packetCoreDataPlane = client.GetPacketCoreDataPlaneResource(packetCoreDataPlaneResourceId);
// invoke the operation
PacketCoreDataPlaneResource result = await packetCoreDataPlane.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
PacketCoreDataPlaneData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,39 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreDataPlaneListByPacketCoreControlPlane.json
// this example is just showing the usage of "PacketCoreDataPlanes_ListByPacketCoreControlPlane" 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 PacketCoreControlPlaneResource created on azure
// for more information of creating PacketCoreControlPlaneResource, please refer to the document of PacketCoreControlPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "testPacketCoreCP";
ResourceIdentifier packetCoreControlPlaneResourceId = PacketCoreControlPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName);
PacketCoreControlPlaneResource packetCoreControlPlane = client.GetPacketCoreControlPlaneResource(packetCoreControlPlaneResourceId);
// get the collection of this PacketCoreDataPlaneResource
PacketCoreDataPlaneCollection collection = packetCoreControlPlane.GetPacketCoreDataPlanes();
// invoke the operation and iterate over the result
await foreach (PacketCoreDataPlaneResource 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
PacketCoreDataPlaneData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,42 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/PacketCoreDataPlaneUpdateTags.json
// this example is just showing the usage of "PacketCoreDataPlanes_UpdateTags" 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 PacketCoreDataPlaneResource created on azure
// for more information of creating PacketCoreDataPlaneResource, please refer to the document of PacketCoreDataPlaneResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string packetCoreControlPlaneName = "testPacketCoreCP";
string packetCoreDataPlaneName = "testPacketCoreDP";
ResourceIdentifier packetCoreDataPlaneResourceId = PacketCoreDataPlaneResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, packetCoreControlPlaneName, packetCoreDataPlaneName);
PacketCoreDataPlaneResource packetCoreDataPlane = client.GetPacketCoreDataPlaneResource(packetCoreDataPlaneResourceId);
// invoke the operation
MobileNetworkTagsPatch patch = new MobileNetworkTagsPatch()
{
Tags =
{
["tag1"] = "value1",
["tag2"] = "value2",
},
};
PacketCoreDataPlaneResource result = await packetCoreDataPlane.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
PacketCoreDataPlaneData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,75 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/ServiceCreate.json
// this example is just showing the usage of "Services_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 MobileNetworkResource created on azure
// for more information of creating MobileNetworkResource, please refer to the document of MobileNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
ResourceIdentifier mobileNetworkResourceId = MobileNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName);
MobileNetworkResource mobileNetwork = client.GetMobileNetworkResource(mobileNetworkResourceId);
// get the collection of this MobileNetworkServiceResource
MobileNetworkServiceCollection collection = mobileNetwork.GetMobileNetworkServices();
// invoke the operation
string serviceName = "TestService";
MobileNetworkServiceData data = new MobileNetworkServiceData(new AzureLocation("eastus"), 255, new PccRuleConfiguration[]
{
new PccRuleConfiguration("default-rule",255,new MobileNetworkServiceDataFlowTemplate[]
{
new MobileNetworkServiceDataFlowTemplate("IP-to-server",MobileNetworkSdfDirectionS.Uplink,new string[]
{
"ip"
},new string[]
{
"10.3.4.0/24"
})
{
Ports =
{
},
}
})
{
RuleQosPolicy = new PccRuleQosPolicy(new Ambr("500 Mbps","1 Gbps"))
{
FiveQi = 9,
AllocationAndRetentionPriorityLevel = 9,
PreemptionCapability = MobileNetworkPreemptionCapability.NotPreempt,
PreemptionVulnerability = MobileNetworkPreemptionVulnerability.Preemptable,
},
TrafficControl = MobileNetworkTrafficControlPermission.Enabled,
}
})
{
ServiceQosPolicy = new MobileNetworkQosPolicy(new Ambr("500 Mbps", "1 Gbps"))
{
FiveQi = 9,
AllocationAndRetentionPriorityLevel = 9,
PreemptionCapability = MobileNetworkPreemptionCapability.NotPreempt,
PreemptionVulnerability = MobileNetworkPreemptionVulnerability.Preemptable,
},
};
ArmOperation<MobileNetworkServiceResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data);
MobileNetworkServiceResource 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
MobileNetworkServiceData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,30 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/ServiceDelete.json
// this example is just showing the usage of "Services_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 MobileNetworkServiceResource created on azure
// for more information of creating MobileNetworkServiceResource, please refer to the document of MobileNetworkServiceResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
string serviceName = "TestService";
ResourceIdentifier mobileNetworkServiceResourceId = MobileNetworkServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName, serviceName);
MobileNetworkServiceResource mobileNetworkService = client.GetMobileNetworkServiceResource(mobileNetworkServiceResourceId);
// invoke the operation
await mobileNetworkService.DeleteAsync(WaitUntil.Completed);
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,45 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/ServiceGet.json
// this example is just showing the usage of "Services_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 MobileNetworkResource created on azure
// for more information of creating MobileNetworkResource, please refer to the document of MobileNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
ResourceIdentifier mobileNetworkResourceId = MobileNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName);
MobileNetworkResource mobileNetwork = client.GetMobileNetworkResource(mobileNetworkResourceId);
// get the collection of this MobileNetworkServiceResource
MobileNetworkServiceCollection collection = mobileNetwork.GetMobileNetworkServices();
// invoke the operation
string serviceName = "TestService";
NullableResponse<MobileNetworkServiceResource> response = await collection.GetIfExistsAsync(serviceName);
MobileNetworkServiceResource result = response.HasValue ? response.Value : null;
if (result == null)
{
Console.WriteLine($"Succeeded with null as result");
}
else
{
// 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
MobileNetworkServiceData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,39 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/ServiceListByMobileNetwork.json
// this example is just showing the usage of "Services_ListByMobileNetwork" 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 MobileNetworkResource created on azure
// for more information of creating MobileNetworkResource, please refer to the document of MobileNetworkResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "testResourceGroupName";
string mobileNetworkName = "testMobileNetwork";
ResourceIdentifier mobileNetworkResourceId = MobileNetworkResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName);
MobileNetworkResource mobileNetwork = client.GetMobileNetworkResource(mobileNetworkResourceId);
// get the collection of this MobileNetworkServiceResource
MobileNetworkServiceCollection collection = mobileNetwork.GetMobileNetworkServices();
// invoke the operation and iterate over the result
await foreach (MobileNetworkServiceResource 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
MobileNetworkServiceData resourceData = item.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");
}
Console.WriteLine($"Succeeded");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Просмотреть файл

@ -0,0 +1,42 @@
using Azure;
using Azure.ResourceManager;
using System;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.MobileNetwork.Models;
using Azure.ResourceManager.MobileNetwork;
// Generated from example definition: specification/mobilenetwork/resource-manager/Microsoft.MobileNetwork/stable/2024-02-01/examples/ServiceUpdateTags.json
// this example is just showing the usage of "Services_UpdateTags" 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 MobileNetworkServiceResource created on azure
// for more information of creating MobileNetworkServiceResource, please refer to the document of MobileNetworkServiceResource
string subscriptionId = "00000000-0000-0000-0000-000000000000";
string resourceGroupName = "rg1";
string mobileNetworkName = "testMobileNetwork";
string serviceName = "TestService";
ResourceIdentifier mobileNetworkServiceResourceId = MobileNetworkServiceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, mobileNetworkName, serviceName);
MobileNetworkServiceResource mobileNetworkService = client.GetMobileNetworkServiceResource(mobileNetworkServiceResourceId);
// invoke the operation
MobileNetworkTagsPatch patch = new MobileNetworkTagsPatch()
{
Tags =
{
["tag1"] = "value1",
["tag2"] = "value2",
},
};
MobileNetworkServiceResource result = await mobileNetworkService.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
MobileNetworkServiceData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

Просмотреть файл

@ -0,0 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.MobileNetwork_1.2.0/sdk/mobilenetwork/Azure.ResourceManager.MobileNetwork/README.md"}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше