Skip to content

Commit 9832929

Browse files
mgmt, upgrade resources to 2025-03 (Azure#45276)
1 parent 0ea8abe commit 9832929

File tree

46 files changed

+741
-57
lines changed

Some content is hidden

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

46 files changed

+741
-57
lines changed

sdk/resourcemanager/api-specs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
"dir": "azure-resourcemanager-resources",
227227
"source": "specification/resources/resource-manager/readme.md",
228228
"package": "com.azure.resourcemanager.resources",
229-
"args": "--tag=package-resources-2024-11 --add-inner=Deployment --enable-sync-stack=false",
229+
"args": "--tag=package-resources-2025-03 --add-inner=Deployment --enable-sync-stack=false",
230230
"note": "Remove `final` from `ResourceReference`, as it is used as superclass in deploymentstacks."
231231
},
232232
"resources-hybrid": {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Other Changes
1212

13+
- Updated `api-version` of resources to `2025-03-01`.
14+
1315
## 2.50.0 (2025-04-24)
1416

1517
### Other Changes

sdk/resourcemanager/azure-resourcemanager-resources/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/resourcemanager/azure-resourcemanager-resources",
5-
"Tag": "java/resourcemanager/azure-resourcemanager-resources_953c74acc9"
5+
"Tag": "java/resourcemanager/azure-resourcemanager-resources_97e79fed72"
66
}

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/DeploymentExportResultInner.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ public void validate() {
6161
@Override
6262
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
6363
jsonWriter.writeStartObject();
64-
jsonWriter.writeUntypedField("template", this.template);
64+
if (this.template != null) {
65+
jsonWriter.writeUntypedField("template", this.template);
66+
}
6567
return jsonWriter.writeEndObject();
6668
}
6769

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/GenericResourceExpandedInner.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
229229
jsonWriter.writeStringField("location", location());
230230
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
231231
jsonWriter.writeJsonField("plan", plan());
232-
jsonWriter.writeUntypedField("properties", properties());
232+
if (properties() != null) {
233+
jsonWriter.writeUntypedField("properties", properties());
234+
}
233235
jsonWriter.writeStringField("kind", kind());
234236
jsonWriter.writeStringField("managedBy", managedBy());
235237
jsonWriter.writeJsonField("sku", sku());

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluent/models/ResourceGroupExportResultInner.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ public void validate() {
112112
@Override
113113
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
114114
jsonWriter.writeStartObject();
115-
jsonWriter.writeUntypedField("template", this.template);
115+
if (this.template != null) {
116+
jsonWriter.writeUntypedField("template", this.template);
117+
}
116118
jsonWriter.writeStringField("output", this.output);
117119
jsonWriter.writeJsonField("error", this.error);
118120
return jsonWriter.writeEndObject();

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourceManagementClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ public DeploymentOperationsClient getDeploymentOperations() {
239239
this.defaultPollInterval = defaultPollInterval;
240240
this.subscriptionId = subscriptionId;
241241
this.endpoint = endpoint;
242-
this.apiVersion = "2024-11-01";
242+
this.apiVersion = "2025-03-01";
243243
this.operations = new OperationsClientImpl(this);
244244
this.deployments = new DeploymentsClientImpl(this);
245245
this.providers = new ProvidersClientImpl(this);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.resourcemanager.resources.models;
6+
7+
import com.azure.core.annotation.Fluent;
8+
import com.azure.json.JsonReader;
9+
import com.azure.json.JsonSerializable;
10+
import com.azure.json.JsonToken;
11+
import com.azure.json.JsonWriter;
12+
import java.io.IOException;
13+
14+
/**
15+
* The DeploymentExtensionConfigItem model.
16+
*/
17+
@Fluent
18+
public final class DeploymentExtensionConfigItem implements JsonSerializable<DeploymentExtensionConfigItem> {
19+
/*
20+
* The value type of the extension config property.
21+
*/
22+
private ExtensionConfigPropertyType type;
23+
24+
/*
25+
* The value of the extension config property.
26+
*/
27+
private Object value;
28+
29+
/*
30+
* The Azure Key Vault reference used to retrieve the secret value of the extension config property.
31+
*/
32+
private KeyVaultParameterReference keyVaultReference;
33+
34+
/**
35+
* Creates an instance of DeploymentExtensionConfigItem class.
36+
*/
37+
public DeploymentExtensionConfigItem() {
38+
}
39+
40+
/**
41+
* Get the type property: The value type of the extension config property.
42+
*
43+
* @return the type value.
44+
*/
45+
public ExtensionConfigPropertyType type() {
46+
return this.type;
47+
}
48+
49+
/**
50+
* Get the value property: The value of the extension config property.
51+
*
52+
* @return the value value.
53+
*/
54+
public Object value() {
55+
return this.value;
56+
}
57+
58+
/**
59+
* Set the value property: The value of the extension config property.
60+
*
61+
* @param value the value value to set.
62+
* @return the DeploymentExtensionConfigItem object itself.
63+
*/
64+
public DeploymentExtensionConfigItem withValue(Object value) {
65+
this.value = value;
66+
return this;
67+
}
68+
69+
/**
70+
* Get the keyVaultReference property: The Azure Key Vault reference used to retrieve the secret value of the
71+
* extension config property.
72+
*
73+
* @return the keyVaultReference value.
74+
*/
75+
public KeyVaultParameterReference keyVaultReference() {
76+
return this.keyVaultReference;
77+
}
78+
79+
/**
80+
* Set the keyVaultReference property: The Azure Key Vault reference used to retrieve the secret value of the
81+
* extension config property.
82+
*
83+
* @param keyVaultReference the keyVaultReference value to set.
84+
* @return the DeploymentExtensionConfigItem object itself.
85+
*/
86+
public DeploymentExtensionConfigItem withKeyVaultReference(KeyVaultParameterReference keyVaultReference) {
87+
this.keyVaultReference = keyVaultReference;
88+
return this;
89+
}
90+
91+
/**
92+
* Validates the instance.
93+
*
94+
* @throws IllegalArgumentException thrown if the instance is not valid.
95+
*/
96+
public void validate() {
97+
if (keyVaultReference() != null) {
98+
keyVaultReference().validate();
99+
}
100+
}
101+
102+
/**
103+
* {@inheritDoc}
104+
*/
105+
@Override
106+
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
107+
jsonWriter.writeStartObject();
108+
if (this.value != null) {
109+
jsonWriter.writeUntypedField("value", this.value);
110+
}
111+
jsonWriter.writeJsonField("keyVaultReference", this.keyVaultReference);
112+
return jsonWriter.writeEndObject();
113+
}
114+
115+
/**
116+
* Reads an instance of DeploymentExtensionConfigItem from the JsonReader.
117+
*
118+
* @param jsonReader The JsonReader being read.
119+
* @return An instance of DeploymentExtensionConfigItem if the JsonReader was pointing to an instance of it, or null
120+
* if it was pointing to JSON null.
121+
* @throws IOException If an error occurs while reading the DeploymentExtensionConfigItem.
122+
*/
123+
public static DeploymentExtensionConfigItem fromJson(JsonReader jsonReader) throws IOException {
124+
return jsonReader.readObject(reader -> {
125+
DeploymentExtensionConfigItem deserializedDeploymentExtensionConfigItem
126+
= new DeploymentExtensionConfigItem();
127+
while (reader.nextToken() != JsonToken.END_OBJECT) {
128+
String fieldName = reader.getFieldName();
129+
reader.nextToken();
130+
131+
if ("type".equals(fieldName)) {
132+
deserializedDeploymentExtensionConfigItem.type
133+
= ExtensionConfigPropertyType.fromString(reader.getString());
134+
} else if ("value".equals(fieldName)) {
135+
deserializedDeploymentExtensionConfigItem.value = reader.readUntyped();
136+
} else if ("keyVaultReference".equals(fieldName)) {
137+
deserializedDeploymentExtensionConfigItem.keyVaultReference
138+
= KeyVaultParameterReference.fromJson(reader);
139+
} else {
140+
reader.skipChildren();
141+
}
142+
}
143+
144+
return deserializedDeploymentExtensionConfigItem;
145+
});
146+
}
147+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.resourcemanager.resources.models;
6+
7+
import com.azure.core.annotation.Immutable;
8+
import com.azure.json.JsonReader;
9+
import com.azure.json.JsonSerializable;
10+
import com.azure.json.JsonToken;
11+
import com.azure.json.JsonWriter;
12+
import java.io.IOException;
13+
import java.util.Map;
14+
15+
/**
16+
* The DeploymentExtensionDefinition model.
17+
*/
18+
@Immutable
19+
public final class DeploymentExtensionDefinition implements JsonSerializable<DeploymentExtensionDefinition> {
20+
/*
21+
* The alias of the extension as defined in the deployment template.
22+
*/
23+
private String alias;
24+
25+
/*
26+
* The extension name.
27+
*/
28+
private String name;
29+
30+
/*
31+
* The extension version.
32+
*/
33+
private String version;
34+
35+
/*
36+
* The extension configuration ID. It uniquely identifies a deployment control plane within an extension.
37+
*/
38+
private String configId;
39+
40+
/*
41+
* The extension configuration.
42+
*/
43+
private Map<String, DeploymentExtensionConfigItem> config;
44+
45+
/**
46+
* Creates an instance of DeploymentExtensionDefinition class.
47+
*/
48+
public DeploymentExtensionDefinition() {
49+
}
50+
51+
/**
52+
* Get the alias property: The alias of the extension as defined in the deployment template.
53+
*
54+
* @return the alias value.
55+
*/
56+
public String alias() {
57+
return this.alias;
58+
}
59+
60+
/**
61+
* Get the name property: The extension name.
62+
*
63+
* @return the name value.
64+
*/
65+
public String name() {
66+
return this.name;
67+
}
68+
69+
/**
70+
* Get the version property: The extension version.
71+
*
72+
* @return the version value.
73+
*/
74+
public String version() {
75+
return this.version;
76+
}
77+
78+
/**
79+
* Get the configId property: The extension configuration ID. It uniquely identifies a deployment control plane
80+
* within an extension.
81+
*
82+
* @return the configId value.
83+
*/
84+
public String configId() {
85+
return this.configId;
86+
}
87+
88+
/**
89+
* Get the config property: The extension configuration.
90+
*
91+
* @return the config value.
92+
*/
93+
public Map<String, DeploymentExtensionConfigItem> config() {
94+
return this.config;
95+
}
96+
97+
/**
98+
* Validates the instance.
99+
*
100+
* @throws IllegalArgumentException thrown if the instance is not valid.
101+
*/
102+
public void validate() {
103+
if (config() != null) {
104+
config().values().forEach(e -> {
105+
if (e != null) {
106+
e.validate();
107+
}
108+
});
109+
}
110+
}
111+
112+
/**
113+
* {@inheritDoc}
114+
*/
115+
@Override
116+
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
117+
jsonWriter.writeStartObject();
118+
return jsonWriter.writeEndObject();
119+
}
120+
121+
/**
122+
* Reads an instance of DeploymentExtensionDefinition from the JsonReader.
123+
*
124+
* @param jsonReader The JsonReader being read.
125+
* @return An instance of DeploymentExtensionDefinition if the JsonReader was pointing to an instance of it, or null
126+
* if it was pointing to JSON null.
127+
* @throws IOException If an error occurs while reading the DeploymentExtensionDefinition.
128+
*/
129+
public static DeploymentExtensionDefinition fromJson(JsonReader jsonReader) throws IOException {
130+
return jsonReader.readObject(reader -> {
131+
DeploymentExtensionDefinition deserializedDeploymentExtensionDefinition
132+
= new DeploymentExtensionDefinition();
133+
while (reader.nextToken() != JsonToken.END_OBJECT) {
134+
String fieldName = reader.getFieldName();
135+
reader.nextToken();
136+
137+
if ("alias".equals(fieldName)) {
138+
deserializedDeploymentExtensionDefinition.alias = reader.getString();
139+
} else if ("name".equals(fieldName)) {
140+
deserializedDeploymentExtensionDefinition.name = reader.getString();
141+
} else if ("version".equals(fieldName)) {
142+
deserializedDeploymentExtensionDefinition.version = reader.getString();
143+
} else if ("configId".equals(fieldName)) {
144+
deserializedDeploymentExtensionDefinition.configId = reader.getString();
145+
} else if ("config".equals(fieldName)) {
146+
Map<String, DeploymentExtensionConfigItem> config
147+
= reader.readMap(reader1 -> DeploymentExtensionConfigItem.fromJson(reader1));
148+
deserializedDeploymentExtensionDefinition.config = config;
149+
} else {
150+
reader.skipChildren();
151+
}
152+
}
153+
154+
return deserializedDeploymentExtensionDefinition;
155+
});
156+
}
157+
}

sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/models/DeploymentParameter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ public void validate() {
8989
@Override
9090
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
9191
jsonWriter.writeStartObject();
92-
jsonWriter.writeUntypedField("value", this.value);
92+
if (this.value != null) {
93+
jsonWriter.writeUntypedField("value", this.value);
94+
}
9395
jsonWriter.writeJsonField("reference", this.reference);
9496
return jsonWriter.writeEndObject();
9597
}

0 commit comments

Comments
 (0)