Skip to content

Commit 9cf8723

Browse files
author
SDKAuto
committed
CodeGen from PR 32996 in Azure/azure-rest-api-specs
Merge 009ea356ee33ad9d514f73968f1245ef0c575adb into cb5ef7fc4cb443bd5f6b21d02cbce41051beb6ae
1 parent 41e7411 commit 9cf8723

File tree

97 files changed

+649
-2209
lines changed

Some content is hidden

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

97 files changed

+649
-2209
lines changed

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

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

3-
## 1.1.0-beta.1 (Unreleased)
3+
## 1.0.0-beta.1 (2025-04-15)
4+
5+
- Azure Resource Manager AppConfiguration client library for Java. This package contains Microsoft Azure SDK for AppConfiguration Management SDK. Package tag package-preview-2024-06-15-preview. 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.TelemetryProperties` was added
10+
11+
#### `models.ConfigurationStoreUpdateParameters` was modified
12+
13+
* `withTelemetry(models.TelemetryProperties)` was added
14+
* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added
15+
* `telemetry()` was added
16+
* `defaultKeyValueRevisionRetentionPeriodInSeconds()` was added
17+
18+
#### `models.ConfigurationStore$Definition` was modified
19+
20+
* `withTelemetry(models.TelemetryProperties)` was added
21+
* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added
22+
23+
#### `models.ConfigurationStore$Update` was modified
24+
25+
* `withTelemetry(models.TelemetryProperties)` was added
26+
* `withDefaultKeyValueRevisionRetentionPeriodInSeconds(java.lang.Long)` was added
827

9-
### Bugs Fixed
28+
#### `models.ConfigurationStore` was modified
1029

11-
### Other Changes
30+
* `defaultKeyValueRevisionRetentionPeriodInSeconds()` was added
31+
* `telemetry()` was added
1232

1333
## 1.0.0 (2024-11-20)
1434

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-preview-2024-06-15-preview. 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: 62 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-preview-2024-06-15-preview.</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: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import com.azure.resourcemanager.appconfiguration.models.PublicNetworkAccess;
2020
import com.azure.resourcemanager.appconfiguration.models.ResourceIdentity;
2121
import com.azure.resourcemanager.appconfiguration.models.Sku;
22+
import com.azure.resourcemanager.appconfiguration.models.TelemetryProperties;
2223
import java.io.IOException;
2324
import java.time.OffsetDateTime;
2425
import java.util.List;
@@ -310,6 +311,38 @@ public ConfigurationStoreInner withSoftDeleteRetentionInDays(Integer softDeleteR
310311
return this;
311312
}
312313

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

419+
/**
420+
* Get the telemetry property: Property specifying the configuration of telemetry for this configuration store.
421+
*
422+
* @return the telemetry value.
423+
*/
424+
public TelemetryProperties telemetry() {
425+
return this.innerProperties() == null ? null : this.innerProperties().telemetry();
426+
}
427+
428+
/**
429+
* Set the telemetry property: Property specifying the configuration of telemetry for this configuration store.
430+
*
431+
* @param telemetry the telemetry value to set.
432+
* @return the ConfigurationStoreInner object itself.
433+
*/
434+
public ConfigurationStoreInner withTelemetry(TelemetryProperties telemetry) {
435+
if (this.innerProperties() == null) {
436+
this.innerProperties = new ConfigurationStoreProperties();
437+
}
438+
this.innerProperties().withTelemetry(telemetry);
439+
return this;
440+
}
441+
386442
/**
387443
* Validates the instance.
388444
*

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

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.azure.resourcemanager.appconfiguration.models.PrivateEndpointConnectionReference;
1717
import com.azure.resourcemanager.appconfiguration.models.ProvisioningState;
1818
import com.azure.resourcemanager.appconfiguration.models.PublicNetworkAccess;
19+
import com.azure.resourcemanager.appconfiguration.models.TelemetryProperties;
1920
import java.io.IOException;
2021
import java.time.OffsetDateTime;
2122
import java.util.List;
@@ -65,6 +66,12 @@ public final class ConfigurationStoreProperties implements JsonSerializable<Conf
6566
*/
6667
private Integer softDeleteRetentionInDays;
6768

69+
/*
70+
* The duration in seconds to retain new key value revisions. Defaults to 604800 (7 days) for Free SKU stores and
71+
* 2592000 (30 days) for Standard SKU stores and Premium SKU stores.
72+
*/
73+
private Long defaultKeyValueRevisionRetentionPeriodInSeconds;
74+
6875
/*
6976
* Property specifying whether protection against purge is enabled for this configuration store.
7077
*/
@@ -80,6 +87,11 @@ public final class ConfigurationStoreProperties implements JsonSerializable<Conf
8087
*/
8188
private CreateMode createMode;
8289

90+
/*
91+
* Property specifying the configuration of telemetry for this configuration store
92+
*/
93+
private TelemetryProperties telemetry;
94+
8395
/**
8496
* Creates an instance of ConfigurationStoreProperties class.
8597
*/
@@ -207,6 +219,32 @@ public ConfigurationStoreProperties withSoftDeleteRetentionInDays(Integer softDe
207219
return this;
208220
}
209221

222+
/**
223+
* Get the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value
224+
* revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and
225+
* Premium SKU stores.
226+
*
227+
* @return the defaultKeyValueRevisionRetentionPeriodInSeconds value.
228+
*/
229+
public Long defaultKeyValueRevisionRetentionPeriodInSeconds() {
230+
return this.defaultKeyValueRevisionRetentionPeriodInSeconds;
231+
}
232+
233+
/**
234+
* Set the defaultKeyValueRevisionRetentionPeriodInSeconds property: The duration in seconds to retain new key value
235+
* revisions. Defaults to 604800 (7 days) for Free SKU stores and 2592000 (30 days) for Standard SKU stores and
236+
* Premium SKU stores.
237+
*
238+
* @param defaultKeyValueRevisionRetentionPeriodInSeconds the defaultKeyValueRevisionRetentionPeriodInSeconds value
239+
* to set.
240+
* @return the ConfigurationStoreProperties object itself.
241+
*/
242+
public ConfigurationStoreProperties
243+
withDefaultKeyValueRevisionRetentionPeriodInSeconds(Long defaultKeyValueRevisionRetentionPeriodInSeconds) {
244+
this.defaultKeyValueRevisionRetentionPeriodInSeconds = defaultKeyValueRevisionRetentionPeriodInSeconds;
245+
return this;
246+
}
247+
210248
/**
211249
* Get the enablePurgeProtection property: Property specifying whether protection against purge is enabled for this
212250
* configuration store.
@@ -271,6 +309,26 @@ public ConfigurationStoreProperties withCreateMode(CreateMode createMode) {
271309
return this;
272310
}
273311

312+
/**
313+
* Get the telemetry property: Property specifying the configuration of telemetry for this configuration store.
314+
*
315+
* @return the telemetry value.
316+
*/
317+
public TelemetryProperties telemetry() {
318+
return this.telemetry;
319+
}
320+
321+
/**
322+
* Set the telemetry property: Property specifying the configuration of telemetry for this configuration store.
323+
*
324+
* @param telemetry the telemetry value to set.
325+
* @return the ConfigurationStoreProperties object itself.
326+
*/
327+
public ConfigurationStoreProperties withTelemetry(TelemetryProperties telemetry) {
328+
this.telemetry = telemetry;
329+
return this;
330+
}
331+
274332
/**
275333
* Validates the instance.
276334
*
@@ -286,6 +344,9 @@ public void validate() {
286344
if (dataPlaneProxy() != null) {
287345
dataPlaneProxy().validate();
288346
}
347+
if (telemetry() != null) {
348+
telemetry().validate();
349+
}
289350
}
290351

291352
/**
@@ -299,9 +360,12 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
299360
this.publicNetworkAccess == null ? null : this.publicNetworkAccess.toString());
300361
jsonWriter.writeBooleanField("disableLocalAuth", this.disableLocalAuth);
301362
jsonWriter.writeNumberField("softDeleteRetentionInDays", this.softDeleteRetentionInDays);
363+
jsonWriter.writeNumberField("defaultKeyValueRevisionRetentionPeriodInSeconds",
364+
this.defaultKeyValueRevisionRetentionPeriodInSeconds);
302365
jsonWriter.writeBooleanField("enablePurgeProtection", this.enablePurgeProtection);
303366
jsonWriter.writeJsonField("dataPlaneProxy", this.dataPlaneProxy);
304367
jsonWriter.writeStringField("createMode", this.createMode == null ? null : this.createMode.toString());
368+
jsonWriter.writeJsonField("telemetry", this.telemetry);
305369
return jsonWriter.writeEndObject();
306370
}
307371

@@ -343,13 +407,18 @@ public static ConfigurationStoreProperties fromJson(JsonReader jsonReader) throw
343407
} else if ("softDeleteRetentionInDays".equals(fieldName)) {
344408
deserializedConfigurationStoreProperties.softDeleteRetentionInDays
345409
= reader.getNullable(JsonReader::getInt);
410+
} else if ("defaultKeyValueRevisionRetentionPeriodInSeconds".equals(fieldName)) {
411+
deserializedConfigurationStoreProperties.defaultKeyValueRevisionRetentionPeriodInSeconds
412+
= reader.getNullable(JsonReader::getLong);
346413
} else if ("enablePurgeProtection".equals(fieldName)) {
347414
deserializedConfigurationStoreProperties.enablePurgeProtection
348415
= reader.getNullable(JsonReader::getBoolean);
349416
} else if ("dataPlaneProxy".equals(fieldName)) {
350417
deserializedConfigurationStoreProperties.dataPlaneProxy = DataPlaneProxyProperties.fromJson(reader);
351418
} else if ("createMode".equals(fieldName)) {
352419
deserializedConfigurationStoreProperties.createMode = CreateMode.fromString(reader.getString());
420+
} else if ("telemetry".equals(fieldName)) {
421+
deserializedConfigurationStoreProperties.telemetry = TelemetryProperties.fromJson(reader);
353422
} else {
354423
reader.skipChildren();
355424
}

0 commit comments

Comments
 (0)