Share via


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
accountName
path True

string

minLength: 3
maxLength: 64
pattern: ^[a-zA-Z]{1}[a-zA-Z0-9]{2,63}$

Name of account.

resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
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

EnablementStatus

When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations.

properties.regionalAffinity

EnablementStatus

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

EnablementStatus

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

EnablementStatus

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

Account

Resource 'Account' update operation succeeded

201 Created

Account

Resource 'Account' create operation succeeded

Headers

Retry-After: integer

Other Status Codes

ErrorResponse

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.

createdByType

The type of identity that created the resource.

EnablementStatus

The enablement status of a feature.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

ProvisioningState

The status of the current operation.

systemData

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

EnablementStatus

Disabled

When enabled, this feature allows the workspace to use local auth (through service access token) for executing operations.

properties.provisioningState

ProvisioningState

The status of the last operation.

properties.regionalAffinity

EnablementStatus

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

EnablementStatus

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

EnablementStatus

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

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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

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

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

createdByType

The type of identity that last modified the resource.