Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,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"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "Operations_List",
"operationId": "Operations_List",
"parameters": {
"api-version": "2023-10-01-preview"
"api-version": "2024-02-01"
},
"responses": {
"200": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,28 @@ using Azure.Core;
@armProviderNamespace("Microsoft.AzurePlaywrightService")
@service({
title: "Microsoft AzurePlaywrightService Management API",
version: "2023-10-01-preview",
version: "2024-02-01",
})
@doc("Microsoft.AzurePlaywrightService Resource Provider management API.")
@doc("Microsoft.AzurePlaywrightService Resource Provider Management API.")
@useDependency(Azure.ResourceManager.Versions.v1_0_Preview_1)
@useDependency(Azure.Core.Versions.v1_0_Preview_2)
namespace Microsoft.AzurePlaywrightService;

interface Operations extends Azure.ResourceManager.Operations {}

@doc("An account resource")
@doc("A Playwright service account resource.")
model Account is TrackedResource<AccountProperties> {
@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.")
Expand Down Expand Up @@ -68,18 +68,24 @@ enum EnablementStatus {
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<Account, AccountProperties> {}
extends TrackedResourceOperations<Account, AccountProperties> {
@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.")
Expand All @@ -90,38 +96,65 @@ model Location {
name: string;
}

@doc("A quota resource")
@doc("A subscription quota resource.")
@parentResource(Location)
model Quota is ProxyResource<QuotaProperties> {
@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")
@doc("The status of the last operation.")
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<AccountQuotaProperties> {
@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;
Expand All @@ -143,10 +176,6 @@ model FreeTrialProperties {
@minValue(0)
@maxValue(100)
percentageUsed: decimal;

@doc("The free-trial state.")
@visibility("read")
state: FreeTrialState;
}

@doc("The free-trial state.")
Expand All @@ -156,13 +185,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<Quota>;

@doc("List quotas for a given subscription Id.")
listBySubscription is ArmListBySubscription<Quota>;
}

@armResourceOperations
interface AccountQuotas {
@doc("Get quota by name for an account.")
get is ArmResourceRead<AccountQuota>;

@doc("List quotas for a given account.")
listByAccount is ArmResourceListByParent<AccountQuota>;
}
Loading