Skip to content

Commit 2218667

Browse files
author
SDKAuto
committed
CodeGen from PR 32208 in Azure/azure-rest-api-specs
Merge d6bde830bc415516a9c646dc9f93fd9c2129a7c2 into 040184cd37f2eb2704325b47f205a32eb0891413
1 parent d01a687 commit 2218667

File tree

96 files changed

+336
-2211
lines changed

Some content is hidden

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

96 files changed

+336
-2211
lines changed

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

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
# Release History
22

3-
## 1.1.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2025-03-25)
4+
5+
- Azure Resource Manager AppConfiguration client library for Java. This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2024-06-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

7-
### Breaking Changes
9+
#### `models.ConfigurationStoreUpdateParameters` was modified
10+
11+
* `defaultKeyValueRevisionRetentionPeriodInSeconds()` was added
12+
* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added
13+
14+
#### `models.ConfigurationStore$Definition` was modified
815

9-
### Bugs Fixed
16+
* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added
17+
18+
#### `models.ConfigurationStore$Update` was modified
19+
20+
* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added
21+
22+
#### `models.ConfigurationStore` was modified
1023

11-
### Other Changes
24+
* `defaultKeyValueRevisionRetentionPeriodInSeconds()` was added
1225

1326
## 1.0.0 (2024-11-20)
1427

sdk/appconfiguration/azure-resourcemanager-appconfiguration/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 AppConfiguration client library for Java.
44

5-
This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-2024-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 AppConfiguration Management SDK. Package tag package-2024-06-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

@@ -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
AppConfigurationManager manager = AppConfigurationManager
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/appconfiguration/azure-resourcemanager-appconfiguration/SAMPLE.md

Lines changed: 38 additions & 36 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 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 AppConfiguration Management</name>
21-
<description>This package contains Microsoft Azure SDK for AppConfiguration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-05-01.</description>
21+
<description>This package contains Microsoft Azure SDK for AppConfiguration Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2024-06-01.</description>
2222
<url>https://github.com/Azure/azure-sdk-for-java</url>
2323

2424
<licenses>
@@ -45,6 +45,7 @@
4545
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4646
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
4747
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
48+
<revapi.skip>true</revapi.skip>
4849
<spotless.skip>false</spotless.skip>
4950
</properties>
5051
<dependencies>

sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/AppConfigurationManager.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.appconfiguration.fluent.AppConfigurationManagementClient;
2728
import com.azure.resourcemanager.appconfiguration.implementation.AppConfigurationManagementClientBuilder;
@@ -43,6 +44,7 @@
4344
import java.time.temporal.ChronoUnit;
4445
import java.util.ArrayList;
4546
import java.util.List;
47+
import java.util.Map;
4648
import java.util.Objects;
4749
import java.util.stream.Collectors;
4850

