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-09-25)

- Azure Resource Manager Standby Pool client library for Java. This package contains Microsoft Azure SDK for Standby Pool Management SDK. 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
13 changes: 5 additions & 8 deletions sdk/standbypool/azure-resourcemanager-standbypool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-standbypool</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -45,15 +45,11 @@ Azure Management Libraries require a `TokenCredential` implementation for authen

### Authentication

By default, Microsoft Entra ID token authentication depends on correct configuration of the following environment variables.
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.

- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.

With above configuration, `azure` client can be authenticated using the following code:
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
Expand Down Expand Up @@ -97,6 +93,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[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_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
Expand Down
169 changes: 127 additions & 42 deletions sdk/standbypool/azure-resourcemanager-standbypool/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

- [List](#operations_list)

## StandbyContainerGroupPoolRuntimeViews

- [Get](#standbycontainergrouppoolruntimeviews_get)
- [ListByStandbyPool](#standbycontainergrouppoolruntimeviews_listbystandbypool)

## StandbyContainerGroupPools

- [CreateOrUpdate](#standbycontainergrouppools_createorupdate)
Expand All @@ -14,6 +19,11 @@
- [ListByResourceGroup](#standbycontainergrouppools_listbyresourcegroup)
- [Update](#standbycontainergrouppools_update)

## StandbyVirtualMachinePoolRuntimeViews

- [Get](#standbyvirtualmachinepoolruntimeviews_get)
- [ListByStandbyPool](#standbyvirtualmachinepoolruntimeviews_listbystandbypool)

## StandbyVirtualMachinePools

- [CreateOrUpdate](#standbyvirtualmachinepools_createorupdate)
Expand All @@ -35,8 +45,7 @@
*/
public final class OperationsListSamples {
/*
* x-ms-original-file:
* specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/Operations_List.json
* x-ms-original-file: 2024-03-01/Operations_List.json
*/
/**
* Sample code: Operations_List.
Expand All @@ -49,6 +58,52 @@ public final class OperationsListSamples {
}
```

### StandbyContainerGroupPoolRuntimeViews_Get

```java
/**
* Samples for StandbyContainerGroupPoolRuntimeViews Get.
*/
public final class StandbyContainerGroupPoolRuntimeViewsGetSamples {
/*
* x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_Get.json
*/
/**
* Sample code: StandbyContainerGroupPoolRuntimeViews_Get.
*
* @param manager Entry point to StandbyPoolManager.
*/
public static void
standbyContainerGroupPoolRuntimeViewsGet(com.azure.resourcemanager.standbypool.StandbyPoolManager manager) {
manager.standbyContainerGroupPoolRuntimeViews()
.getWithResponse("rgstandbypool", "pool", "latest", com.azure.core.util.Context.NONE);
}
}
```

### StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool

```java
/**
* Samples for StandbyContainerGroupPoolRuntimeViews ListByStandbyPool.
*/
public final class StandbyContainerGroupPoolRuntimeViewsListByStandbyPoolSamples {
/*
* x-ms-original-file: 2024-03-01/StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.json
*/
/**
* Sample code: StandbyContainerGroupPoolRuntimeViews_ListByStandbyPool.
*
* @param manager Entry point to StandbyPoolManager.
*/
public static void standbyContainerGroupPoolRuntimeViewsListByStandbyPool(
com.azure.resourcemanager.standbypool.StandbyPoolManager manager) {
manager.standbyContainerGroupPoolRuntimeViews()
.listByStandbyPool("rgstandbypool", "pool", com.azure.core.util.Context.NONE);
}
}
```

### StandbyContainerGroupPools_CreateOrUpdate

```java
Expand All @@ -67,8 +122,7 @@ import java.util.Map;
*/
public final class StandbyContainerGroupPoolsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/
* StandbyContainerGroupPools_CreateOrUpdate.json
* x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_CreateOrUpdate.json
*/
/**
* Sample code: StandbyContainerGroupPools_CreateOrUpdate.
Expand All @@ -87,10 +141,10 @@ public final class StandbyContainerGroupPoolsCreateOrUpdateSamples {
.withRefillPolicy(RefillPolicy.ALWAYS))
.withContainerGroupProperties(new ContainerGroupProperties()
.withContainerGroupProfile(new ContainerGroupProfile().withId(
"/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile")
"/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile")
.withRevision(1L))
.withSubnetIds(Arrays.asList(new Subnet().withId(
"/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet")))))
"/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet")))))
.create();
}

Expand All @@ -116,9 +170,7 @@ public final class StandbyContainerGroupPoolsCreateOrUpdateSamples {
*/
public final class StandbyContainerGroupPoolsDeleteSamples {
/*
* x-ms-original-file:
* specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/StandbyContainerGroupPools_Delete.
* json
* x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Delete.json
*/
/**
* Sample code: StandbyContainerGroupPools_Delete.
Expand All @@ -140,8 +192,7 @@ public final class StandbyContainerGroupPoolsDeleteSamples {
*/
public final class StandbyContainerGroupPoolsGetByResourceGroupSamples {
/*
* x-ms-original-file:
* specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/StandbyContainerGroupPools_Get.json
* x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Get.json
*/
/**
* Sample code: StandbyContainerGroupPools_Get.
Expand All @@ -163,8 +214,7 @@ public final class StandbyContainerGroupPoolsGetByResourceGroupSamples {
*/
public final class StandbyContainerGroupPoolsListSamples {
/*
* x-ms-original-file: specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/
* StandbyContainerGroupPools_ListBySubscription.json
* x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListBySubscription.json
*/
/**
* Sample code: StandbyContainerGroupPools_ListBySubscription.
Expand All @@ -186,8 +236,7 @@ public final class StandbyContainerGroupPoolsListSamples {
*/
public final class StandbyContainerGroupPoolsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/
* StandbyContainerGroupPools_ListByResourceGroup.json
* x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_ListByResourceGroup.json
*/
/**
* Sample code: StandbyContainerGroupPools_ListByResourceGroup.
Expand Down Expand Up @@ -220,9 +269,7 @@ import java.util.Map;
*/
public final class StandbyContainerGroupPoolsUpdateSamples {
/*
* x-ms-original-file:
* specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/StandbyContainerGroupPools_Update.
* json
* x-ms-original-file: 2024-03-01/StandbyContainerGroupPools_Update.json
*/
/**
* Sample code: StandbyContainerGroupPools_Update.
Expand All @@ -241,10 +288,10 @@ public final class StandbyContainerGroupPoolsUpdateSamples {
.withRefillPolicy(RefillPolicy.ALWAYS))
.withContainerGroupProperties(new ContainerGroupProperties()
.withContainerGroupProfile(new ContainerGroupProfile().withId(
"/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile")
"/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.ContainerInstance/containerGroupProfiles/cgProfile")
.withRevision(2L))
.withSubnetIds(Arrays.asList(new Subnet().withId(
"/subscriptions/8cf6c1b6-c80f-437c-87ad-45fbaff54f73/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet")))))
"/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Network/virtualNetworks/cgSubnet/subnets/cgSubnet")))))
.apply();
}

Expand All @@ -262,6 +309,52 @@ public final class StandbyContainerGroupPoolsUpdateSamples {
}
```

### StandbyVirtualMachinePoolRuntimeViews_Get

```java
/**
* Samples for StandbyVirtualMachinePoolRuntimeViews Get.
*/
public final class StandbyVirtualMachinePoolRuntimeViewsGetSamples {
/*
* x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_Get.json
*/
/**
* Sample code: StandbyVirtualMachinePoolRuntimeViews_Get.
*
* @param manager Entry point to StandbyPoolManager.
*/
public static void
standbyVirtualMachinePoolRuntimeViewsGet(com.azure.resourcemanager.standbypool.StandbyPoolManager manager) {
manager.standbyVirtualMachinePoolRuntimeViews()
.getWithResponse("rgstandbypool", "pool", "latest", com.azure.core.util.Context.NONE);
}
}
```

### StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool

```java
/**
* Samples for StandbyVirtualMachinePoolRuntimeViews ListByStandbyPool.
*/
public final class StandbyVirtualMachinePoolRuntimeViewsListByStandbyPoolSamples {
/*
* x-ms-original-file: 2024-03-01/StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.json
*/
/**
* Sample code: StandbyVirtualMachinePoolRuntimeViews_ListByStandbyPool.
*
* @param manager Entry point to StandbyPoolManager.
*/
public static void standbyVirtualMachinePoolRuntimeViewsListByStandbyPool(
com.azure.resourcemanager.standbypool.StandbyPoolManager manager) {
manager.standbyVirtualMachinePoolRuntimeViews()
.listByStandbyPool("rgstandbypool", "pool", com.azure.core.util.Context.NONE);
}
}
```

### StandbyVirtualMachinePools_CreateOrUpdate

```java
Expand All @@ -276,8 +369,7 @@ import java.util.Map;
*/
public final class StandbyVirtualMachinePoolsCreateOrUpdateSamples {
/*
* x-ms-original-file: specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/
* StandbyVirtualMachinePools_CreateOrUpdate.json
* x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_CreateOrUpdate.json
*/
/**
* Sample code: StandbyVirtualMachinePools_CreateOrUpdate.
Expand All @@ -292,10 +384,11 @@ public final class StandbyVirtualMachinePoolsCreateOrUpdateSamples {
.withExistingResourceGroup("rgstandbypool")
.withTags(mapOf())
.withProperties(new StandbyVirtualMachinePoolResourceProperties()
.withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(304L))
.withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(304L)
.withMinReadyCapacity(300L))
.withVirtualMachineState(VirtualMachineState.RUNNING)
.withAttachedVirtualMachineScaleSetId(
"/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"))
"/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"))
.create();
}

Expand All @@ -321,9 +414,7 @@ public final class StandbyVirtualMachinePoolsCreateOrUpdateSamples {
*/
public final class StandbyVirtualMachinePoolsDeleteSamples {
/*
* x-ms-original-file:
* specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/StandbyVirtualMachinePools_Delete.
* json
* x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Delete.json
*/
/**
* Sample code: StandbyVirtualMachinePools_Delete.
Expand All @@ -345,8 +436,7 @@ public final class StandbyVirtualMachinePoolsDeleteSamples {
*/
public final class StandbyVirtualMachinePoolsGetByResourceGroupSamples {
/*
* x-ms-original-file:
* specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/StandbyVirtualMachinePools_Get.json
* x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Get.json
*/
/**
* Sample code: StandbyVirtualMachinePools_Get.
Expand All @@ -368,8 +458,7 @@ public final class StandbyVirtualMachinePoolsGetByResourceGroupSamples {
*/
public final class StandbyVirtualMachinePoolsListSamples {
/*
* x-ms-original-file: specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/
* StandbyVirtualMachinePools_ListBySubscription.json
* x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListBySubscription.json
*/
/**
* Sample code: StandbyVirtualMachinePools_ListBySubscription.
Expand All @@ -391,8 +480,7 @@ public final class StandbyVirtualMachinePoolsListSamples {
*/
public final class StandbyVirtualMachinePoolsListByResourceGroupSamples {
/*
* x-ms-original-file: specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/
* StandbyVirtualMachinePools_ListByResourceGroup.json
* x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_ListByResourceGroup.json
*/
/**
* Sample code: StandbyVirtualMachinePools_ListByResourceGroup.
Expand Down Expand Up @@ -421,9 +509,7 @@ import java.util.Map;
*/
public final class StandbyVirtualMachinePoolsUpdateSamples {
/*
* x-ms-original-file:
* specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/StandbyVirtualMachinePools_Update.
* json
* x-ms-original-file: 2024-03-01/StandbyVirtualMachinePools_Update.json
*/
/**
* Sample code: StandbyVirtualMachinePools_Update.
Expand All @@ -438,10 +524,11 @@ public final class StandbyVirtualMachinePoolsUpdateSamples {
resource.update()
.withTags(mapOf())
.withProperties(new StandbyVirtualMachinePoolResourceUpdateProperties()
.withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(304L))
.withElasticityProfile(new StandbyVirtualMachinePoolElasticityProfile().withMaxReadyCapacity(304L)
.withMinReadyCapacity(300L))
.withVirtualMachineState(VirtualMachineState.RUNNING)
.withAttachedVirtualMachineScaleSetId(
"/subscriptions/8CC31D61-82D7-4B2B-B9DC-6B924DE7D229/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"))
"/subscriptions/00000000-0000-0000-0000-000000000009/resourceGroups/rgstandbypool/providers/Microsoft.Compute/virtualMachineScaleSets/myVmss"))
.apply();
}

Expand All @@ -467,8 +554,7 @@ public final class StandbyVirtualMachinePoolsUpdateSamples {
*/
public final class StandbyVirtualMachinesGetSamples {
/*
* x-ms-original-file:
* specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/StandbyVirtualMachines_Get.json
* x-ms-original-file: 2024-03-01/StandbyVirtualMachines_Get.json
*/
/**
* Sample code: StandbyVirtualMachines_Get.
Expand All @@ -490,8 +576,7 @@ public final class StandbyVirtualMachinesGetSamples {
*/
public final class StandbyVirtualMachinesListByStandbyVirtualMachinePoolResourceSamples {
/*
* x-ms-original-file: specification/standbypool/StandbyPool.Management/examples/2023-12-01-preview/
* StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json
* x-ms-original-file: 2024-03-01/StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.json
*/
/**
* Sample code: StandbyVirtualMachines_ListByStandbyVirtualMachinePoolResource.
Expand Down
4 changes: 2 additions & 2 deletions sdk/standbypool/azure-resourcemanager-standbypool/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the MIT License.
Code generated by Microsoft (R) TypeSpec Code Generator.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) TypeSpec Code Generator.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
Expand Down
Loading