Skip to content

mgmt, upgrade resources to 2025-03 #45276

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sdk/resourcemanager/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
"dir": "azure-resourcemanager-resources",
"source": "specification/resources/resource-manager/readme.md",
"package": "com.azure.resourcemanager.resources",
"args": "--tag=package-resources-2024-11 --add-inner=Deployment --enable-sync-stack=false",
"args": "--tag=package-resources-2025-03 --add-inner=Deployment --enable-sync-stack=false",
"note": "Remove `final` from `ResourceReference`, as it is used as superclass in deploymentstacks."
},
"resources-hybrid": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

### Other Changes

- Updated `api-version` of resources to `2025-03-01`.

## 2.50.0 (2025-04-24)

### Other Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-resources",
"Tag": "java/resourcemanager/azure-resourcemanager-resources_953c74acc9"
"Tag": "java/resourcemanager/azure-resourcemanager-resources_97e79fed72"
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeUntypedField("template", this.template);
if (this.template != null) {
jsonWriter.writeUntypedField("template", this.template);
}
return jsonWriter.writeEndObject();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("plan", plan());
jsonWriter.writeUntypedField("properties", properties());
if (properties() != null) {
jsonWriter.writeUntypedField("properties", properties());
}
jsonWriter.writeStringField("kind", kind());
jsonWriter.writeStringField("managedBy", managedBy());
jsonWriter.writeJsonField("sku", sku());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeUntypedField("template", this.template);
if (this.template != null) {
jsonWriter.writeUntypedField("template", this.template);
}
jsonWriter.writeStringField("output", this.output);
jsonWriter.writeJsonField("error", this.error);
return jsonWriter.writeEndObject();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public DeploymentOperationsClient getDeploymentOperations() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
this.apiVersion = "2024-11-01";
this.apiVersion = "2025-03-01";
this.operations = new OperationsClientImpl(this);
this.deployments = new DeploymentsClientImpl(this);
this.providers = new ProvidersClientImpl(this);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.resources.models;

import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;

/**
* The DeploymentExtensionConfigItem model.
*/
@Fluent
public final class DeploymentExtensionConfigItem implements JsonSerializable<DeploymentExtensionConfigItem> {
/*
* The value type of the extension config property.
*/
private ExtensionConfigPropertyType type;

/*
* The value of the extension config property.
*/
private Object value;

/*
* The Azure Key Vault reference used to retrieve the secret value of the extension config property.
*/
private KeyVaultParameterReference keyVaultReference;

/**
* Creates an instance of DeploymentExtensionConfigItem class.
*/
public DeploymentExtensionConfigItem() {
}

/**
* Get the type property: The value type of the extension config property.
*
* @return the type value.
*/
public ExtensionConfigPropertyType type() {
return this.type;
}

/**
* Get the value property: The value of the extension config property.
*
* @return the value value.
*/
public Object value() {
return this.value;
}

/**
* Set the value property: The value of the extension config property.
*
* @param value the value value to set.
* @return the DeploymentExtensionConfigItem object itself.
*/
public DeploymentExtensionConfigItem withValue(Object value) {
this.value = value;
return this;
}

/**
* Get the keyVaultReference property: The Azure Key Vault reference used to retrieve the secret value of the
* extension config property.
*
* @return the keyVaultReference value.
*/
public KeyVaultParameterReference keyVaultReference() {
return this.keyVaultReference;
}

/**
* Set the keyVaultReference property: The Azure Key Vault reference used to retrieve the secret value of the
* extension config property.
*
* @param keyVaultReference the keyVaultReference value to set.
* @return the DeploymentExtensionConfigItem object itself.
*/
public DeploymentExtensionConfigItem withKeyVaultReference(KeyVaultParameterReference keyVaultReference) {
this.keyVaultReference = keyVaultReference;
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (keyVaultReference() != null) {
keyVaultReference().validate();
}
}

/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
if (this.value != null) {
jsonWriter.writeUntypedField("value", this.value);
}
jsonWriter.writeJsonField("keyVaultReference", this.keyVaultReference);
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of DeploymentExtensionConfigItem from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DeploymentExtensionConfigItem if the JsonReader was pointing to an instance of it, or null
* if it was pointing to JSON null.
* @throws IOException If an error occurs while reading the DeploymentExtensionConfigItem.
*/
public static DeploymentExtensionConfigItem fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DeploymentExtensionConfigItem deserializedDeploymentExtensionConfigItem
= new DeploymentExtensionConfigItem();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("type".equals(fieldName)) {
deserializedDeploymentExtensionConfigItem.type
= ExtensionConfigPropertyType.fromString(reader.getString());
} else if ("value".equals(fieldName)) {
deserializedDeploymentExtensionConfigItem.value = reader.readUntyped();
} else if ("keyVaultReference".equals(fieldName)) {
deserializedDeploymentExtensionConfigItem.keyVaultReference
= KeyVaultParameterReference.fromJson(reader);
} else {
reader.skipChildren();
}
}

