Skip to content

Commit 08e4c9c

Browse files
author
SDKAuto
committed
CodeGen from PR 3677 in openapi-env-test/azure-rest-api-specs
Merge 03a29e9f7aeb5d62f394b98f1af96a2e5f2a801b into 8c7c5dc99229b065dc1e908c3d5c6c7904262c1e
1 parent b5f4a18 commit 08e4c9c

File tree

67 files changed

+253
-4883
lines changed

Some content is hidden

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

67 files changed

+253
-4883
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-06)
4+
5+
- Azure Resource Manager ServiceLinker client library for Java. This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider asd. 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: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager ServiceLinker client library for Java.
44

5-
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).
5+
This package contains Microsoft Azure SDK for ServiceLinker Management SDK. Microsoft.ServiceLinker provider asd. 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).
66

77
## We'd love to hear your feedback
88

@@ -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: 2 additions & 249 deletions
Original file line numberDiff line numberDiff line change
@@ -3,193 +3,14 @@
33

44
## Linker
55

6-
- [CreateOrUpdate](#linker_createorupdate)
7-
- [Delete](#linker_delete)
8-
- [Get](#linker_get)
9-
- [List](#linker_list)
106
- [ListConfigurations](#linker_listconfigurations)
11-
- [Update](#linker_update)
12-
- [Validate](#linker_validate)
137

148
## Operations
159

1610
- [List](#operations_list)
17-
### Linker_CreateOrUpdate
18-
19-
```java
20-
import com.azure.resourcemanager.servicelinker.models.AzureResource;
21-
import com.azure.resourcemanager.servicelinker.models.KeyVaultSecretUriSecretInfo;
22-
import com.azure.resourcemanager.servicelinker.models.SecretAuthInfo;
23-
import com.azure.resourcemanager.servicelinker.models.SecretStore;
24-
import com.azure.resourcemanager.servicelinker.models.VNetSolution;
25-
import com.azure.resourcemanager.servicelinker.models.VNetSolutionType;
26-
import com.azure.resourcemanager.servicelinker.models.ValueSecretInfo;
27-
28-
/** Samples for Linker CreateOrUpdate. */
29-
public final class LinkerCreateOrUpdateSamples {
30-
/*
31-
* x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithSecretStore.json
32-
*/
33-
/**
34-
* Sample code: PutLinkWithSecretStore.
35-
*
36-
* @param manager Entry point to ServiceLinkerManager.
37-
*/
38-
public static void putLinkWithSecretStore(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
39-
manager
40-
.linkers()
41-
.define("linkName")
42-
.withExistingResourceUri(
43-
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app")
44-
.withTargetService(
45-
new AzureResource()
46-
.withId(
47-
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"))
48-
.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"))
53-
.create();
54-
}
55-
56-
/*
57-
* x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLinkWithServiceEndpoint.json
58-
*/
59-
/**
60-
* Sample code: PutLinkWithServiceEndpoint.
61-
*
62-
* @param manager Entry point to ServiceLinkerManager.
63-
*/
64-
public static void putLinkWithServiceEndpoint(
65-
com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
66-
manager
67-
.linkers()
68-
.define("linkName")
69-
.withExistingResourceUri(
70-
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app")
71-
.withTargetService(
72-
new AzureResource()
73-
.withId(
74-
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db"))
75-
.withAuthInfo(
76-
new SecretAuthInfo()
77-
.withName("name")
78-
.withSecretInfo(
79-
new KeyVaultSecretUriSecretInfo()
80-
.withValue(
81-
"https://vault-name.vault.azure.net/secrets/secret-name/00000000000000000000000000000000")))
82-
.withVNetSolution(new VNetSolution().withType(VNetSolutionType.SERVICE_ENDPOINT))
83-
.create();
84-
}
85-
86-
/*
87-
* x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PutLink.json
88-
*/
89-
/**
90-
* Sample code: PutLink.
91-
*
92-
* @param manager Entry point to ServiceLinkerManager.
93-
*/
94-
public static void putLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
95-
manager
96-
.linkers()
97-
.define("linkName")
98-
.withExistingResourceUri(
99-
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app")
100-
.withTargetService(
101-
new AzureResource()
102-
.withId(
103-
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DBforPostgreSQL/servers/test-pg/databases/test-db"))
104-
.withAuthInfo(
105-
new SecretAuthInfo().withName("name").withSecretInfo(new ValueSecretInfo().withValue("secret")))
106-
.create();
107-
}
108-
}
109-
```
110-
111-
### Linker_Delete
112-
113-
```java
114-
import com.azure.core.util.Context;
115-
116-
/** Samples for Linker Delete. */
117-
public final class LinkerDeleteSamples {
118-
/*
119-
* x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/DeleteLink.json
120-
*/
121-
/**
122-
* Sample code: DeleteLink.
123-
*
124-
* @param manager Entry point to ServiceLinkerManager.
125-
*/
126-
public static void deleteLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
127-
manager
128-
.linkers()
129-
.delete(
130-
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
131-
"linkName",
132-
Context.NONE);
133-
}
134-
}
135-
```
136-
137-
### Linker_Get
138-
139-
```java
140-
import com.azure.core.util.Context;
141-
142-
/** Samples for Linker Get. */
143-
public final class LinkerGetSamples {
144-
/*
145-
* x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/Link.json
146-
*/
147-
/**
148-
* Sample code: Link.
149-
*
150-
* @param manager Entry point to ServiceLinkerManager.
151-
*/
152-
public static void link(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
153-
manager
154-
.linkers()
155-
.getWithResponse(
156-
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
157-
"linkName",
158-
Context.NONE);
159-
}
160-
}
161-
```
162-
163-
### Linker_List
164-
165-
```java
166-
import com.azure.core.util.Context;
167-
168-
/** Samples for Linker List. */
169-
public final class LinkerListSamples {
170-
/*
171-
* x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/LinkList.json
172-
*/
173-
/**
174-
* Sample code: LinkList.
175-
*
176-
* @param manager Entry point to ServiceLinkerManager.
177-
*/
178-
public static void linkList(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
179-
manager
180-
.linkers()
181-
.list(
182-
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
183-
Context.NONE);
184-
}
185-
}
186-
```
187-
18811
### Linker_ListConfigurations
18912

19013
```java
191-
import com.azure.core.util.Context;
192-
19314
/** Samples for Linker ListConfigurations. */
19415
public final class LinkerListConfigurationsSamples {
19516
/*
@@ -206,82 +27,14 @@ public final class LinkerListConfigurationsSamples {
20627
.listConfigurationsWithResponse(
20728
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
20829
"linkName",
209-
Context.NONE);
210-
}
211-
}
212-
```
213-
214-
### Linker_Update
215-
216-
```java
217-
import com.azure.core.util.Context;
218-
import com.azure.resourcemanager.servicelinker.models.AzureResource;
219-
import com.azure.resourcemanager.servicelinker.models.LinkerResource;
220-
import com.azure.resourcemanager.servicelinker.models.ServicePrincipalSecretAuthInfo;
221-
222-
/** Samples for Linker Update. */
223-
public final class LinkerUpdateSamples {
224-
/*
225-
* x-ms-original-file: specification/servicelinker/resource-manager/Microsoft.ServiceLinker/stable/2022-05-01/examples/PatchLink.json
226-
*/
227-
/**
228-
* Sample code: PatchLink.
229-
*
230-
* @param manager Entry point to ServiceLinkerManager.
231-
*/
232-
public static void patchLink(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
233-
LinkerResource resource =
234-
manager
235-
.linkers()
236-
.getWithResponse(
237-
"subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.Web/sites/test-app",
238-
"linkName",
239-
Context.NONE)
240-
.getValue();
241-
resource
242-
.update()
243-
.withTargetService(
244-
new AzureResource()
245-
.withId(
246-
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-rg/providers/Microsoft.DocumentDb/databaseAccounts/test-acc/mongodbDatabases/test-db"))
247-
.withAuthInfo(
248-
new ServicePrincipalSecretAuthInfo().withClientId("name").withPrincipalId("id").withSecret("secret"))
249-
.apply();
250-
}
251-
}
252-
```
253-
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);
30+
com.azure.core.util.Context.NONE);
27631
}
27732
}
27833
```
27934

28035
### Operations_List
28136

28237
```java
283-
import com.azure.core.util.Context;
284-
28538
/** Samples for Operations List. */
28639
public final class OperationsListSamples {
28740
/*
@@ -293,7 +46,7 @@ public final class OperationsListSamples {
29346
* @param manager Entry point to ServiceLinkerManager.
29447
*/
29548
public static void getConfiguration(com.azure.resourcemanager.servicelinker.ServiceLinkerManager manager) {
296-
manager.operations().list(Context.NONE);
49+
manager.operations().list(com.azure.core.util.Context.NONE);
29750
}
29851
}
29952
```

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

Lines changed: 8 additions & 2 deletions
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>
@@ -13,7 +18,7 @@
1318
<packaging>jar</packaging>
1419

1520
<name>Microsoft Azure SDK for ServiceLinker Management</name>
16-
<description>This package contains Microsoft Azure SDK for ServiceLinker Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.ServiceLinker provider. Package tag package-2022-05-01.</description>
21+
<description>This package contains Microsoft Azure SDK for ServiceLinker Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Microsoft.ServiceLinker provider asd. Package tag package-2022-05-01.</description>
1722
<url>https://github.com/Azure/azure-sdk-for-java</url>
1823

1924
<licenses>
@@ -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>

0 commit comments

Comments
 (0)