[Automation] Collect examples from azure-sdk-for-net#Azure.ResourceManager.CognitiveServices_1.3.0-beta.1

Co-authored-by: azure-sdk <azuresdk@microsoft.com>
This commit is contained in:
Azure-Fluent 2023-05-30 20:01:32 +08:00 коммит произвёл GitHub
Родитель c2137331b5
Коммит 882e72f32d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
48 изменённых файлов: 104 добавлений и 102 удалений

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -38,10 +38,13 @@ CognitiveServicesAccountData data = new CognitiveServicesAccountData(new AzureLo
{
Encryption = new ServiceAccountEncryptionProperties()
{
KeyVaultProperties = new CognitiveServicesKeyVaultProperties()
{
KeyName = "KeyName",
KeyVersion = "891CF236-D241-4738-9462-D506AF493DFA",
KeyVaultUri = new Uri("https://pltfrmscrts-use-pc-dev.vault.azure.net/"),
},
KeySource = ServiceAccountEncryptionKeySource.MicrosoftKeyVault,
KeyName = "KeyName",
KeyVersion = "891CF236-D241-4738-9462-D506AF493DFA",
KeyVaultUri = new Uri("https://pltfrmscrts-use-pc-dev.vault.azure.net/"),
},
UserOwnedStorage =
{

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -15,19 +15,20 @@ TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this CognitiveServicesAccountResource created on azure
// for more information of creating CognitiveServicesAccountResource, please refer to the document of CognitiveServicesAccountResource
// this example assumes you already have this CommitmentPlanResource created on azure
// for more information of creating CommitmentPlanResource, please refer to the document of CommitmentPlanResource
string subscriptionId = "subscriptionId";
string resourceGroupName = "resourceGroupName";
string accountName = "accountName";
ResourceIdentifier cognitiveServicesAccountResourceId = CognitiveServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
CognitiveServicesAccountResource cognitiveServicesAccount = client.GetCognitiveServicesAccountResource(cognitiveServicesAccountResourceId);
// get the collection of this CommitmentPlanResource
CommitmentPlanCollection collection = cognitiveServicesAccount.GetCommitmentPlans();
string commitmentPlanName = "commitmentPlanName";
ResourceIdentifier commitmentPlanResourceId = CommitmentPlanResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, commitmentPlanName);
CommitmentPlanResource commitmentPlan = client.GetCommitmentPlanResource(commitmentPlanResourceId);
// invoke the operation
string commitmentPlanName = "commitmentPlanName";
bool result = await collection.ExistsAsync(commitmentPlanName);
CommitmentPlanResource result = await commitmentPlan.GetAsync();
Console.WriteLine($"Succeeded: {result}");
// 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
CommitmentPlanData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -15,19 +15,20 @@ TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this CognitiveServicesAccountResource created on azure
// for more information of creating CognitiveServicesAccountResource, please refer to the document of CognitiveServicesAccountResource
// this example assumes you already have this CognitiveServicesAccountDeploymentResource created on azure
// for more information of creating CognitiveServicesAccountDeploymentResource, please refer to the document of CognitiveServicesAccountDeploymentResource
string subscriptionId = "subscriptionId";
string resourceGroupName = "resourceGroupName";
string accountName = "accountName";
ResourceIdentifier cognitiveServicesAccountResourceId = CognitiveServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
CognitiveServicesAccountResource cognitiveServicesAccount = client.GetCognitiveServicesAccountResource(cognitiveServicesAccountResourceId);
// get the collection of this CognitiveServicesAccountDeploymentResource
CognitiveServicesAccountDeploymentCollection collection = cognitiveServicesAccount.GetCognitiveServicesAccountDeployments();
string deploymentName = "deploymentName";
ResourceIdentifier cognitiveServicesAccountDeploymentResourceId = CognitiveServicesAccountDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, deploymentName);
CognitiveServicesAccountDeploymentResource cognitiveServicesAccountDeployment = client.GetCognitiveServicesAccountDeploymentResource(cognitiveServicesAccountDeploymentResourceId);
// invoke the operation
string deploymentName = "deploymentName";
bool result = await collection.ExistsAsync(deploymentName);
CognitiveServicesAccountDeploymentResource result = await cognitiveServicesAccountDeployment.GetAsync();
Console.WriteLine($"Succeeded: {result}");
// 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
CognitiveServicesAccountDeploymentData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1,5 +1,6 @@
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager;
@ -13,19 +14,20 @@ TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this CognitiveServicesAccountResource created on azure
// for more information of creating CognitiveServicesAccountResource, please refer to the document of CognitiveServicesAccountResource
// this example assumes you already have this CognitiveServicesPrivateEndpointConnectionResource created on azure
// for more information of creating CognitiveServicesPrivateEndpointConnectionResource, please refer to the document of CognitiveServicesPrivateEndpointConnectionResource
string subscriptionId = "{subscription-id}";
string resourceGroupName = "res6977";
string accountName = "sto2527";
ResourceIdentifier cognitiveServicesAccountResourceId = CognitiveServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
CognitiveServicesAccountResource cognitiveServicesAccount = client.GetCognitiveServicesAccountResource(cognitiveServicesAccountResourceId);
// get the collection of this CognitiveServicesPrivateEndpointConnectionResource
CognitiveServicesPrivateEndpointConnectionCollection collection = cognitiveServicesAccount.GetCognitiveServicesPrivateEndpointConnections();
string privateEndpointConnectionName = "{privateEndpointConnectionName}";
ResourceIdentifier cognitiveServicesPrivateEndpointConnectionResourceId = CognitiveServicesPrivateEndpointConnectionResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, privateEndpointConnectionName);
CognitiveServicesPrivateEndpointConnectionResource cognitiveServicesPrivateEndpointConnection = client.GetCognitiveServicesPrivateEndpointConnectionResource(cognitiveServicesPrivateEndpointConnectionResourceId);
// invoke the operation
string privateEndpointConnectionName = "{privateEndpointConnectionName}";
bool result = await collection.ExistsAsync(privateEndpointConnectionName);
CognitiveServicesPrivateEndpointConnectionResource result = await cognitiveServicesPrivateEndpointConnection.GetAsync();
Console.WriteLine($"Succeeded: {result}");
// 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
CognitiveServicesPrivateEndpointConnectionData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -16,18 +16,19 @@ 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
// this example assumes you already have this CognitiveServicesCommitmentPlanResource created on azure
// for more information of creating CognitiveServicesCommitmentPlanResource, please refer to the document of CognitiveServicesCommitmentPlanResource
string subscriptionId = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
string resourceGroupName = "resourceGroupName";
ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName);
ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId);
// get the collection of this CognitiveServicesCommitmentPlanResource
CognitiveServicesCommitmentPlanCollection collection = resourceGroupResource.GetCognitiveServicesCommitmentPlans();
string commitmentPlanName = "commitmentPlanName";
ResourceIdentifier cognitiveServicesCommitmentPlanResourceId = CognitiveServicesCommitmentPlanResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, commitmentPlanName);
CognitiveServicesCommitmentPlanResource cognitiveServicesCommitmentPlan = client.GetCognitiveServicesCommitmentPlanResource(cognitiveServicesCommitmentPlanResourceId);
// invoke the operation
string commitmentPlanName = "commitmentPlanName";
bool result = await collection.ExistsAsync(commitmentPlanName);
CognitiveServicesCommitmentPlanResource result = await cognitiveServicesCommitmentPlan.GetAsync();
Console.WriteLine($"Succeeded: {result}");
// 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
CommitmentPlanData resourceData = result.Data;
// for demo we just print out the id
Console.WriteLine($"Succeeded on id: {resourceData.Id}");

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -15,19 +15,16 @@ TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this CognitiveServicesAccountResource created on azure
// for more information of creating CognitiveServicesAccountResource, please refer to the document of CognitiveServicesAccountResource
// this example assumes you already have this CommitmentPlanResource created on azure
// for more information of creating CommitmentPlanResource, please refer to the document of CommitmentPlanResource
string subscriptionId = "subscriptionId";
string resourceGroupName = "resourceGroupName";
string accountName = "accountName";
ResourceIdentifier cognitiveServicesAccountResourceId = CognitiveServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
CognitiveServicesAccountResource cognitiveServicesAccount = client.GetCognitiveServicesAccountResource(cognitiveServicesAccountResourceId);
// get the collection of this CommitmentPlanResource
CommitmentPlanCollection collection = cognitiveServicesAccount.GetCommitmentPlans();
string commitmentPlanName = "commitmentPlanName";
ResourceIdentifier commitmentPlanResourceId = CommitmentPlanResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, commitmentPlanName);
CommitmentPlanResource commitmentPlan = client.GetCommitmentPlanResource(commitmentPlanResourceId);
// invoke the operation
string commitmentPlanName = "commitmentPlanName";
CommitmentPlanData data = new CommitmentPlanData()
{
Properties = new CommitmentPlanProperties()
@ -41,7 +38,7 @@ CommitmentPlanData data = new CommitmentPlanData()
AutoRenew = true,
},
};
ArmOperation<CommitmentPlanResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, commitmentPlanName, data);
ArmOperation<CommitmentPlanResource> lro = await commitmentPlan.UpdateAsync(WaitUntil.Completed, data);
CommitmentPlanResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -15,19 +15,16 @@ TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this CognitiveServicesAccountResource created on azure
// for more information of creating CognitiveServicesAccountResource, please refer to the document of CognitiveServicesAccountResource
// this example assumes you already have this CognitiveServicesAccountDeploymentResource created on azure
// for more information of creating CognitiveServicesAccountDeploymentResource, please refer to the document of CognitiveServicesAccountDeploymentResource
string subscriptionId = "subscriptionId";
string resourceGroupName = "resourceGroupName";
string accountName = "accountName";
ResourceIdentifier cognitiveServicesAccountResourceId = CognitiveServicesAccountResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName);
CognitiveServicesAccountResource cognitiveServicesAccount = client.GetCognitiveServicesAccountResource(cognitiveServicesAccountResourceId);
// get the collection of this CognitiveServicesAccountDeploymentResource
CognitiveServicesAccountDeploymentCollection collection = cognitiveServicesAccount.GetCognitiveServicesAccountDeployments();
string deploymentName = "deploymentName";
ResourceIdentifier cognitiveServicesAccountDeploymentResourceId = CognitiveServicesAccountDeploymentResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, accountName, deploymentName);
CognitiveServicesAccountDeploymentResource cognitiveServicesAccountDeployment = client.GetCognitiveServicesAccountDeploymentResource(cognitiveServicesAccountDeploymentResourceId);
// invoke the operation
string deploymentName = "deploymentName";
CognitiveServicesAccountDeploymentData data = new CognitiveServicesAccountDeploymentData()
{
Properties = new CognitiveServicesAccountDeploymentProperties()
@ -45,7 +42,7 @@ CognitiveServicesAccountDeploymentData data = new CognitiveServicesAccountDeploy
},
},
};
ArmOperation<CognitiveServicesAccountDeploymentResource> lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, deploymentName, data);
ArmOperation<CognitiveServicesAccountDeploymentResource> lro = await cognitiveServicesAccountDeployment.UpdateAsync(WaitUntil.Completed, data);
CognitiveServicesAccountDeploymentResource result = lro.Value;
// the variable result is a resource, you could call other operations on this instance as well

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}

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

@ -1 +1 @@
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.2.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-net/blob/Azure.ResourceManager.CognitiveServices_1.3.0-beta.1/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/README.md"}