@@ -116,6 +118,9 @@ public static Configurable configure() {
116118
*/
117119
public static final class Configurable {
118120
private static final ClientLogger LOGGER = new ClientLogger(Configurable.class);
121+
private static final String SDK_VERSION = "version";
122+
private static final Map<String, String> PROPERTIES
123+
= CoreUtils.getProperties("azure-resourcemanager-appconfiguration.properties");
119124

120125
private HttpClient httpClient;
121126
private HttpLogOptions httpLogOptions;
@@ -223,12 +228,14 @@ public AppConfigurationManager authenticate(TokenCredential credential, AzurePro
223228
Objects.requireNonNull(credential, "'credential' cannot be null.");
224229
Objects.requireNonNull(profile, "'profile' cannot be null.");
225230

231+
String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
232+
226233
StringBuilder userAgentBuilder = new StringBuilder();
227234
userAgentBuilder.append("azsdk-java")
228235
.append("-")
229236
.append("com.azure.resourcemanager.appconfiguration")
230237
.append("/")
231-
.append("1.0.0");
238+
.append(clientVersion);
232239
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
233240
userAgentBuilder.append(" (")
234241
.append(Configuration.getGlobalConfiguration().get("java.version"))

sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/KeyValuesClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,15 @@ Response<KeyValueInner> createOrUpdateWithResponse(String resourceGroupName, Str
7979
* @param configStoreName The name of the configuration store.
8080
* @param keyValueName Identifier of key and label combination. Key and label are joined by $ character. Label is
8181
* optional.
82+
* @param keyValueParameters The parameters for creating a key-value.
8283
* @throws IllegalArgumentException thrown if parameters fail the validation.
8384
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
8485
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
8586
* @return the key-value resource along with all resource properties.
8687
*/
8788
@ServiceMethod(returns = ReturnType.SINGLE)
88-
KeyValueInner createOrUpdate(String resourceGroupName, String configStoreName, String keyValueName);
89+
KeyValueInner createOrUpdate(String resourceGroupName, String configStoreName, String keyValueName,
90+
KeyValueInner keyValueParameters);
8991

9092
/**
9193
* Deletes a key-value. NOTE: This operation is intended for use in ARM Template deployments. For all other

sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreInner.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,38 @@ public ConfigurationStoreInner withSoftDeleteRetentionInDays(Integer softDeleteR
310310
return this;
311311
}
312312

313+
/**
314+
* Get the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value
315+
* revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and
316+
* Premium SKU stores.
317+
*
318+
* @return the defaultKeyValueRevisionRetentionPeriodInSeconds value.
319+
*/
320+
public Long defaultKeyValueRevisionRetentionPeriodInSeconds() {
321+
return this.innerProperties() == null
322+
? null
323+
: this.innerProperties().defaultKeyValueRevisionRetentionPeriodInSeconds();
324+
}
325+
326+
/**
327+
* Set the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value
328+
* revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and
329+
* Premium SKU stores.
330+
*
331+
* @param defaultKeyValueRevisionRetentionPeriodInSeconds the defaultKeyValueRevisionRetentionPeriodInSeconds value
332+
* to set.
333+
* @return the ConfigurationStoreInner object itself.
334+
*/
335+
public ConfigurationStoreInner
336+
withDefaultKeyValueRevisionRetentionPeriodInSeconds(Long defaultKeyValueRevisionRetentionPeriodInSeconds) {
337+
if (this.innerProperties() == null) {
338+
this.innerProperties = new ConfigurationStoreProperties();
339+
}
340+
this.innerProperties()
341+
.withDefaultKeyValueRevisionRetentionPeriodInSeconds(defaultKeyValueRevisionRetentionPeriodInSeconds);
342+
return this;
343+
}
344+
313345
/**
314346
* Get the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this
315347
* configuration store.

sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStoreProperties.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ public final class ConfigurationStoreProperties implements JsonSerializable<Conf
6565
*/
6666
private Integer softDeleteRetentionInDays;
6767

68+
/*
69+
* The duration in seconds to retain new key value revisions. Defaults to 604800 (7 days) for Free SKU stores and
70+
* 2592000 (30 days) for Standard SKU stores and Premium SKU stores.
71+
*/
72+
private Long defaultKeyValueRevisionRetentionPeriodInSeconds;
73+
6874
/*
6975
* Property specifying whether protection against purge is enabled for this configuration store.
7076
*/
@@ -207,6 +213,32 @@ public ConfigurationStoreProperties withSoftDeleteRetentionInDays(Integer softDe
207213
return this;
208214
}
209215

216+
/**
217+
* Get the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value
218+
* revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and
219+
* Premium SKU stores.
220+
*
221+
* @return the defaultKeyValueRevisionRetentionPeriodInSeconds value.
222+
*/
223+
public Long defaultKeyValueRevisionRetentionPeriodInSeconds() {
224+
return this.defaultKeyValueRevisionRetentionPeriodInSeconds;
225+
}
226+
227+
/**
228+
* Set the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value
229+
* revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and
230+
* Premium SKU stores.
231+
*
232+
* @param defaultKeyValueRevisionRetentionPeriodInSeconds the defaultKeyValueRevisionRetentionPeriodInSeconds value
233+
* to set.
234+
* @return the ConfigurationStoreProperties object itself.
235+
*/
236+
public ConfigurationStoreProperties
237+
withDefaultKeyValueRevisionRetentionPeriodInSeconds(Long defaultKeyValueRevisionRetentionPeriodInSeconds) {
238+
this.defaultKeyValueRevisionRetentionPeriodInSeconds = defaultKeyValueRevisionRetentionPeriodInSeconds;
239+
return this;
240+
}
241+
210242
/**
211243
* Get the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this
212244
* configuration store.
@@ -299,6 +331,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
299331
this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
300332
jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth);
301333
jsonWriter.writeNumberField("softDeleteRetentionInDays", this.softDeleteRetentionInDays);
334+
jsonWriter.writeNumberField("defaultKeyValueRevisionRetentionPeriodInSeconds",
335+
this.defaultKeyValueRevisionRetentionPeriodInSeconds);
302336
jsonWriter.writeBooleanField("enablePurgeProtection", this.enablePurgeProtection);
303337
jsonWriter.writeJsonField("dataPlaneProxy", this.dataPlaneProxy);
304338
jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString());
@@ -343,6 +377,9 @@ public static ConfigurationStoreProperties fromJson(JsonReader jsonReader) throw
343377
} else if ("softDeleteRetentionInDays".equals(fieldName)) {
344378
deserializedConfigurationStoreProperties.softDeleteRetentionInDays
345379
= reader.getNullable(JsonReader::getInt);
380+
} else if ("defaultKeyValueRevisionRetentionPeriodInSeconds".equals(fieldName)) {
381+
deserializedConfigurationStoreProperties.defaultKeyValueRevisionRetentionPeriodInSeconds
382+
= reader.getNullable(JsonReader::getLong);
346383
} else if ("enablePurgeProtection".equals(fieldName)) {
347384
deserializedConfigurationStoreProperties.enablePurgeProtection
348385
= reader.getNullable(JsonReader::getBoolean);

sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/fluent/models/ConfigurationStorePropertiesUpdateParameters.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ public final class ConfigurationStorePropertiesUpdateParameters
4545
*/
4646
private DataPlaneProxyProperties dataPlaneProxy;
4747

48+
/*
49+
* The duration in seconds to retain new key value revisions. Defaults to 604800 (7 days) for Free SKU stores and
50+
* 2592000 (30 days) for Standard SKU stores and Premium SKU stores.
51+
*/
52+
private Long defaultKeyValueRevisionRetentionPeriodInSeconds;
53+
4854
/**
4955
* Creates an instance of ConfigurationStorePropertiesUpdateParameters class.
5056
*/
@@ -158,6 +164,32 @@ public ConfigurationStorePropertiesUpdateParameters withDataPlaneProxy(DataPlane
158164
return this;
159165
}
160166

167+
/**
168+
* Get the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value
169+
* revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and
170+
* Premium SKU stores.
171+
*
172+
* @return the defaultKeyValueRevisionRetentionPeriodInSeconds value.
173+
*/
174+
public Long defaultKeyValueRevisionRetentionPeriodInSeconds() {
175+
return this.defaultKeyValueRevisionRetentionPeriodInSeconds;
176+
}
177+
178+
/**
179+
* Set the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value
180+
* revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and
181+
* Premium SKU stores.
182+
*
183+
* @param defaultKeyValueRevisionRetentionPeriodInSeconds the defaultKeyValueRevisionRetentionPeriodInSeconds value
184+
* to set.
185+
* @return the ConfigurationStorePropertiesUpdateParameters object itself.
186+
*/
187+
public ConfigurationStorePropertiesUpdateParameters
188+
withDefaultKeyValueRevisionRetentionPeriodInSeconds(Long defaultKeyValueRevisionRetentionPeriodInSeconds) {
189+
this.defaultKeyValueRevisionRetentionPeriodInSeconds = defaultKeyValueRevisionRetentionPeriodInSeconds;
190+
return this;
191+
}
192+
161193
/**
162194
* Validates the instance.
163195
*
@@ -184,6 +216,8 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
184216
this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
185217
jsonWriter.writeBooleanField("enablePurgeProtection", this.enablePurgeProtection);
186218
jsonWriter.writeJsonField("dataPlaneProxy", this.dataPlaneProxy);
219+
jsonWriter.writeNumberField("defaultKeyValueRevisionRetentionPeriodInSeconds",
220+
this.defaultKeyValueRevisionRetentionPeriodInSeconds);
187221
return jsonWriter.writeEndObject();
188222
}
189223

@@ -218,6 +252,9 @@ public static ConfigurationStorePropertiesUpdateParameters fromJson(JsonReader j
218252
} else if ("dataPlaneProxy".equals(fieldName)) {
219253
deserializedConfigurationStorePropertiesUpdateParameters.dataPlaneProxy
220254
= DataPlaneProxyProperties.fromJson(reader);
255+
} else if ("defaultKeyValueRevisionRetentionPeriodInSeconds".equals(fieldName)) {
256+
deserializedConfigurationStorePropertiesUpdateParameters.defaultKeyValueRevisionRetentionPeriodInSeconds
257+
= reader.getNullable(JsonReader::getLong);
221258
} else {
222259
reader.skipChildren();
223260
}

sdk/appconfiguration/azure-resourcemanager-appconfiguration/src/main/java/com/azure/resourcemanager/appconfiguration/implementation/AppConfigurationManagementClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public SnapshotsClient getSnapshots() {
244244
this.defaultPollInterval = defaultPollInterval;
245245
this.subscriptionId = subscriptionId;
246246
this.endpoint = endpoint;
247-
this.apiVersion = "2024-05-01";
247+
this.apiVersion = "2024-06-01";
248248
this.configurationStores = new ConfigurationStoresClientImpl(this);
249249
this.operations = new OperationsClientImpl(this);
250250
this.privateEndpointConnections = new PrivateEndpointConnectionsClientImpl(this);

0 commit comments

Comments
 (0)