Skip to content

Commit 5870f22

Browse files
author
SDKAuto
committed
CodeGen from PR 33888 in Azure/azure-rest-api-specs
Merge 8ac12f92c1d48f202f344ab30df1842d10a10211 into 0d182673b42de227bc01c0e4f04932b6c074f5ce
1 parent 40993ae commit 5870f22

File tree

41 files changed

+339
-1763
lines changed

Some content is hidden

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

41 files changed

+339
-1763
lines changed

sdk/astro/azure-resourcemanager-astro/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 (2025-04-11)
4+
5+
- Azure Resource Manager Astro client library for Java. This package contains Microsoft Azure SDK for Astro Management SDK. Package tag package-2024-08-27. 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/astro/azure-resourcemanager-astro/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Azure Resource Manager Astro client library for Java.
44

5-
This package contains Microsoft Azure SDK for Astro Management SDK. Package tag package-2023-08-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 Astro Management SDK. Package tag package-2024-08-27. 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

@@ -52,15 +52,15 @@ Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment
5252
Assuming the use of the `DefaultAzureCredential` credential class, the client can be authenticated using the following code:
5353

5454
```java
55-
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
55+
AzureProfile profile = new AzureProfile(AzureCloud.AZURE_PUBLIC_CLOUD);
5656
TokenCredential credential = new DefaultAzureCredentialBuilder()
5757
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
5858
.build();
5959
AstroManager manager = AstroManager
6060
.authenticate(credential, profile);
6161
```
6262

63-
The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
63+
The sample code assumes global Azure. Please change the `AzureCloud.AZURE_PUBLIC_CLOUD` variable if otherwise.
6464

6565
See [Authentication][authenticate] for more options.
6666

@@ -100,5 +100,3 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
100100
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
101101
[coc]: https://opensource.microsoft.com/codeofconduct/
102102
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
103-
104-

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

