Skip to content

Commit 4f18c9b

Browse files
author
SDKAuto
committed
CodeGen from PR 32208 in Azure/azure-rest-api-specs
Merge c202ee1b823271e371edc39452d68b50b821517a into 69339d9098a3110738a872aa0326246670f0b3f1
1 parent 8ae755a commit 4f18c9b

File tree

96 files changed

+330
-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

+330
-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-02-28)
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+
* `withRevisionRetentionPeriodInSeconds(java.lang.Long)` was added
12+
* `revisionRetentionPeriodInSeconds()` was added
13+
14+
#### `models.ConfigurationStore$Definition` was modified
815

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

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

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

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

Lines changed: 4 additions & 6 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

@@ -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-appconfiguration</artifactId>
35-
<version>1.0.0</version>
35+
<version>1.1.0-beta.1</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})
@@ -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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,35 @@ public ConfigurationStoreInner withSoftDeleteRetentionInDays(Integer softDeleteR
310310
return this;
311311
}
312312

313+
/**
314+
* Get the revisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value revisions.
315+
* This is also the default duration a snapshot remains archived before expiring if 'retentionPeriod' is not set
316+
* during snapshot creation. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU
317+
* stores and Premium SKU stores.
318+
*
319+
* @return the revisionRetentionPeriodInSeconds value.
320+
*/
321+
public Long revisionRetentionPeriodInSeconds() {
322+
return this.innerProperties() == null ? null : this.innerProperties().revisionRetentionPeriodInSeconds();
323+
}
324+
325+
/**
326+
* Set the revisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value revisions.
327+
* This is also the default duration a snapshot remains archived before expiring if 'retentionPeriod' is not set
328+
* during snapshot creation. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU
329+
* stores and Premium SKU stores.
330+
*
331+
* @param revisionRetentionPeriodInSeconds the revisionRetentionPeriodInSeconds value to set.
332+
* @return the ConfigurationStoreInner object itself.
333+
*/
334+
public ConfigurationStoreInner withRevisionRetentionPeriodInSeconds(Long revisionRetentionPeriodInSeconds) {
335+
if (this.innerProperties() == null) {
336+
this.innerProperties = new ConfigurationStoreProperties();
337+
}
338+
this.innerProperties().withRevisionRetentionPeriodInSeconds(revisionRetentionPeriodInSeconds);
339+
return this;
340+
}
341+
313342
/**
314343
* Get the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this
315344
* 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,13 @@ 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. This is also the default duration a snapshot remains
70+
* archived before expiring if 'retentionPeriod' is not set during snapshot creation. Defaults to 604800 (7 days)
71+
* for Free SKU stores and 2592000 (30 days) for Standard SKU stores and Premium SKU stores.
72+
*/
73+
private Long revisionRetentionPeriodInSeconds;
74+
6875
/*
6976
* Property specifying whether protection against purge is enabled for this configuration store.
7077
*/
@@ -207,6 +214,32 @@ public ConfigurationStoreProperties withSoftDeleteRetentionInDays(Integer softDe
207214
return this;
208215
}
209216

217+
/**
218+
* Get the revisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value revisions.
219+
* This is also the default duration a snapshot remains archived before expiring if 'retentionPeriod' is not set
220+
* during snapshot creation. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU
221+
* stores and Premium SKU stores.
222+
*
223+
* @return the revisionRetentionPeriodInSeconds value.
224+
*/
225+
public Long revisionRetentionPeriodInSeconds() {
226+
return this.revisionRetentionPeriodInSeconds;
227+
}
228+
229+
/**
230+
* Set the revisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value revisions.
231+
* This is also the default duration a snapshot remains archived before expiring if 'retentionPeriod' is not set
232+
* during snapshot creation. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU
233+
* stores and Premium SKU stores.
234+
*
235+
* @param revisionRetentionPeriodInSeconds the revisionRetentionPeriodInSeconds value to set.
236+
* @return the ConfigurationStoreProperties object itself.
237+
*/
238+
public ConfigurationStoreProperties withRevisionRetentionPeriodInSeconds(Long revisionRetentionPeriodInSeconds) {
239+
this.revisionRetentionPeriodInSeconds = revisionRetentionPeriodInSeconds;
240+
return this;
241+
}
242+
210243
/**
211244
* Get the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this
212245
* configuration store.
@@ -299,6 +332,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
299332
this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
300333
jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth);
301334
jsonWriter.writeNumberField("softDeleteRetentionInDays", this.softDeleteRetentionInDays);
335+
jsonWriter.writeNumberField("revisionRetentionPeriodInSeconds", this.revisionRetentionPeriodInSeconds);
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 ("revisionRetentionPeriodInSeconds".equals(fieldName)) {
381+
deserializedConfigurationStoreProperties.revisionRetentionPeriodInSeconds
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: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@ public final class ConfigurationStorePropertiesUpdateParameters
4545
*/
4646
private DataPlaneProxyProperties dataPlaneProxy;
4747

