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 (2023-05-15)

- Azure Resource Manager Hardware Security Modules client library for Java. This package contains Microsoft Azure SDK for Hardware Security Modules Management SDK. The Azure management API provides a RESTful set of web services that interact with Azure Dedicated HSM RP. Package tag package-2021-11. 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 @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-hardwaresecuritymodules</artifactId>
<version>1.0.0-beta.1</version>
<version>1.0.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand All @@ -41,19 +41,19 @@ Various documentation is available to help you get started

Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.

[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.

### Authentication

By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
By default, Azure Active Directory 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.
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.

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

With above configuration, `azure` client can be authenticated by following code:
With above configuration, `azure` client can be authenticated using the following code:

```java
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
Expand Down Expand Up @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on

## Contributing

For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
For details on contributing to this repository, see the [contributing guide][cg].

1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit <https://cla.microsoft.com>.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA.

This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact <opencode@microsoft.com> with any additional questions or comments.

<!-- LINKS -->
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
Expand All @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
[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
[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/
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ public final class DedicatedHsmCreateOrUpdateSamples {
### DedicatedHsm_Delete

```java
import com.azure.core.util.Context;

/** Samples for DedicatedHsm Delete. */
public final class DedicatedHsmDeleteSamples {
/*
Expand All @@ -149,16 +147,14 @@ public final class DedicatedHsmDeleteSamples {
*/
public static void deleteADedicatedHSM(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().delete("hsm-group", "hsm1", Context.NONE);
manager.dedicatedHsms().delete("hsm-group", "hsm1", com.azure.core.util.Context.NONE);
}
}
```

### DedicatedHsm_GetByResourceGroup

```java
import com.azure.core.util.Context;

/** Samples for DedicatedHsm GetByResourceGroup. */
public final class DedicatedHsmGetByResourceGroupSamples {
/*
Expand All @@ -171,7 +167,7 @@ public final class DedicatedHsmGetByResourceGroupSamples {
*/
public static void getAPaymentHSM(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().getByResourceGroupWithResponse("hsm-group", "hsm1", Context.NONE);
manager.dedicatedHsms().getByResourceGroupWithResponse("hsm-group", "hsm1", com.azure.core.util.Context.NONE);
}

/*
Expand All @@ -184,7 +180,7 @@ public final class DedicatedHsmGetByResourceGroupSamples {
*/
public static void getAPaymentHSMWith20181031PreviewApiVersion(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().getByResourceGroupWithResponse("hsm-group", "hsm1", Context.NONE);
manager.dedicatedHsms().getByResourceGroupWithResponse("hsm-group", "hsm1", com.azure.core.util.Context.NONE);
}

/*
Expand All @@ -197,16 +193,14 @@ public final class DedicatedHsmGetByResourceGroupSamples {
*/
public static void getADedicatedHSM(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().getByResourceGroupWithResponse("hsm-group", "hsm1", Context.NONE);
manager.dedicatedHsms().getByResourceGroupWithResponse("hsm-group", "hsm1", com.azure.core.util.Context.NONE);
}
}
```

### DedicatedHsm_List

```java
import com.azure.core.util.Context;

/** Samples for DedicatedHsm List. */
public final class DedicatedHsmListSamples {
/*
Expand All @@ -219,7 +213,7 @@ public final class DedicatedHsmListSamples {
*/
public static void listDedicatedHSMDevicesInASubscriptionIncludingPaymentHSM(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().list(null, Context.NONE);
manager.dedicatedHsms().list(null, com.azure.core.util.Context.NONE);
}

/*
Expand All @@ -232,16 +226,14 @@ public final class DedicatedHsmListSamples {
*/
public static void listDedicatedHSMDevicesInASubscription(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().list(null, Context.NONE);
manager.dedicatedHsms().list(null, com.azure.core.util.Context.NONE);
}
}
```

### DedicatedHsm_ListByResourceGroup

```java
import com.azure.core.util.Context;

/** Samples for DedicatedHsm ListByResourceGroup. */
public final class DedicatedHsmListByResourceGroupSamples {
/*
Expand All @@ -254,7 +246,7 @@ public final class DedicatedHsmListByResourceGroupSamples {
*/
public static void listDedicatedHSMDevicesInAResourceGroup(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().listByResourceGroup("hsm-group", null, Context.NONE);
manager.dedicatedHsms().listByResourceGroup("hsm-group", null, com.azure.core.util.Context.NONE);
}

/*
Expand All @@ -267,16 +259,14 @@ public final class DedicatedHsmListByResourceGroupSamples {
*/
public static void listDedicatedHSMDevicesInAResourceGroupIncludingPaymentHSM(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().listByResourceGroup("hsm-group", null, Context.NONE);
manager.dedicatedHsms().listByResourceGroup("hsm-group", null, com.azure.core.util.Context.NONE);
}
}
```

### DedicatedHsm_ListOutboundNetworkDependenciesEndpoints

```java
import com.azure.core.util.Context;

/** Samples for DedicatedHsm ListOutboundNetworkDependenciesEndpoints. */
public final class DedicatedHsmListOutboundNetworkDependenciesEndpointsSamples {
/*
Expand All @@ -289,15 +279,16 @@ public final class DedicatedHsmListOutboundNetworkDependenciesEndpointsSamples {
*/
public static void listOutboundNetworkDependenciesEndpointsByManagedCluster(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.dedicatedHsms().listOutboundNetworkDependenciesEndpoints("hsm-group", "hsm1", Context.NONE);
manager
.dedicatedHsms()
.listOutboundNetworkDependenciesEndpoints("hsm-group", "hsm1", com.azure.core.util.Context.NONE);
}
}
```

### DedicatedHsm_Update

```java
import com.azure.core.util.Context;
import com.azure.resourcemanager.hardwaresecuritymodules.models.DedicatedHsm;
import java.util.HashMap;
import java.util.Map;
Expand All @@ -315,7 +306,10 @@ public final class DedicatedHsmUpdateSamples {
public static void updateAnExistingDedicatedHSM(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
DedicatedHsm resource =
manager.dedicatedHsms().getByResourceGroupWithResponse("hsm-group", "hsm1", Context.NONE).getValue();
manager
.dedicatedHsms()
.getByResourceGroupWithResponse("hsm-group", "hsm1", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("Dept", "hsm", "Environment", "dogfood", "Slice", "A")).apply();
}

Expand All @@ -330,7 +324,10 @@ public final class DedicatedHsmUpdateSamples {
public static void updateAnExistingPaymentHSM(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
DedicatedHsm resource =
manager.dedicatedHsms().getByResourceGroupWithResponse("hsm-group", "hsm1", Context.NONE).getValue();
manager
.dedicatedHsms()
.getByResourceGroupWithResponse("hsm-group", "hsm1", com.azure.core.util.Context.NONE)
.getValue();
resource.update().withTags(mapOf("Dept", "hsm", "Environment", "dogfood", "Slice", "A")).apply();
}

Expand All @@ -350,8 +347,6 @@ public final class DedicatedHsmUpdateSamples {
### Operations_List

```java
import com.azure.core.util.Context;

/** Samples for Operations List. */
public final class OperationsListSamples {
/*
Expand All @@ -364,7 +359,7 @@ public final class OperationsListSamples {
*/
public static void getAListOfPaymentHSMOperations(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.operations().list(Context.NONE);
manager.operations().list(com.azure.core.util.Context.NONE);
}

/*
Expand All @@ -377,7 +372,7 @@ public final class OperationsListSamples {
*/
public static void getAListOfDedicatedHSMOperations(
com.azure.resourcemanager.hardwaresecuritymodules.HardwareSecurityModulesManager manager) {
manager.operations().list(Context.NONE);
manager.operations().list(com.azure.core.util.Context.NONE);
}
}
```
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 Down Expand Up @@ -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 @@ -282,7 +282,7 @@ public Operations operations() {
}

/**
* Gets the resource collection API of DedicatedHsms.
* Gets the resource collection API of DedicatedHsms. It manages DedicatedHsm.
*
* @return Resource collection API of DedicatedHsms.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,29 +208,29 @@ DedicatedHsmInner update(
*
* @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
* @param name The name of the dedicated HSM.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
* by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the specified Azure dedicated HSM.
* @return the specified Azure dedicated HSM along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
DedicatedHsmInner getByResourceGroup(String resourceGroupName, String name);
Response<DedicatedHsmInner> getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);

/**
* Gets the specified Azure dedicated HSM.
*
* @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
* @param name The name of the dedicated HSM.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.resourcemanager.hardwaresecuritymodules.models.ErrorException thrown if the request is rejected
* by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the specified Azure dedicated HSM along with {@link Response}.
* @return the specified Azure dedicated HSM.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<DedicatedHsmInner> getByResourceGroupWithResponse(String resourceGroupName, String name, Context context);
DedicatedHsmInner getByResourceGroup(String resourceGroupName, String name);

/**
* The List operation gets information about the dedicated hsms associated with the subscription and within the
Expand Down Expand Up @@ -289,7 +289,10 @@ DedicatedHsmInner update(

/**
* Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm
* resource. The operation returns properties of each egress endpoint.
* resource.
*
* <p>Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated
* hsm resource. The operation returns properties of each egress endpoint.
*
* @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
* @param name The name of the dedicated HSM.
Expand All @@ -306,7 +309,10 @@ PagedIterable<OutboundEnvironmentEndpointInner> listOutboundNetworkDependenciesE

/**
* Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated hsm
* resource. The operation returns properties of each egress endpoint.
* resource.
*
* <p>Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified dedicated
* hsm resource. The operation returns properties of each egress endpoint.
*
* @param resourceGroupName The name of the Resource Group to which the dedicated hsm belongs.
* @param name The name of the dedicated HSM.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public final class DedicatedHsmInner extends Resource {
@JsonProperty(value = "zones")
private List<String> zones;

/** Creates an instance of DedicatedHsmInner class. */
public DedicatedHsmInner() {
}

/**
* Get the systemData property: Metadata pertaining to creation and last modification of the resource.
*
Expand Down
Loading