Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.2 (Unreleased)
## 1.0.0-beta.1 (2024-01-30)

- Azure Resource Manager Playwright Testing client library for Java. This package contains Microsoft Azure SDK for Playwright Testing Management SDK. Azure Playwright testing management service. Package tag package-2024-02-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Azure Resource Manager Playwright Testing client library for Java.

This package contains Microsoft Azure SDK for Playwright Testing Management SDK. Azure Playwright testing management service. Package tag package-2023-10-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
This package contains Microsoft Azure SDK for Playwright Testing Management SDK. Azure Playwright testing management service. Package tag package-2024-02-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## We'd love to hear your feedback

Expand Down Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-playwrighttesting</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
Expand Down Expand Up @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
[docs]: https://azure.github.io/azure-sdk-for-java/
[jdk]: https://docs.microsoft.com/java/azure/jdk/
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
[azure_subscription]: https://azure.microsoft.com/free/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
Expand Down
188 changes: 132 additions & 56 deletions sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Code snippets and samples


## AccountQuotas

- [Get](#accountquotas_get)
- [ListByAccount](#accountquotas_listbyaccount)

## Accounts

- [CheckNameAvailability](#accounts_checknameavailability)
- [CreateOrUpdate](#accounts_createorupdate)
- [Delete](#accounts_delete)
- [GetByResourceGroup](#accounts_getbyresourcegroup)
Expand All @@ -18,33 +24,97 @@

- [Get](#quotas_get)
- [ListBySubscription](#quotas_listbysubscription)
### AccountQuotas_Get

```java
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
import java.util.stream.Collectors;

/**
* Samples for AccountQuotas Get.
*/
public final class AccountQuotasGetSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_Get.json
*/
/**
* Sample code: AccountQuotas_Get.
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountQuotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accountQuotas().getWithResponse("dummyrg", "myPlaywrightAccount", QuotaNames.SCALABLE_EXECUTION, com.azure.core.util.Context.NONE);
}
}
```

### AccountQuotas_ListByAccount

```java
/**
* Samples for AccountQuotas ListByAccount.
*/
public final class AccountQuotasListByAccountSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/AccountQuotas_ListByAccount.json
*/
/**
* Sample code: AccountQuotas_ListByAccount.
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountQuotasListByAccount(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accountQuotas().listByAccount("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
}
}
```

### Accounts_CheckNameAvailability

```java
import com.azure.resourcemanager.playwrighttesting.models.CheckNameAvailabilityRequest;

/**
* Samples for Accounts CheckNameAvailability.
*/
public final class AccountsCheckNameAvailabilitySamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CheckNameAvailability.json
*/
/**
* Sample code: Accounts_CheckNameAvailability.
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountsCheckNameAvailability(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accounts().checkNameAvailabilityWithResponse(new CheckNameAvailabilityRequest().withName("dummyName").withType("Microsoft.AzurePlaywrightService/Accounts"), com.azure.core.util.Context.NONE);
}
}
```

### Accounts_CreateOrUpdate

```java
import com.azure.resourcemanager.playwrighttesting.models.AccountProperties;
import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

/** Samples for Accounts CreateOrUpdate. */
/**
* Samples for Accounts CreateOrUpdate.
*/
public final class AccountsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_CreateOrUpdate.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_CreateOrUpdate.json
*/
/**
* Sample code: Accounts_CreateOrUpdate.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountsCreateOrUpdate(
com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager
.accounts()
.define("myPlaywrightAccount")
.withRegion("westus")
.withExistingResourceGroup("dummyrg")
.withTags(mapOf("Team", "Dev Exp"))
.withRegionalAffinity(EnablementStatus.ENABLED)
.create();
public static void accountsCreateOrUpdate(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accounts().define("myPlaywrightAccount").withRegion("westus").withExistingResourceGroup("dummyrg").withTags(mapOf("Team", "Dev Exp")).withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED)).create();
}

// Use "Map.of" if available
Expand All @@ -64,14 +134,16 @@ public final class AccountsCreateOrUpdateSamples {
### Accounts_Delete

```java
/** Samples for Accounts Delete. */
/**
* Samples for Accounts Delete.
*/
public final class AccountsDeleteSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Delete.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Delete.json
*/
/**
* Sample code: Accounts_Delete.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountsDelete(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
Expand All @@ -83,39 +155,40 @@ public final class AccountsDeleteSamples {
### Accounts_GetByResourceGroup

```java
/** Samples for Accounts GetByResourceGroup. */
/**
* Samples for Accounts GetByResourceGroup.
*/
public final class AccountsGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Get.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Get.json
*/
/**
* Sample code: Accounts_Get.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountsGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager
.accounts()
.getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
manager.accounts().getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
}
}
```

### Accounts_List

```java
/** Samples for Accounts List. */
/**
* Samples for Accounts List.
*/
public final class AccountsListSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListBySubscription.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_ListBySubscription.json
*/
/**
* Sample code: Accounts_ListBySubscription.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountsListBySubscription(
com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
public static void accountsListBySubscription(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accounts().list(com.azure.core.util.Context.NONE);
}
}
Expand All @@ -124,18 +197,19 @@ public final class AccountsListSamples {
### Accounts_ListByResourceGroup

```java
/** Samples for Accounts ListByResourceGroup. */
/**
* Samples for Accounts ListByResourceGroup.
*/
public final class AccountsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_ListByResourceGroup.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_ListByResourceGroup.json
*/
/**
* Sample code: Accounts_ListByResourceGroup.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountsListByResourceGroup(
com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
public static void accountsListByResourceGroup(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accounts().listByResourceGroup("dummyrg", com.azure.core.util.Context.NONE);
}
}
Expand All @@ -145,31 +219,27 @@ public final class AccountsListByResourceGroupSamples {

```java
import com.azure.resourcemanager.playwrighttesting.models.Account;
import com.azure.resourcemanager.playwrighttesting.models.AccountUpdateProperties;
import com.azure.resourcemanager.playwrighttesting.models.EnablementStatus;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;

/** Samples for Accounts Update. */
/**
* Samples for Accounts Update.
*/
public final class AccountsUpdateSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Accounts_Update.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Accounts_Update.json
*/
/**
* Sample code: Accounts_Update.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountsUpdate(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
Account resource =
manager
.accounts()
.getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE)
.getValue();
resource
.update()
.withTags(mapOf("Division", "LT", "Team", "Dev Exp"))
.withRegionalAffinity(EnablementStatus.ENABLED)
.apply();
Account resource = manager.accounts().getByResourceGroupWithResponse("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE).getValue();
resource.update().withTags(mapOf("Division", "LT", "Team", "Dev Exp")).withProperties(new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.ENABLED)).apply();
}

// Use "Map.of" if available
Expand All @@ -189,14 +259,16 @@ public final class AccountsUpdateSamples {
### Operations_List

```java
/** Samples for Operations List. */
/**
* Samples for Operations List.
*/
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Operations_List.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Operations_List.json
*/
/**
* Sample code: Operations_List.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void operationsList(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
Expand All @@ -209,15 +281,18 @@ public final class OperationsListSamples {

```java
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
import java.util.stream.Collectors;

/** Samples for Quotas Get. */
/**
* Samples for Quotas Get.
*/
public final class QuotasGetSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_Get.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Quotas_Get.json
*/
/**
* Sample code: Quotas_Get.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void quotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
Expand All @@ -229,18 +304,19 @@ public final class QuotasGetSamples {
### Quotas_ListBySubscription

```java
/** Samples for Quotas ListBySubscription. */
/**
* Samples for Quotas ListBySubscription.
*/
public final class QuotasListBySubscriptionSamples {
/*
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/preview/2023-10-01-preview/examples/Quotas_ListBySubscription.json
* x-ms-original-file: specification/playwrighttesting/resource-manager/Microsoft.AzurePlaywrightService/stable/2024-02-01/examples/Quotas_ListBySubscription.json
*/
/**
* Sample code: Quotas_ListBySubscription.
*
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void quotasListBySubscription(
com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
public static void quotasListBySubscription(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.quotas().listBySubscription("eastus", com.azure.core.util.Context.NONE);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for Playwright Testing Management</name>
<description>This package contains Microsoft Azure SDK for Playwright Testing Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Playwright testing management service. Package tag package-2023-10-01-preview.</description>
<description>This package contains Microsoft Azure SDK for Playwright Testing Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Azure Playwright testing management service. Package tag package-2024-02-01.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand Down Expand Up @@ -88,8 +88,6 @@
<version>4.11.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
<!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release -->
<!-- of Mockito supporting Java 8 as a baseline. -->
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
Expand Down
Loading