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
2 changes: 1 addition & 1 deletion sdk/clientcore/annotation-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
<dependency>
<groupId>io.clientcore</groupId>
<artifactId>core</artifactId>
<version>1.0.0-beta.9</version> <!-- {x-version-update;io.clientcore:core;dependency} -->
<version>1.0.0-beta.8</version> <!-- {x-version-update;io.clientcore:core;dependency} -->
</dependency>

<!-- Unit Test -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
# Release History

## 1.1.0-beta.1 (Unreleased)
## 1.1.0-beta.1 (2025-04-07)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
- Azure Resource Manager Playwright Testing client library for Java. This package contains Microsoft Azure SDK for Playwright Testing Management SDK. Microsoft.AzurePlaywrightService Resource Provider Management API. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

## 1.0.0 (2024-12-16)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
PlaywrightTestingManager manager = PlaywrightTestingManager
.authenticate(credential, profile);
```

The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.

See [Authentication][authenticate] for more options.

Expand All @@ -70,6 +70,14 @@ See [API design][design] for general introduction on design and key concepts on

## Examples

```java
account = playwrightTestingManager.accounts()
.define(accountName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED))
.create();
```
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md)


Expand Down Expand Up @@ -100,5 +108,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/


202 changes: 101 additions & 101 deletions sdk/playwrighttesting/azure-resourcemanager-playwrighttesting/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,44 @@
### AccountQuotas_Get

```java
import com.azure.resourcemanager.playwrighttesting.models.QuotaNames;
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;

