diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/AccountQuotas_Get.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/AccountQuotas_Get.json new file mode 100644 index 000000000000..4bbab16c74f2 --- /dev/null +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/AccountQuotas_Get.json @@ -0,0 +1,30 @@ +{ + "title": "AccountQuotas_Get", + "operationId": "AccountQuotas_Get", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg", + "accountName": "myPlaywrightAccount", + "quotaName": "ScalableExecution" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/ScalableExecution", + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Accounts/Quotas", + "properties": { + "freeTrial": { + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "allocatedValue": 0, + "usedValue": 0, + "percentageUsed": 100 + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/AccountQuotas_ListByAccount.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/AccountQuotas_ListByAccount.json new file mode 100644 index 000000000000..0d087084b0df --- /dev/null +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/AccountQuotas_ListByAccount.json @@ -0,0 +1,33 @@ +{ + "title": "AccountQuotas_ListByAccount", + "operationId": "AccountQuotas_ListByAccount", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg", + "accountName": "myPlaywrightAccount" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/ScalableExecution", + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Accounts/Quotas", + "properties": { + "freeTrial": { + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "allocatedValue": 0, + "usedValue": 0, + "percentageUsed": 100 + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_CheckNameAvailability.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_CheckNameAvailability.json new file mode 100644 index 000000000000..d251005d1323 --- /dev/null +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_CheckNameAvailability.json @@ -0,0 +1,20 @@ +{ + "title": "Accounts_CheckNameAvailability", + "operationId": "Accounts_CheckNameAvailability", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "body": { + "name": "dummyName", + "type": "Microsoft.AzurePlaywrightService/Accounts" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true, + "message": "Test message." + } + } + } +} diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_CreateOrUpdate.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_CreateOrUpdate.json similarity index 97% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_CreateOrUpdate.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_CreateOrUpdate.json index d6a0cc6f066f..f17750340bf4 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_CreateOrUpdate.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_CreateOrUpdate.json @@ -2,10 +2,10 @@ "title": "Accounts_CreateOrUpdate", "operationId": "Accounts_CreateOrUpdate", "parameters": { - "api-version": "2023-10-01-preview", + "api-version": "2024-02-01", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "dummyrg", - "name": "myPlaywrightAccount", + "accountName": "myPlaywrightAccount", "resource": { "location": "westus", "tags": { diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Delete.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Delete.json similarity index 88% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Delete.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Delete.json index ab0312eaad4d..f50f3cec23e9 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Delete.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Delete.json @@ -2,10 +2,10 @@ "title": "Accounts_Delete", "operationId": "Accounts_Delete", "parameters": { - "api-version": "2023-10-01-preview", + "api-version": "2024-02-01", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "dummyrg", - "name": "myPlaywrightAccount" + "accountName": "myPlaywrightAccount" }, "responses": { "202": { diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Get.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Get.json similarity index 94% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Get.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Get.json index 393f21fbb9fa..f6980545f4d7 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Get.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Get.json @@ -2,10 +2,10 @@ "title": "Accounts_Get", "operationId": "Accounts_Get", "parameters": { - "api-version": "2023-10-01-preview", + "api-version": "2024-02-01", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "dummyrg", - "name": "myPlaywrightAccount" + "accountName": "myPlaywrightAccount" }, "responses": { "200": { diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_ListByResourceGroup.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_ListByResourceGroup.json similarity index 97% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_ListByResourceGroup.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_ListByResourceGroup.json index 09f407425f0c..462b79389851 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_ListByResourceGroup.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_ListByResourceGroup.json @@ -2,7 +2,7 @@ "title": "Accounts_ListByResourceGroup", "operationId": "Accounts_ListByResourceGroup", "parameters": { - "api-version": "2023-10-01-preview", + "api-version": "2024-02-01", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "dummyrg" }, diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_ListBySubscription.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_ListBySubscription.json similarity index 96% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_ListBySubscription.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_ListBySubscription.json index 2d851e0c6100..5a38310a8dc7 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_ListBySubscription.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_ListBySubscription.json @@ -2,7 +2,7 @@ "title": "Accounts_ListBySubscription", "operationId": "Accounts_ListBySubscription", "parameters": { - "api-version": "2023-10-01-preview", + "api-version": "2024-02-01", "subscriptionId": "00000000-0000-0000-0000-000000000000" }, "responses": { diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Update.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Update.json similarity index 94% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Update.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Update.json index 0cff87eeeb43..673ee23285b1 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Accounts_Update.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Accounts_Update.json @@ -2,10 +2,10 @@ "title": "Accounts_Update", "operationId": "Accounts_Update", "parameters": { - "api-version": "2023-10-01-preview", + "api-version": "2024-02-01", "subscriptionId": "00000000-0000-0000-0000-000000000000", "resourceGroupName": "dummyrg", - "name": "myPlaywrightAccount", + "accountName": "myPlaywrightAccount", "properties": { "tags": { "Team": "Dev Exp", diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Operations_List.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Operations_List.json similarity index 97% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Operations_List.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Operations_List.json index 9516db396631..3f437274a34c 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Operations_List.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Operations_List.json @@ -2,7 +2,7 @@ "title": "Operations_List", "operationId": "Operations_List", "parameters": { - "api-version": "2023-10-01-preview" + "api-version": "2024-02-01" }, "responses": { "200": { diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Quotas_Get.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Quotas_Get.json similarity index 72% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Quotas_Get.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Quotas_Get.json index 266052bb14a8..e6824227a6ab 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Quotas_Get.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Quotas_Get.json @@ -2,10 +2,10 @@ "title": "Quotas_Get", "operationId": "Quotas_Get", "parameters": { - "api-version": "2023-10-01-preview", + "api-version": "2024-02-01", "subscriptionId": "00000000-0000-0000-0000-000000000000", "location": "eastus", - "name": "ScalableExecution" + "quotaName": "ScalableExecution" }, "responses": { "200": { @@ -16,11 +16,6 @@ "properties": { "freeTrial": { "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "createdAt": "2023-08-31T10:19:36.081Z", - "expiryAt": "2023-08-31T10:19:36.081Z", - "allocatedValue": 0, - "usedValue": 0, - "percentageUsed": 100, "state": "Active" }, "provisioningState": "Succeeded" diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Quotas_ListBySubscription.json b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Quotas_ListBySubscription.json similarity index 75% rename from specification/playwrighttesting/PlaywrightTesting.Management/examples/Quotas_ListBySubscription.json rename to specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Quotas_ListBySubscription.json index 90637aa1559c..09bf98f70898 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/examples/Quotas_ListBySubscription.json +++ b/specification/playwrighttesting/PlaywrightTesting.Management/examples/2024-02-01/Quotas_ListBySubscription.json @@ -2,7 +2,7 @@ "title": "Quotas_ListBySubscription", "operationId": "Quotas_ListBySubscription", "parameters": { - "api-version": "2023-10-01-preview", + "api-version": "2024-02-01", "subscriptionId": "00000000-0000-0000-0000-000000000000", "location": "eastus" }, @@ -14,11 +14,6 @@ "properties": { "freeTrial": { "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", - "createdAt": "2023-08-31T10:19:36.081Z", - "expiryAt": "2023-08-31T10:19:36.081Z", - "allocatedValue": 0, - "usedValue": 0, - "percentageUsed": 100, "state": "Active" }, "provisioningState": "Succeeded" diff --git a/specification/playwrighttesting/PlaywrightTesting.Management/main.tsp b/specification/playwrighttesting/PlaywrightTesting.Management/main.tsp index 3eb3ce51e3cb..9f05d2c999c2 100644 --- a/specification/playwrighttesting/PlaywrightTesting.Management/main.tsp +++ b/specification/playwrighttesting/PlaywrightTesting.Management/main.tsp @@ -7,34 +7,40 @@ import "@azure-tools/typespec-azure-resource-manager"; using TypeSpec.Http; using TypeSpec.Rest; using TypeSpec.Versioning; -using Azure.ResourceManager; using Azure.Core; +using Azure.ResourceManager; @armProviderNamespace("Microsoft.AzurePlaywrightService") @service({ title: "Microsoft AzurePlaywrightService Management API", - version: "2023-10-01-preview", }) -@doc("Microsoft.AzurePlaywrightService Resource Provider management API.") -@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) -@useDependency(Azure.Core.Versions.v1_0_Preview_2) +@doc("Microsoft.AzurePlaywrightService Resource Provider Management API.") +@versioned(Versions) namespace Microsoft.AzurePlaywrightService; +@doc("Microsoft.AzurePlaywrightService Management API Versions.") +enum Versions { + /** 2024-02-01 version */ + @useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1) + @armCommonTypesVersion(Azure.ResourceManager.CommonTypes.Versions.v5) + `2024-02-01`, +} + interface Operations extends Azure.ResourceManager.Operations {} -@doc("An account resource") +@doc("A Playwright service account resource.") model Account is TrackedResource { - @doc("Name of account") + @doc("Name of account.") @minLength(3) @maxLength(64) @pattern("^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$") - @key("name") + @key("accountName") @path @segment("accounts") name: string; } -@doc("Account properties") +@doc("Account resource properties.") model AccountProperties { @visibility("read") @doc("The Playwright testing dashboard URI for the account resource.") @@ -64,22 +70,28 @@ enum EnablementStatus { } @doc("The status of the current operation.") -@Azure.Core.lroStatus +@lroStatus enum ProvisioningState { ...ResourceProvisioningState, - @doc("Deletion in progress") + @doc("Creation in progress..") + Creating, + + @doc("Deletion in progress..") Deleting, - @doc("Change accepted for processing") + @doc("Change accepted for processing..") Accepted, } @armResourceOperations interface Accounts - extends TrackedResourceOperations {} + extends TrackedResourceOperations { + @doc("Adds check global name availability operation, normally used if a resource name must be globally unique.") + checkNameAvailability is checkGlobalNameAvailability; +} -@doc("The location of quota resource") +@doc("The location of subscription quota resource.") @subscriptionResource model Location { @doc("The location of quota in ARM Normalized format like eastus, southeastasia etc.") @@ -90,25 +102,25 @@ model Location { name: string; } -@doc("A quota resource") +@doc("A subscription quota resource.") @parentResource(Location) model Quota is ProxyResource { @doc("The quota name.") - @key("name") + @key("quotaName") @path @segment("quotas") name: QuotaNames; } -@doc("The quota name.") +@doc("The enum for quota name.") enum QuotaNames { @doc("The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.") ScalableExecution, } -@doc("Quota properties") +@doc("The subscription quota resource properties.") model QuotaProperties { - @doc("The free-trial quota.") + @doc("The subscription quota resource free-trial properties.") freeTrial?: FreeTrialProperties; @visibility("read") @@ -116,12 +128,39 @@ model QuotaProperties { provisioningState?: ProvisioningState; } -@doc("The free-trial properties") +@doc("The subscription quota resource free-trial properties.") model FreeTrialProperties { - @doc("The playwright account id.") + @doc("The Playwright service account id.") @visibility("read") accountId: string; + @doc("The free-trial state.") + @visibility("read") + state: FreeTrialState; +} + +@doc("A quota resource for a Playwright service account.") +@parentResource(Account) +model AccountQuota is ProxyResource { + @doc("The Playwright service account quota name.") + @key("quotaName") + @path + @segment("quotas") + name: QuotaNames; +} + +@doc("The Playwright service account quota resource properties.") +model AccountQuotaProperties { + @doc("The Playwright service account quota resource free-trial properties.") + freeTrial?: AccountFreeTrialProperties; + + @visibility("read") + @doc("The status of the last operation.") + provisioningState?: ProvisioningState; +} + +@doc("The Playwright service account quota resource free-trial properties.") +model AccountFreeTrialProperties { @doc("The free-trial createdAt utcDateTime.") @visibility("read") createdAt: utcDateTime; @@ -142,11 +181,7 @@ model FreeTrialProperties { @visibility("read") @minValue(0) @maxValue(100) - percentageUsed: decimal; - - @doc("The free-trial state.") - @visibility("read") - state: FreeTrialState; + percentageUsed: float32; } @doc("The free-trial state.") @@ -156,13 +191,28 @@ enum FreeTrialState { @doc("The free-trial is Expired.") Expired, + + @doc("The free-trial is Not Eligible.") + NotEligible, + + @doc("The free-trial is Not Registered.") + NotRegistered, } @armResourceOperations interface Quotas { - @doc("Get quota by name.") + @doc("Get subscription quota by name.") get is ArmResourceRead; @doc("List quotas for a given subscription Id.") listBySubscription is ArmListBySubscription; } + +@armResourceOperations +interface AccountQuotas { + @doc("Get quota by name for an account.") + get is ArmResourceRead; + + @doc("List quotas for a given account.") + listByAccount is ArmResourceListByParent; +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_Get.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_Get.json new file mode 100644 index 000000000000..4bbab16c74f2 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_Get.json @@ -0,0 +1,30 @@ +{ + "title": "AccountQuotas_Get", + "operationId": "AccountQuotas_Get", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg", + "accountName": "myPlaywrightAccount", + "quotaName": "ScalableExecution" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/ScalableExecution", + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Accounts/Quotas", + "properties": { + "freeTrial": { + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "allocatedValue": 0, + "usedValue": 0, + "percentageUsed": 100 + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_ListByAccount.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_ListByAccount.json new file mode 100644 index 000000000000..0d087084b0df --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_ListByAccount.json @@ -0,0 +1,33 @@ +{ + "title": "AccountQuotas_ListByAccount", + "operationId": "AccountQuotas_ListByAccount", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg", + "accountName": "myPlaywrightAccount" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount/quotas/ScalableExecution", + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Accounts/Quotas", + "properties": { + "freeTrial": { + "createdAt": "2023-08-31T10:19:36.081Z", + "expiryAt": "2023-08-31T10:19:36.081Z", + "allocatedValue": 0, + "usedValue": 0, + "percentageUsed": 100 + }, + "provisioningState": "Succeeded" + } + } + ] + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CheckNameAvailability.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CheckNameAvailability.json new file mode 100644 index 000000000000..d251005d1323 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CheckNameAvailability.json @@ -0,0 +1,20 @@ +{ + "title": "Accounts_CheckNameAvailability", + "operationId": "Accounts_CheckNameAvailability", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "body": { + "name": "dummyName", + "type": "Microsoft.AzurePlaywrightService/Accounts" + } + }, + "responses": { + "200": { + "body": { + "nameAvailable": true, + "message": "Test message." + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CreateOrUpdate.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CreateOrUpdate.json new file mode 100644 index 000000000000..f17750340bf4 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CreateOrUpdate.json @@ -0,0 +1,76 @@ +{ + "title": "Accounts_CreateOrUpdate", + "operationId": "Accounts_CreateOrUpdate", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg", + "accountName": "myPlaywrightAccount", + "resource": { + "location": "westus", + "tags": { + "Team": "Dev Exp" + }, + "properties": { + "regionalAffinity": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "scalableExecution": "Enabled", + "reporting": "Enabled" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "tags": { + "Team": "Dev Exp" + }, + "systemData": { + "createdBy": "userId1001", + "createdByType": "User", + "createdAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z" + } + } + }, + "201": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.PlaywrightTesting/locations/eastus/operationResults/00000000-0000-0000-0000-000000000000/Spring/default?api-version=2023-06-01-preview" + }, + "body": { + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "scalableExecution": "Enabled", + "reporting": "Enabled" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "tags": { + "Team": "Dev Exp" + }, + "systemData": { + "createdBy": "userId1001", + "createdByType": "User", + "createdAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z" + } + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Delete.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Delete.json new file mode 100644 index 000000000000..f50f3cec23e9 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Delete.json @@ -0,0 +1,19 @@ +{ + "title": "Accounts_Delete", + "operationId": "Accounts_Delete", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg", + "accountName": "myPlaywrightAccount" + }, + "responses": { + "202": { + "headers": { + "Location": "https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.PlaywrightTesting/locations/eastus/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2023-06-01-preview" + } + }, + "204": {}, + "200": {} + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Get.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Get.json new file mode 100644 index 000000000000..f6980545f4d7 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Get.json @@ -0,0 +1,38 @@ +{ + "title": "Accounts_Get", + "operationId": "Accounts_Get", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg", + "accountName": "myPlaywrightAccount" + }, + "responses": { + "200": { + "body": { + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "scalableExecution": "Enabled", + "reporting": "Enabled" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "tags": { + "Team": "Dev Exp" + }, + "systemData": { + "createdBy": "userId1001", + "createdByType": "User", + "createdAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z" + } + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_ListByResourceGroup.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_ListByResourceGroup.json new file mode 100644 index 000000000000..462b79389851 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_ListByResourceGroup.json @@ -0,0 +1,41 @@ +{ + "title": "Accounts_ListByResourceGroup", + "operationId": "Accounts_ListByResourceGroup", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "scalableExecution": "Enabled", + "reporting": "Enabled" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "tags": { + "Team": "Dev Exp" + }, + "systemData": { + "createdBy": "userId1001", + "createdByType": "User", + "createdAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z" + } + } + ] + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_ListBySubscription.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_ListBySubscription.json new file mode 100644 index 000000000000..5a38310a8dc7 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_ListBySubscription.json @@ -0,0 +1,40 @@ +{ + "title": "Accounts_ListBySubscription", + "operationId": "Accounts_ListBySubscription", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "scalableExecution": "Enabled", + "reporting": "Enabled" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "tags": { + "Team": "Dev Exp" + }, + "systemData": { + "createdBy": "userId1001", + "createdByType": "User", + "createdAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z" + } + } + ] + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Update.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Update.json new file mode 100644 index 000000000000..673ee23285b1 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Update.json @@ -0,0 +1,47 @@ +{ + "title": "Accounts_Update", + "operationId": "Accounts_Update", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "resourceGroupName": "dummyrg", + "accountName": "myPlaywrightAccount", + "properties": { + "tags": { + "Team": "Dev Exp", + "Division": "LT" + }, + "properties": { + "regionalAffinity": "Enabled" + } + } + }, + "responses": { + "200": { + "body": { + "location": "westus", + "properties": { + "dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com", + "provisioningState": "Succeeded", + "regionalAffinity": "Enabled", + "scalableExecution": "Enabled", + "reporting": "Enabled" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount", + "name": "myPlaywrightAccount", + "type": "Microsoft.AzurePlaywrightService/accounts", + "tags": { + "Team": "Dev Exp" + }, + "systemData": { + "createdBy": "userId1001", + "createdByType": "User", + "createdAt": "2021-09-28T12:32:33Z", + "lastModifiedBy": "userId1001", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-09-28T12:32:33Z" + } + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Operations_List.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Operations_List.json new file mode 100644 index 000000000000..3f437274a34c --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Operations_List.json @@ -0,0 +1,46 @@ +{ + "title": "Operations_List", + "operationId": "Operations_List", + "parameters": { + "api-version": "2024-02-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.AzurePlaywrightService/accounts/Write", + "isDataAction": false, + "display": { + "provider": "Microsoft.AzurePlaywrightService", + "resource": "accounts", + "operation": "Creates or updates the PlaywrightAccounts", + "description": "Set PlaywrightAccounts" + } + }, + { + "name": "Microsoft.AzurePlaywrightService/accounts/Delete", + "isDataAction": false, + "display": { + "provider": "Microsoft.AzurePlaywrightService", + "resource": "accounts", + "operation": "Deletes the PlaywrightAccounts", + "description": "Delete PlaywrightAccounts" + } + }, + { + "name": "Microsoft.AzurePlaywrightService/accounts/Read", + "isDataAction": false, + "display": { + "provider": "Microsoft.AzurePlaywrightService", + "resource": "accounts", + "operation": "Reads the PlaywrightAccounts", + "description": "Read PlaywrightAccounts" + } + } + ], + "nextLink": "http://nextlink.contoso.com" + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Quotas_Get.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Quotas_Get.json new file mode 100644 index 000000000000..e6824227a6ab --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Quotas_Get.json @@ -0,0 +1,26 @@ +{ + "title": "Quotas_Get", + "operationId": "Quotas_Get", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "eastus", + "quotaName": "ScalableExecution" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution", + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Locations/Quotas", + "properties": { + "freeTrial": { + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "state": "Active" + }, + "provisioningState": "Succeeded" + } + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Quotas_ListBySubscription.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Quotas_ListBySubscription.json new file mode 100644 index 000000000000..09bf98f70898 --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Quotas_ListBySubscription.json @@ -0,0 +1,29 @@ +{ + "title": "Quotas_ListBySubscription", + "operationId": "Quotas_ListBySubscription", + "parameters": { + "api-version": "2024-02-01", + "subscriptionId": "00000000-0000-0000-0000-000000000000", + "location": "eastus" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "properties": { + "freeTrial": { + "accountId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + "state": "Active" + }, + "provisioningState": "Succeeded" + }, + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.AzurePlaywrightService/locations/eastus/quotas/ScalableExecution", + "name": "ScalableExecution", + "type": "Microsoft.AzurePlaywrightService/Locations/Quotas" + } + ] + } + } + } +} diff --git a/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/playwrighttesting.json b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/playwrighttesting.json new file mode 100644 index 000000000000..7d7c5e05772e --- /dev/null +++ b/specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/playwrighttesting.json @@ -0,0 +1,1093 @@ +{ + "swagger": "2.0", + "info": { + "title": "Microsoft AzurePlaywrightService Management API", + "version": "2024-02-01", + "description": "Microsoft.AzurePlaywrightService Resource Provider Management API.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "Operations" + }, + { + "name": "Accounts" + }, + { + "name": "Quotas" + }, + { + "name": "AccountQuotas" + } + ], + "paths": { + "/providers/Microsoft.AzurePlaywrightService/operations": { + "get": { + "operationId": "Operations_List", + "tags": [ + "Operations" + ], + "description": "List the operations for the provider", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Operations_List": { + "$ref": "./examples/Operations_List.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/accounts": { + "get": { + "operationId": "Accounts_ListBySubscription", + "tags": [ + "Accounts" + ], + "description": "List Account resources by subscription ID", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/AccountListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_ListBySubscription": { + "$ref": "./examples/Accounts_ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/checkNameAvailability": { + "post": { + "operationId": "Accounts_CheckNameAvailability", + "tags": [ + "Accounts" + ], + "description": "Adds check global name availability operation, normally used if a resource name must be globally unique.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "body", + "in": "body", + "description": "The CheckAvailability request", + "required": true, + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/CheckNameAvailabilityResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_CheckNameAvailability": { + "$ref": "./examples/Accounts_CheckNameAvailability.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas": { + "get": { + "operationId": "Quotas_ListBySubscription", + "tags": [ + "Quotas" + ], + "description": "List quotas for a given subscription Id.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "location", + "in": "path", + "description": "The location of quota in ARM Normalized format like eastus, southeastasia etc.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/QuotaListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Quotas_ListBySubscription": { + "$ref": "./examples/Quotas_ListBySubscription.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}": { + "get": { + "operationId": "Quotas_Get", + "tags": [ + "Quotas" + ], + "description": "Get subscription quota by name.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "location", + "in": "path", + "description": "The location of quota in ARM Normalized format like eastus, southeastasia etc.", + "required": true, + "type": "string" + }, + { + "name": "quotaName", + "in": "path", + "description": "The quota name.", + "required": true, + "type": "string", + "enum": [ + "ScalableExecution" + ], + "x-ms-enum": { + "name": "QuotaNames", + "modelAsString": true, + "values": [ + { + "name": "ScalableExecution", + "value": "ScalableExecution", + "description": "The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations." + } + ] + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/Quota" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Quotas_Get": { + "$ref": "./examples/Quotas_Get.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts": { + "get": { + "operationId": "Accounts_ListByResourceGroup", + "tags": [ + "Accounts" + ], + "description": "List Account resources by resource group", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/AccountListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_ListByResourceGroup": { + "$ref": "./examples/Accounts_ListByResourceGroup.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}": { + "get": { + "operationId": "Accounts_Get", + "tags": [ + "Accounts" + ], + "description": "Get a Account", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "Name of account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_Get": { + "$ref": "./examples/Accounts_Get.json" + } + } + }, + "put": { + "operationId": "Accounts_CreateOrUpdate", + "tags": [ + "Accounts" + ], + "description": "Create a Account", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "Name of account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + }, + { + "name": "resource", + "in": "body", + "description": "Resource create parameters.", + "required": true, + "schema": { + "$ref": "#/definitions/Account" + } + } + ], + "responses": { + "200": { + "description": "Resource 'Account' update operation succeeded", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "201": { + "description": "Resource 'Account' create operation succeeded", + "schema": { + "$ref": "#/definitions/Account" + }, + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_CreateOrUpdate": { + "$ref": "./examples/Accounts_CreateOrUpdate.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "x-ms-long-running-operation": true + }, + "patch": { + "operationId": "Accounts_Update", + "tags": [ + "Accounts" + ], + "description": "Update a Account", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "Name of account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + }, + { + "name": "properties", + "in": "body", + "description": "The resource properties to be updated.", + "required": true, + "schema": { + "$ref": "#/definitions/AccountUpdate" + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/Account" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_Update": { + "$ref": "./examples/Accounts_Update.json" + } + } + }, + "delete": { + "operationId": "Accounts_Delete", + "tags": [ + "Accounts" + ], + "description": "Delete a Account", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "Name of account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "202": { + "description": "Resource deletion accepted.", + "headers": { + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "The Retry-After header can indicate how long the client should wait before polling the operation status." + }, + "Location": { + "type": "string", + "description": "The Location header contains the URL where the status of the long running operation can be checked." + } + } + }, + "204": { + "description": "Resource deleted successfully." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Accounts_Delete": { + "$ref": "./examples/Accounts_Delete.json" + } + }, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "x-ms-long-running-operation": true + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas": { + "get": { + "operationId": "AccountQuotas_ListByAccount", + "tags": [ + "AccountQuotas" + ], + "description": "List quotas for a given account.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "Name of account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/AccountQuotaListResult" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "AccountQuotas_ListByAccount": { + "$ref": "./examples/AccountQuotas_ListByAccount.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}": { + "get": { + "operationId": "AccountQuotas_Get", + "tags": [ + "AccountQuotas" + ], + "description": "Get quota by name for an account.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "accountName", + "in": "path", + "description": "Name of account.", + "required": true, + "type": "string", + "minLength": 3, + "maxLength": 64, + "pattern": "^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$" + }, + { + "name": "quotaName", + "in": "path", + "description": "The Playwright service account quota name.", + "required": true, + "type": "string", + "enum": [ + "ScalableExecution" + ], + "x-ms-enum": { + "name": "QuotaNames", + "modelAsString": true, + "values": [ + { + "name": "ScalableExecution", + "value": "ScalableExecution", + "description": "The quota details for scalable execution feature. When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations." + } + ] + } + } + ], + "responses": { + "200": { + "description": "ARM operation completed successfully.", + "schema": { + "$ref": "#/definitions/AccountQuota" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "AccountQuotas_Get": { + "$ref": "./examples/AccountQuotas_Get.json" + } + } + } + } + }, + "definitions": { + "Account": { + "type": "object", + "description": "A Playwright service account resource.", + "properties": { + "properties": { + "$ref": "#/definitions/AccountProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/TrackedResource" + } + ] + }, + "AccountFreeTrialProperties": { + "type": "object", + "description": "The Playwright service account quota resource free-trial properties.", + "properties": { + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The free-trial createdAt utcDateTime.", + "readOnly": true + }, + "expiryAt": { + "type": "string", + "format": "date-time", + "description": "The free-trial expiryAt utcDateTime.", + "readOnly": true + }, + "allocatedValue": { + "type": "integer", + "format": "int32", + "description": "The free-trial allocated limit value eg. allocated free minutes.", + "readOnly": true + }, + "usedValue": { + "type": "integer", + "format": "int32", + "description": "The free-trial used value eg. used free minutes.", + "readOnly": true + }, + "percentageUsed": { + "type": "number", + "format": "float", + "description": "The free-trial percentage used.", + "minimum": 0, + "maximum": 100, + "readOnly": true + } + }, + "required": [ + "createdAt", + "expiryAt", + "allocatedValue", + "usedValue", + "percentageUsed" + ] + }, + "AccountListResult": { + "type": "object", + "description": "The response of a Account list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Account items on this page", + "items": { + "$ref": "#/definitions/Account" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "AccountProperties": { + "type": "object", + "description": "Account resource properties.", + "properties": { + "dashboardUri": { + "type": "string", + "format": "uri", + "description": "The Playwright testing dashboard URI for the account resource.", + "readOnly": true + }, + "regionalAffinity": { + "$ref": "#/definitions/EnablementStatus", + "description": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.", + "default": "Enabled" + }, + "scalableExecution": { + "$ref": "#/definitions/EnablementStatus", + "description": "When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.", + "default": "Enabled" + }, + "reporting": { + "$ref": "#/definitions/EnablementStatus", + "description": "When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.", + "default": "Disabled" + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "AccountQuota": { + "type": "object", + "description": "A quota resource for a Playwright service account.", + "properties": { + "properties": { + "$ref": "#/definitions/AccountQuotaProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "AccountQuotaListResult": { + "type": "object", + "description": "The response of a AccountQuota list operation.", + "properties": { + "value": { + "type": "array", + "description": "The AccountQuota items on this page", + "items": { + "$ref": "#/definitions/AccountQuota" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "AccountQuotaProperties": { + "type": "object", + "description": "The Playwright service account quota resource properties.", + "properties": { + "freeTrial": { + "$ref": "#/definitions/AccountFreeTrialProperties", + "description": "The Playwright service account quota resource free-trial properties." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + }, + "AccountUpdate": { + "type": "object", + "description": "The type used for update operations of the Account.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "$ref": "#/definitions/AccountUpdateProperties", + "x-ms-client-flatten": true + } + } + }, + "AccountUpdateProperties": { + "type": "object", + "description": "The updatable properties of the Account.", + "properties": { + "regionalAffinity": { + "$ref": "#/definitions/EnablementStatus", + "description": "This property sets the connection region for Playwright client workers to cloud-hosted browsers. If enabled, workers connect to browsers in the closest Azure region, ensuring lower latency. If disabled, workers connect to browsers in the Azure region in which the workspace was initially created.", + "default": "Enabled" + }, + "scalableExecution": { + "$ref": "#/definitions/EnablementStatus", + "description": "When enabled, Playwright client workers can connect to cloud-hosted browsers. This can increase the number of parallel workers for a test run, significantly minimizing test completion durations.", + "default": "Enabled" + }, + "reporting": { + "$ref": "#/definitions/EnablementStatus", + "description": "When enabled, this feature allows the workspace to upload and display test results, including artifacts like traces and screenshots, in the Playwright portal. This enables faster and more efficient troubleshooting.", + "default": "Disabled" + } + } + }, + "EnablementStatus": { + "type": "string", + "description": "The enablement status of a feature.", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "EnablementStatus", + "modelAsString": true, + "values": [ + { + "name": "Enabled", + "value": "Enabled", + "description": "The feature is Enabled." + }, + { + "name": "Disabled", + "value": "Disabled", + "description": "The feature is Disabled." + } + ] + } + }, + "FreeTrialProperties": { + "type": "object", + "description": "The subscription quota resource free-trial properties.", + "properties": { + "accountId": { + "type": "string", + "description": "The Playwright service account id.", + "readOnly": true + }, + "state": { + "$ref": "#/definitions/FreeTrialState", + "description": "The free-trial state.", + "readOnly": true + } + }, + "required": [ + "accountId", + "state" + ] + }, + "FreeTrialState": { + "type": "string", + "description": "The free-trial state.", + "enum": [ + "Active", + "Expired", + "NotEligible", + "NotRegistered" + ], + "x-ms-enum": { + "name": "FreeTrialState", + "modelAsString": true, + "values": [ + { + "name": "Active", + "value": "Active", + "description": "The free-trial is Active." + }, + { + "name": "Expired", + "value": "Expired", + "description": "The free-trial is Expired." + }, + { + "name": "NotEligible", + "value": "NotEligible", + "description": "The free-trial is Not Eligible." + }, + { + "name": "NotRegistered", + "value": "NotRegistered", + "description": "The free-trial is Not Registered." + } + ] + } + }, + "ProvisioningState": { + "type": "string", + "description": "The status of the current operation.", + "enum": [ + "Succeeded", + "Failed", + "Canceled", + "Creating", + "Deleting", + "Accepted" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true, + "values": [ + { + "name": "Succeeded", + "value": "Succeeded", + "description": "Resource has been created." + }, + { + "name": "Failed", + "value": "Failed", + "description": "Resource creation failed." + }, + { + "name": "Canceled", + "value": "Canceled", + "description": "Resource creation was canceled." + }, + { + "name": "Creating", + "value": "Creating", + "description": "Creation in progress.." + }, + { + "name": "Deleting", + "value": "Deleting", + "description": "Deletion in progress.." + }, + { + "name": "Accepted", + "value": "Accepted", + "description": "Change accepted for processing.." + } + ] + } + }, + "Quota": { + "type": "object", + "description": "A subscription quota resource.", + "properties": { + "properties": { + "$ref": "#/definitions/QuotaProperties", + "description": "The resource-specific properties for this resource.", + "x-ms-client-flatten": true, + "x-ms-mutability": [ + "read", + "create" + ] + } + }, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" + } + ] + }, + "QuotaListResult": { + "type": "object", + "description": "The response of a Quota list operation.", + "properties": { + "value": { + "type": "array", + "description": "The Quota items on this page", + "items": { + "$ref": "#/definitions/Quota" + } + }, + "nextLink": { + "type": "string", + "format": "uri", + "description": "The link to the next page of items" + } + }, + "required": [ + "value" + ] + }, + "QuotaProperties": { + "type": "object", + "description": "The subscription quota resource properties.", + "properties": { + "freeTrial": { + "$ref": "#/definitions/FreeTrialProperties", + "description": "The subscription quota resource free-trial properties." + }, + "provisioningState": { + "$ref": "#/definitions/ProvisioningState", + "description": "The status of the last operation.", + "readOnly": true + } + } + } + }, + "parameters": {} +} diff --git a/specification/playwrighttesting/resource-manager/readme.md b/specification/playwrighttesting/resource-manager/readme.md index 0db53daa3b81..50602ce48ffa 100644 --- a/specification/playwrighttesting/resource-manager/readme.md +++ b/specification/playwrighttesting/resource-manager/readme.md @@ -29,7 +29,31 @@ title: PlaywrightTestingClient description: Azure Playwright testing management service openapi-type: arm openapi-subtype: rpaas -tag: package-2023-10-01-preview +tag: package-2024-02-01 +``` + +### Tag: package-2024-02-01 + +These settings apply only when `--tag=package-2024-02-01` is specified on the command line. + +```yaml $(tag) == 'package-2024-02-01' +input-file: + - Microsoft.AzurePlaywrightService/stable/2024-02-01/playwrighttesting.json +suppressions: + - code: ResourceNameRestriction + from: playwrighttesting.json + reason: We have enums defined for quota resource names which doesn't support string pattern validation. + # where: + # - $.paths["/subscriptions/{subscriptionId}/providers/Microsoft.AzurePlaywrightService/locations/{location}/quotas/{quotaName}"].get.parameters.3 + # - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}/quotas/{quotaName}"].get.parameters.4 + - code: ProvisioningStateMustBeReadOnly + from: playwrighttesting.json + reason: Seems like a tool bug, as the visibility is set to read only in the TypeSpec already. + - code: DeleteResponseCodes + from: playwrighttesting.json + reason: Seems like a tool bug, as default operations with codes are generated from the TrackedResourceOperations in the TypeSpec. + where: + - $.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}"].delete ``` ### Tag: package-2023-10-01-preview