Skip to content

Commit d2155df

Browse files
author
SDKAuto
committed
CodeGen from PR 3691 in openapi-env-test/azure-rest-api-specs
Merge 9d299d7cf949f82280a26d453dca855affb9f351 into 41e238f9fd4ba837de65fca653a971f577529b12
1 parent b5f4a18 commit d2155df

File tree

62 files changed

+347
-1461
lines changed

Some content is hidden

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

62 files changed

+347
-1461
lines changed

sdk/servicelinker/azure-resourcemanager-servicelinker/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.3 (Unreleased)
3+
## 1.0.0-beta.1 (2023-11-22)
4+
5+
- Azure Resource Manager ServiceLinker client library for Java. This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider. Package tag package-2022-05-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
46

57
### Features Added
68

sdk/servicelinker/azure-resourcemanager-servicelinker/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-servicelinker</artifactId>
35-
<version>1.0.0-beta.2</version>
35+
<version>1.0.0-beta.3</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -41,19 +41,19 @@ Various documentation is available to help you get started
4141

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

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

4646
### Authentication
4747

48-
By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
48+
By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables.
4949

5050
- `AZURE_CLIENT_ID` for Azure client ID.
5151
- `AZURE_TENANT_ID` for Azure tenant ID.
5252
- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
5353

54-
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
54+
In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
5555

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

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

8484
## Contributing
8585

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

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
88+
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>.
89+
90+
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.
91+
92+
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 <[email protected]> with any additional questions or comments.
9393

9494
<!-- LINKS -->
9595
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
@@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt
100100
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
101101
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
102102
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
103+
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
104+
[coc]: https://opensource.microsoft.com/codeofconduct/
105+
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/

sdk/servicelinker/azure-resourcemanager-servicelinker/SAMPLE.md

