Skip to content

Commit 8aaa060

Browse files
author
SDKAuto
committed
CodeGen from PR 33581 in Azure/azure-rest-api-specs
Merge efc5c09ac76420e669ba217b83c81ce263ad5453 into cb5ef7fc4cb443bd5f6b21d02cbce41051beb6ae
1 parent 41e7411 commit 8aaa060

File tree

63 files changed

+6014
-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.

63 files changed

+6014
-0
lines changed

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.2
476+
com.azure.resourcemanager:azure-resourcemanager-sitemanager;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
@@ -209,6 +209,7 @@
209209
<module>sdk/servicelinker</module>
210210
<module>sdk/servicenetworking</module>
211211
<module>sdk/signalr</module>
212+
<module>sdk/sitemanager</module>
212213
<module>sdk/sphere</module>
213214
<module>sdk/spring</module>
214215
<module>sdk/spring-experimental</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-04-15)
4+
5+
- Azure Resource Manager sitemanager client library for Java. This package contains Microsoft Azure SDK for sitemanager Management SDK. Azure Edge Sites Resource Provider management API. 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-sitemanager Java SDK.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# Azure Resource Manager sitemanager client library for Java
2+
3+
Azure Resource Manager sitemanager client library for Java.
4+
5+
This package contains Microsoft Azure SDK for sitemanager Management SDK. Azure Edge Sites Resource Provider management API. 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-sitemanager;current})
31+
```xml
32+
<dependency>
33+
<groupId>com.azure.resourcemanager</groupId>
34+
<artifactId>azure-resourcemanager-sitemanager</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+
SitemanagerManager manager = SitemanagerManager
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/sitemanager/azure-resourcemanager-sitemanager/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: 265 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,265 @@
1+
# Code snippets and samples
2+
3+
4+
## Sites
5+
6+
- [CreateOrUpdate](#sites_createorupdate)
7+
- [Delete](#sites_delete)
8+
- [GetByResourceGroup](#sites_getbyresourcegroup)
9+
- [ListByResourceGroup](#sites_listbyresourcegroup)
10+
- [Update](#sites_update)
11+
12+
## SitesBySubscription
13+
14+
- [CreateOrUpdate](#sitesbysubscription_createorupdate)
15+
- [Delete](#sitesbysubscription_delete)
16+
- [Get](#sitesbysubscription_get)
17+
- [List](#sitesbysubscription_list)
18+
- [Update](#sitesbysubscription_update)
19+
### Sites_CreateOrUpdate
20+
21+
```java
22+
/**
23+
* Samples for SitesBySubscription Get.
24+
*/
25+
public final class SitesBySubscriptionGetSamples {
26+
/*
27+
* x-ms-original-file: 2024-02-01-preview/SitesBySubscription_Get.json
28+
*/
29+
/**
30+
* Sample code: Get Site Subscription.
31+
*
32+
* @param manager Entry point to SitemanagerManager.
33+
*/
34+
public static void getSiteSubscription(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
35+
manager.sitesBySubscriptions().getWithResponse("string", com.azure.core.util.Context.NONE);
36+
}
37+
}
38+
```
39+
40+
### Sites_Delete
41+
42+
```java
43+
import com.azure.resourcemanager.sitemanager.fluent.models.SiteInner;
44+
import com.azure.resourcemanager.sitemanager.models.SiteProperties;
45+
46+
/**
47+
* Samples for SitesBySubscription CreateOrUpdate.
48+
*/
49+
public final class SitesBySubscriptionCreateOrUpdateSamples {
50+
/*
51+
* x-ms-original-file: 2024-02-01-preview/SitesBySubscription_CreateOrUpdate.json
52+
*/
53+
/**
54+
* Sample code: Create Site Subscription.
55+
*
56+
* @param manager Entry point to SitemanagerManager.
57+
*/
58+
public static void createSiteSubscription(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
59+
manager.sitesBySubscriptions()
60+
.createOrUpdate("string", new SiteInner().withProperties(new SiteProperties().withDisplayName("string")
61+
.withDescription("string")
62+
.withAddressResourceId(
63+
"/subscriptions/680d0dad-59aa-4464-3df3-b34b2b42738c/resourceGroups/us-site-rg/providers/Microsoft.EdgeOrder/addresses/12343213")),
64+
com.azure.core.util.Context.NONE);
65+
}
66+
}
67+
```
68+
69+
### Sites_GetByResourceGroup
70+
71+
```java
72+
import com.azure.resourcemanager.sitemanager.models.SiteProperties;
73+
74+
/**
75+
* Samples for Sites CreateOrUpdate.
76+
*/
77+
public final class SitesCreateOrUpdateSamples {
78+
/*
79+
* x-ms-original-file: 2024-02-01-preview/Sites_CreateOrUpdate.json
80+
*/
81+
/**
82+
* Sample code: Create or update Site.
83+
*
84+
* @param manager Entry point to SitemanagerManager.
85+
*/
86+
public static void createOrUpdateSite(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
87+
manager.sites()
88+
.define("string")
89+
.withExistingResourceGroup("string")
90+
.withProperties(new SiteProperties().withDisplayName("string")
91+
.withDescription("string")
92+
.withAddressResourceId(
93+
"/subscriptions/680d0dad-59aa-4464-3df3-b34b2b42738c/resourceGroups/us-site-rg/providers/Microsoft.EdgeOrder/addresses/12343213"))
94+
.create();
95+
}
96+
}
97+
```
98+
99+
### Sites_ListByResourceGroup
100+
101+
```java
102+
/**
103+
* Samples for SitesBySubscription List.
104+
*/
105+
public final class SitesBySubscriptionListSamples {
106+
/*
107+
* x-ms-original-file: 2024-02-01-preview/SitesBySubscription_List.json
108+
*/
109+
/**
110+
* Sample code: List by Subscription.
111+
*
112+
* @param manager Entry point to SitemanagerManager.
113+
*/
114+
public static void listBySubscription(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
115+
manager.sitesBySubscriptions().list(com.azure.core.util.Context.NONE);
116+
}
117+
}
118+
```
119+
120+
### Sites_Update
121+
122+
```java
123+
/**
124+
* Samples for Sites Delete.
125+
*/
126+
public final class SitesDeleteSamples {
127+
/*
128+
* x-ms-original-file: 2024-02-01-preview/Sites_Delete.json
129+
*/
130+
/**
131+
* Sample code: Delete Site.
132+
*
133+
* @param manager Entry point to SitemanagerManager.
134+
*/
135+
public static void deleteSite(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
136+
manager.sites().deleteByResourceGroupWithResponse("string", "string", com.azure.core.util.Context.NONE);
137+
}
138+
}
139+
```
140+
141+
### SitesBySubscription_CreateOrUpdate
142+
143+
```java
144+
import com.azure.resourcemanager.sitemanager.models.SiteUpdate;
145+
import com.azure.resourcemanager.sitemanager.models.SiteUpdateProperties;
146+
147+
/**
148+
* Samples for SitesBySubscription Update.
149+
*/
150+
public final class SitesBySubscriptionUpdateSamples {
151+
/*
152+
* x-ms-original-file: 2024-02-01-preview/SitesBySubscription_Update.json
153+
*/
154+
/**
155+
* Sample code: Patch Site Subscription.
156+
*
157+
* @param manager Entry point to SitemanagerManager.
158+
*/
159+
public static void patchSiteSubscription(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
160+
manager.sitesBySubscriptions()
161+
.updateWithResponse("string", new SiteUpdate().withProperties(new SiteUpdateProperties()
162+
.withDisplayName("string")
163+
.withDescription("string")
164+
.withAddressResourceId(
165+
"/subscriptions/0154f7fe-df09-4981-bf82-7ad5c1f596eb/resourceGroups/us-site-rg/providers/Microsoft.EdgeOrder/addresses/12343213")),
166+
com.azure.core.util.Context.NONE);
167+
}
168+
}
169+
```
170+
171+
### SitesBySubscription_Delete
172+
173+
```java
174+
import com.azure.resourcemanager.sitemanager.models.Site;
175+
import com.azure.resourcemanager.sitemanager.models.SiteUpdateProperties;
176+
177+
/**
178+
* Samples for Sites Update.
179+
*/
180+
public final class SitesUpdateSamples {
181+
/*
182+
* x-ms-original-file: 2024-02-01-preview/Sites_Update.json
183+
*/
184+
/**
185+
* Sample code: Update Site.
186+
*
187+
* @param manager Entry point to SitemanagerManager.
188+
*/
189+
public static void updateSite(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
190+
Site resource = manager.sites()
191+
.getByResourceGroupWithResponse("string", "string", com.azure.core.util.Context.NONE)
192+
.getValue();
193+
resource.update()
194+
.withProperties(new SiteUpdateProperties().withDisplayName("string")
195+
.withDescription("string")
196+
.withAddressResourceId(
197+
"/subscriptions/11111111-2222-3333-4444-55555555/resourceGroups/us-site-rg/providers/Microsoft.EdgeOrder/addresses/12343213"))
198+
.apply();
199+
}
200+
}
201+
```
202+
203+
### SitesBySubscription_Get
204+
205+
```java
206+
/**
207+
* Samples for Sites GetByResourceGroup.
208+
*/
209+
public final class SitesGetByResourceGroupSamples {
210+
/*
211+
* x-ms-original-file: 2024-02-01-preview/Sites_Get.json
212+
*/
213+
/**
214+
* Sample code: Get Site.
215+
*
216+
* @param manager Entry point to SitemanagerManager.
217+
*/
218+
public static void getSite(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
219+
manager.sites().getByResourceGroupWithResponse("string", "string", com.azure.core.util.Context.NONE);
220+
}
221+
}
222+
```
223+
224+
### SitesBySubscription_List
225+
226+
```java
227+
/**
228+
* Samples for Sites ListByResourceGroup.
229+
*/
230+
public final class SitesListByResourceGroupSamples {
231+
/*
232+
* x-ms-original-file: 2024-02-01-preview/Sites_ListByResourceGroup.json
233+
*/
234+
/**
235+
* Sample code: List by Site Subscription.
236+
*
237+
* @param manager Entry point to SitemanagerManager.
238+
*/
239+
public static void listBySiteSubscription(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
240+
manager.sites().listByResourceGroup("string", com.azure.core.util.Context.NONE);
241+
}
242+
}
243+
```
244+
245+
### SitesBySubscription_Update
246+
247+
```java
248+
/**
249+
* Samples for SitesBySubscription Delete.
250+
*/
251+
public final class SitesBySubscriptionDeleteSamples {
252+
/*
253+
* x-ms-original-file: 2024-02-01-preview/SitesBySubscription_Delete.json
254+
*/
255+
/**
256+
* Sample code: Delete Site Subscription.
257+
*
258+
* @param manager Entry point to SitemanagerManager.
259+
*/
260+
public static void deleteSiteSubscription(com.azure.resourcemanager.sitemanager.SitemanagerManager manager) {
261+
manager.sitesBySubscriptions().deleteWithResponse("string", com.azure.core.util.Context.NONE);
262+
}
263+
}
264+
```
265+

0 commit comments

Comments
 (0)