Lines changed: 98 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
public final class OperationsListSamples {
2323
/*
24-
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
24+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
2525
* Operations_List_MaximumSet_Gen.json
2626
*/
2727
/**
@@ -32,6 +32,19 @@ public final class OperationsListSamples {
3232
public static void operationsListGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
3333
manager.operations().list(com.azure.core.util.Context.NONE);
3434
}
35+
36+
/*
37+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
38+
* Operations_List_MinimumSet_Gen.json
39+
*/
40+
/**
41+
* Sample code: Operations_List - generated by [MinimumSet] rule.
42+
*
43+
* @param manager Entry point to AstroManager.
44+
*/
45+
public static void operationsListGeneratedByMinimumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
46+
manager.operations().list(com.azure.core.util.Context.NONE);
47+
}
3548
}
3649
```
3750

@@ -47,6 +60,7 @@ import com.azure.resourcemanager.astro.models.LiftrBaseUserDetails;
4760
import com.azure.resourcemanager.astro.models.ManagedServiceIdentity;
4861
import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
4962
import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
63+
import com.azure.resourcemanager.astro.models.RenewalMode;
5064
import com.azure.resourcemanager.astro.models.SingleSignOnStates;
5165
import java.util.Arrays;
5266
import java.util.HashMap;
@@ -57,7 +71,7 @@ import java.util.Map;
5771
*/
5872
public final class OrganizationsCreateOrUpdateSamples {
5973
/*
60-
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
74+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
6175
* Organizations_CreateOrUpdate_MaximumSet_Gen.json
6276
*/
6377
/**
@@ -69,33 +83,34 @@ public final class OrganizationsCreateOrUpdateSamples {
6983
organizationsCreateOrUpdateGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
7084
manager.organizations()
7185
.define("U.1-:7")
72-
.withRegion("mhqthlsatwvqkl")
86+
.withRegion("pgfkugslgnsxeqpjs")
7387
.withExistingResourceGroup("rgastronomer")
7488
.withTags(mapOf())
7589
.withProperties(new LiftrBaseDataOrganizationProperties()
76-
.withMarketplace(new LiftrBaseMarketplaceDetails()
90+
.withMarketplace(new LiftrBaseMarketplaceDetails().withSubscriptionId("emasc")
7791
.withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
78-
.withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("astronomer1591719760654")
79-
.withOfferId("astro")
80-
.withPlanId("astro-paygo")
81-
.withPlanName("Monthly Pay-As-You-Go")
82-
.withTermUnit("Monthly")
83-
.withTermId("gmz7xq9ge3py")))
84-
.withUser(new LiftrBaseUserDetails().withFirstName("nfh")
85-
.withLastName("lazfbstcccykibvcrxpmglqam")
92+
.withOfferDetails(new LiftrBaseOfferDetails().withPublisherId("kt")
93+
.withOfferId("tvidibzbxevtvnrdp")
94+
.withPlanId("lwcvzdqecwkeracahmixnh")
95+
.withPlanName("d")
96+
.withTermUnit("rs")
97+
.withTermId("kopnnjsp")
98+
.withRenewalMode(RenewalMode.AUTO)))
99+
.withUser(new LiftrBaseUserDetails().withFirstName("ucowvrccqpqpkdg")
100+
.withLastName("fwwtnwggrtibghoijfzajrhgyo")
86101
.withEmailAddress("[email protected]")
87-
.withUpn("xtutvycpxjrtoftx")
88-
.withPhoneNumber("inxkscllh"))
102+
.withUpn("zbdgbbqg")
103+
.withPhoneNumber("brnngpezmqecvflklbhsibq"))
89104
.withPartnerOrganizationProperties(
90-
new LiftrBaseDataPartnerOrganizationProperties().withOrganizationId("lskgzdmziusgrsucv")
91-
.withWorkspaceId("vcrupxwpaba")
92-
.withOrganizationName("3-")
105+
new LiftrBaseDataPartnerOrganizationProperties().withOrganizationId("juomtfzwkjwnhhpodfnrqdv")
106+
.withWorkspaceId("nnryjcmiohmkbvhngfgxigpodvhl")
107+
.withOrganizationName("U.1-:7")
93108
.withWorkspaceName("9.:06")
94109
.withSingleSignOnProperties(
95110
new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL)
96-
.withEnterpriseAppId("mklfypyujwumgwdzae")
97-
.withSingleSignOnUrl("ymmtzkyghvinvhgnqlzwrr")
98-
.withAadDomains(Arrays.asList("kfbleh")))))
111+
.withEnterpriseAppId("srkwxktx")
112+
.withSingleSignOnUrl("l")
113+
.withAadDomains(Arrays.asList("fcnqoizqxcdclmy")))))
99114
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
100115
.withUserAssignedIdentities(mapOf()))
101116
.create();
@@ -123,7 +138,7 @@ public final class OrganizationsCreateOrUpdateSamples {
123138
*/
124139
public final class OrganizationsDeleteSamples {
125140
/*
126-
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
141+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
127142
* Organizations_Delete_MaximumSet_Gen.json
128143
*/
129144
/**
@@ -133,7 +148,7 @@ public final class OrganizationsDeleteSamples {
133148
*/
134149
public static void
135150
organizationsDeleteGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
136-
manager.organizations().delete("rgastronomer", "q:", com.azure.core.util.Context.NONE);
151+
manager.organizations().delete("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE);
137152
}
138153
}
139154
```
@@ -146,7 +161,7 @@ public final class OrganizationsDeleteSamples {
146161
*/
147162
public final class OrganizationsGetByResourceGroupSamples {
148163
/*
149-
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
164+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
150165
* Organizations_Get_MaximumSet_Gen.json
151166
*/
152167
/**
@@ -156,7 +171,7 @@ public final class OrganizationsGetByResourceGroupSamples {
156171
*/
157172
public static void organizationsGetGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
158173
manager.organizations()
159-
.getByResourceGroupWithResponse("rgastronomer", "S PS", com.azure.core.util.Context.NONE);
174+
.getByResourceGroupWithResponse("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE);
160175
}
161176
}
162177
```
@@ -169,7 +184,21 @@ public final class OrganizationsGetByResourceGroupSamples {
169184
*/
170185
public final class OrganizationsListSamples {
171186
/*
172-
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
187+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
188+
* Organizations_ListBySubscription_MinimumSet_Gen.json
189+
*/
190+
/**
191+
* Sample code: Organizations_ListBySubscription - generated by [MinimumSet] rule.
192+
*
193+
* @param manager Entry point to AstroManager.
194+
*/
195+
public static void
196+
organizationsListBySubscriptionGeneratedByMinimumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
197+
manager.organizations().list(com.azure.core.util.Context.NONE);
198+
}
199+
200+
/*
201+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
173202
* Organizations_ListBySubscription_MaximumSet_Gen.json
174203
*/
175204
/**
@@ -192,7 +221,7 @@ public final class OrganizationsListSamples {
192221
*/
193222
public final class OrganizationsListByResourceGroupSamples {
194223
/*
195-
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
224+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
196225
* Organizations_ListByResourceGroup_MaximumSet_Gen.json
197226
*/
198227
/**
@@ -204,6 +233,20 @@ public final class OrganizationsListByResourceGroupSamples {
204233
com.azure.resourcemanager.astro.AstroManager manager) {
205234
manager.organizations().listByResourceGroup("rgastronomer", com.azure.core.util.Context.NONE);
206235
}
236+
237+
/*
238+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
239+
* Organizations_ListByResourceGroup_MinimumSet_Gen.json
240+
*/
241+
/**
242+
* Sample code: Organizations_ListByResourceGroup - generated by [MinimumSet] rule.
243+
*
244+
* @param manager Entry point to AstroManager.
245+
*/
246+
public static void organizationsListByResourceGroupGeneratedByMinimumSetRule(
247+
com.azure.resourcemanager.astro.AstroManager manager) {
248+
manager.organizations().listByResourceGroup("rgastronomer", com.azure.core.util.Context.NONE);
249+
}
207250
}
208251
```
209252

@@ -220,6 +263,7 @@ import com.azure.resourcemanager.astro.models.ManagedServiceIdentityType;
220263
import com.azure.resourcemanager.astro.models.MarketplaceSubscriptionStatus;
221264
import com.azure.resourcemanager.astro.models.OrganizationResource;
222265
import com.azure.resourcemanager.astro.models.OrganizationResourceUpdateProperties;
266+
import com.azure.resourcemanager.astro.models.RenewalMode;
223267
import com.azure.resourcemanager.astro.models.SingleSignOnStates;
224268
import java.util.Arrays;
225269
import java.util.HashMap;
@@ -230,46 +274,48 @@ import java.util.Map;
230274
*/
231275
public final class OrganizationsUpdateSamples {
232276
/*
233-
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2023-08-01/examples/
277+
* x-ms-original-file: specification/liftrastronomer/resource-manager/Astronomer.Astro/stable/2024-08-27/examples/
234278
* Organizations_Update_MaximumSet_Gen.json
235279
*/
236280
/**
237-
* Sample code: Organizations_Update.
281+
* Sample code: Organizations_Update - generated by [MaximumSet] rule.
238282
*
239283
* @param manager Entry point to AstroManager.
240284
*/
241-
public static void organizationsUpdate(com.azure.resourcemanager.astro.AstroManager manager) {
285+
public static void
286+
organizationsUpdateGeneratedByMaximumSetRule(com.azure.resourcemanager.astro.AstroManager manager) {
242287
OrganizationResource resource = manager.organizations()
243-
.getByResourceGroupWithResponse("rgastronomer", "6.", com.azure.core.util.Context.NONE)
288+
.getByResourceGroupWithResponse("rgastronomer", "U.1-:7", com.azure.core.util.Context.NONE)
244289
.getValue();
245290
resource.update()
246-
.withTags(mapOf("key1474", "fakeTokenPlaceholder"))
291+
.withTags(mapOf())
247292
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE)
248293
.withUserAssignedIdentities(mapOf()))
249294
.withProperties(new OrganizationResourceUpdateProperties()
250-
.withMarketplace(new LiftrBaseMarketplaceDetailsUpdate().withSubscriptionId("bpoiahcvraqjhwpqcyvmxl")
295+
.withMarketplace(new LiftrBaseMarketplaceDetailsUpdate().withSubscriptionId("ujl")
251296
.withSubscriptionStatus(MarketplaceSubscriptionStatus.PENDING_FULFILLMENT_START)
252-
.withOfferDetails(new LiftrBaseOfferDetailsUpdate().withPublisherId("zhnlxf")
253-
.withOfferId("rh")
254-
.withPlanId("uqlecfuht")
255-
.withPlanName("secxe")
256-
.withTermUnit("skbmivxsechzkyuxvd")
257-
.withTermId("qvnaspsilt")))
258-
.withUser(new LiftrBaseUserDetailsUpdate().withFirstName("pantcaqwknzxnjs")
259-
.withLastName("loytwkjq")
297+
.withOfferDetails(new LiftrBaseOfferDetailsUpdate().withPublisherId("bywzycdrucjkx")
298+
.withOfferId("aljpaprqzpnivwol")
299+
.withPlanId("fcpnstrwetlrajanh")
300+
.withPlanName("wjgnlhqqkdi")
301+
.withTermUnit("pvpk")
302+
.withTermId("xg")
303+
.withRenewalMode(RenewalMode.AUTO)))
304+
.withUser(new LiftrBaseUserDetailsUpdate().withFirstName("wyoaxocyjfpgicvketuiayfxrxq")
305+
.withLastName("vlwybhfayupjpwfhy")
260306
.withEmailAddress("[email protected]")
261-
.withUpn("sbfjcucbtwvnnhyzpfycykerzqjvo")
262-
.withPhoneNumber("smwcipwxoxdmzgj"))
263-
.withPartnerOrganizationProperties(
264-
new LiftrBaseDataPartnerOrganizationPropertiesUpdate().withOrganizationId("ugyxg")
265-
.withWorkspaceId("jbpphzsonkhnaxbwlpmgrwuklcx")
266-
.withOrganizationName("6.")
267-
.withWorkspaceName("L.-y_--:")
268-
.withSingleSignOnProperties(
269-
new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL)
270-
.withEnterpriseAppId("hkqosvz")
271-
.withSingleSignOnUrl("mgr")
272-
.withAadDomains(Arrays.asList("ynmjdshvcxpusrtv")))))
307+
.withUpn("ezefcwbsbgcxrdiixmzphibt")
308+
.withPhoneNumber("eibhsslqzufgshuzrjjyymsb"))
309+
.withPartnerOrganizationProperties(new LiftrBaseDataPartnerOrganizationPropertiesUpdate()
310+
.withOrganizationId("linzwcqhrpqrxpnghxjnxzetfdps")
311+
.withWorkspaceId("tmmxzlagmdrc")
312+
.withOrganizationName("U.1-:7")
313+
.withWorkspaceName("9.:06")
314+
.withSingleSignOnProperties(
315+
new LiftrBaseSingleSignOnProperties().withSingleSignOnState(SingleSignOnStates.INITIAL)
316+
.withEnterpriseAppId("jspfkoxolosmvyixpktbwyoqrx")
317+
.withSingleSignOnUrl("aatouxlmqqizijszlu")
318+
.withAadDomains(Arrays.asList("gwzhrfmnhbeitagjdlzw")))))
273319
.apply();
274320
}
275321

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<packaging>jar</packaging>
1919

