Accounts - Create Or Update
Create a Account
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzurePlaywrightService/accounts/{accountName}?api-version=2024-12-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
account
|
path | True |
string minLength: 3maxLength: 64 pattern: ^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$ |
Name of account. |
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
The geo-location where the resource lives |
properties.localAuth |
When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. |
||
properties.regionalAffinity |
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. |
||
properties.reporting |
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. |
||
properties.scalableExecution |
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. |
||
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Resource 'Account' update operation succeeded |
|
201 Created |
Resource 'Account' create operation succeeded Headers Retry-After: integer |
|
Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Accounts_CreateOrUpdate
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/dummyrg/providers/Microsoft.AzurePlaywrightService/accounts/myPlaywrightAccount?api-version=2024-12-01
{
"location": "westus",
"tags": {
"Team": "Dev Exp"
},
"properties": {
"regionalAffinity": "Enabled"
}
}
Sample response
{
"location": "westus",
"properties": {
"dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com",
"provisioningState": "Succeeded",
"regionalAffinity": "Enabled",
"scalableExecution": "Enabled",
"reporting": "Enabled",
"localAuth": "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"
}
}
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
{
"location": "westus",
"properties": {
"dashboardUri": "https://dashboard.00000000-0000-0000-0000-000000000000.domain.com",
"provisioningState": "Succeeded",
"regionalAffinity": "Enabled",
"scalableExecution": "Enabled",
"reporting": "Enabled",
"localAuth": "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"
}
}
Definitions
Name | Description |
---|---|
Account |
A Playwright service account resource. |
created |
The type of identity that created the resource. |
Enablement |
The enablement status of a feature. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Provisioning |
The status of the current operation. |
system |
Metadata pertaining to creation and last modification of the resource. |
Account
A Playwright service account resource.
Name | Type | Default value | Description |
---|---|---|---|
id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
|
location |
string |
The geo-location where the resource lives |
|
name |
string |
The name of the resource |
|
properties.dashboardUri |
string (uri) |
The Playwright testing dashboard URI for the account resource. |
|
properties.localAuth | Disabled |
When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations. |
|
properties.provisioningState |
The status of the last operation. |
||
properties.regionalAffinity | Enabled |
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. |
|
properties.reporting | Enabled |
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. |
|
properties.scalableExecution | Enabled |
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. |
|
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
||
tags |
object |
Resource tags. |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
createdByType
The type of identity that created the resource.
Value | Description |
---|---|
User | |
Application | |
ManagedIdentity | |
Key |
EnablementStatus
The enablement status of a feature.
Value | Description |
---|---|
Enabled |
The feature is Enabled. |
Disabled |
The feature is Disabled. |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
ProvisioningState
The status of the current operation.
Value | Description |
---|---|
Succeeded |
Resource has been created. |
Failed |
Resource creation failed. |
Canceled |
Resource creation was canceled. |
Creating |
Creation in progress.. |
Deleting |
Deletion in progress.. |
Accepted |
Change accepted for processing.. |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |