diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/api/Azure.ResourceManager.CognitiveServices.netstandard2.0.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/api/Azure.ResourceManager.CognitiveServices.netstandard2.0.cs index 6ad900d0cc39..991f141f7b40 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/api/Azure.ResourceManager.CognitiveServices.netstandard2.0.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/api/Azure.ResourceManager.CognitiveServices.netstandard2.0.cs @@ -155,8 +155,6 @@ public static partial class CognitiveServicesExtensions public partial class CognitiveServicesPrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected CognitiveServicesPrivateEndpointConnectionCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.CognitiveServices.CognitiveServicesPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string privateEndpointConnectionName, Azure.ResourceManager.CognitiveServices.CognitiveServicesPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -188,8 +186,6 @@ protected CognitiveServicesPrivateEndpointConnectionResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.CognitiveServices.CognitiveServicesPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.CognitiveServices.CognitiveServicesPrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class CommitmentPlanCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionCollection.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionCollection.cs index 05486b816db7..517d89b3deab 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionCollection.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionCollection.cs @@ -53,72 +53,6 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, CognitiveServicesAccountResource.ResourceType), nameof(id)); } - /// - /// Update the state of specified private endpoint connection associated with the Cognitive Services account. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName} - /// Operation Id: PrivateEndpointConnections_CreateOrUpdate - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the private endpoint connection associated with the Cognitive Services Account. - /// The private endpoint connection properties. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string privateEndpointConnectionName, CognitiveServicesPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("CognitiveServicesPrivateEndpointConnectionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken).ConfigureAwait(false); - var operation = new CognitiveServicesArmOperation(new CognitiveServicesPrivateEndpointConnectionOperationSource(Client), _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified private endpoint connection associated with the Cognitive Services account. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName} - /// Operation Id: PrivateEndpointConnections_CreateOrUpdate - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the private endpoint connection associated with the Cognitive Services Account. - /// The private endpoint connection properties. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string privateEndpointConnectionName, CognitiveServicesPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("CognitiveServicesPrivateEndpointConnectionCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data, cancellationToken); - var operation = new CognitiveServicesArmOperation(new CognitiveServicesPrivateEndpointConnectionOperationSource(Client), _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, privateEndpointConnectionName, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Gets the specified private endpoint connection associated with the Cognitive Services account. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionResource.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionResource.cs index dcd4ad1c572d..78421545ef52 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionResource.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/CognitiveServicesPrivateEndpointConnectionResource.cs @@ -185,65 +185,5 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel throw; } } - - /// - /// Update the state of specified private endpoint connection associated with the Cognitive Services account. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName} - /// Operation Id: PrivateEndpointConnections_CreateOrUpdate - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The private endpoint connection properties. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(WaitUntil waitUntil, CognitiveServicesPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("CognitiveServicesPrivateEndpointConnectionResource.Update"); - scope.Start(); - try - { - var response = await _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); - var operation = new CognitiveServicesArmOperation(new CognitiveServicesPrivateEndpointConnectionOperationSource(Client), _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Update the state of specified private endpoint connection associated with the Cognitive Services account. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName} - /// Operation Id: PrivateEndpointConnections_CreateOrUpdate - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The private endpoint connection properties. - /// The cancellation token to use. - /// is null. - public virtual ArmOperation Update(WaitUntil waitUntil, CognitiveServicesPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics.CreateScope("CognitiveServicesPrivateEndpointConnectionResource.Update"); - scope.Start(); - try - { - var response = _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); - var operation = new CognitiveServicesArmOperation(new CognitiveServicesPrivateEndpointConnectionOperationSource(Client), _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsClientDiagnostics, Pipeline, _cognitiveServicesPrivateEndpointConnectionPrivateEndpointConnectionsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.Location); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/LongRunningOperation/CognitiveServicesPrivateEndpointConnectionOperationSource.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/LongRunningOperation/CognitiveServicesPrivateEndpointConnectionOperationSource.cs deleted file mode 100644 index f2fc1bddf6fa..000000000000 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/LongRunningOperation/CognitiveServicesPrivateEndpointConnectionOperationSource.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.ResourceManager; - -namespace Azure.ResourceManager.CognitiveServices -{ - internal class CognitiveServicesPrivateEndpointConnectionOperationSource : IOperationSource - { - private readonly ArmClient _client; - - internal CognitiveServicesPrivateEndpointConnectionOperationSource(ArmClient client) - { - _client = client; - } - - CognitiveServicesPrivateEndpointConnectionResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = CognitiveServicesPrivateEndpointConnectionData.DeserializeCognitiveServicesPrivateEndpointConnectionData(document.RootElement); - return new CognitiveServicesPrivateEndpointConnectionResource(_client, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = CognitiveServicesPrivateEndpointConnectionData.DeserializeCognitiveServicesPrivateEndpointConnectionData(document.RootElement); - return new CognitiveServicesPrivateEndpointConnectionResource(_client, data); - } - } -} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index d76619d5ca5c..a0d6059f3ec5 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -204,90 +204,6 @@ public Response Get(string subsc } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, CognitiveServicesPrivateEndpointConnectionData data) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.CognitiveServices/accounts/", false); - uri.AppendPath(accountName, true); - uri.AppendPath("/privateEndpointConnections/", false); - uri.AppendPath(privateEndpointConnectionName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Update the state of specified private endpoint connection associated with the Cognitive Services account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of Cognitive Services account. - /// The name of the private endpoint connection associated with the Cognitive Services Account. - /// The private endpoint connection properties. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, CognitiveServicesPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, privateEndpointConnectionName, data); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Update the state of specified private endpoint connection associated with the Cognitive Services account. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of Cognitive Services account. - /// The name of the private endpoint connection associated with the Cognitive Services Account. - /// The private endpoint connection properties. - /// The cancellation token to use. - /// , , , or is null. - /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName, CognitiveServicesPrivateEndpointConnectionData data, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(accountName, nameof(accountName)); - Argument.AssertNotNullOrEmpty(privateEndpointConnectionName, nameof(privateEndpointConnectionName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, accountName, privateEndpointConnectionName, data); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 202: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string accountName, string privateEndpointConnectionName) { var message = _pipeline.CreateMessage(); diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/autorest.md b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/autorest.md index 33a4432014ec..5a96ec6bfc7d 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/autorest.md +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/src/autorest.md @@ -118,6 +118,10 @@ rename-rules: Etag: ETag|etag directive: + - from: cognitiveservices.json + where: $.paths + transform: > + delete $["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}"]["put"] - from: cognitiveservices.json where: $.definitions transform: > @@ -126,7 +130,6 @@ directive: $.Encryption.properties.keyVaultProperties['x-ms-client-flatten'] = true; $.PrivateEndpointConnection.properties.properties['x-ms-client-flatten'] = true; delete $.AccountProperties.properties.internalId; - # TODO, these configs will be replaced by the new rename-mapping - from: cognitiveservices.json where: $.definitions @@ -149,5 +152,4 @@ directive: $.SkuChangeInfo.properties.lastChangeDate['x-ms-client-name'] = 'lastChangedOn'; $.VirtualNetworkRule.properties.id['x-ms-format'] = 'arm-id'; $.ApiProperties.properties.qnaAzureSearchEndpointId['x-ms-format'] = 'arm-id'; - ``` diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/CognitiveServicesManagementTestBase.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/CognitiveServicesManagementTestBase.cs index 38b4a46ceae2..1dacb57c3ede 100644 --- a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/CognitiveServicesManagementTestBase.cs +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/CognitiveServicesManagementTestBase.cs @@ -13,6 +13,8 @@ namespace Azure.ResourceManager.CognitiveServices.Tests public class CognitiveServicesManagementTestBase : ManagementRecordedTestBase { protected ArmClient Client { get; private set; } + protected AzureLocation DefaultLocation => AzureLocation.WestUS; + protected SubscriptionResource DefaultSubscription { get; private set; } protected CognitiveServicesManagementTestBase(bool isAsync, RecordedTestMode mode) : base(isAsync, mode) @@ -25,17 +27,26 @@ protected CognitiveServicesManagementTestBase(bool isAsync) } [SetUp] - public void CreateCommonClient() + public async Task CreateCommonClient() { Client = GetArmClient(); + DefaultSubscription = await Client.GetDefaultSubscriptionAsync().ConfigureAwait(false); } - protected async Task CreateResourceGroup(SubscriptionResource subscription, string rgNamePrefix, AzureLocation location) + protected async Task CreateResourceGroupAsync() { - string rgName = Recording.GenerateAssetName(rgNamePrefix); - ResourceGroupData input = new ResourceGroupData(location); - var lro = await subscription.GetResourceGroups().CreateOrUpdateAsync(WaitUntil.Completed, rgName, input); - return lro.Value; + var resourceGroupName = Recording.GenerateAssetName("testRG-"); + var rgOp = await DefaultSubscription.GetResourceGroups().CreateOrUpdateAsync( + WaitUntil.Completed, + resourceGroupName, + new ResourceGroupData(DefaultLocation) + { + Tags = + { + { "test", "env" } + } + }); + return rgOp.Value; } } } diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/Helpers/ResourceDataHelper.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/Helpers/ResourceDataHelper.cs new file mode 100644 index 000000000000..513ebabd9d09 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/Helpers/ResourceDataHelper.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using Azure.ResourceManager.CognitiveServices.Models; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; +using NUnit.Framework; +using Azure.Core; +using System; + +namespace Azure.ResourceManager.CognitiveServices.Tests.Helpers +{ + public static class ResourceDataHelper + { + private const string dummySSHKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+wWK73dCr+jgQOAxNsHAnNNNMEMWOHYEccp6wJm2gotpr9katuF/ZAdou5AaW1C61slRkHRkpRRX9FA9CYBiitZgvCCz+3nWNN7l/Up54Zps/pHWGZLHNJZRYyAB6j5yVLMVHIHriY49d/GZTZVNB8GoJv9Gakwc/fuEZYYl4YDFiGMBP///TzlI4jhiJzjKnEvqPFki5p2ZRJqcbCiF4pJrxUQR/RXqVFQdbRLZgYfJ8xGB878RENq3yQ39d8dVOkq4edbkzwcUmwwwkYVPIoDGsYLaRHnG+To7FvMeyO7xDVQkMKzopTQV8AuKpyvpqu0a9pWOMaiCyDytO7GGN you@me.com"; + + // Temporary solution since the one in Azure.ResourceManager.CognitiveServices is internal + public static IDictionary ReplaceWith(this IDictionary dest, IDictionary src) + { + dest.Clear(); + foreach (var kv in src) + { + dest.Add(kv); + } + + return dest; + } + + public static void AssertTrackedResource(TrackedResourceData r1, TrackedResourceData r2) + { + Assert.AreEqual(r1.Name, r2.Name); + Assert.AreEqual(r1.Id, r2.Id); + Assert.AreEqual(r1.ResourceType, r2.ResourceType); + Assert.AreEqual(r1.Location, r2.Location); + Assert.AreEqual(r1.Tags, r2.Tags); + } + + #region Account + public static void AssertAccount(CognitiveServicesAccountData account1, CognitiveServicesAccountData account2) + { + AssertTrackedResource(account1, account2); + Assert.AreEqual(account1.ETag, account2.ETag); + } + + public static CognitiveServicesAccountData GetBasicAccountData(AzureLocation location) + { + var data = new CognitiveServicesAccountData(location) + { + Sku = new CognitiveServicesSku("S0"), + Kind = "Face", + Properties = new CognitiveServicesAccountProperties() + }; + return data; + } + #endregion + + #region CommitmentPlan + public static void AssertCommitmentPlan(CommitmentPlanData plan1, CommitmentPlanData plan2) + { + //AssertTrackedResource(plan1, plan2); + Assert.AreEqual(plan1.Name, plan2.Name); + Assert.AreEqual(plan1.Id, plan2.Id); + Assert.AreEqual(plan1.ResourceType, plan2.ResourceType); + Assert.AreEqual(plan1.ETag, plan2.ETag); + } + + public static CommitmentPlanData GetBasicCommitmentPlanData() + { + var data = new CommitmentPlanData() + { + Properties = new CommitmentPlanProperties() + { + HostingModel = ServiceAccountHostingModel.Web, + PlanType = "TA", + AutoRenew = false + } + }; + return data; + } + #endregion + + #region Deployment + public static void AssertDeployment(CognitiveServicesAccountDeploymentData d1, CognitiveServicesAccountDeploymentData d2) + { + Assert.AreEqual(d1.Name, d2.Name); + Assert.AreEqual(d1.Id, d2.Id); + Assert.AreEqual(d1.ResourceType, d2.ResourceType); + Assert.AreEqual(d1.ETag, d2.ETag); + } + + public static CognitiveServicesAccountDeploymentData GetBasicDeploymentData() + { + var data = new CognitiveServicesAccountDeploymentData() + { + Properties = new CognitiveServicesAccountDeploymentProperties + { + Model = new CognitiveServicesAccountDeploymentModel() + { + Name = "ada", + Format = "OpenAI", + Version = "1" + }, + ScaleSettings = new CognitiveServicesAccountDeploymentScaleSettings() + { + ScaleType = CognitiveServicesAccountDeploymentScaleType.Manual, + Capacity = 1 + } + } + }; + return data; + } + #endregion + + #region CognitiveServicesPrivateEndpointConnection + public static void AssertConnection(CognitiveServicesPrivateEndpointConnectionData c1, CognitiveServicesPrivateEndpointConnectionData c2) + { + Assert.AreEqual(c1.Name, c2.Name); + Assert.AreEqual(c1.Id, c2.Id); + Assert.AreEqual(c1.ResourceType, c2.ResourceType); + Assert.AreEqual(c1.ETag, c2.ETag); + } + public static CognitiveServicesPrivateEndpointConnectionData GetBasicCognitiveServicesPrivateEndpointConnectionData() + { + var data = new CognitiveServicesPrivateEndpointConnectionData() + { + ConnectionState = new CognitiveServicesPrivateLinkServiceConnectionState + { + Status = CognitiveServicesPrivateEndpointServiceConnectionStatus.Approved, + Description = "Auto-Approved" + }, + Location = AzureLocation.EastUS2 + }; + return data; + } + #endregion + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountCollectionTests/AccountCollectionApiTests().json b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountCollectionTests/AccountCollectionApiTests().json new file mode 100644 index 000000000000..f3f3c55b25b6 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountCollectionTests/AccountCollectionApiTests().json @@ -0,0 +1,1000 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Connection": "keep-alive", + "traceparent": "00-d58f801a3d76d94589eb537ee99e14b0-0340580a77675948-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "6d3db4e3f864f6320a413fd0f532455c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "747", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:14 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "800f979f-7440-4867-b633-68bcf3c7a632", + "x-ms-ratelimit-remaining-subscription-reads": "11999", + "x-ms-request-id": "800f979f-7440-4867-b633-68bcf3c7a632", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071715Z:800f979f-7440-4867-b633-68bcf3c7a632" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "TagKey-9823": "TagValue-566", + "TagKey-3481": "TagValue-320", + "TagKey-4926": "TagValue-1187", + "TagKey-751": "TagValue-3921", + "TagKey-1866": "TagValue-8559", + "TagKey-3094": "TagValue-9190", + "TagKey-2449": "TagValue-9", + "TagKey-8379": "TagValue-164", + "TagKey-7470": "TagValue-2205", + "TagKey-4236": "TagValue-3698", + "TagKey-5316": "TagValue-2725" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": ".NET Mgmt SDK Test with TTL = 1 Day", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testRG-1357?api-version=2021-04-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "43", + "Content-Type": "application/json", + "traceparent": "00-71c9ffee385ace4cb76dd67ccb969fff-e415da55a20aa04a-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "4d515b48ddc7fd19d0eca7d1abd1fd83", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "test": "env" + }, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "241", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:17 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "532d23f4-984d-4524-92c9-dcf1b46ed1ec", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "532d23f4-984d-4524-92c9-dcf1b46ed1ec", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071718Z:532d23f4-984d-4524-92c9-dcf1b46ed1ec" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357", + "name": "testRG-1357", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "tags": { + "test": "env" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-841fa3f18ac9714fbc22881024aacea4-5e02c03d370a0e44-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "e2b167599734cf19876d669f011e1ef0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/5f53c0a2-f6eb-4810-9051-6ffa92631b85?api-version=2017-04-18", + "Cache-Control": "no-cache", + "Content-Length": "1467", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:24 GMT", + "ETag": "\u00221c00671a-0000-0700-0000-62ea21040000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "243", + "x-ms-correlation-request-id": "1190e6d6-ab39-48a1-a9dc-c6bfcf33d922", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-request-id": "527d3b4c-3007-48d5-a4e6-2f739c329709", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071725Z:1190e6d6-ab39-48a1-a9dc-c6bfcf33d922" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845", + "name": "Account-8845", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00671a-0000-0700-0000-62ea21040000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "2dbb7706a19a48cab4913095ec5997e1", + "dateCreated": "2022-08-03T07:17:23.8682951Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Creating" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:23.2263103Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:23.2263103Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/5f53c0a2-f6eb-4810-9051-6ffa92631b85?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-841fa3f18ac9714fbc22881024aacea4-68441620cd640042-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "ddd98c4d1dabc314377e406fb25ecfcd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "304", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:25 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "53", + "x-ms-correlation-request-id": "644714dd-58ea-4aab-ba4a-84204f1b4a51", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "9e05ff27-e219-4007-8a22-ff82c3bd77e1", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071726Z:644714dd-58ea-4aab-ba4a-84204f1b4a51" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/5f53c0a2-f6eb-4810-9051-6ffa92631b85", + "name": "5f53c0a2-f6eb-4810-9051-6ffa92631b85", + "status": "Succeeded", + "startTime": "2022-08-03T07:17:24Z", + "endTime": "2022-08-03T07:17:24Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-841fa3f18ac9714fbc22881024aacea4-8d916dbf79400746-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "e2e9e088e1383d1c908d72a08b8eaa28", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:25 GMT", + "ETag": "\u00221c009e1a-0000-0700-0000-62ea21040000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-correlation-request-id": "e4e2094b-95ea-4aa6-b7a0-881d19c07655", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "208c48a5-0b25-4f9d-9084-588262b59473", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071726Z:e4e2094b-95ea-4aa6-b7a0-881d19c07655" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845", + "name": "Account-8845", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c009e1a-0000-0700-0000-62ea21040000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "2dbb7706a19a48cab4913095ec5997e1", + "dateCreated": "2022-08-03T07:17:23.8682951Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:23.2263103Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:23.2263103Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-e9ec866dae25f74d8170c69f3abf0db6-6fdccbb4fa2fc646-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "745224fe4144a445da0169cddb677011", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:26 GMT", + "ETag": "\u00221c009e1a-0000-0700-0000-62ea21040000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-correlation-request-id": "6ef90a9d-ba52-4f55-8667-aff37f891e4c", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "4e4dbe68-86b1-468d-82a5-0af5bf3f5b14", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071727Z:6ef90a9d-ba52-4f55-8667-aff37f891e4c" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845", + "name": "Account-8845", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c009e1a-0000-0700-0000-62ea21040000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "2dbb7706a19a48cab4913095ec5997e1", + "dateCreated": "2022-08-03T07:17:23.8682951Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:23.2263103Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:23.2263103Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-cbc747935729ed4e81e209d1bf57f500-f1d29ae10c045b46-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "43033ec48c756b096f9c4d1dab7438a9", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:28 GMT", + "ETag": "\u00221c00e01b-0000-0700-0000-62ea21070000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "32", + "x-ms-correlation-request-id": "4b6f7b4b-c183-4868-aea8-b6875168ca1d", + "x-ms-ratelimit-remaining-subscription-writes": "1197", + "x-ms-request-id": "7ac25035-fbf3-4978-bb30-44f92f5246c7", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071729Z:4b6f7b4b-c183-4868-aea8-b6875168ca1d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845", + "name": "Account-8845", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00e01b-0000-0700-0000-62ea21070000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "provisioningState": "Succeeded", + "internalId": "2dbb7706a19a48cab4913095ec5997e1", + "dateCreated": "2022-08-03T07:17:23.8682951Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + } + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:23.2263103Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:27.5700801Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-4a75da56b2d76b4bbf8624d6275fa22c-b689694b9acb3f44-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "4cdc611c668a72b21ae605a8f327f865", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:30 GMT", + "ETag": "\u00221c00b51c-0000-0700-0000-62ea210a0000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "37", + "x-ms-correlation-request-id": "de0cf836-3871-4a5a-bbf1-8abf9f8feb8e", + "x-ms-ratelimit-remaining-subscription-writes": "1196", + "x-ms-request-id": "1ff62c67-c578-430c-9898-52d9052a8dfa", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071730Z:de0cf836-3871-4a5a-bbf1-8abf9f8feb8e" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845", + "name": "Account-8845", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00b51c-0000-0700-0000-62ea210a0000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "provisioningState": "Succeeded", + "internalId": "2dbb7706a19a48cab4913095ec5997e1", + "dateCreated": "2022-08-03T07:17:23.8682951Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + } + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:23.2263103Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:29.9607147Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-df2131057e121c418d3d1762ece58268-19c5ec85c362ff40-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "4a00243aec986d1f64fe732555e05373", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1480", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:30 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "14", + "x-ms-correlation-request-id": "5b8d29b4-ebe7-4bc7-8e91-cab2bbd9dd60", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "a0bc4529-c896-4526-b100-50b4f7b39469", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071730Z:5b8d29b4-ebe7-4bc7-8e91-cab2bbd9dd60" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845", + "name": "Account-8845", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00b51c-0000-0700-0000-62ea210a0000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "provisioningState": "Succeeded", + "internalId": "2dbb7706a19a48cab4913095ec5997e1", + "dateCreated": "2022-08-03T07:17:23.8682951Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + } + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:23.2263103Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:29.9607147Z" + } + } + ] + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-d3d5ffb26ab5324e93b5e9421105da06-32d03711b80cdb4d-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "b76ea24c9d543a325b7297cebd82ee48", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:30 GMT", + "ETag": "\u00221c00b51c-0000-0700-0000-62ea210a0000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-correlation-request-id": "75c9c58d-f5b3-4c79-ad36-f0543af848c3", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "1be00a3e-7e35-46b9-9732-4c4a6d4e695c", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071730Z:75c9c58d-f5b3-4c79-ad36-f0543af848c3" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-8845", + "name": "Account-8845", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00b51c-0000-0700-0000-62ea210a0000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "provisioningState": "Succeeded", + "internalId": "2dbb7706a19a48cab4913095ec5997e1", + "dateCreated": "2022-08-03T07:17:23.8682951Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + } + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:23.2263103Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:29.9607147Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1357/providers/Microsoft.CognitiveServices/accounts/Account-88451?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-0c8afe07b6811446855314932f6d3e27-04d2a4e4b9f0834b-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "cf6de4f2ae27dccda18c5ff76fdf14d4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "233", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:31 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "c0e9648a-3c1c-4ece-85f1-23817f415c5d", + "x-ms-failure-cause": "gateway", + "x-ms-request-id": "c0e9648a-3c1c-4ece-85f1-23817f415c5d", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071731Z:c0e9648a-3c1c-4ece-85f1-23817f415c5d" + }, + "ResponseBody": { + "error": { + "code": "ResourceNotFound", + "message": "The Resource \u0027Microsoft.CognitiveServices/accounts/Account-88451\u0027 under resource group \u0027testRG-1357\u0027 was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix" + } + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com/", + "RandomSeed": "454556461", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountCollectionTests/AccountCollectionApiTests()Async.json b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountCollectionTests/AccountCollectionApiTests()Async.json new file mode 100644 index 000000000000..7362a5780c14 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountCollectionTests/AccountCollectionApiTests()Async.json @@ -0,0 +1,999 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-222d38f67f8ff944b973b6f4f4c924e3-138d6063293e1341-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "8da2010f5ee911f6d0a1bdaa17265056", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "747", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:38 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "43892948-5427-4e84-8996-8f6d21addebc", + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "43892948-5427-4e84-8996-8f6d21addebc", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071738Z:43892948-5427-4e84-8996-8f6d21addebc" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "TagKey-9823": "TagValue-566", + "TagKey-3481": "TagValue-320", + "TagKey-4926": "TagValue-1187", + "TagKey-751": "TagValue-3921", + "TagKey-1866": "TagValue-8559", + "TagKey-3094": "TagValue-9190", + "TagKey-2449": "TagValue-9", + "TagKey-8379": "TagValue-164", + "TagKey-7470": "TagValue-2205", + "TagKey-4236": "TagValue-3698", + "TagKey-5316": "TagValue-2725" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": ".NET Mgmt SDK Test with TTL = 1 Day", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testRG-9517?api-version=2021-04-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "43", + "Content-Type": "application/json", + "traceparent": "00-40b9509898e2b144acb6bc719b2a01c7-a47f877fd3038b41-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "25a1271a841a764d57839c9e08b953ab", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "test": "env" + }, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "241", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:39 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "64fe47ac-8282-4aaa-b5b8-e5ddd626b13d", + "x-ms-ratelimit-remaining-subscription-writes": "1195", + "x-ms-request-id": "64fe47ac-8282-4aaa-b5b8-e5ddd626b13d", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071739Z:64fe47ac-8282-4aaa-b5b8-e5ddd626b13d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517", + "name": "testRG-9517", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "tags": { + "test": "env" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-c8a3725de1b388489d6fdc8bc85e22d2-9442371ef8f40440-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "bbcaf63ffc045a6dc7a026274a86a6aa", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/62b60d12-1b09-4814-bdb5-91287209a2f3?api-version=2017-04-18", + "Cache-Control": "no-cache", + "Content-Length": "1467", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:42 GMT", + "ETag": "\u00221c005e21-0000-0700-0000-62ea21150000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "279", + "x-ms-correlation-request-id": "cbb5f43b-2dd4-4bb7-ba06-289461d07d45", + "x-ms-ratelimit-remaining-subscription-writes": "1194", + "x-ms-request-id": "f1ae144d-424f-4126-bacd-8427e4e566c2", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071742Z:cbb5f43b-2dd4-4bb7-ba06-289461d07d45" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480", + "name": "Account-4480", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c005e21-0000-0700-0000-62ea21150000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "6e1e55ef34e84a89b90eb0d90a560c49", + "dateCreated": "2022-08-03T07:17:41.7208094Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Creating" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:41.6013924Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:41.6013924Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/62b60d12-1b09-4814-bdb5-91287209a2f3?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-c8a3725de1b388489d6fdc8bc85e22d2-0885d5e636033c42-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "59e6e4ff948b2a1634ca53e4274e0cfd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "304", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:43 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "6", + "x-ms-correlation-request-id": "47e69905-0724-4412-93e5-0c0b3690dfb8", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "0822e0d4-5994-4802-aee6-646d421edc4a", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071743Z:47e69905-0724-4412-93e5-0c0b3690dfb8" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/62b60d12-1b09-4814-bdb5-91287209a2f3", + "name": "62b60d12-1b09-4814-bdb5-91287209a2f3", + "status": "Succeeded", + "startTime": "2022-08-03T07:17:41Z", + "endTime": "2022-08-03T07:17:42Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-c8a3725de1b388489d6fdc8bc85e22d2-7c64335a39474049-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "2314f3f56f9e4a3c7a76a4722213e7ff", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:43 GMT", + "ETag": "\u00221c00a521-0000-0700-0000-62ea21160000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-correlation-request-id": "fb96b515-5add-45c2-9e25-95d0412c9a14", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "6f1047ee-7fe6-4ec0-b784-35b90f29b879", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071743Z:fb96b515-5add-45c2-9e25-95d0412c9a14" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480", + "name": "Account-4480", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00a521-0000-0700-0000-62ea21160000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "6e1e55ef34e84a89b90eb0d90a560c49", + "dateCreated": "2022-08-03T07:17:41.7208094Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:41.6013924Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:41.6013924Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-795122c999386647921b49e378791aa4-68d59f508de0454e-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "6628bcb84c9f5f1f7f8a072ca1972dc8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:43 GMT", + "ETag": "\u00221c00a521-0000-0700-0000-62ea21160000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-correlation-request-id": "a3f048ae-5bde-4f46-8ef3-39f5194107f7", + "x-ms-ratelimit-remaining-subscription-reads": "11989", + "x-ms-request-id": "72d2c27a-ba1d-4638-b121-b7bc2139634a", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071744Z:a3f048ae-5bde-4f46-8ef3-39f5194107f7" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480", + "name": "Account-4480", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00a521-0000-0700-0000-62ea21160000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "6e1e55ef34e84a89b90eb0d90a560c49", + "dateCreated": "2022-08-03T07:17:41.7208094Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:41.6013924Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:41.6013924Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-a6a8e8eab52bdb4eac150e4bafb320ce-a96f563b27ca9448-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "7f64dd85c3b390cba79cdf14f0a30720", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:44 GMT", + "ETag": "\u00221c005e22-0000-0700-0000-62ea21180000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "35", + "x-ms-correlation-request-id": "8e3c1d79-8c3a-40fd-ace4-a0d8546616c4", + "x-ms-ratelimit-remaining-subscription-writes": "1193", + "x-ms-request-id": "1499d515-a123-4add-88ec-468fdb62fccc", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071744Z:8e3c1d79-8c3a-40fd-ace4-a0d8546616c4" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480", + "name": "Account-4480", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c005e22-0000-0700-0000-62ea21180000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "provisioningState": "Succeeded", + "internalId": "6e1e55ef34e84a89b90eb0d90a560c49", + "dateCreated": "2022-08-03T07:17:41.7208094Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + } + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:41.6013924Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:44.1795293Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-b6493b0eb257ad45921f438bb7d91eb4-08cbdf85273d3342-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "45ecdb4868aff44bf198be026c0b6edb", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:45 GMT", + "ETag": "\u00221c00ab22-0000-0700-0000-62ea21190000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "35", + "x-ms-correlation-request-id": "6f492bf1-c68c-4e84-b8e7-78fca8a53ce2", + "x-ms-ratelimit-remaining-subscription-writes": "1192", + "x-ms-request-id": "f66d8d13-07a9-4b2f-bebd-b08f0cecdff3", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071745Z:6f492bf1-c68c-4e84-b8e7-78fca8a53ce2" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480", + "name": "Account-4480", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00ab22-0000-0700-0000-62ea21190000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "provisioningState": "Succeeded", + "internalId": "6e1e55ef34e84a89b90eb0d90a560c49", + "dateCreated": "2022-08-03T07:17:41.7208094Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + } + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:41.6013924Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:44.9451584Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-a19bbce25a44ea4aa5c037ff3b7f6806-69f241f969ca704f-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "15ccfdf3c2b77a700937788de75a3bc8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1480", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:45 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "14", + "x-ms-correlation-request-id": "32004ab1-d8be-484d-aa5c-7ce4382238b9", + "x-ms-ratelimit-remaining-subscription-reads": "11988", + "x-ms-request-id": "d91acf90-3339-4e4d-8bd0-adfb4128f9cf", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071745Z:32004ab1-d8be-484d-aa5c-7ce4382238b9" + }, + "ResponseBody": { + "value": [ + { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480", + "name": "Account-4480", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00ab22-0000-0700-0000-62ea21190000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "provisioningState": "Succeeded", + "internalId": "6e1e55ef34e84a89b90eb0d90a560c49", + "dateCreated": "2022-08-03T07:17:41.7208094Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + } + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:41.6013924Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:44.9451584Z" + } + } + ] + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-5a2caaff8b18e64e90a65d9d808395e3-cb8f260a60f95e48-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "8090c8465cc58576380cc5f4bc4dd538", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1468", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:45 GMT", + "ETag": "\u00221c00ab22-0000-0700-0000-62ea21190000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-correlation-request-id": "5578689d-e5a0-4152-ab01-72b7a3979aa7", + "x-ms-ratelimit-remaining-subscription-reads": "11987", + "x-ms-request-id": "67ff12c5-3841-4868-a584-f722861246d3", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071745Z:5578689d-e5a0-4152-ab01-72b7a3979aa7" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-4480", + "name": "Account-4480", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00ab22-0000-0700-0000-62ea21190000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "provisioningState": "Succeeded", + "internalId": "6e1e55ef34e84a89b90eb0d90a560c49", + "dateCreated": "2022-08-03T07:17:41.7208094Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + } + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:41.6013924Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:44.9451584Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-9517/providers/Microsoft.CognitiveServices/accounts/Account-44801?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-0d3b5af22c348140a3622e58bf9425ee-af70268efddfd448-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "6f0f256f593ec02476cf43334a15f824", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 404, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "233", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e82b4540-b443-4fa8-84d9-00adacd97601", + "x-ms-failure-cause": "gateway", + "x-ms-request-id": "e82b4540-b443-4fa8-84d9-00adacd97601", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071746Z:e82b4540-b443-4fa8-84d9-00adacd97601" + }, + "ResponseBody": { + "error": { + "code": "ResourceNotFound", + "message": "The Resource \u0027Microsoft.CognitiveServices/accounts/Account-44801\u0027 under resource group \u0027testRG-9517\u0027 was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix" + } + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com/", + "RandomSeed": "1050164646", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountResourceTests/AccountResourceApiTests().json b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountResourceTests/AccountResourceApiTests().json new file mode 100644 index 000000000000..cc422bb41d73 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountResourceTests/AccountResourceApiTests().json @@ -0,0 +1,524 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-c29bde161db49047a25296971fc8a136-74216a6dfdfcda4d-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "bce2b44bc0fe70d39d23d3ffd5c2b204", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "747", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:48 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0e9720b3-6e05-402f-a3d4-4be66626dcb5", + "x-ms-ratelimit-remaining-subscription-reads": "11985", + "x-ms-request-id": "0e9720b3-6e05-402f-a3d4-4be66626dcb5", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071748Z:0e9720b3-6e05-402f-a3d4-4be66626dcb5" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "TagKey-9823": "TagValue-566", + "TagKey-3481": "TagValue-320", + "TagKey-4926": "TagValue-1187", + "TagKey-751": "TagValue-3921", + "TagKey-1866": "TagValue-8559", + "TagKey-3094": "TagValue-9190", + "TagKey-2449": "TagValue-9", + "TagKey-8379": "TagValue-164", + "TagKey-7470": "TagValue-2205", + "TagKey-4236": "TagValue-3698", + "TagKey-5316": "TagValue-2725" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": ".NET Mgmt SDK Test with TTL = 1 Day", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testRG-1887?api-version=2021-04-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "43", + "Content-Type": "application/json", + "traceparent": "00-10ccdd9d2c116845ac120613f029ffe0-5121087014870049-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "20e10332004141898ca10fad1589222c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "test": "env" + }, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "241", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:51 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e709a7fc-b24a-46db-8779-66f7dadf4d23", + "x-ms-ratelimit-remaining-subscription-writes": "1191", + "x-ms-request-id": "e709a7fc-b24a-46db-8779-66f7dadf4d23", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071751Z:e709a7fc-b24a-46db-8779-66f7dadf4d23" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1887", + "name": "testRG-1887", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "tags": { + "test": "env" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1887/providers/Microsoft.CognitiveServices/accounts/testAccount-1241?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-2cdc444a9f8fa641b1c627552710968b-eae2a47807dd8646-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "49dd15432b2e26f0ad5f47468b8eeea2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/53f206d1-6ae1-412b-9159-f44f0fd208b8?api-version=2017-04-18", + "Cache-Control": "no-cache", + "Content-Length": "1475", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:53 GMT", + "ETag": "\u00221c00a125-0000-0700-0000-62ea21200000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "212", + "x-ms-correlation-request-id": "0dc91944-ae5e-402e-9f70-927292889ce2", + "x-ms-ratelimit-remaining-subscription-writes": "1190", + "x-ms-request-id": "df10cbe9-26f6-4b88-92c9-00c403bed3b6", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071753Z:0dc91944-ae5e-402e-9f70-927292889ce2" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1887/providers/Microsoft.CognitiveServices/accounts/testAccount-1241", + "name": "testAccount-1241", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00a125-0000-0700-0000-62ea21200000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "c1d9758e3906422da1e25d86c4f54ae7", + "dateCreated": "2022-08-03T07:17:52.4946063Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Creating" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:52.3826918Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:52.3826918Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/53f206d1-6ae1-412b-9159-f44f0fd208b8?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2cdc444a9f8fa641b1c627552710968b-d13645d3ff149948-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "9c7ea8dcd226067e12ba72e1b842b5fd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "304", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "5", + "x-ms-correlation-request-id": "f04f5b58-56ed-4296-b198-d5c37b7eab0d", + "x-ms-ratelimit-remaining-subscription-reads": "11984", + "x-ms-request-id": "fcc19946-b6b1-4604-993e-9f238cb852fd", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071754Z:f04f5b58-56ed-4296-b198-d5c37b7eab0d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/53f206d1-6ae1-412b-9159-f44f0fd208b8", + "name": "53f206d1-6ae1-412b-9159-f44f0fd208b8", + "status": "Succeeded", + "startTime": "2022-08-03T07:17:52Z", + "endTime": "2022-08-03T07:17:53Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1887/providers/Microsoft.CognitiveServices/accounts/testAccount-1241?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-2cdc444a9f8fa641b1c627552710968b-16f3b3d58931ff4e-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "1d886cb2ebcd18a1a3fb1671f7bec5be", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1476", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:55 GMT", + "ETag": "\u00221c00c625-0000-0700-0000-62ea21200000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-correlation-request-id": "1be907ce-1e1c-426e-affb-21d116605c70", + "x-ms-ratelimit-remaining-subscription-reads": "11983", + "x-ms-request-id": "6de049ab-e4c4-4a8d-9d0e-b0d89127fe24", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071756Z:1be907ce-1e1c-426e-affb-21d116605c70" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1887/providers/Microsoft.CognitiveServices/accounts/testAccount-1241", + "name": "testAccount-1241", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00c625-0000-0700-0000-62ea21200000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "c1d9758e3906422da1e25d86c4f54ae7", + "dateCreated": "2022-08-03T07:17:52.4946063Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:52.3826918Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:52.3826918Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1887/providers/Microsoft.CognitiveServices/accounts/testAccount-1241?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-5e6c3130c20387488210e29d00501315-b2a5ba9745845a42-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "e36afd51510f517c79b524d0b79029f0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1476", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:17:56 GMT", + "ETag": "\u00221c00c625-0000-0700-0000-62ea21200000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-correlation-request-id": "f51a7a04-4566-45fc-a281-07adf5d16d08", + "x-ms-ratelimit-remaining-subscription-reads": "11982", + "x-ms-request-id": "85ca5f93-a4fd-4825-aed8-d342cff244a3", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071756Z:f51a7a04-4566-45fc-a281-07adf5d16d08" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1887/providers/Microsoft.CognitiveServices/accounts/testAccount-1241", + "name": "testAccount-1241", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00c625-0000-0700-0000-62ea21200000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "c1d9758e3906422da1e25d86c4f54ae7", + "dateCreated": "2022-08-03T07:17:52.4946063Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:17:52.3826918Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:17:52.3826918Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-1887/providers/Microsoft.CognitiveServices/accounts/testAccount-1241?api-version=2022-03-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-4b7aa2a013992e4dac818fa9160ae46b-6a5d185824f25141-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "f57e3607f067f17c0766f92abc0c0f53", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Wed, 03 Aug 2022 07:18:01 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "91", + "x-ms-correlation-request-id": "4a84bc52-9bab-4b80-b87f-46b4ef509824", + "x-ms-ratelimit-remaining-subscription-deletes": "14999", + "x-ms-request-id": "4a84bc52-9bab-4b80-b87f-46b4ef509824", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071801Z:4a84bc52-9bab-4b80-b87f-46b4ef509824" + }, + "ResponseBody": null + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com/", + "RandomSeed": "441620349", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountResourceTests/AccountResourceApiTests()Async.json b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountResourceTests/AccountResourceApiTests()Async.json new file mode 100644 index 000000000000..4921c2078d2c --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/AccountResourceTests/AccountResourceApiTests()Async.json @@ -0,0 +1,524 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-e8bd241d686a8e4d94e0996935a3d237-f4b1931247db9748-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "b836a1581487fa66bede952206a7ffc6", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "747", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:18:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "8b0b0e9e-b031-41dd-8db3-e01dc8059800", + "x-ms-ratelimit-remaining-subscription-reads": "11981", + "x-ms-request-id": "8b0b0e9e-b031-41dd-8db3-e01dc8059800", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071807Z:8b0b0e9e-b031-41dd-8db3-e01dc8059800" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "TagKey-9823": "TagValue-566", + "TagKey-3481": "TagValue-320", + "TagKey-4926": "TagValue-1187", + "TagKey-751": "TagValue-3921", + "TagKey-1866": "TagValue-8559", + "TagKey-3094": "TagValue-9190", + "TagKey-2449": "TagValue-9", + "TagKey-8379": "TagValue-164", + "TagKey-7470": "TagValue-2205", + "TagKey-4236": "TagValue-3698", + "TagKey-5316": "TagValue-2725" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": ".NET Mgmt SDK Test with TTL = 1 Day", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testRG-7110?api-version=2021-04-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "43", + "Content-Type": "application/json", + "traceparent": "00-68d93957c8345c40b916009fc3daace5-611fe9265c006848-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "189a8b534dd865f2ca8e229884e2e075", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "test": "env" + }, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "241", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:18:08 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "5b323bea-e1bc-4906-952c-5b87ccdfb495", + "x-ms-ratelimit-remaining-subscription-writes": "1189", + "x-ms-request-id": "5b323bea-e1bc-4906-952c-5b87ccdfb495", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071808Z:5b323bea-e1bc-4906-952c-5b87ccdfb495" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-7110", + "name": "testRG-7110", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "tags": { + "test": "env" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-7110/providers/Microsoft.CognitiveServices/accounts/testAccount-6271?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-0f667098cc700545b8804f0f512afcf9-229d6f78f668ba4a-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "8d63657c56eeae50821849a6d7451ebd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/227e3798-e0dd-4373-942f-ec3fde3704b3?api-version=2017-04-18", + "Cache-Control": "no-cache", + "Content-Length": "1475", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:18:10 GMT", + "ETag": "\u00221c00a82c-0000-0700-0000-62ea21320000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "261", + "x-ms-correlation-request-id": "7c266bb0-7c7c-48a8-a026-70280d3c4a2c", + "x-ms-ratelimit-remaining-subscription-writes": "1188", + "x-ms-request-id": "85e27c52-5696-40cd-80c5-b94643a691a4", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071811Z:7c266bb0-7c7c-48a8-a026-70280d3c4a2c" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-7110/providers/Microsoft.CognitiveServices/accounts/testAccount-6271", + "name": "testAccount-6271", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00a82c-0000-0700-0000-62ea21320000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "3058e9933ebe441b9d07cb83aaf57d1e", + "dateCreated": "2022-08-03T07:18:09.8982751Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Creating" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:18:09.7733987Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:18:09.7733987Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/227e3798-e0dd-4373-942f-ec3fde3704b3?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0f667098cc700545b8804f0f512afcf9-fd9d3abb9c71374b-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "992b91415f62fdc63beb95bf034c8d85", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "304", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:18:11 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "8", + "x-ms-correlation-request-id": "7ffbe97d-f054-4ec3-bcb5-d7a0d892d2b7", + "x-ms-ratelimit-remaining-subscription-reads": "11980", + "x-ms-request-id": "36671198-5f14-43c1-b88a-d32ed24cbda3", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071811Z:7ffbe97d-f054-4ec3-bcb5-d7a0d892d2b7" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/227e3798-e0dd-4373-942f-ec3fde3704b3", + "name": "227e3798-e0dd-4373-942f-ec3fde3704b3", + "status": "Succeeded", + "startTime": "2022-08-03T07:18:10Z", + "endTime": "2022-08-03T07:18:10Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-7110/providers/Microsoft.CognitiveServices/accounts/testAccount-6271?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0f667098cc700545b8804f0f512afcf9-7dbdf09d71869242-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "9109656fb6b33b019c7ac7cc0c77d75d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1476", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:18:11 GMT", + "ETag": "\u00221c00dd2c-0000-0700-0000-62ea21320000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-correlation-request-id": "9636fb70-b4a1-4dc2-a85b-7d191457f188", + "x-ms-ratelimit-remaining-subscription-reads": "11979", + "x-ms-request-id": "0e18678b-d4e3-4bd1-9121-9388cd33bbb7", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071811Z:9636fb70-b4a1-4dc2-a85b-7d191457f188" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-7110/providers/Microsoft.CognitiveServices/accounts/testAccount-6271", + "name": "testAccount-6271", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00dd2c-0000-0700-0000-62ea21320000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "3058e9933ebe441b9d07cb83aaf57d1e", + "dateCreated": "2022-08-03T07:18:09.8982751Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:18:09.7733987Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:18:09.7733987Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-7110/providers/Microsoft.CognitiveServices/accounts/testAccount-6271?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-2e42a25a82192348b1c88f51d9b48bf3-7cc2a06ef5544d42-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "456597be84192f5a2c31ef87aa08e579", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1476", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 07:18:11 GMT", + "ETag": "\u00221c00dd2c-0000-0700-0000-62ea21320000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "11", + "x-ms-correlation-request-id": "233973f6-a033-45c2-aced-850416ee3fe5", + "x-ms-ratelimit-remaining-subscription-reads": "11978", + "x-ms-request-id": "17393eec-5ca0-4488-bca8-9bf24bc5e0e9", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071812Z:233973f6-a033-45c2-aced-850416ee3fe5" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-7110/providers/Microsoft.CognitiveServices/accounts/testAccount-6271", + "name": "testAccount-6271", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00221c00dd2c-0000-0700-0000-62ea21320000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "3058e9933ebe441b9d07cb83aaf57d1e", + "dateCreated": "2022-08-03T07:18:09.8982751Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "createdByType": "Application", + "createdAt": "2022-08-03T07:18:09.7733987Z", + "lastModifiedBy": "a1fc368b-7f40-4802-8fa1-260d3a6ec34b", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T07:18:09.7733987Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-7110/providers/Microsoft.CognitiveServices/accounts/testAccount-6271?api-version=2022-03-01", + "RequestMethod": "DELETE", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-6a96a41dacd7e8438d83cba016e9fa14-1816d584ecb0384a-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220803.1 (.NET Framework 4.8.4510.0; Microsoft Windows 10.0.22000 )", + "x-ms-client-request-id": "7268c493c81b8bfe8feffde898faf0c3", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "0", + "Date": "Wed, 03 Aug 2022 07:18:15 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "213", + "x-ms-correlation-request-id": "bc05a1a5-a83d-476a-91c2-952dd736d99b", + "x-ms-ratelimit-remaining-subscription-deletes": "14998", + "x-ms-request-id": "bc05a1a5-a83d-476a-91c2-952dd736d99b", + "x-ms-routing-request-id": "SOUTHEASTASIA:20220803T071816Z:bc05a1a5-a83d-476a-91c2-952dd736d99b" + }, + "ResponseBody": null + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com/", + "RandomSeed": "1205512108", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionCollectionTests/CognitiveServicesPrivateEndpointConnectionCollectionApiTests().json b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionCollectionTests/CognitiveServicesPrivateEndpointConnectionCollectionApiTests().json new file mode 100644 index 000000000000..bf675ccb9539 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionCollectionTests/CognitiveServicesPrivateEndpointConnectionCollectionApiTests().json @@ -0,0 +1,485 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-b233e73a2e051d4989db20dcebca6547-bbfe4b58ebc8634d-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "0f5721a173f62e361ed9c2a441153268", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "747", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:03:46 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "157d3983-a585-4645-bc11-54f624323d90", + "x-ms-ratelimit-remaining-subscription-reads": "11999", + "x-ms-request-id": "157d3983-a585-4645-bc11-54f624323d90", + "x-ms-routing-request-id": "JAPANEAST:20220803T160347Z:157d3983-a585-4645-bc11-54f624323d90" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "TagKey-9823": "TagValue-566", + "TagKey-3481": "TagValue-320", + "TagKey-4926": "TagValue-1187", + "TagKey-751": "TagValue-3921", + "TagKey-1866": "TagValue-8559", + "TagKey-3094": "TagValue-9190", + "TagKey-2449": "TagValue-9", + "TagKey-8379": "TagValue-164", + "TagKey-7470": "TagValue-2205", + "TagKey-4236": "TagValue-3698", + "TagKey-5316": "TagValue-2725" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": ".NET Mgmt SDK Test with TTL = 1 Day", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testRG-6170?api-version=2021-04-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "43", + "Content-Type": "application/json", + "traceparent": "00-c5e5d255ab7fe843a3e5849c137a6283-733fafccb199904d-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "25ca0e4932fa4472b95430e97a27fa3c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "test": "env" + }, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "241", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:03:49 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "84c88c33-c182-4f07-a583-7bff94a318a7", + "x-ms-ratelimit-remaining-subscription-writes": "1199", + "x-ms-request-id": "84c88c33-c182-4f07-a583-7bff94a318a7", + "x-ms-routing-request-id": "JAPANEAST:20220803T160350Z:84c88c33-c182-4f07-a583-7bff94a318a7" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6170", + "name": "testRG-6170", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "tags": { + "test": "env" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6170/providers/Microsoft.CognitiveServices/accounts/testAccount-2586?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-7d53c298cd98444f9fd7c2106bdd897a-320a496ae8ff2748-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220804.1 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "3a23ecd12ef4c52a188dd2396364da33", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/539ad59c-8a50-4a1f-944e-39c9e1f4e8c6?api-version=2017-04-18", + "Cache-Control": "no-cache", + "Content-Length": "1475", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:03:52 GMT", + "ETag": "\u00224900809f-0000-0700-0000-62ea9c690000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "325", + "x-ms-correlation-request-id": "2b0fcb54-c4c4-4f45-99a5-72af17f6b943", + "x-ms-ratelimit-remaining-subscription-writes": "1198", + "x-ms-request-id": "b2745fef-d5fb-4912-9f3b-75003069e140", + "x-ms-routing-request-id": "JAPANEAST:20220803T160353Z:2b0fcb54-c4c4-4f45-99a5-72af17f6b943" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6170/providers/Microsoft.CognitiveServices/accounts/testAccount-2586", + "name": "testAccount-2586", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00224900809f-0000-0700-0000-62ea9c690000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "17173304f5c44cd89048a5f9745c06e9", + "dateCreated": "2022-08-03T16:03:52.8726152Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Creating" + }, + "systemData": { + "createdBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "createdByType": "Application", + "createdAt": "2022-08-03T16:03:52.7744592Z", + "lastModifiedBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T16:03:52.7744592Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/539ad59c-8a50-4a1f-944e-39c9e1f4e8c6?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7d53c298cd98444f9fd7c2106bdd897a-daa1d016f9227a47-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "4643d4671e45df55a05fe2a49f0a55f0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "270", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:03:53 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "50", + "x-ms-correlation-request-id": "c275a92d-9ffe-4f9b-85c7-e876bc262a05", + "x-ms-ratelimit-remaining-subscription-reads": "11998", + "x-ms-request-id": "e9e15d82-91ce-41bb-a07a-7add9376a887", + "x-ms-routing-request-id": "JAPANEAST:20220803T160354Z:c275a92d-9ffe-4f9b-85c7-e876bc262a05" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/539ad59c-8a50-4a1f-944e-39c9e1f4e8c6", + "name": "539ad59c-8a50-4a1f-944e-39c9e1f4e8c6", + "status": "Creating", + "startTime": "2022-08-03T16:03:53Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/539ad59c-8a50-4a1f-944e-39c9e1f4e8c6?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7d53c298cd98444f9fd7c2106bdd897a-c85d2d4903daf141-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "c576b556a2b32b83fc3e6eb710248074", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "270", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:03:54 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "41", + "x-ms-correlation-request-id": "dc8772c3-151a-497b-abb8-9a84f64bbd8d", + "x-ms-ratelimit-remaining-subscription-reads": "11997", + "x-ms-request-id": "d8471611-0513-4dd3-990d-732375cbe6be", + "x-ms-routing-request-id": "JAPANEAST:20220803T160355Z:dc8772c3-151a-497b-abb8-9a84f64bbd8d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/539ad59c-8a50-4a1f-944e-39c9e1f4e8c6", + "name": "539ad59c-8a50-4a1f-944e-39c9e1f4e8c6", + "status": "Creating", + "startTime": "2022-08-03T16:03:53Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/539ad59c-8a50-4a1f-944e-39c9e1f4e8c6?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7d53c298cd98444f9fd7c2106bdd897a-166fa9d4c743894e-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "8ed20adb9321e5ee0b67fa89c34a45c0", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "304", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:03:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "45", + "x-ms-correlation-request-id": "35f20fe9-77ad-4ded-b2aa-dac3dc03eb7b", + "x-ms-ratelimit-remaining-subscription-reads": "11996", + "x-ms-request-id": "dcbb3caf-3f41-4613-9c51-6c8b37c5083b", + "x-ms-routing-request-id": "JAPANEAST:20220803T160356Z:35f20fe9-77ad-4ded-b2aa-dac3dc03eb7b" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/539ad59c-8a50-4a1f-944e-39c9e1f4e8c6", + "name": "539ad59c-8a50-4a1f-944e-39c9e1f4e8c6", + "status": "Succeeded", + "startTime": "2022-08-03T16:03:53Z", + "endTime": "2022-08-03T16:03:55Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6170/providers/Microsoft.CognitiveServices/accounts/testAccount-2586?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-7d53c298cd98444f9fd7c2106bdd897a-4805b65d9e384440-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "8fb02ee6ec2cc51351184907af9ecf7b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1476", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:03:56 GMT", + "ETag": "\u0022490048a0-0000-0700-0000-62ea9c6b0000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-correlation-request-id": "267b1d01-8379-473f-8cc4-63eda95548d1", + "x-ms-ratelimit-remaining-subscription-reads": "11995", + "x-ms-request-id": "d13e1fa8-c98a-490c-be60-a116c2868e93", + "x-ms-routing-request-id": "JAPANEAST:20220803T160357Z:267b1d01-8379-473f-8cc4-63eda95548d1" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6170/providers/Microsoft.CognitiveServices/accounts/testAccount-2586", + "name": "testAccount-2586", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u0022490048a0-0000-0700-0000-62ea9c6b0000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "17173304f5c44cd89048a5f9745c06e9", + "dateCreated": "2022-08-03T16:03:52.8726152Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "createdByType": "Application", + "createdAt": "2022-08-03T16:03:52.7744592Z", + "lastModifiedBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T16:03:52.7744592Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6170/providers/Microsoft.CognitiveServices/accounts/testAccount-2586/privateEndpointConnections?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-162db8b426ddf74b8ad391c9a7b1fd30-b27c42059a57ed4e-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220804.1 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "94c96ddfc638c2cfc691b94ba8fa67b2", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:03:56 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "13", + "x-ms-correlation-request-id": "d4ca707e-92c8-4f29-8e06-5f6ea5d479a8", + "x-ms-ratelimit-remaining-subscription-reads": "11994", + "x-ms-request-id": "027db1e6-f90a-42aa-b98b-c996e413da0b", + "x-ms-routing-request-id": "JAPANEAST:20220803T160357Z:d4ca707e-92c8-4f29-8e06-5f6ea5d479a8" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "164108534", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionCollectionTests/CognitiveServicesPrivateEndpointConnectionCollectionApiTests()Async.json b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionCollectionTests/CognitiveServicesPrivateEndpointConnectionCollectionApiTests()Async.json new file mode 100644 index 000000000000..8483333fa819 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionCollectionTests/CognitiveServicesPrivateEndpointConnectionCollectionApiTests()Async.json @@ -0,0 +1,450 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-d379f9d644268747ae549ade0eefc22d-ab8b3d46116b344a-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "65fcaa1e616e766c92ad5a191d83dbaf", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "747", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:01 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2eb06cd1-b1a8-484f-9e14-5526377076e6", + "x-ms-ratelimit-remaining-subscription-reads": "11993", + "x-ms-request-id": "2eb06cd1-b1a8-484f-9e14-5526377076e6", + "x-ms-routing-request-id": "JAPANEAST:20220803T160402Z:2eb06cd1-b1a8-484f-9e14-5526377076e6" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "TagKey-9823": "TagValue-566", + "TagKey-3481": "TagValue-320", + "TagKey-4926": "TagValue-1187", + "TagKey-751": "TagValue-3921", + "TagKey-1866": "TagValue-8559", + "TagKey-3094": "TagValue-9190", + "TagKey-2449": "TagValue-9", + "TagKey-8379": "TagValue-164", + "TagKey-7470": "TagValue-2205", + "TagKey-4236": "TagValue-3698", + "TagKey-5316": "TagValue-2725" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": ".NET Mgmt SDK Test with TTL = 1 Day", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testRG-2042?api-version=2021-04-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "43", + "Content-Type": "application/json", + "traceparent": "00-38a7055c2be6f541aecc2e09a85203ae-7b8e58cbc4783446-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "c058ae47aeb3bfaf2875e1e386a2d4c4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "test": "env" + }, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "241", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:02 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "1f8c0e32-b152-473f-aaa7-527dccb3fd6d", + "x-ms-ratelimit-remaining-subscription-writes": "1197", + "x-ms-request-id": "1f8c0e32-b152-473f-aaa7-527dccb3fd6d", + "x-ms-routing-request-id": "JAPANEAST:20220803T160403Z:1f8c0e32-b152-473f-aaa7-527dccb3fd6d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-2042", + "name": "testRG-2042", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "tags": { + "test": "env" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-2042/providers/Microsoft.CognitiveServices/accounts/testAccount-654?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-a697f02601bb2d45ae035624aed68afd-91060cb12df23942-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220804.1 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "60ab999282e664f7f44815b5c56bb8cc", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/5a0b60db-1786-4573-ba5c-59bc78f7b670?api-version=2017-04-18", + "Cache-Control": "no-cache", + "Content-Length": "1472", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:04 GMT", + "ETag": "\u0022490097a3-0000-0700-0000-62ea9c750000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "362", + "x-ms-correlation-request-id": "39708799-6085-4c06-b265-dee572d6a1bd", + "x-ms-ratelimit-remaining-subscription-writes": "1196", + "x-ms-request-id": "75ae789b-49e2-4325-b5d4-ea9f51693e2b", + "x-ms-routing-request-id": "JAPANEAST:20220803T160405Z:39708799-6085-4c06-b265-dee572d6a1bd" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-2042/providers/Microsoft.CognitiveServices/accounts/testAccount-654", + "name": "testAccount-654", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u0022490097a3-0000-0700-0000-62ea9c750000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "bc9a9c6e6c7543ca9b56a6ec8caae018", + "dateCreated": "2022-08-03T16:04:04.891187Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Creating" + }, + "systemData": { + "createdBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "createdByType": "Application", + "createdAt": "2022-08-03T16:04:04.7990145Z", + "lastModifiedBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T16:04:04.7990145Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/5a0b60db-1786-4573-ba5c-59bc78f7b670?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a697f02601bb2d45ae035624aed68afd-e37a3eda4a705843-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "42f1a85503042b60615cbf659a096209", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "270", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:05 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "45", + "x-ms-correlation-request-id": "79d3da8a-c36e-44e6-bcf2-a07154be9ac4", + "x-ms-ratelimit-remaining-subscription-reads": "11992", + "x-ms-request-id": "165629eb-261d-4bd7-bc5d-9ee1d84690ba", + "x-ms-routing-request-id": "JAPANEAST:20220803T160406Z:79d3da8a-c36e-44e6-bcf2-a07154be9ac4" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/5a0b60db-1786-4573-ba5c-59bc78f7b670", + "name": "5a0b60db-1786-4573-ba5c-59bc78f7b670", + "status": "Creating", + "startTime": "2022-08-03T16:04:05Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/5a0b60db-1786-4573-ba5c-59bc78f7b670?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a697f02601bb2d45ae035624aed68afd-9bfbeeb0118ef242-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "10741628ae0a27619d5eb9a0966cd1e8", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "304", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:06 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "50", + "x-ms-correlation-request-id": "8f4ee87d-0008-485d-b630-c0d7761d3436", + "x-ms-ratelimit-remaining-subscription-reads": "11991", + "x-ms-request-id": "96b3a9b3-dd1a-40f2-b370-7af9a0a16b6a", + "x-ms-routing-request-id": "JAPANEAST:20220803T160407Z:8f4ee87d-0008-485d-b630-c0d7761d3436" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/5a0b60db-1786-4573-ba5c-59bc78f7b670", + "name": "5a0b60db-1786-4573-ba5c-59bc78f7b670", + "status": "Succeeded", + "startTime": "2022-08-03T16:04:05Z", + "endTime": "2022-08-03T16:04:06Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-2042/providers/Microsoft.CognitiveServices/accounts/testAccount-654?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-a697f02601bb2d45ae035624aed68afd-c9bfdf765f0a6e48-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "1c608f3e767a0fc8319db4b7ab96b29d", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1473", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:06 GMT", + "ETag": "\u00224900d8a3-0000-0700-0000-62ea9c760000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "16", + "x-ms-correlation-request-id": "7ac3a89e-5a72-403a-9577-f9fbda2554db", + "x-ms-ratelimit-remaining-subscription-reads": "11990", + "x-ms-request-id": "f72f113a-266c-4a87-ab33-a51c93a2f037", + "x-ms-routing-request-id": "JAPANEAST:20220803T160407Z:7ac3a89e-5a72-403a-9577-f9fbda2554db" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-2042/providers/Microsoft.CognitiveServices/accounts/testAccount-654", + "name": "testAccount-654", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00224900d8a3-0000-0700-0000-62ea9c760000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "bc9a9c6e6c7543ca9b56a6ec8caae018", + "dateCreated": "2022-08-03T16:04:04.891187Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "createdByType": "Application", + "createdAt": "2022-08-03T16:04:04.7990145Z", + "lastModifiedBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T16:04:04.7990145Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-2042/providers/Microsoft.CognitiveServices/accounts/testAccount-654/privateEndpointConnections?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-56ca2bdde1027c41b10bb64d25d2c8a6-d24d3d8a43ab2b4b-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220804.1 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "7c62e2e3f997a67a47c9a5a649c095f4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:07 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "14", + "x-ms-correlation-request-id": "0594fa6b-192a-48f7-bd0c-9a1e76c4d29f", + "x-ms-ratelimit-remaining-subscription-reads": "11989", + "x-ms-request-id": "04203d16-97f7-4173-810e-4d7f5f71ab29", + "x-ms-routing-request-id": "JAPANEAST:20220803T160408Z:0594fa6b-192a-48f7-bd0c-9a1e76c4d29f" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "1389925706", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionResourceTests/CognitiveServicesPrivateEndpointConnectionResourceApiTests().json b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionResourceTests/CognitiveServicesPrivateEndpointConnectionResourceApiTests().json new file mode 100644 index 000000000000..778c84beeb35 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionResourceTests/CognitiveServicesPrivateEndpointConnectionResourceApiTests().json @@ -0,0 +1,450 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-5782e6d139bee9439d870ca985154c48-7d8cacccd03b384a-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "7bfab27bb324707abe6b2b5329a3e7ee", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "747", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:11 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "e6ddc768-732d-4916-9a21-390ecce12b3e", + "x-ms-ratelimit-remaining-subscription-reads": "11988", + "x-ms-request-id": "e6ddc768-732d-4916-9a21-390ecce12b3e", + "x-ms-routing-request-id": "JAPANEAST:20220803T160411Z:e6ddc768-732d-4916-9a21-390ecce12b3e" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "TagKey-9823": "TagValue-566", + "TagKey-3481": "TagValue-320", + "TagKey-4926": "TagValue-1187", + "TagKey-751": "TagValue-3921", + "TagKey-1866": "TagValue-8559", + "TagKey-3094": "TagValue-9190", + "TagKey-2449": "TagValue-9", + "TagKey-8379": "TagValue-164", + "TagKey-7470": "TagValue-2205", + "TagKey-4236": "TagValue-3698", + "TagKey-5316": "TagValue-2725" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": ".NET Mgmt SDK Test with TTL = 1 Day", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testRG-612?api-version=2021-04-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "43", + "Content-Type": "application/json", + "traceparent": "00-d1cf387baa4612449da371789504dd5d-bec2b8e0f218c04c-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "a51311a36b2943d8f20c4abe805a9720", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "test": "env" + }, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "239", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:12 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "2179bbcf-86b3-4bd5-a92b-9d5a0ee6c823", + "x-ms-ratelimit-remaining-subscription-writes": "1195", + "x-ms-request-id": "2179bbcf-86b3-4bd5-a92b-9d5a0ee6c823", + "x-ms-routing-request-id": "JAPANEAST:20220803T160412Z:2179bbcf-86b3-4bd5-a92b-9d5a0ee6c823" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-612", + "name": "testRG-612", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "tags": { + "test": "env" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-612/providers/Microsoft.CognitiveServices/accounts/testAccount-1751?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-0a8569c94607154e8bcb9c6834685a4c-34ab775837196b4c-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220804.1 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "74bb56f750dfaa23ac66e49b193b4a92", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/3b38e315-ed9a-4cdc-a8ff-f67426a4c7be?api-version=2017-04-18", + "Cache-Control": "no-cache", + "Content-Length": "1474", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:14 GMT", + "ETag": "\u0022490058a6-0000-0700-0000-62ea9c7e0000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "331", + "x-ms-correlation-request-id": "136b43c2-ba98-4404-921d-916f5dfc1d0c", + "x-ms-ratelimit-remaining-subscription-writes": "1194", + "x-ms-request-id": "01dd0ab1-77df-4dac-8e7b-56ee0f6ae73c", + "x-ms-routing-request-id": "JAPANEAST:20220803T160414Z:136b43c2-ba98-4404-921d-916f5dfc1d0c" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-612/providers/Microsoft.CognitiveServices/accounts/testAccount-1751", + "name": "testAccount-1751", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u0022490058a6-0000-0700-0000-62ea9c7e0000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "94769b2d0c1941bea23554246bbcdd64", + "dateCreated": "2022-08-03T16:04:13.8477594Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Creating" + }, + "systemData": { + "createdBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "createdByType": "Application", + "createdAt": "2022-08-03T16:04:13.7593693Z", + "lastModifiedBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T16:04:13.7593693Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/3b38e315-ed9a-4cdc-a8ff-f67426a4c7be?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0a8569c94607154e8bcb9c6834685a4c-5e2f5cc7f601e449-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "90acd432ab32c1c3f0fb7c05f4a7d8d1", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "270", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:15 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "7", + "x-ms-correlation-request-id": "95f15778-da3f-419e-a28a-707a2ea686db", + "x-ms-ratelimit-remaining-subscription-reads": "11987", + "x-ms-request-id": "cf7689ee-a9b7-40da-a08e-5b728b5a6f9b", + "x-ms-routing-request-id": "JAPANEAST:20220803T160415Z:95f15778-da3f-419e-a28a-707a2ea686db" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/3b38e315-ed9a-4cdc-a8ff-f67426a4c7be", + "name": "3b38e315-ed9a-4cdc-a8ff-f67426a4c7be", + "status": "Creating", + "startTime": "2022-08-03T16:04:14Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/3b38e315-ed9a-4cdc-a8ff-f67426a4c7be?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0a8569c94607154e8bcb9c6834685a4c-12ab94528c426c40-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "ed432cffb032a48510993bada9f2f96e", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "304", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:16 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "40", + "x-ms-correlation-request-id": "79b3fd5e-9a21-4fc8-9e86-c389222af2e8", + "x-ms-ratelimit-remaining-subscription-reads": "11986", + "x-ms-request-id": "46d27eb3-5d79-47a8-8820-202102f4d12d", + "x-ms-routing-request-id": "JAPANEAST:20220803T160416Z:79b3fd5e-9a21-4fc8-9e86-c389222af2e8" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/3b38e315-ed9a-4cdc-a8ff-f67426a4c7be", + "name": "3b38e315-ed9a-4cdc-a8ff-f67426a4c7be", + "status": "Succeeded", + "startTime": "2022-08-03T16:04:14Z", + "endTime": "2022-08-03T16:04:15Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-612/providers/Microsoft.CognitiveServices/accounts/testAccount-1751?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-0a8569c94607154e8bcb9c6834685a4c-29658169bd0be646-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "45685056ba8f9160aaa27fd4d5412e91", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1475", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:16 GMT", + "ETag": "\u00224900f7a6-0000-0700-0000-62ea9c7f0000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "9", + "x-ms-correlation-request-id": "c0cd823c-51c8-4dbc-8df9-4c405dfc3c8d", + "x-ms-ratelimit-remaining-subscription-reads": "11985", + "x-ms-request-id": "9d258941-8925-4f2d-a346-ed7d6d414a89", + "x-ms-routing-request-id": "JAPANEAST:20220803T160416Z:c0cd823c-51c8-4dbc-8df9-4c405dfc3c8d" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-612/providers/Microsoft.CognitiveServices/accounts/testAccount-1751", + "name": "testAccount-1751", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u00224900f7a6-0000-0700-0000-62ea9c7f0000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "94769b2d0c1941bea23554246bbcdd64", + "dateCreated": "2022-08-03T16:04:13.8477594Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "createdByType": "Application", + "createdAt": "2022-08-03T16:04:13.7593693Z", + "lastModifiedBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T16:04:13.7593693Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-612/providers/Microsoft.CognitiveServices/accounts/testAccount-1751/privateEndpointConnections?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-4a32cd19b0f1a449ad81f9ae55a5215b-bdba6b0cc7924249-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220804.1 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "8531d55923fb82614e078098701518fd", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:17 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "114", + "x-ms-correlation-request-id": "8d948ff5-77de-4502-95d6-0695155291cd", + "x-ms-ratelimit-remaining-subscription-reads": "11984", + "x-ms-request-id": "80d5273f-4051-4190-b764-04db0b4f2e61", + "x-ms-routing-request-id": "JAPANEAST:20220803T160417Z:8d948ff5-77de-4502-95d6-0695155291cd" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "273228952", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionResourceTests/CognitiveServicesPrivateEndpointConnectionResourceApiTests()Async.json b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionResourceTests/CognitiveServicesPrivateEndpointConnectionResourceApiTests()Async.json new file mode 100644 index 000000000000..6a88258f6329 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/SessionRecords/CognitiveServicesPrivateEndpointConnectionResourceTests/CognitiveServicesPrivateEndpointConnectionResourceApiTests()Async.json @@ -0,0 +1,450 @@ +{ + "Entries": [ + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c?api-version=2021-01-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-6afad3129bf87c448ffc65338dbd771f-f75ba48918b8ef4b-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "ff09870781dcadd4c58cccffb6ac156c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "747", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:19 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "80eefc19-1864-4b16-ab80-352ff95be724", + "x-ms-ratelimit-remaining-subscription-reads": "11983", + "x-ms-request-id": "80eefc19-1864-4b16-ab80-352ff95be724", + "x-ms-routing-request-id": "JAPANEAST:20220803T160419Z:80eefc19-1864-4b16-ab80-352ff95be724" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "authorizationSource": "RoleBased", + "managedByTenants": [], + "tags": { + "TagKey-9823": "TagValue-566", + "TagKey-3481": "TagValue-320", + "TagKey-4926": "TagValue-1187", + "TagKey-751": "TagValue-3921", + "TagKey-1866": "TagValue-8559", + "TagKey-3094": "TagValue-9190", + "TagKey-2449": "TagValue-9", + "TagKey-8379": "TagValue-164", + "TagKey-7470": "TagValue-2205", + "TagKey-4236": "TagValue-3698", + "TagKey-5316": "TagValue-2725" + }, + "subscriptionId": "db1ab6f0-4769-4b27-930e-01e2ef9c123c", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "displayName": ".NET Mgmt SDK Test with TTL = 1 Day", + "state": "Enabled", + "subscriptionPolicies": { + "locationPlacementId": "Internal_2014-09-01", + "quotaId": "Internal_2014-09-01", + "spendingLimit": "Off" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourcegroups/testRG-6272?api-version=2021-04-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "43", + "Content-Type": "application/json", + "traceparent": "00-5318fd5be8759947934b0613ac505aa0-0fbd861bf33e7a43-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "dc5221fa6e4aaa0e9238e4c228aa267b", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "tags": { + "test": "env" + }, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "241", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:20 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-ms-correlation-request-id": "0d338ebd-1854-40b9-b789-4c3a549f867a", + "x-ms-ratelimit-remaining-subscription-writes": "1193", + "x-ms-request-id": "0d338ebd-1854-40b9-b789-4c3a549f867a", + "x-ms-routing-request-id": "JAPANEAST:20220803T160420Z:0d338ebd-1854-40b9-b789-4c3a549f867a" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6272", + "name": "testRG-6272", + "type": "Microsoft.Resources/resourceGroups", + "location": "westus", + "tags": { + "test": "env" + }, + "properties": { + "provisioningState": "Succeeded" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6272/providers/Microsoft.CognitiveServices/accounts/testAccount-829?api-version=2022-03-01", + "RequestMethod": "PUT", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "Content-Length": "81", + "Content-Type": "application/json", + "traceparent": "00-9bc3a453011b5d47a5e7a1f699d3befb-7fddda878b68564a-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220804.1 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "1122bd7121c17892ce61f358e7d56db4", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": { + "kind": "Face", + "sku": { + "name": "S0" + }, + "properties": {}, + "tags": {}, + "location": "westus" + }, + "StatusCode": 201, + "ResponseHeaders": { + "azure-asyncoperation": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/a024ba33-17e7-4087-a058-0d6ca6d68803?api-version=2017-04-18", + "Cache-Control": "no-cache", + "Content-Length": "1473", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:22 GMT", + "ETag": "\u0022490021a9-0000-0700-0000-62ea9c850000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "231", + "x-ms-correlation-request-id": "ee034763-478f-4fef-ad76-7d4ecea2cabc", + "x-ms-ratelimit-remaining-subscription-writes": "1192", + "x-ms-request-id": "d154eaa7-52d0-489c-bd89-f2f7302fe2c4", + "x-ms-routing-request-id": "JAPANEAST:20220803T160422Z:ee034763-478f-4fef-ad76-7d4ecea2cabc" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6272/providers/Microsoft.CognitiveServices/accounts/testAccount-829", + "name": "testAccount-829", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u0022490021a9-0000-0700-0000-62ea9c850000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "7263f6b14b814a2e8c5db949f840286d", + "dateCreated": "2022-08-03T16:04:21.7689239Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Creating" + }, + "systemData": { + "createdBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "createdByType": "Application", + "createdAt": "2022-08-03T16:04:21.6871591Z", + "lastModifiedBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T16:04:21.6871591Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/a024ba33-17e7-4087-a058-0d6ca6d68803?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9bc3a453011b5d47a5e7a1f699d3befb-2506fe79db3b1244-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "583a7f83ac4aff38c0647b0c1b51ab63", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "270", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:22 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "6", + "x-ms-correlation-request-id": "984dccd0-b30d-41f1-b10e-5206a6ba263a", + "x-ms-ratelimit-remaining-subscription-reads": "11982", + "x-ms-request-id": "4f2486dc-7e05-4d83-a16f-5043306c8f32", + "x-ms-routing-request-id": "JAPANEAST:20220803T160422Z:984dccd0-b30d-41f1-b10e-5206a6ba263a" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/a024ba33-17e7-4087-a058-0d6ca6d68803", + "name": "a024ba33-17e7-4087-a058-0d6ca6d68803", + "status": "Creating", + "startTime": "2022-08-03T16:04:21Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/a024ba33-17e7-4087-a058-0d6ca6d68803?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9bc3a453011b5d47a5e7a1f699d3befb-6ca521d41360c747-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "d30f0d774552b555a327bc77d8a38d31", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "304", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "116", + "x-ms-correlation-request-id": "0de18970-1f94-4249-b801-e4850389dc97", + "x-ms-ratelimit-remaining-subscription-reads": "11981", + "x-ms-request-id": "c727f311-1f85-4d26-a5b7-eb9f09936e49", + "x-ms-routing-request-id": "JAPANEAST:20220803T160424Z:0de18970-1f94-4249-b801-e4850389dc97" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/providers/Microsoft.CognitiveServices/locations/westus/operationResults/a024ba33-17e7-4087-a058-0d6ca6d68803", + "name": "a024ba33-17e7-4087-a058-0d6ca6d68803", + "status": "Succeeded", + "startTime": "2022-08-03T16:04:21Z", + "endTime": "2022-08-03T16:04:23Z" + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6272/providers/Microsoft.CognitiveServices/accounts/testAccount-829?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Authorization": "Sanitized", + "traceparent": "00-9bc3a453011b5d47a5e7a1f699d3befb-3ef4bc58dd9cbd49-00", + "User-Agent": "azsdk-net-ResourceManager/1.2.0 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "68d44e7f159b6c6a9ed4757d400ddf03", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "1474", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:24 GMT", + "ETag": "\u0022490074a9-0000-0700-0000-62ea9c870000\u0022", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "10", + "x-ms-correlation-request-id": "bcba7188-78ac-4741-a07c-b1bf6fba332a", + "x-ms-ratelimit-remaining-subscription-reads": "11980", + "x-ms-request-id": "b6be4b3b-0715-4a26-ac9e-55d7e12b38f8", + "x-ms-routing-request-id": "JAPANEAST:20220803T160424Z:bcba7188-78ac-4741-a07c-b1bf6fba332a" + }, + "ResponseBody": { + "id": "/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6272/providers/Microsoft.CognitiveServices/accounts/testAccount-829", + "name": "testAccount-829", + "type": "Microsoft.CognitiveServices/accounts", + "etag": "\u0022490074a9-0000-0700-0000-62ea9c870000\u0022", + "location": "westus", + "sku": { + "name": "S0" + }, + "kind": "Face", + "tags": {}, + "properties": { + "endpoint": "https://westus.api.cognitive.microsoft.com/", + "internalId": "7263f6b14b814a2e8c5db949f840286d", + "dateCreated": "2022-08-03T16:04:21.7689239Z", + "callRateLimit": { + "rules": [ + { + "key": "face", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "face/*", + "method": "*" + } + ] + }, + { + "key": "container.billing", + "renewalPeriod": 10, + "count": 500, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "billing/*", + "method": "*" + } + ] + }, + { + "key": "default", + "renewalPeriod": 1, + "count": 10, + "dynamicThrottlingEnabled": false, + "matchPatterns": [ + { + "path": "*", + "method": "*" + } + ] + } + ] + }, + "isMigrated": false, + "privateEndpointConnections": [], + "publicNetworkAccess": "Enabled", + "capabilities": [ + { + "name": "VirtualNetworks" + }, + { + "name": "Container", + "value": "Face.*,Face.Face" + } + ], + "endpoints": { + "Face": "https://westus.api.cognitive.microsoft.com/" + }, + "provisioningState": "Succeeded" + }, + "systemData": { + "createdBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "createdByType": "Application", + "createdAt": "2022-08-03T16:04:21.6871591Z", + "lastModifiedBy": "8e6d47e0-7969-4fde-a62c-4fea4f165e98", + "lastModifiedByType": "Application", + "lastModifiedAt": "2022-08-03T16:04:21.6871591Z" + } + } + }, + { + "RequestUri": "https://management.azure.com/subscriptions/db1ab6f0-4769-4b27-930e-01e2ef9c123c/resourceGroups/testRG-6272/providers/Microsoft.CognitiveServices/accounts/testAccount-829/privateEndpointConnections?api-version=2022-03-01", + "RequestMethod": "GET", + "RequestHeaders": { + "Accept": "application/json", + "Authorization": "Sanitized", + "traceparent": "00-ea2514d4afb61b4b8710c6a0ecf4de2b-7c23c31f98b25540-00", + "User-Agent": "azsdk-net-ResourceManager.CognitiveServices/1.0.0-alpha.20220804.1 (.NET Core 3.1.27; Microsoft Windows 10.0.22000)", + "x-ms-client-request-id": "dc77e59e0f8d3e522a84b523f0c1261c", + "x-ms-return-client-request-id": "true" + }, + "RequestBody": null, + "StatusCode": 200, + "ResponseHeaders": { + "Cache-Control": "no-cache", + "Content-Length": "12", + "Content-Type": "application/json; charset=utf-8", + "Date": "Wed, 03 Aug 2022 16:04:24 GMT", + "Expires": "-1", + "Pragma": "no-cache", + "Server": "istio-envoy", + "Strict-Transport-Security": "max-age=31536000; includeSubDomains", + "X-Content-Type-Options": "nosniff", + "x-envoy-upstream-service-time": "12", + "x-ms-correlation-request-id": "51702cdc-dfc8-48d9-b107-80b443ba63c3", + "x-ms-ratelimit-remaining-subscription-reads": "11979", + "x-ms-request-id": "f640026a-743a-4479-9c7a-4447e70837b6", + "x-ms-routing-request-id": "JAPANEAST:20220803T160424Z:51702cdc-dfc8-48d9-b107-80b443ba63c3" + }, + "ResponseBody": { + "value": [] + } + } + ], + "Variables": { + "AZURE_AUTHORITY_HOST": "https://login.microsoftonline.com", + "RandomSeed": "1323280296", + "RESOURCE_MANAGER_URL": null, + "SUBSCRIPTION_ID": "db1ab6f0-4769-4b27-930e-01e2ef9c123c" + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/AccountCollectionTests.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/AccountCollectionTests.cs new file mode 100644 index 000000000000..ec048d594899 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/AccountCollectionTests.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.CognitiveServices.Tests.Helpers; +using Azure.ResourceManager.CognitiveServices.Models; +using NUnit.Framework; +using System.Linq; +using Azure.Core; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.CognitiveServices.Tests +{ + public class AccountCollectionTests : CognitiveServicesManagementTestBase + { + public AccountCollectionTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + private async Task GetAccountCollectionAsync() + { + var resourceGroup = await CreateResourceGroupAsync(); + return resourceGroup.GetCognitiveServicesAccounts(); + } + + [TestCase] + public async Task AccountCollectionApiTests() + { + //1.CreateOrUpdate + var container = await GetAccountCollectionAsync(); + var name = Recording.GenerateAssetName("Account-"); + var input = ResourceDataHelper.GetBasicAccountData(DefaultLocation); + var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + CognitiveServicesAccountResource account1 = lro.Value; + Assert.AreEqual(name, account1.Data.Name); + //2.Get + CognitiveServicesAccountResource account2 = await container.GetAsync(name); + ResourceDataHelper.AssertAccount(account1.Data, account2.Data); + //3.GetAll + _ = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + _ = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + int count = 0; + await foreach (var account in container.GetAllAsync()) + { + count++; + } + Assert.GreaterOrEqual(count, 1); + //4Exists + Assert.IsTrue(await container.ExistsAsync(name)); + Assert.IsFalse(await container.ExistsAsync(name + "1")); + + Assert.ThrowsAsync(async () => _ = await container.ExistsAsync(null)); + } + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/AccountResourceTests.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/AccountResourceTests.cs new file mode 100644 index 000000000000..81f2007a2d0a --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/AccountResourceTests.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.CognitiveServices.Tests.Helpers; +using NUnit.Framework; + +namespace Azure.ResourceManager.CognitiveServices.Tests +{ + public class AccountResourceTests : CognitiveServicesManagementTestBase + { + public AccountResourceTests(bool Async) + : base(Async)//, RecordedTestMode.Record) + { + } + private async Task CreateAccountResourceAsync(string accountName) + { + var container = (await CreateResourceGroupAsync()).GetCognitiveServicesAccounts(); + var input = ResourceDataHelper.GetBasicAccountData(DefaultLocation); + var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, accountName, input); + return lro.Value; + } + + [TestCase] + public async Task AccountResourceApiTests() + { + //1.Get + var accountName = Recording.GenerateAssetName("testAccount-"); + var account1 = await CreateAccountResourceAsync(accountName); + CognitiveServicesAccountResource account2 = await account1.GetAsync(); + + ResourceDataHelper.AssertAccount(account1.Data, account2.Data); + //2.Delete + await account1.DeleteAsync(WaitUntil.Completed); + } + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CognitiveServicesPrivateEndpointConnectionCollectionTests.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CognitiveServicesPrivateEndpointConnectionCollectionTests.cs new file mode 100644 index 000000000000..127342f6e6b1 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CognitiveServicesPrivateEndpointConnectionCollectionTests.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.CognitiveServices.Tests.Helpers; +using NUnit.Framework; + +namespace Azure.ResourceManager.CognitiveServices.Tests +{ + public class CognitiveServicesPrivateEndpointConnectionCollectionTests : CognitiveServicesManagementTestBase + { + public CognitiveServicesPrivateEndpointConnectionCollectionTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + private async Task GetCognitiveServicesPrivateEndpointConnectionCollectionAsync() + { + var container = (await CreateResourceGroupAsync()).GetCognitiveServicesAccounts(); + var input = ResourceDataHelper.GetBasicAccountData(DefaultLocation); + var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, Recording.GenerateAssetName("testAccount-"), input); + var account = lro.Value; + return account.GetCognitiveServicesPrivateEndpointConnections(); + } + + [TestCase] + public async Task CognitiveServicesPrivateEndpointConnectionCollectionApiTests() + { + //1.GetAll + var container = await GetCognitiveServicesPrivateEndpointConnectionCollectionAsync(); + var list = await container.GetAllAsync().ToEnumerableAsync(); + Assert.GreaterOrEqual(list.Count, 0); + //4Exists + Assert.ThrowsAsync(async () => _ = await container.ExistsAsync(null)); + } + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CognitiveServicesPrivateEndpointConnectionResourceTests.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CognitiveServicesPrivateEndpointConnectionResourceTests.cs new file mode 100644 index 000000000000..6ba1be9f9cb3 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CognitiveServicesPrivateEndpointConnectionResourceTests.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.CognitiveServices.Tests.Helpers; +using NUnit.Framework; +using System.Linq; + +namespace Azure.ResourceManager.CognitiveServices.Tests +{ + public class CognitiveServicesPrivateEndpointConnectionResourceTests : CognitiveServicesManagementTestBase + { + public CognitiveServicesPrivateEndpointConnectionResourceTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + private async Task GetCognitiveServicesPrivateEndpointConnectionCollectionAsync() + { + var container = (await CreateResourceGroupAsync()).GetCognitiveServicesAccounts(); + var input = ResourceDataHelper.GetBasicAccountData(DefaultLocation); + var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, Recording.GenerateAssetName("testAccount-"), input); + var account = lro.Value; + return account.GetCognitiveServicesPrivateEndpointConnections(); + } + + [TestCase] + public async Task CognitiveServicesPrivateEndpointConnectionResourceApiTests() + { + //1.Get + var collection = await GetCognitiveServicesPrivateEndpointConnectionCollectionAsync(); + var list = await collection.GetAllAsync().ToEnumerableAsync(); + + if (list.Count > 0) + { + var connection1 = list.FirstOrDefault(); + var connection2 = (await connection1.GetAsync()).Value; + ResourceDataHelper.AssertConnection(connection1.Data, connection2.Data); + + //2.Delete + await connection1.DeleteAsync(WaitUntil.Completed); + } + } + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CommitmentPlanCollectionTests.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CommitmentPlanCollectionTests.cs new file mode 100644 index 000000000000..d2d2a5211178 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CommitmentPlanCollectionTests.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core.TestFramework; +using Azure.ResourceManager.CognitiveServices.Tests.Helpers; +using NUnit.Framework; + +namespace Azure.ResourceManager.CognitiveServices.Tests +{ + public class CommitmentPlanCollectionTests : CognitiveServicesManagementTestBase + { + public CommitmentPlanCollectionTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + private async Task GetCommitmentPlanCollectionAsync() + { + var container = (await CreateResourceGroupAsync()).GetCognitiveServicesAccounts(); + var input = ResourceDataHelper.GetBasicAccountData(DefaultLocation); + var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, Recording.GenerateAssetName("testAccount-"), input); + var account = lro.Value; + return account.GetCommitmentPlans(); + } + + [TestCase] + [Ignore("The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI'")] + public async Task CommitmentPlanCollectionApiTests() + { + //1.CreateOrUpdate + var container = await GetCommitmentPlanCollectionAsync(); + var name = Recording.GenerateAssetName("CommitmentPlan-"); + var input = ResourceDataHelper.GetBasicCommitmentPlanData(); + var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + CommitmentPlanResource plan1 = lro.Value; + Assert.AreEqual(name, plan1.Data.Name); + //2.Get + CommitmentPlanResource plan2 = await container.GetAsync(name); + ResourceDataHelper.AssertCommitmentPlan(plan1.Data, plan2.Data); + //3.GetAll + _ = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + _ = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + int count = 0; + await foreach (var plan in container.GetAllAsync()) + { + count++; + } + Assert.GreaterOrEqual(count, 2); + //4Exists + Assert.IsTrue(await container.ExistsAsync(name)); + Assert.IsFalse(await container.ExistsAsync(name + "1")); + + Assert.ThrowsAsync(async () => _ = await container.ExistsAsync(null)); + } + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CommitmentPlanResourceTests.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CommitmentPlanResourceTests.cs new file mode 100644 index 000000000000..028096498076 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/CommitmentPlanResourceTests.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.CognitiveServices.Models; +using Azure.ResourceManager.CognitiveServices.Tests.Helpers; +using NUnit.Framework; + +namespace Azure.ResourceManager.CognitiveServices.Tests +{ + public class CommitmentPlanResourceTests : CognitiveServicesManagementTestBase + { + public CommitmentPlanResourceTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + private async Task CreateCommitmentPlanAsync(string planName) + { + var accountContainer = (await CreateResourceGroupAsync()).GetCognitiveServicesAccounts(); + var accountInput = ResourceDataHelper.GetBasicAccountData(AzureLocation.EastUS); + accountInput.Sku = new CognitiveServicesSku("s0"); + accountInput.Kind = "OpenAI"; + var lro = await accountContainer.CreateOrUpdateAsync(WaitUntil.Completed, Recording.GenerateAssetName("testAccount-"), accountInput); + var account = lro.Value; + var container = account.GetCommitmentPlans(); + var input = ResourceDataHelper.GetBasicCommitmentPlanData(); + var lro_plan = await container.CreateOrUpdateAsync(WaitUntil.Completed, planName, input); + return lro_plan.Value; + } + + [TestCase] + [Ignore("The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI'")] + public async Task CommitmentPlanResourceApiTests() + { + //1.Get + var planName = Recording.GenerateAssetName("testCommitmentPlan-"); + var plan1 = await CreateCommitmentPlanAsync(planName); + CommitmentPlanResource plan2 = await plan1.GetAsync(); + + ResourceDataHelper.AssertCommitmentPlan(plan1.Data, plan2.Data); + //2.Delete + await plan1.DeleteAsync(WaitUntil.Completed); + } + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/DeploymentCollectionTests.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/DeploymentCollectionTests.cs new file mode 100644 index 000000000000..502da9bfce83 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/DeploymentCollectionTests.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.CognitiveServices.Models; +using Azure.ResourceManager.CognitiveServices.Tests.Helpers; +using NUnit.Framework; + +namespace Azure.ResourceManager.CognitiveServices.Tests +{ + public class DeploymentCollectionTests : CognitiveServicesManagementTestBase + { + public DeploymentCollectionTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + private async Task GetDeploymentCollectionAsync() + { + var container = (await CreateResourceGroupAsync()).GetCognitiveServicesAccounts(); + var input = ResourceDataHelper.GetBasicAccountData(AzureLocation.WestUS2); + input.Kind = "OpenAI"; + input.Sku = new CognitiveServicesSku("f0"); + var account = (await container.CreateOrUpdateAsync(WaitUntil.Completed, Recording.GenerateAssetName("testAccount-"), input)).Value; + return account.GetCognitiveServicesAccountDeployments(); + } + + [TestCase] + [Ignore("The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI'")] + public async Task DeploymentCollectionApiTests() + { + //1.CreateOrUpdate + var container = await GetDeploymentCollectionAsync(); + var name = Recording.GenerateAssetName("Deployment-"); + var input = ResourceDataHelper.GetBasicDeploymentData(); + var lro = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + CognitiveServicesAccountDeploymentResource deployment1 = lro.Value; + Assert.AreEqual(name, deployment1.Data.Name); + //2.Get + CognitiveServicesAccountDeploymentResource deployment2 = await container.GetAsync(name); + ResourceDataHelper.AssertDeployment(deployment1.Data, deployment2.Data); + //3.GetAll + _ = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + _ = await container.CreateOrUpdateAsync(WaitUntil.Completed, name, input); + int count = 0; + await foreach (var deployment in container.GetAllAsync()) + { + count++; + } + Assert.GreaterOrEqual(count, 2); + //4Exists + Assert.IsTrue(await container.ExistsAsync(name)); + Assert.IsFalse(await container.ExistsAsync(name + "1")); + + Assert.ThrowsAsync(async () => _ = await container.ExistsAsync(null)); + } + } +} diff --git a/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/DeploymentResourceTests.cs b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/DeploymentResourceTests.cs new file mode 100644 index 000000000000..687cb4aabe70 --- /dev/null +++ b/sdk/cognitiveservices/Azure.ResourceManager.CognitiveServices/tests/TestCase/DeploymentResourceTests.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.TestFramework; +using Azure.ResourceManager.CognitiveServices.Models; +using Azure.ResourceManager.CognitiveServices.Tests.Helpers; +using NUnit.Framework; + +namespace Azure.ResourceManager.CognitiveServices.Tests +{ + public class DeploymentResourceTests : CognitiveServicesManagementTestBase + { + public DeploymentResourceTests(bool isAsync) + : base(isAsync)//, RecordedTestMode.Record) + { + } + + private async Task CreateDeploymentAsync(string deploymentName) + { + var accountContainer = (await CreateResourceGroupAsync()).GetCognitiveServicesAccounts(); + var accountInput = ResourceDataHelper.GetBasicAccountData(AzureLocation.EastUS); + accountInput.Kind = "OpenAI"; + accountInput.Sku = new CognitiveServicesSku("f0"); + var lro = await accountContainer.CreateOrUpdateAsync(WaitUntil.Completed, Recording.GenerateAssetName("testAccount-"), accountInput); + var account = lro.Value; + var container = account.GetCognitiveServicesAccountDeployments(); + var input = ResourceDataHelper.GetBasicDeploymentData(); + var lro_connection = await container.CreateOrUpdateAsync(WaitUntil.Completed, deploymentName, input); + return lro_connection.Value; + } + + [TestCase] + [Ignore("The subscription does not have QuotaId/Feature required by SKU 'S0' from kind 'OpenAI'")] + public async Task DeploymentResourceApiTests() + { + //1.Get + var deploymentName = Recording.GenerateAssetName("testDeployment-"); + var deployment1 = await CreateDeploymentAsync(deploymentName); + CognitiveServicesAccountDeploymentResource deployment2 = await deployment1.GetAsync(); + + ResourceDataHelper.AssertDeployment(deployment1.Data, deployment2.Data); + //2.Delete + await deployment1.DeleteAsync(WaitUntil.Completed); + } + } +}