return deserializedDeploymentExtensionConfigItem;
});
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.resources.models;

import com.azure.core.annotation.Immutable;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;
import java.util.Map;

/**
* The DeploymentExtensionDefinition model.
*/
@Immutable
public final class DeploymentExtensionDefinition implements JsonSerializable<DeploymentExtensionDefinition> {
/*
* The alias of the extension as defined in the deployment template.
*/
private String alias;

/*
* The extension name.
*/
private String name;

/*
* The extension version.
*/
private String version;

/*
* The extension configuration ID. It uniquely identifies a deployment control plane within an extension.
*/
private String configId;

/*
* The extension configuration.
*/
private Map<String, DeploymentExtensionConfigItem> config;

/**
* Creates an instance of DeploymentExtensionDefinition class.
*/
public DeploymentExtensionDefinition() {
}

/**
* Get the alias property: The alias of the extension as defined in the deployment template.
*
* @return the alias value.
*/
public String alias() {
return this.alias;
}

/**
* Get the name property: The extension name.
*
* @return the name value.
*/
public String name() {
return this.name;
}

/**
* Get the version property: The extension version.
*
* @return the version value.
*/
public String version() {
return this.version;
}

/**
* Get the configId property: The extension configuration ID. It uniquely identifies a deployment control plane
* within an extension.
*
* @return the configId value.
*/
public String configId() {
return this.configId;
}

/**
* Get the config property: The extension configuration.
*
* @return the config value.
*/
public Map<String, DeploymentExtensionConfigItem> config() {
return this.config;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (config() != null) {
config().values().forEach(e -> {
if (e != null) {
e.validate();
}
});
}
}

/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of DeploymentExtensionDefinition from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of DeploymentExtensionDefinition if the JsonReader was pointing to an instance of it, or null
* if it was pointing to JSON null.
* @throws IOException If an error occurs while reading the DeploymentExtensionDefinition.
*/
public static DeploymentExtensionDefinition fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
DeploymentExtensionDefinition deserializedDeploymentExtensionDefinition
= new DeploymentExtensionDefinition();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("alias".equals(fieldName)) {
deserializedDeploymentExtensionDefinition.alias = reader.getString();
} else if ("name".equals(fieldName)) {
deserializedDeploymentExtensionDefinition.name = reader.getString();
} else if ("version".equals(fieldName)) {
deserializedDeploymentExtensionDefinition.version = reader.getString();
} else if ("configId".equals(fieldName)) {
deserializedDeploymentExtensionDefinition.configId = reader.getString();
} else if ("config".equals(fieldName)) {
Map<String, DeploymentExtensionConfigItem> config
= reader.readMap(reader1 -> DeploymentExtensionConfigItem.fromJson(reader1));
deserializedDeploymentExtensionDefinition.config = config;
} else {
reader.skipChildren();
}
}

return deserializedDeploymentExtensionDefinition;
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeUntypedField("value", this.value);
if (this.value != null) {
jsonWriter.writeUntypedField("value", this.value);
}
jsonWriter.writeJsonField("reference", this.reference);
return jsonWriter.writeEndObject();
}
Expand Down
Loading
Loading