48+
/*
49+
* The duration in seconds to retain new key value revisions. This is also the default duration a snapshot remains
50+
* archived before expiring if 'retentionPeriod' is not set during snapshot creation. Defaults to 604800 (7 days)
51+
* for Free SKU stores and 2592000 (30 days) for Standard SKU stores and Premium SKU stores.
52+
*/
53+
private Long revisionRetentionPeriodInSeconds;
54+
4855
/**
4956
* Creates an instance of ConfigurationStorePropertiesUpdateParameters class.
5057
*/
@@ -158,6 +165,33 @@ public ConfigurationStorePropertiesUpdateParameters withDataPlaneProxy(DataPlane
158165
return this;
159166
}
160167

168+
/**
169+
* Get the revisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value revisions.
170+
* This is also the default duration a snapshot remains archived before expiring if 'retentionPeriod' is not set
171+
* during snapshot creation. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU
172+
* stores and Premium SKU stores.
173+
*
174+
* @return the revisionRetentionPeriodInSeconds value.
175+
*/
176+
public Long revisionRetentionPeriodInSeconds() {
177+
return this.revisionRetentionPeriodInSeconds;
178+
}
179+
180+
/**
181+
* Set the revisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value revisions.
182+
* This is also the default duration a snapshot remains archived before expiring if 'retentionPeriod' is not set
183+
* during snapshot creation. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU
184+
* stores and Premium SKU stores.
185+
*
186+
* @param revisionRetentionPeriodInSeconds the revisionRetentionPeriodInSeconds value to set.
187+
* @return the ConfigurationStorePropertiesUpdateParameters object itself.
188+
*/
189+
public ConfigurationStorePropertiesUpdateParameters
190+
withRevisionRetentionPeriodInSeconds(Long revisionRetentionPeriodInSeconds) {
191+
this.revisionRetentionPeriodInSeconds = revisionRetentionPeriodInSeconds;
192+
return this;
193+
}
194+
161195
/**
162196
* Validates the instance.
163197
*
@@ -184,6 +218,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
184218
this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
185219
jsonWriter.writeBooleanField("enablePurgeProtection", this.enablePurgeProtection);
186220
jsonWriter.writeJsonField("dataPlaneProxy", this.dataPlaneProxy);
221+
jsonWriter.writeNumberField("revisionRetentionPeriodInSeconds", this.revisionRetentionPeriodInSeconds);
187222
return jsonWriter.writeEndObject();
188223
}
189224

@@ -218,6 +253,9 @@ public static ConfigurationStorePropertiesUpdateParameters fromJson(JsonReader j
218253
} else if ("dataPlaneProxy".equals(fieldName)) {
219254
deserializedConfigurationStorePropertiesUpdateParameters.dataPlaneProxy
220255
= DataPlaneProxyProperties.fromJson(reader);
256+
} else if ("revisionRetentionPeriodInSeconds".equals(fieldName)) {
257+
deserializedConfigurationStorePropertiesUpdateParameters.revisionRetentionPeriodInSeconds
258+
= reader.getNullable(JsonReader::getLong);
221259
} else {
222260
reader.skipChildren();
223261
}

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)