/**
* Samples for AccountQuotas Get.
* Samples for Accounts Update.
*/
public final class AccountQuotasGetSamples {
public final class AccountsUpdateSamples {
/*
* x-ms-original-file: 2024-12-01/AccountQuotas_Get.json
* x-ms-original-file: 2024-12-01/Accounts_Update.json
*/
/**
* Sample code: AccountQuotas_Get.
* Sample code: Accounts_Update.
*
* @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);
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("Team", "Dev Exp", "Division", "LT"))
.withProperties(new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.ENABLED))
.apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
```
Expand All @@ -50,20 +70,19 @@ public final class AccountQuotasGetSamples {

```java
/**
* Samples for AccountQuotas ListByAccount.
* Samples for Accounts Delete.
*/
public final class AccountQuotasListByAccountSamples {
public final class AccountsDeleteSamples {
/*
* x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json
* x-ms-original-file: 2024-12-01/Accounts_Delete.json
*/
/**
* Sample code: AccountQuotas_ListByAccount.
* Sample code: Accounts_Delete.
*
* @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);
public static void accountsDelete(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accounts().delete("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
}
}
```
Expand Down Expand Up @@ -97,44 +116,20 @@ public final class AccountsCheckNameAvailabilitySamples {
### 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;

/**
* Samples for Accounts CreateOrUpdate.
* Samples for Operations List.
*/
public final class AccountsCreateOrUpdateSamples {
public final class OperationsListSamples {
/*
* x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json
* x-ms-original-file: 2024-12-01/Operations_List.json
*/
/**
* Sample code: Accounts_CreateOrUpdate.
* Sample code: Operations_List.
*
* @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"))
.withProperties(new AccountProperties().withRegionalAffinity(EnablementStatus.ENABLED))
.create();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
public static void operationsList(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.operations().list(com.azure.core.util.Context.NONE);
}
}
```
Expand All @@ -143,64 +138,43 @@ public final class AccountsCreateOrUpdateSamples {

```java
/**
* Samples for Accounts Delete.
* Samples for Quotas ListBySubscription.
*/
public final class AccountsDeleteSamples {
public final class QuotasListBySubscriptionSamples {
/*
* x-ms-original-file: 2024-12-01/Accounts_Delete.json
* x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json
*/
/**
* Sample code: Accounts_Delete.
* Sample code: Quotas_ListBySubscription.
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void accountsDelete(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accounts().delete("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
public static void
quotasListBySubscription(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.quotas().listBySubscription("eastus", com.azure.core.util.Context.NONE);
}
}
```

### Accounts_Update

```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 com.azure.resourcemanager.playwrighttesting.models.QuotaNames;

/**
* Samples for Accounts Update.
* Samples for Quotas Get.
*/
public final class AccountsUpdateSamples {
public final class QuotasGetSamples {
/*
* x-ms-original-file: 2024-12-01/Accounts_Update.json
* x-ms-original-file: 2024-12-01/Quotas_Get.json
*/
/**
* Sample code: Accounts_Update.
* Sample code: Quotas_Get.
*
* @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("Team", "Dev Exp", "Division", "LT"))
.withProperties(new AccountUpdateProperties().withRegionalAffinity(EnablementStatus.ENABLED))
.apply();
}

// Use "Map.of" if available
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
public static void quotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.quotas().getWithResponse("eastus", QuotaNames.SCALABLE_EXECUTION, com.azure.core.util.Context.NONE);
}
}
```
Expand All @@ -209,64 +183,90 @@ public final class AccountsUpdateSamples {

```java
/**
* Samples for Operations List.
* Samples for AccountQuotas ListByAccount.
*/
public final class OperationsListSamples {
public final class AccountQuotasListByAccountSamples {
/*
* x-ms-original-file: 2024-12-01/Operations_List.json
* x-ms-original-file: 2024-12-01/AccountQuotas_ListByAccount.json
*/
/**
* Sample code: Operations_List.
* Sample code: AccountQuotas_ListByAccount.
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void operationsList(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.operations().list(com.azure.core.util.Context.NONE);
public static void
accountQuotasListByAccount(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accountQuotas().listByAccount("dummyrg", "myPlaywrightAccount", com.azure.core.util.Context.NONE);
}
}
```

### Quotas_Get

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

/**
* Samples for Quotas Get.
* Samples for Accounts CreateOrUpdate.
*/
public final class QuotasGetSamples {
public final class AccountsCreateOrUpdateSamples {
/*
* x-ms-original-file: 2024-12-01/Quotas_Get.json
* x-ms-original-file: 2024-12-01/Accounts_CreateOrUpdate.json
*/
/**
* Sample code: Quotas_Get.
* Sample code: Accounts_CreateOrUpdate.
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void quotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.quotas().getWithResponse("eastus", QuotaNames.SCALABLE_EXECUTION, com.azure.core.util.Context.NONE);
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
@SuppressWarnings("unchecked")
private static <T> Map<String, T> mapOf(Object... inputs) {
Map<String, T> map = new HashMap<>();
for (int i = 0; i < inputs.length; i += 2) {
String key = (String) inputs[i];
T value = (T) inputs[i + 1];
map.put(key, value);
}
return map;
}
}
```

### Quotas_ListBySubscription

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

/**
* Samples for Quotas ListBySubscription.
* Samples for AccountQuotas Get.
*/
public final class QuotasListBySubscriptionSamples {
public final class AccountQuotasGetSamples {
/*
* x-ms-original-file: 2024-12-01/Quotas_ListBySubscription.json
* x-ms-original-file: 2024-12-01/AccountQuotas_Get.json
*/
/**
* Sample code: Quotas_ListBySubscription.
* Sample code: AccountQuotas_Get.
*
* @param manager Entry point to PlaywrightTestingManager.
*/
public static void
quotasListBySubscription(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.quotas().listBySubscription("eastus", com.azure.core.util.Context.NONE);
public static void accountQuotasGet(com.azure.resourcemanager.playwrighttesting.PlaywrightTestingManager manager) {
manager.accountQuotas()
.getWithResponse("dummyrg", "myPlaywrightAccount", QuotaNames.SCALABLE_EXECUTION,
com.azure.core.util.Context.NONE);
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
Expand Down
Loading