Skip to content

Commit 4f1a2d0

Browse files
author
SDKAuto
committed
CodeGen from PR 16301 in Azure/azure-rest-api-specs
Merge 4665521a3856029b4c622720b7efd24d2ec5c426 into 5ee7c98d2f778a2a3f867215eba5b13ddf139f6e
1 parent 439bd3a commit 4f1a2d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+5313
-0
lines changed

eng/versioning/version_client.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ com.azure.resourcemanager:azure-resourcemanager-quota;1.0.0-beta.1;1.0.0-beta.2
320320
com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.1;1.0.0-beta.2
321321
com.azure.resourcemanager:azure-resourcemanager-logz;1.0.0-beta.1;1.0.0-beta.2
322322
com.azure.resourcemanager:azure-resourcemanager-storagepool;1.0.0-beta.1;1.0.0-beta.1
323+
com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.0.0-beta.1;1.0.0-beta.1
323324

324325
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
325326
# version. Unreleased dependencies are only valid for dependency versions.

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,6 +769,7 @@
769769
<module>sdk/healthbot</module>
770770
<module>sdk/healthcareapis</module>
771771
<module>sdk/hybridcompute</module>
772+
<module>sdk/hybridconnectivity</module>
772773
<module>sdk/hybridkubernetes</module>
773774
<module>sdk/hybridnetwork</module>
774775
<module>sdk/identity</module>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (2021-10-11)
4+
5+
- Azure Resource Manager HybridConnectivity client library for Java. This package contains Microsoft Azure SDK for HybridConnectivity Management SDK. REST API for Hybrid Connectivity. Package tag package-2021-10-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Azure Resource Manager HybridConnectivity client library for Java
2+
3+
Azure Resource Manager HybridConnectivity client library for Java.
4+
5+
This package contains Microsoft Azure SDK for HybridConnectivity Management SDK. REST API for Hybrid Connectivity. Package tag package-2021-10-06-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
6+
7+
## We'd love to hear your feedback
8+
9+
We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
10+
11+
If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
12+
13+
Thank you in advance for your collaboration. We really appreciate your time!
14+
15+
## Documentation
16+
17+
Various documentation is available to help you get started
18+
19+
- [API reference documentation][docs]
20+
21+
## Getting started
22+
23+
### Prerequisites
24+
25+
- [Java Development Kit (JDK)][jdk] with version 8 or above
26+
- [Azure Subscription][azure_subscription]
27+
28+
### Adding the package to your product
29+
30+
[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;current})
31+
```xml
32+
<dependency>
33+
<groupId>com.azure.resourcemanager</groupId>
34+
<artifactId>azure-resourcemanager-hybridconnectivity</artifactId>
35+
<version>1.0.0-beta.1</version>
36+
</dependency>
37+
```
38+
[//]: # ({x-version-update-end})
39+
40+
### Include the recommended packages
41+
42+
Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
43+
44+
[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
45+
46+
### Authentication
47+
48+
By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
49+
50+
- `AZURE_CLIENT_ID` for Azure client ID.
51+
- `AZURE_TENANT_ID` for Azure tenant ID.
52+
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
53+
54+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
55+
56+
With above configuration, `azure` client can be authenticated by following code:
57+
58+
```java
59+
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
60+
TokenCredential credential = new DefaultAzureCredentialBuilder()
61+
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
62+
.build();
63+
HybridConnectivityManager manager = HybridConnectivityManager
64+
.authenticate(credential, profile);
65+
```
66+
67+
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
68+
69+
See [Authentication][authenticate] for more options.
70+
71+
## Key concepts
72+
73+
See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
74+
75+
## Examples
76+
77+
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/hybridconnectivity/azure-resourcemanager-hybridconnectivity/SAMPLE.md)
78+
79+
80+
## Troubleshooting
81+
82+
## Next steps
83+
84+
## Contributing
85+
86+
For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
87+
88+
1. Fork it
89+
1. Create your feature branch (`git checkout -b my-new-feature`)
90+
1. Commit your changes (`git commit -am 'Add some feature'`)
91+
1. Push to the branch (`git push origin my-new-feature`)
92+
1. Create new Pull Request
93+
94+
<!-- LINKS -->
95+
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
96+
[docs]: https://azure.github.io/azure-sdk-for-java/
97+
[jdk]: https://docs.microsoft.com/java/azure/jdk/
98+
[azure_subscription]: https://azure.microsoft.com/free/
99+
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
100+
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
101+
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
102+
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
# Code snippets and samples
2+
3+
4+
## Endpoints
5+
6+
- [CreateOrUpdate](#endpoints_createorupdate)
7+
- [Delete](#endpoints_delete)
8+
- [Get](#endpoints_get)
9+
- [List](#endpoints_list)
10+
- [ListCredentials](#endpoints_listcredentials)
11+
- [Update](#endpoints_update)
12+
13+
## Operations
14+
15+
- [List](#operations_list)
16+
### Endpoints_CreateOrUpdate
17+
18+
```java
19+
import com.azure.resourcemanager.hybridconnectivity.models.Type;
20+
21+
/** Samples for Endpoints CreateOrUpdate. */
22+
public final class EndpointsCreateOrUpdateSamples {
23+
/*
24+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsPutCustom.json
25+
*/
26+
/**
27+
* Sample code: HybridConnectivityEndpointsPutCustom.
28+
*
29+
* @param manager Entry point to HybridConnectivityManager.
30+
*/
31+
public static void hybridConnectivityEndpointsPutCustom(
32+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
33+
manager
34+
.endpoints()
35+
.define("custom")
36+
.withExistingResourceUri(
37+
"subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine")
38+
.withTypePropertiesType(Type.CUSTOM)
39+
.withResourceId(
40+
"/subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.Relay/namespaces/custom-relay-namespace")
41+
.create();
42+
}
43+
44+
/*
45+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsPutDefault.json
46+
*/
47+
/**
48+
* Sample code: HybridConnectivityEndpointsPutDefault.
49+
*
50+
* @param manager Entry point to HybridConnectivityManager.
51+
*/
52+
public static void hybridConnectivityEndpointsPutDefault(
53+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
54+
manager
55+
.endpoints()
56+
.define("default")
57+
.withExistingResourceUri(
58+
"subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine")
59+
.withTypePropertiesType(Type.DEFAULT)
60+
.create();
61+
}
62+
}
63+
```
64+
65+
### Endpoints_Delete
66+
67+
```java
68+
import com.azure.core.util.Context;
69+
70+
/** Samples for Endpoints Delete. */
71+
public final class EndpointsDeleteSamples {
72+
/*
73+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsDeleteDefault.json
74+
*/
75+
/**
76+
* Sample code: HybridConnectivityEndpointsDeleteDefault.
77+
*
78+
* @param manager Entry point to HybridConnectivityManager.
79+
*/
80+
public static void hybridConnectivityEndpointsDeleteDefault(
81+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
82+
manager
83+
.endpoints()
84+
.deleteWithResponse(
85+
"subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
86+
"default",
87+
Context.NONE);
88+
}
89+
}
90+
```
91+
92+
### Endpoints_Get
93+
94+
```java
95+
import com.azure.core.util.Context;
96+
97+
/** Samples for Endpoints Get. */
98+
public final class EndpointsGetSamples {
99+
/*
100+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsGetDefault.json
101+
*/
102+
/**
103+
* Sample code: HybridConnectivityEndpointsGetDefault.
104+
*
105+
* @param manager Entry point to HybridConnectivityManager.
106+
*/
107+
public static void hybridConnectivityEndpointsGetDefault(
108+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
109+
manager
110+
.endpoints()
111+
.getWithResponse(
112+
"subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
113+
"default",
114+
Context.NONE);
115+
}
116+
117+
/*
118+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsGetCustom.json
119+
*/
120+
/**
121+
* Sample code: HybridConnectivityEndpointsGetCustom.
122+
*
123+
* @param manager Entry point to HybridConnectivityManager.
124+
*/
125+
public static void hybridConnectivityEndpointsGetCustom(
126+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
127+
manager
128+
.endpoints()
129+
.getWithResponse(
130+
"subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
131+
"custom",
132+
Context.NONE);
133+
}
134+
}
135+
```
136+
137+
### Endpoints_List
138+
139+
```java
140+
import com.azure.core.util.Context;
141+
142+
/** Samples for Endpoints List. */
143+
public final class EndpointsListSamples {
144+
/*
145+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsList.json
146+
*/
147+
/**
148+
* Sample code: HybridConnectivityEndpointsGet.
149+
*
150+
* @param manager Entry point to HybridConnectivityManager.
151+
*/
152+
public static void hybridConnectivityEndpointsGet(
153+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
154+
manager
155+
.endpoints()
156+
.list(
157+
"subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
158+
Context.NONE);
159+
}
160+
}
161+
```
162+
163+
### Endpoints_ListCredentials
164+
165+
```java
166+
import com.azure.core.util.Context;
167+
168+
/** Samples for Endpoints ListCredentials. */
169+
public final class EndpointsListCredentialsSamples {
170+
/*
171+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsPostListCredentials.json
172+
*/
173+
/**
174+
* Sample code: HybridConnectivityEndpointsPostListCredentials.
175+
*
176+
* @param manager Entry point to HybridConnectivityManager.
177+
*/
178+
public static void hybridConnectivityEndpointsPostListCredentials(
179+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
180+
manager
181+
.endpoints()
182+
.listCredentialsWithResponse(
183+
"subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
184+
"default",
185+
10800L,
186+
Context.NONE);
187+
}
188+
}
189+
```
190+
191+
### Endpoints_Update
192+
193+
```java
194+
import com.azure.core.util.Context;
195+
import com.azure.resourcemanager.hybridconnectivity.models.EndpointResource;
196+
import com.azure.resourcemanager.hybridconnectivity.models.Type;
197+
198+
/** Samples for Endpoints Update. */
199+
public final class EndpointsUpdateSamples {
200+
/*
201+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/EndpointsPatchDefault.json
202+
*/
203+
/**
204+
* Sample code: HybridConnectivityEndpointsPatchDefault.
205+
*
206+
* @param manager Entry point to HybridConnectivityManager.
207+
*/
208+
public static void hybridConnectivityEndpointsPatchDefault(
209+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
210+
EndpointResource resource =
211+
manager
212+
.endpoints()
213+
.getWithResponse(
214+
"subscriptions/f5bcc1d9-23af-4ae9-aca1-041d0f593a63/resourceGroups/hybridRG/providers/Microsoft.HybridCompute/machines/testMachine",
215+
"default",
216+
Context.NONE)
217+
.getValue();
218+
resource.update().withTypePropertiesType(Type.DEFAULT).apply();
219+
}
220+
}
221+
```
222+
223+
### Operations_List
224+
225+
```java
226+
import com.azure.core.util.Context;
227+
228+
/** Samples for Operations List. */
229+
public final class OperationsListSamples {
230+
/*
231+
* x-ms-original-file: specification/hybridconnectivity/resource-manager/Microsoft.HybridConnectivity/preview/2021-10-06-preview/examples/OperationsList.json
232+
*/
233+
/**
234+
* Sample code: HybridConnectivityOperationsList.
235+
*
236+
* @param manager Entry point to HybridConnectivityManager.
237+
*/
238+
public static void hybridConnectivityOperationsList(
239+
com.azure.resourcemanager.hybridconnectivity.HybridConnectivityManager manager) {
240+
manager.operations().list(Context.NONE);
241+
}
242+
}
243+
```
244+

0 commit comments

Comments
 (0)