Skip to content
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
8 changes: 3 additions & 5 deletions sdk/dashboard/azure-resourcemanager-dashboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Release History

## 1.2.0-beta.2 (Unreleased)
## 1.2.0-beta.2 (2025-07-21)

### Features Added

### Breaking Changes
- Azure Resource Manager Dashboard client library for Java. This package contains Microsoft Azure SDK for Dashboard Management SDK. The Microsoft.Dashboard Rest API spec. Package api-version 2024-11-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Bugs Fixed

### Other Changes
- Fixed bug on update of `ManagedGrafana`.

## 1.2.0-beta.1 (2025-07-14)

Expand Down
4 changes: 2 additions & 2 deletions sdk/dashboard/azure-resourcemanager-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-dashboard</artifactId>
<version>1.2.0-beta.1</version>
<version>1.2.0-beta.2</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down Expand Up @@ -73,8 +73,8 @@ See [API design][design] for general introduction on design and key concepts on
```java
grafana = dashboardManager.grafanas()
.define(grafanaName)
.withRegion(REGION)
.withExistingResourceGroup(resourceGroupName)
.withRegion(REGION)
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
.create();
```
Expand Down
4 changes: 2 additions & 2 deletions sdk/dashboard/azure-resourcemanager-dashboard/SAMPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ public final class GrafanaCreateSamples {
public static void grafanaCreate(com.azure.resourcemanager.dashboard.DashboardManager manager) {
manager.grafanas()
.define("myWorkspace")
.withRegion("West US")
.withExistingResourceGroup("myResourceGroup")
.withRegion("West US")
.withTags(mapOf("Environment", "Dev"))
.withSku(new ResourceSku().withName("Standard"))
.withProperties(new ManagedGrafanaProperties().withPublicNetworkAccess(PublicNetworkAccess.ENABLED)
.withZoneRedundancy(ZoneRedundancy.ENABLED)
.withApiKey(ApiKey.ENABLED)
Expand All @@ -145,6 +144,7 @@ public final class GrafanaCreateSamples {
.withUnifiedAlertingScreenshots(new UnifiedAlertingScreenshots().withCaptureEnabled(false)))
.withGrafanaPlugins(mapOf("sample-plugin-id", new GrafanaPlugin()))
.withGrafanaMajorVersion("9"))
.withSku(new ResourceSku().withName("Standard"))
.withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
.create();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ ManagedGrafanaInner create(String resourceGroupName, String workspaceName,
ManagedGrafanaInner create(String resourceGroupName, String workspaceName,
ManagedGrafanaInner requestBodyParameters, Context context);

/**
* Update a workspace for Grafana resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The workspace name of Azure Managed Grafana.
* @param requestBodyParameters The requestBodyParameters parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link SyncPoller} for polling of the grafana resource type.
*/
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ManagedGrafanaInner>, ManagedGrafanaInner> beginUpdate(String resourceGroupName,
String workspaceName, ManagedGrafanaUpdateParameters requestBodyParameters);

/**
* Update a workspace for Grafana resource.
*
Expand All @@ -124,11 +139,11 @@ ManagedGrafanaInner create(String resourceGroupName, String workspaceName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the grafana resource type along with {@link Response}.
* @return the {@link SyncPoller} for polling of the grafana resource type.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ManagedGrafanaInner> updateWithResponse(String resourceGroupName, String workspaceName,
ManagedGrafanaUpdateParameters requestBodyParameters, Context context);
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller<PollResult<ManagedGrafanaInner>, ManagedGrafanaInner> beginUpdate(String resourceGroupName,
String workspaceName, ManagedGrafanaUpdateParameters requestBodyParameters, Context context);

/**
* Update a workspace for Grafana resource.
Expand All @@ -145,6 +160,22 @@ Response<ManagedGrafanaInner> updateWithResponse(String resourceGroupName, Strin
ManagedGrafanaInner update(String resourceGroupName, String workspaceName,
ManagedGrafanaUpdateParameters requestBodyParameters);

/**
* Update a workspace for Grafana resource.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The workspace name of Azure Managed Grafana.
* @param requestBodyParameters The requestBodyParameters parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the grafana resource type.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
ManagedGrafanaInner update(String resourceGroupName, String workspaceName,
ManagedGrafanaUpdateParameters requestBodyParameters, Context context);

/**
* Delete a workspace for Grafana resource.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package com.azure.resourcemanager.dashboard.fluent.models;

import com.azure.core.annotation.Fluent;
import com.azure.core.management.Resource;
import com.azure.core.management.ProxyResource;
import com.azure.core.management.SystemData;
import com.azure.json.JsonReader;
import com.azure.json.JsonToken;
Expand All @@ -20,16 +20,26 @@
* The grafana resource type.
*/
@Fluent
public final class ManagedGrafanaInner extends Resource {
public final class ManagedGrafanaInner extends ProxyResource {
/*
* Properties specific to the grafana resource.
*/
private ManagedGrafanaProperties properties;

/*
* The Sku of the grafana resource.
*/
private ResourceSku sku;

/*
* Properties specific to the grafana resource.
* Resource tags.
*/
private ManagedGrafanaProperties properties;
private Map<String, String> tags;

/*
* The geo-location where the resource lives
*/
private String location;

/*
* The managed service identities assigned to this resource.
Expand Down Expand Up @@ -62,6 +72,26 @@ public final class ManagedGrafanaInner extends Resource {
public ManagedGrafanaInner() {
}

/**
* Get the properties property: Properties specific to the grafana resource.
*
* @return the properties value.
*/
public ManagedGrafanaProperties properties() {
return this.properties;
}

/**
* Set the properties property: Properties specific to the grafana resource.
*
* @param properties the properties value to set.
* @return the ManagedGrafanaInner object itself.
*/
public ManagedGrafanaInner withProperties(ManagedGrafanaProperties properties) {
this.properties = properties;
return this;
}

/**
* Get the sku property: The Sku of the grafana resource.
*
Expand All @@ -83,22 +113,42 @@ public ManagedGrafanaInner withSku(ResourceSku sku) {
}

/**
* Get the properties property: Properties specific to the grafana resource.
* Get the tags property: Resource tags.
*
* @return the properties value.
* @return the tags value.
*/
public ManagedGrafanaProperties properties() {
return this.properties;
public Map<String, String> tags() {
return this.tags;
}

/**
* Set the properties property: Properties specific to the grafana resource.
* Set the tags property: Resource tags.
*
* @param properties the properties value to set.
* @param tags the tags value to set.
* @return the ManagedGrafanaInner object itself.
*/
public ManagedGrafanaInner withProperties(ManagedGrafanaProperties properties) {
this.properties = properties;
public ManagedGrafanaInner withTags(Map<String, String> tags) {
this.tags = tags;
return this;
}

/**
* Get the location property: The geo-location where the resource lives.
*
* @return the location value.
*/
public String location() {
return this.location;
}

/**
* Set the location property: The geo-location where the resource lives.
*
* @param location the location value to set.
* @return the ManagedGrafanaInner object itself.
*/
public ManagedGrafanaInner withLocation(String location) {
this.location = location;
return this;
}

Expand Down Expand Up @@ -161,36 +211,18 @@ public String id() {
return this.id;
}

/**
* {@inheritDoc}
*/
@Override
public ManagedGrafanaInner withLocation(String location) {
super.withLocation(location);
return this;
}

/**
* {@inheritDoc}
*/
@Override
public ManagedGrafanaInner withTags(Map<String, String> tags) {
super.withTags(tags);
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (sku() != null) {
sku().validate();
}
if (properties() != null) {
properties().validate();
}
if (sku() != null) {
sku().validate();
}
if (identity() != null) {
identity().validate();
}
Expand All @@ -202,10 +234,10 @@ public void validate() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("location", location());
jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
jsonWriter.writeJsonField("sku", this.sku);
jsonWriter.writeJsonField("properties", this.properties);
jsonWriter.writeJsonField("sku", this.sku);
jsonWriter.writeMapField("tags", this.tags, (writer, element) -> writer.writeString(element));
jsonWriter.writeStringField("location", this.location);
jsonWriter.writeJsonField("identity", this.identity);
return jsonWriter.writeEndObject();
}
Expand All @@ -232,15 +264,15 @@ public static ManagedGrafanaInner fromJson(JsonReader jsonReader) throws IOExcep
deserializedManagedGrafanaInner.name = reader.getString();
} else if ("type".equals(fieldName)) {
deserializedManagedGrafanaInner.type = reader.getString();
} else if ("location".equals(fieldName)) {
deserializedManagedGrafanaInner.withLocation(reader.getString());
} else if ("tags".equals(fieldName)) {
Map<String, String> tags = reader.readMap(reader1 -> reader1.getString());
deserializedManagedGrafanaInner.withTags(tags);
} else if ("sku".equals(fieldName)) {
deserializedManagedGrafanaInner.sku = ResourceSku.fromJson(reader);
} else if ("properties".equals(fieldName)) {
deserializedManagedGrafanaInner.properties = ManagedGrafanaProperties.fromJson(reader);
} else if ("sku".equals(fieldName)) {
deserializedManagedGrafanaInner.sku = ResourceSku.fromJson(reader);
} else if ("tags".equals(fieldName)) {
Map<String, String> tags = reader.readMap(reader1 -> reader1.getString());
deserializedManagedGrafanaInner.tags = tags;
} else if ("location".equals(fieldName)) {
deserializedManagedGrafanaInner.location = reader.getString();
} else if ("identity".equals(fieldName)) {
deserializedManagedGrafanaInner.identity = ManagedServiceIdentity.fromJson(reader);
} else if ("systemData".equals(fieldName)) {
Expand Down
Loading