2020
<name>Microsoft Azure SDK for Astro Management</name>
21-
<description>This package contains Microsoft Azure SDK for Astro Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-08-01.</description>
21+
<description>This package contains Microsoft Azure SDK for Astro Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-08-27.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>

sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/AstroManager.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import com.azure.core.http.policy.UserAgentPolicy;
2323
import com.azure.core.management.profile.AzureProfile;
2424
import com.azure.core.util.Configuration;
25+
import com.azure.core.util.CoreUtils;
2526
import com.azure.core.util.logging.ClientLogger;
2627
import com.azure.resourcemanager.astro.fluent.AstroMgmtClient;
2728
import com.azure.resourcemanager.astro.implementation.AstroMgmtClientBuilder;
@@ -33,6 +34,7 @@
3334
import java.time.temporal.ChronoUnit;
3435
import java.util.ArrayList;
3536
import java.util.List;
37+
import java.util.Map;
3638
import java.util.Objects;
3739
import java.util.stream.Collectors;
3840

@@ -96,6 +98,9 @@ public static Configurable configure() {
9698
*/
9799
public static final class Configurable {
98100
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
101+
private static final String SDK_VERSION = "version";
102+
private static final Map<String, String> PROPERTIES
103+
= CoreUtils.getProperties("azure-resourcemanager-astro.properties");
99104

100105
private HttpClient httpClient;
101106
private HttpLogOptions httpLogOptions;
@@ -203,12 +208,14 @@ public AstroManager authenticate(TokenCredential credential, AzureProfile profil
203208
Objects.requireNonNull(credential, "'credential' cannot be null.");
204209
Objects.requireNonNull(profile, "'profile' cannot be null.");
205210

211+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
212+
206213
StringBuilder userAgentBuilder = new StringBuilder();
207214
userAgentBuilder.append("azsdk-java")
208215
.append("-")
209216
.append("com.azure.resourcemanager.astro")
210217
.append("/")
211-
.append("1.0.0-beta.2");
218+
.append(clientVersion);
212219
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
213220
userAgentBuilder.append(" (")
214221
.append(Configuration.getGlobalConfiguration().get("java.version"))

sdk/astro/azure-resourcemanager-astro/src/main/java/com/azure/resourcemanager/astro/implementation/AstroMgmtClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public OrganizationsClient getOrganizations() {
169169
this.defaultPollInterval = defaultPollInterval;
170170
this.subscriptionId = subscriptionId;
171171
this.endpoint = endpoint;
172-
this.apiVersion = "2023-08-01";
172+
this.apiVersion = "2024-08-27";
173173
this.operations = new OperationsClientImpl(this);
174174
this.organizations = new OrganizationsClientImpl(this);
175175
}

0 commit comments

Comments
 (0)