Skip to content

Commit 15af3a7

Browse files
author
SDKAuto
committed
CodeGen from PR 33233 in Azure/azure-rest-api-specs
Merge d8beaffe57c3c6229ff362e0da45bf676dd99f86 into a8f625201b3611ee65a832522dba59ae1c287f10
1 parent ba48d62 commit 15af3a7

File tree

58 files changed

+7797
-0
lines changed

Some content is hidden

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

58 files changed

+7797
-0
lines changed

eng/automation/api-specs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ informatica:
6666
service: informaticadatamanagement
6767
keyvault:
6868
suffix: generated
69+
kubernetesconfiguration/Microsoft.KubernetesConfiguration/extensions:
70+
service: kubernetesconfigurationmicrosoftkubernetesconfigurationextensions
6971
liftrastronomer:
7072
service: astro
7173
liftrqumulo:

eng/versioning/version_client.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ com.azure.resourcemanager:azure-resourcemanager-databasewatcher;1.0.0-beta.1;1.0
473473
com.azure.resourcemanager:azure-resourcemanager-durabletask;1.0.0-beta.1;1.0.0-beta.2
474474
com.azure.resourcemanager:azure-resourcemanager-arizeaiobservabilityeval;1.0.0-beta.1;1.0.0-beta.2
475475
com.azure.resourcemanager:azure-resourcemanager-weightsandbiases;1.0.0-beta.1;1.0.0-beta.1
476+
com.azure.resourcemanager:azure-resourcemanager-kubernetesconfigurationmicrosoftkubernetesconfigurationextensions;1.0.0-beta.1;1.0.0-beta.1
476477
com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1
477478
com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1
478479
com.azure.v2:azure-client-sdk-parent;2.0.0-beta.1;2.0.0-beta.1

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
<module>sdk/iotoperations</module>
127127
<module>sdk/keyvault</module>
128128
<module>sdk/kubernetesconfiguration</module>
129+
<module>sdk/kubernetesconfigurationmicrosoftkubernetesconfigurationextensions</module>
129130
<module>sdk/kusto</module>
130131
<module>sdk/labservices</module>
131132
<module>sdk/largeinstance</module>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Release History
2+
3+
## 1.0.0-beta.1 (2025-03-31)
4+
5+
- Azure Resource Manager Extensions client library for Java. This package contains Microsoft Azure SDK for Extensions Management SDK. KubernetesConfiguration Extensions Client. Package tag package-2024-11. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
6+
### Features Added
7+
8+
- Initial release for the azure-resourcemanager-kubernetesconfigurationmicrosoftkubernetesconfigurationextensions Java SDK.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Azure Resource Manager Extensions client library for Java
2+
3+
Azure Resource Manager Extensions client library for Java.
4+
5+
This package contains Microsoft Azure SDK for Extensions Management SDK. KubernetesConfiguration Extensions Client. Package tag package-2024-11. 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-kubernetesconfigurationmicrosoftkubernetesconfigurationextensions;current})
31+
```xml
32+
<dependency>
33+
<groupId>com.azure.resourcemanager</groupId>
34+
<artifactId>azure-resourcemanager-kubernetesconfigurationmicrosoftkubernetesconfigurationextensions</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] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation.
45+
46+
### Authentication
47+
48+
Microsoft Entra ID token authentication relies on the [credential class][azure_identity_credentials] from [Azure Identity][azure_identity] package.
49+
50+
Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable.
51+
52+
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
53+
54+
```java
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
56+
TokenCredential credential = new DefaultAzureCredentialBuilder()
57+
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
58+
.build();
59+
ExtensionsManager manager = ExtensionsManager
60+
.authenticate(credential, profile);
61+
```
62+
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
64+
65+
See [Authentication][authenticate] for more options.
66+
67+
## Key concepts
68+
69+
See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
70+
71+
## Examples
72+
73+
[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/kubernetesconfigurationmicrosoftkubernetesconfigurationextensions/azure-resourcemanager-kubernetesconfigurationmicrosoftkubernetesconfigurationextensions/SAMPLE.md)
74+
75+
76+
## Troubleshooting
77+
78+
## Next steps
79+
80+
## Contributing
81+
82+
For details on contributing to this repository, see the [contributing guide][cg].
83+
84+
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>.
85+
86+
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.
87+
88+
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.
89+
90+
<!-- LINKS -->
91+
[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
92+
[docs]: https://azure.github.io/azure-sdk-for-java/
93+
[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/
94+
[azure_subscription]: https://azure.microsoft.com/free/
95+
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
96+
[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
97+
[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
98+
[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
99+
[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
100+
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101+
[coc]: https://opensource.microsoft.com/codeofconduct/
102+
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
Lines changed: 257 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,257 @@
1+
# Code snippets and samples
2+
3+
4+
## Extensions
5+
6+
- [Create](#extensions_create)
7+
- [Delete](#extensions_delete)
8+
- [Get](#extensions_get)
9+
- [List](#extensions_list)
10+
- [Update](#extensions_update)
11+
12+
## OperationStatus
13+
14+
- [Get](#operationstatus_get)
15+
### Extensions_Create
16+
17+
```java
18+
import com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.fluent.models.ExtensionInner;
19+
import com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.models.Plan;
20+
import com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.models.Scope;
21+
import com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.models.ScopeCluster;
22+
import java.util.HashMap;
23+
import java.util.Map;
24+
25+
/**
26+
* Samples for Extensions Create.
27+
*/
28+
public final class ExtensionsCreateSamples {
29+
/*
30+
* x-ms-original-file:
31+
* specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/stable/2024-
32+
* 11-01/examples/CreateExtension.json
33+
*/
34+
/**
35+
* Sample code: Create Extension.
36+
*
37+
* @param manager Entry point to ExtensionsManager.
38+
*/
39+
public static void createExtension(
40+
com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.ExtensionsManager manager) {
41+
manager.extensions()
42+
.create("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "ClusterMonitor",
43+
new ExtensionInner().withExtensionType("azuremonitor-containers")
44+
.withAutoUpgradeMinorVersion(true)
45+
.withReleaseTrain("Preview")
46+
.withScope(new Scope().withCluster(new ScopeCluster().withReleaseNamespace("kube-system")))
47+
.withConfigurationSettings(mapOf("omsagent.env.clusterName", "clusterName1", "omsagent.secret.wsid",
48+
"fakeTokenPlaceholder"))
49+
.withConfigurationProtectedSettings(mapOf("omsagent.secret.key", "fakeTokenPlaceholder")),
50+
com.azure.core.util.Context.NONE);
51+
}
52+
53+
/*
54+
* x-ms-original-file:
55+
* specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/stable/2024-
56+
* 11-01/examples/CreateExtensionWithPlan.json
57+
*/
58+
/**
59+
* Sample code: Create Extension with Plan.
60+
*
61+
* @param manager Entry point to ExtensionsManager.
62+
*/
63+
public static void createExtensionWithPlan(
64+
com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.ExtensionsManager manager) {
65+
manager.extensions()
66+
.create("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "azureVote",
67+
new ExtensionInner()
68+
.withPlan(new Plan().withName("azure-vote-standard")
69+
.withPublisher("Microsoft")
70+
.withProduct("azure-vote-standard-offer-id"))
71+
.withExtensionType("azure-vote")
72+
.withAutoUpgradeMinorVersion(true)
73+
.withReleaseTrain("Preview"),
74+
com.azure.core.util.Context.NONE);
75+
}
76+
77+
// Use "Map.of" if available
78+
@SuppressWarnings("unchecked")
79+
private static <T> Map<String, T> mapOf(Object... inputs) {
80+
Map<String, T> map = new HashMap<>();
81+
for (int i = 0; i < inputs.length; i += 2) {
82+
String key = (String) inputs[i];
83+
T value = (T) inputs[i + 1];
84+
map.put(key, value);
85+
}
86+
return map;
87+
}
88+
}
89+
```
90+
91+
### Extensions_Delete
92+
93+
```java
94+
/**
95+
* Samples for Extensions Delete.
96+
*/
97+
public final class ExtensionsDeleteSamples {
98+
/*
99+
* x-ms-original-file:
100+
* specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/stable/2024-
101+
* 11-01/examples/DeleteExtension.json
102+
*/
103+
/**
104+
* Sample code: Delete Extension.
105+
*
106+
* @param manager Entry point to ExtensionsManager.
107+
*/
108+
public static void deleteExtension(
109+
com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.ExtensionsManager manager) {
110+
manager.extensions()
111+
.delete("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "ClusterMonitor", null,
112+
com.azure.core.util.Context.NONE);
113+
}
114+
}
115+
```
116+
117+
### Extensions_Get
118+
119+
```java
120+
/**
121+
* Samples for Extensions Get.
122+
*/
123+
public final class ExtensionsGetSamples {
124+
/*
125+
* x-ms-original-file:
126+
* specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/stable/2024-
127+
* 11-01/examples/GetExtensionWithPlan.json
128+
*/
129+
/**
130+
* Sample code: Get Extension with Plan.
131+
*
132+
* @param manager Entry point to ExtensionsManager.
133+
*/
134+
public static void getExtensionWithPlan(
135+
com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.ExtensionsManager manager) {
136+
manager.extensions()
137+
.getWithResponse("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "azureVote",
138+
com.azure.core.util.Context.NONE);
139+
}
140+
141+
/*
142+
* x-ms-original-file:
143+
* specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/stable/2024-
144+
* 11-01/examples/GetExtension.json
145+
*/
146+
/**
147+
* Sample code: Get Extension.
148+
*
149+
* @param manager Entry point to ExtensionsManager.
150+
*/
151+
public static void getExtension(
152+
com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.ExtensionsManager manager) {
153+
manager.extensions()
154+
.getWithResponse("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "ClusterMonitor",
155+
com.azure.core.util.Context.NONE);
156+
}
157+
}
158+
```
159+
160+
### Extensions_List
161+
162+
```java
163+
/**
164+
* Samples for Extensions List.
165+
*/
166+
public final class ExtensionsListSamples {
167+
/*
168+
* x-ms-original-file:
169+
* specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/stable/2024-
170+
* 11-01/examples/ListExtensions.json
171+
*/
172+
/**
173+
* Sample code: List Extensions.
174+
*
175+
* @param manager Entry point to ExtensionsManager.
176+
*/
177+
public static void listExtensions(
178+
com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.ExtensionsManager manager) {
179+
manager.extensions()
180+
.list("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", com.azure.core.util.Context.NONE);
181+
}
182+
}
183+
```
184+
185+
### Extensions_Update
186+
187+
```java
188+
import com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.models.PatchExtension;
189+
import java.util.HashMap;
190+
import java.util.Map;
191+
192+
/**
193+
* Samples for Extensions Update.
194+
*/
195+
public final class ExtensionsUpdateSamples {
196+
/*
197+
* x-ms-original-file:
198+
* specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/stable/2024-
199+
* 11-01/examples/PatchExtension.json
200+
*/
201+
/**
202+
* Sample code: Update Extension.
203+
*
204+
* @param manager Entry point to ExtensionsManager.
205+
*/
206+
public static void updateExtension(
207+
com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.ExtensionsManager manager) {
208+
manager.extensions()
209+
.update("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "ClusterMonitor",
210+
new PatchExtension().withAutoUpgradeMinorVersion(true)
211+
.withReleaseTrain("Preview")
212+
.withConfigurationSettings(mapOf("omsagent.env.clusterName", "clusterName1", "omsagent.secret.wsid",
213+
"fakeTokenPlaceholder"))
214+
.withConfigurationProtectedSettings(mapOf("omsagent.secret.key", "fakeTokenPlaceholder")),
215+
com.azure.core.util.Context.NONE);
216+
}
217+
218+
// Use "Map.of" if available
219+
@SuppressWarnings("unchecked")
220+
private static <T> Map<String, T> mapOf(Object... inputs) {
221+
Map<String, T> map = new HashMap<>();
222+
for (int i = 0; i < inputs.length; i += 2) {
223+
String key = (String) inputs[i];
224+
T value = (T) inputs[i + 1];
225+
map.put(key, value);
226+
}
227+
return map;
228+
}
229+
}
230+
```
231+
232+
### OperationStatus_Get
233+
234+
```java
235+
/**
236+
* Samples for OperationStatus Get.
237+
*/
238+
public final class OperationStatusGetSamples {
239+
/*
240+
* x-ms-original-file:
241+
* specification/kubernetesconfiguration/resource-manager/Microsoft.KubernetesConfiguration/extensions/stable/2024-
242+
* 11-01/examples/GetExtensionAsyncOperationStatus.json
243+
*/
244+
/**
245+
* Sample code: ExtensionAsyncOperationStatus Get.
246+
*
247+
* @param manager Entry point to ExtensionsManager.
248+
*/
249+
public static void extensionAsyncOperationStatusGet(
250+
com.azure.resourcemanager.kubernetesconfigurationmicrosoftkubernetesconfigurationextensions.ExtensionsManager manager) {
251+
manager.operationStatus()
252+
.getWithResponse("rg1", "Microsoft.Kubernetes", "connectedClusters", "clusterName1", "ClusterMonitor",
253+
"99999999-9999-9999-9999-999999999999", com.azure.core.util.Context.NONE);
254+
}
255+
}
256+
```
257+

0 commit comments

Comments
 (0)