Lines changed: 11 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
- [List](#linker_list)
1010
- [ListConfigurations](#linker_listconfigurations)
1111
- [Update](#linker_update)
12-
- [Validate](#linker_validate)
1312

1413
## Operations
1514

@@ -46,10 +45,7 @@ public final class LinkerCreateOrUpdateSamples {
4645
.withId(
4746
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"))
4847
.withAuthInfo(new SecretAuthInfo())
49-
.withSecretStore(
50-
new SecretStore()
51-
.withKeyVaultId(
52-
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.KeyVault/vaults/test-kv"))
48+
.withSecretStore(new SecretStore().withKeyVaultId("fakeTokenPlaceholder"))
5349
.create();
5450
}
5551

@@ -111,8 +107,6 @@ public final class LinkerCreateOrUpdateSamples {
111107
### Linker_Delete
112108

113109
```java
114-
import com.azure.core.util.Context;
115-
116110
/** Samples for Linker Delete. */
117111
public final class LinkerDeleteSamples {
118112
/*
@@ -129,16 +123,14 @@ public final class LinkerDeleteSamples {
129123
.delete(
130124
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
131125
"linkName",
132-
Context.NONE);
126+
com.azure.core.util.Context.NONE);
133127
}
134128
}
135129
```
136130

137131
### Linker_Get
138132

139133
```java
140-
import com.azure.core.util.Context;
141-
142134
/** Samples for Linker Get. */
143135
public final class LinkerGetSamples {
144136
/*
@@ -155,16 +147,14 @@ public final class LinkerGetSamples {
155147
.getWithResponse(
156148
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
157149
"linkName",
158-
Context.NONE);
150+
com.azure.core.util.Context.NONE);
159151
}
160152
}
161153
```
162154

163155
### Linker_List
164156

165157
```java
166-
import com.azure.core.util.Context;
167-
168158
/** Samples for Linker List. */
169159
public final class LinkerListSamples {
170160
/*
@@ -180,16 +170,14 @@ public final class LinkerListSamples {
180170
.linkers()
181171
.list(
182172
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
183-
Context.NONE);
173+
com.azure.core.util.Context.NONE);
184174
}
185175
}
186176
```
187177

188178
### Linker_ListConfigurations
189179

190180
```java
191-
import com.azure.core.util.Context;
192-
193181
/** Samples for Linker ListConfigurations. */
194182
public final class LinkerListConfigurationsSamples {
195183
/*
@@ -206,15 +194,14 @@ public final class LinkerListConfigurationsSamples {
206194
.listConfigurationsWithResponse(
207195
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
208196
"linkName",
209-
Context.NONE);
197+
com.azure.core.util.Context.NONE);
210198
}
211199
}
212200
```
213201

214202
### Linker_Update
215203

216204
```java
217-
import com.azure.core.util.Context;
218205
import com.azure.resourcemanager.servicelinker.models.AzureResource;
219206
import com.azure.resourcemanager.servicelinker.models.LinkerResource;
220207
import com.azure.resourcemanager.servicelinker.models.ServicePrincipalSecretAuthInfo;
@@ -236,7 +223,7 @@ public final class LinkerUpdateSamples {
236223
.getWithResponse(
237224
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
238225
"linkName",
239-
Context.NONE)
226+
com.azure.core.util.Context.NONE)
240227
.getValue();
241228
resource
242229
.update()
@@ -245,43 +232,18 @@ public final class LinkerUpdateSamples {
245232
.withId(
246233
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"))
247234
.withAuthInfo(
248-
new ServicePrincipalSecretAuthInfo().withClientId("name").withPrincipalId("id").withSecret("secret"))
235+
new ServicePrincipalSecretAuthInfo()
236+
.withClientId("name")
237+
.withPrincipalId("id")
238+
.withSecret("fakeTokenPlaceholder"))
249239
.apply();
250240
}
251241
}
252242
```
253243

254-
### Linker_Validate
255-
256-
```java
257-
import com.azure.core.util.Context;
258-
259-
/** Samples for Linker Validate. */
260-
public final class LinkerValidateSamples {
261-
/*
262-
* x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/ValidateLinkSuccess.json
263-
*/
264-
/**
265-
* Sample code: ValidateLinkSuccess.
266-
*
267-
* @param manager Entry point to ServiceLinkerManager.
268-
*/
269-
public static void validateLinkSuccess(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
270-
manager
271-
.linkers()
272-
.validate(
273-
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
274-
"linkName",
275-
Context.NONE);
276-
}
277-
}
278-
```
279-
280244
### Operations_List
281245

282246
```java
283-
import com.azure.core.util.Context;
284-
285247
/** Samples for Operations List. */
286248
public final class OperationsListSamples {
287249
/*
@@ -293,7 +255,7 @@ public final class OperationsListSamples {
293255
* @param manager Entry point to ServiceLinkerManager.
294256
*/
295257
public static void getConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
296-
manager.operations().list(Context.NONE);
258+
manager.operations().list(com.azure.core.util.Context.NONE);
297259
}
298260
}
299261
```

sdk/servicelinker/azure-resourcemanager-servicelinker/pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
<!--
2+
~ Copyright (c) Microsoft Corporation. All rights reserved.
3+
~ Licensed under the MIT License.
4+
~ Code generated by Microsoft (R) AutoRest Code Generator.
5+
-->
16
<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">
27
<modelVersion>4.0.0</modelVersion>
38
<parent>
@@ -38,7 +43,8 @@
3843
</developers>
3944
<properties>
4045
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41-
<jacoco.skip>true</jacoco.skip>
46+
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
47+
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
4248
</properties>
4349
<dependencies>
4450
<dependency>

sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/ServiceLinkerManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public ServiceLinkerManager authenticate(TokenCredential credential, AzureProfil
206206
.append("-")
207207
.append("com.azure.resourcemanager.servicelinker")
208208
.append("/")
209-
.append("1.0.0-beta.2");
209+
.append("1.0.0-beta.1");
210210
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
211211
userAgentBuilder
212212
.append(" (")

sdk/servicelinker/azure-resourcemanager-servicelinker/src/main/java/com/azure/resourcemanager/servicelinker/fluent/LinkersClient.java

Lines changed: 10 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import com.azure.core.util.polling.SyncPoller;
1414
import com.azure.resourcemanager.servicelinker.fluent.models.LinkerResourceInner;
1515
import com.azure.resourcemanager.servicelinker.fluent.models.SourceConfigurationResultInner;
16-
import com.azure.resourcemanager.servicelinker.fluent.models.ValidateOperationResultInner;
1716
import com.azure.resourcemanager.servicelinker.models.LinkerPatch;
1817

1918
/** An instance of this class provides access to all the operations defined in LinkersClient. */
@@ -48,27 +47,27 @@ public interface LinkersClient {
4847
*
4948
* @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
5049
* @param linkerName The name Linker resource.
50+
* @param context The context to associate with this operation.
5151
* @throws IllegalArgumentException thrown if parameters fail the validation.
5252
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
5353
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
54-
* @return linker of source and target resource.
54+
* @return linker of source and target resource along with {@link Response}.
5555
*/
5656
@ServiceMethod(returns = ReturnType.SINGLE)
57-
LinkerResourceInner get(String resourceUri, String linkerName);
57+
Response<LinkerResourceInner> getWithResponse(String resourceUri, String linkerName, Context context);
5858

5959
/**
6060
* Returns Linker resource for a given name.
6161
*
6262
* @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
6363
* @param linkerName The name Linker resource.
64-
* @param context The context to associate with this operation.
6564
* @throws IllegalArgumentException thrown if parameters fail the validation.
6665
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
6766
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
68-
* @return linker of source and target resource along with {@link Response}.
67+
* @return linker of source and target resource.
6968
*/
7069
@ServiceMethod(returns = ReturnType.SINGLE)
71-
Response<LinkerResourceInner> getWithResponse(String resourceUri, String linkerName, Context context);
70+
LinkerResourceInner get(String resourceUri, String linkerName);
7271

7372
/**
7473
* Create or update linker resource.
@@ -244,60 +243,20 @@ SyncPoller<PollResult<LinkerResourceInner>, LinkerResourceInner> beginUpdate(
244243
LinkerResourceInner update(String resourceUri, String linkerName, LinkerPatch parameters, Context context);
245244

246245
/**
247-
* Validate a link.
248-
*
249-
* @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
250-
* @param linkerName The name Linker resource.
251-
* @throws IllegalArgumentException thrown if parameters fail the validation.
252-
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
253-
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
254-
* @return the {@link SyncPoller} for polling of the validation operation result for a linker.
255-
*/
256-
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
257-
SyncPoller<PollResult<ValidateOperationResultInner>, ValidateOperationResultInner> beginValidate(
258-
String resourceUri, String linkerName);
259-
260-
/**
261-
* Validate a link.
262-
*
263-
* @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
264-
* @param linkerName The name Linker resource.
265-
* @param context The context to associate with this operation.
266-
* @throws IllegalArgumentException thrown if parameters fail the validation.
267-
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
268-
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
269-
* @return the {@link SyncPoller} for polling of the validation operation result for a linker.
270-
*/
271-
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
272-
SyncPoller<PollResult<ValidateOperationResultInner>, ValidateOperationResultInner> beginValidate(
273-
String resourceUri, String linkerName, Context context);
274-
275-
/**
276-
* Validate a link.
277-
*
278-
* @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
279-
* @param linkerName The name Linker resource.
280-
* @throws IllegalArgumentException thrown if parameters fail the validation.
281-
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
282-
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
283-
* @return the validation operation result for a linker.
284-
*/
285-
@ServiceMethod(returns = ReturnType.SINGLE)
286-
ValidateOperationResultInner validate(String resourceUri, String linkerName);
287-
288-
/**
289-
* Validate a link.
246+
* list source configurations for a linker.
290247
*
291248
* @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
292249
* @param linkerName The name Linker resource.
293250
* @param context The context to associate with this operation.
294251
* @throws IllegalArgumentException thrown if parameters fail the validation.
295252
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
296253
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
297-
* @return the validation operation result for a linker.
254+
* @return configurations for source resource, include appSettings, connectionString and serviceBindings along with
255+
* {@link Response}.
298256
*/
299257
@ServiceMethod(returns = ReturnType.SINGLE)
300-
ValidateOperationResultInner validate(String resourceUri, String linkerName, Context context);
258+
Response<SourceConfigurationResultInner> listConfigurationsWithResponse(
259+
String resourceUri, String linkerName, Context context);
301260

302261
/**
303262
* list source configurations for a linker.
@@ -311,20 +270,4 @@ SyncPoller<PollResult<ValidateOperationResultInner>, ValidateOperationResultInne
311270
*/
312271
@ServiceMethod(returns = ReturnType.SINGLE)
313272
SourceConfigurationResultInner listConfigurations(String resourceUri, String linkerName);
314-
315-
/**
316-
* list source configurations for a linker.
317-
*
318-
* @param resourceUri The fully qualified Azure Resource manager identifier of the resource to be connected.
319-
* @param linkerName The name Linker resource.
320-
* @param context The context to associate with this operation.
321-
* @throws IllegalArgumentException thrown if parameters fail the validation.
322-
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
323-
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
324-
* @return configurations for source resource, include appSettings, connectionString and serviceBindings along with
325-
* {@link Response}.
326-
*/
327-
@ServiceMethod(returns = ReturnType.SINGLE)
328-
Response<SourceConfigurationResultInner> listConfigurationsWithResponse(
329-
String resourceUri, String linkerName, Context context);
330273
}

0 commit comments

Comments
 (0)