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.3 (Unreleased)
## 1.0.0-beta.1 (2023-05-10)

- Azure Resource Manager BareMetalInfrastructure client library for Java. This package contains Microsoft Azure SDK for BareMetalInfrastructure Management SDK. The BareMetalInfrastructure Management client. Package tag package-2023-04-06. 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 BareMetalInfrastructure client library for Java.

This package contains Microsoft Azure SDK for BareMetalInfrastructure Management SDK. The BareMetalInfrastructure Management client. Package tag package-2021-08-09. 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 BareMetalInfrastructure Management SDK. The BareMetalInfrastructure Management client. Package tag package-2023-04-06. 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-baremetalinfrastructure</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
- [ListByResourceGroup](#azurebaremetalinstances_listbyresourcegroup)
- [Update](#azurebaremetalinstances_update)

## AzureBareMetalStorageInstances

- [Create](#azurebaremetalstorageinstances_create)
- [Delete](#azurebaremetalstorageinstances_delete)
- [GetByResourceGroup](#azurebaremetalstorageinstances_getbyresourcegroup)
- [List](#azurebaremetalstorageinstances_list)
- [ListByResourceGroup](#azurebaremetalstorageinstances_listbyresourcegroup)
- [Update](#azurebaremetalstorageinstances_update)

## Operations

- [List](#operations_list)
Expand All @@ -17,7 +26,7 @@
/** Samples for AzureBareMetalInstances GetByResourceGroup. */
public final class AzureBareMetalInstancesGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_Get.json
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalInstances_Get.json
*/
/**
* Sample code: Get an AzureBareMetal instance.
Expand All @@ -40,7 +49,7 @@ public final class AzureBareMetalInstancesGetByResourceGroupSamples {
/** Samples for AzureBareMetalInstances List. */
public final class AzureBareMetalInstancesListSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_ListBySubscription.json
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalInstances_ListBySubscription.json
*/
/**
* Sample code: List all AzureBareMetal instances in a subscription.
Expand All @@ -60,7 +69,7 @@ public final class AzureBareMetalInstancesListSamples {
/** Samples for AzureBareMetalInstances ListByResourceGroup. */
public final class AzureBareMetalInstancesListByResourceGroupSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_ListByResourceGroup.json
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalInstances_ListByResourceGroup.json
*/
/**
* Sample code: List all AzureBareMetal instances in a resource group.
Expand All @@ -84,7 +93,7 @@ import java.util.Map;
/** Samples for AzureBareMetalInstances Update. */
public final class AzureBareMetalInstancesUpdateSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_PatchTags.json
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalInstances_PatchTags.json
*/
/**
* Sample code: Update Tags field of an AzureBareMetal instance.
Expand All @@ -103,7 +112,7 @@ public final class AzureBareMetalInstancesUpdateSamples {
}

/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalInstances_PatchTags_Delete.json
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalInstances_PatchTags_Delete.json
*/
/**
* Sample code: Delete Tags field of an AzureBareMetal instance.
Expand Down Expand Up @@ -131,13 +140,215 @@ public final class AzureBareMetalInstancesUpdateSamples {
}
```

### AzureBareMetalStorageInstances_Create

```java
import com.azure.resourcemanager.baremetalinfrastructure.models.ProvisioningState;
import com.azure.resourcemanager.baremetalinfrastructure.models.StorageBillingProperties;
import com.azure.resourcemanager.baremetalinfrastructure.models.StorageProperties;
import java.util.HashMap;
import java.util.Map;

/** Samples for AzureBareMetalStorageInstances Create. */
public final class AzureBareMetalStorageInstancesCreateSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalStorageInstances_Create.json
*/
/**
* Sample code: Put a new AzureBareMetalStorageInstance.
*
* @param manager Entry point to BareMetalInfrastructureManager.
*/
public static void putANewAzureBareMetalStorageInstance(
com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager) {
manager
.azureBareMetalStorageInstances()
.define("myAzureBareMetalStorageInstance")
.withRegion("westus2")
.withExistingResourceGroup("myResourceGroup")
.withTags(mapOf("key", "value"))
.withAzureBareMetalStorageInstanceUniqueIdentifier("23415635-4d7e-41dc-9598-8194f22c24e9")
.withStorageProperties(
new StorageProperties()
.withProvisioningState(ProvisioningState.SUCCEEDED)
.withOfferingType("EPIC")
.withStorageType("FC")
.withGeneration("Gen4")
.withHardwareType("NetApp")
.withWorkloadType("ODB")
.withStorageBillingProperties(
new StorageBillingProperties()
.withBillingMode("PAYG")
.withAzureBareMetalStorageInstanceSize("")))
.create();
}

@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;
}
}
```

### AzureBareMetalStorageInstances_Delete

```java
/** Samples for AzureBareMetalStorageInstances Delete. */
public final class AzureBareMetalStorageInstancesDeleteSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalStorageInstances_Delete.json
*/
/**
* Sample code: Delete an AzureBareMetalStorageInstance.
*
* @param manager Entry point to BareMetalInfrastructureManager.
*/
public static void deleteAnAzureBareMetalStorageInstance(
com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager) {
manager
.azureBareMetalStorageInstances()
.deleteByResourceGroupWithResponse(
"myResourceGroup", "myAzureBareMetalStorageInstance", com.azure.core.util.Context.NONE);
}
}
```

### AzureBareMetalStorageInstances_GetByResourceGroup

```java
/** Samples for AzureBareMetalStorageInstances GetByResourceGroup. */
public final class AzureBareMetalStorageInstancesGetByResourceGroupSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalStorageInstances_Get.json
*/
/**
* Sample code: Get an AzureBareMetalStorage instance.
*
* @param manager Entry point to BareMetalInfrastructureManager.
*/
public static void getAnAzureBareMetalStorageInstance(
com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager) {
manager
.azureBareMetalStorageInstances()
.getByResourceGroupWithResponse(
"myResourceGroup", "myAzureBareMetalStorageInstance", com.azure.core.util.Context.NONE);
}
}
```

### AzureBareMetalStorageInstances_List

```java
/** Samples for AzureBareMetalStorageInstances List. */
public final class AzureBareMetalStorageInstancesListSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalStorageInstances_ListBySubscription.json
*/
/**
* Sample code: List all AzureBareMetalStorage instances in a subscription.
*
* @param manager Entry point to BareMetalInfrastructureManager.
*/
public static void listAllAzureBareMetalStorageInstancesInASubscription(
com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager) {
manager.azureBareMetalStorageInstances().list(com.azure.core.util.Context.NONE);
}
}
```

### AzureBareMetalStorageInstances_ListByResourceGroup

```java
/** Samples for AzureBareMetalStorageInstances ListByResourceGroup. */
public final class AzureBareMetalStorageInstancesListByResourceGroupSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalStorageInstances_ListByResourceGroup.json
*/
/**
* Sample code: List all AzureBareMetalStorage instances in a resource group.
*
* @param manager Entry point to BareMetalInfrastructureManager.
*/
public static void listAllAzureBareMetalStorageInstancesInAResourceGroup(
com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager) {
manager
.azureBareMetalStorageInstances()
.listByResourceGroup("myResourceGroup", com.azure.core.util.Context.NONE);
}
}
```

### AzureBareMetalStorageInstances_Update

```java
import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalStorageInstance;
import java.util.HashMap;
import java.util.Map;

/** Samples for AzureBareMetalStorageInstances Update. */
public final class AzureBareMetalStorageInstancesUpdateSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalStorageInstances_PatchTags.json
*/
/**
* Sample code: Update Tags field of an AzureBareMetalStorage instance.
*
* @param manager Entry point to BareMetalInfrastructureManager.
*/
public static void updateTagsFieldOfAnAzureBareMetalStorageInstance(
com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager) {
AzureBareMetalStorageInstance resource =
manager
.azureBareMetalStorageInstances()
.getByResourceGroupWithResponse("myResourceGroup", "myABMSInstance", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("testkey", "testvalue")).apply();
}

/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalStorageInstances_PatchTags_Delete.json
*/
/**
* Sample code: Delete Tags field of an AzureBareMetalStorage instance.
*
* @param manager Entry point to BareMetalInfrastructureManager.
*/
public static void deleteTagsFieldOfAnAzureBareMetalStorageInstance(
com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager) {
AzureBareMetalStorageInstance resource =
manager
.azureBareMetalStorageInstances()
.getByResourceGroupWithResponse("myResourceGroup", "myABMSInstance", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf()).apply();
}

@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;
}
}
```

### Operations_List

```java
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2021-08-09/examples/AzureBareMetalOperations_List.json
* x-ms-original-file: specification/baremetalinfrastructure/resource-manager/Microsoft.BareMetalInfrastructure/stable/2023-04-06/examples/AzureBareMetalOperations_List.json
*/
/**
* Sample code: List all management operations supported by the AzureBareMetal RP.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
~ Code generated by Microsoft (R) AutoRest 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>
<parent>
Expand All @@ -13,7 +18,7 @@
<packaging>jar</packaging>

<name>Microsoft Azure SDK for BareMetalInfrastructure Management</name>
<description>This package contains Microsoft Azure SDK for BareMetalInfrastructure Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The BareMetalInfrastructure Management client. Package tag package-2021-08-09.</description>
<description>This package contains Microsoft Azure SDK for BareMetalInfrastructure Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The BareMetalInfrastructure Management client. Package tag package-2023-04-06.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
Expand All @@ -38,7 +43,8 @@
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jacoco.skip>true</jacoco.skip>
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
</properties>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.baremetalinfrastructure.fluent.BareMetalInfrastructureClient;
import com.azure.resourcemanager.baremetalinfrastructure.implementation.AzureBareMetalInstancesImpl;
import com.azure.resourcemanager.baremetalinfrastructure.implementation.AzureBareMetalStorageInstancesImpl;
import com.azure.resourcemanager.baremetalinfrastructure.implementation.BareMetalInfrastructureClientBuilder;
import com.azure.resourcemanager.baremetalinfrastructure.implementation.OperationsImpl;
import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstances;
import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalStorageInstances;
import com.azure.resourcemanager.baremetalinfrastructure.models.Operations;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
Expand All @@ -42,6 +44,8 @@ public final class BareMetalInfrastructureManager {

private Operations operations;

private AzureBareMetalStorageInstances azureBareMetalStorageInstances;

private final BareMetalInfrastructureClient clientObject;

private BareMetalInfrastructureManager(
Expand Down Expand Up @@ -209,7 +213,7 @@ public BareMetalInfrastructureManager authenticate(TokenCredential credential, A
.append("-")
.append("com.azure.resourcemanager.baremetalinfrastructure")
.append("/")
.append("1.0.0-beta.2");
.append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
Expand Down Expand Up @@ -291,6 +295,19 @@ public Operations operations() {
return operations;
}

/**
* Gets the resource collection API of AzureBareMetalStorageInstances. It manages AzureBareMetalStorageInstance.
*
* @return Resource collection API of AzureBareMetalStorageInstances.
*/
public AzureBareMetalStorageInstances azureBareMetalStorageInstances() {
if (this.azureBareMetalStorageInstances == null) {
this.azureBareMetalStorageInstances =
new AzureBareMetalStorageInstancesImpl(clientObject.getAzureBareMetalStorageInstances(), this);
}
return azureBareMetalStorageInstances;
}

/**
* @return Wrapped service client BareMetalInfrastructureClient providing direct access to the underlying
* auto-generated API implementation, based on Azure REST API.
Expand Down
Loading