Share via


Grafana - Create

Create or update a workspace for Grafana resource. This API is idempotent, so user can either create a new grafana or update an existing grafana.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Dashboard/grafana/{workspaceName}?api-version=2024-10-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

minLength: 1
maxLength: 90

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

workspaceName
path True

string

pattern: ^[a-zA-Z][a-z0-9A-Z-]{0,28}[a-z0-9A-Z]$

The workspace name of Azure Managed Grafana.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Request Body

Name Type Description
identity

ManagedServiceIdentity

The managed identity of the grafana resource.

location

string

The geo-location where the grafana resource lives

properties

ManagedGrafanaProperties

Properties specific to the grafana resource.

sku

ResourceSku

The Sku of the grafana resource.

tags

object

The tags for grafana resource.

Responses

Name Type Description
200 OK

ManagedGrafana

OK. Successfully create a workspace for Grafana resource.

201 Created

ManagedGrafana

Creation started. The operation was successfully started and will complete asynchronously.

Headers

Azure-AsyncOperation: string

Other Status Codes

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations.

Examples

Grafana_Create

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Dashboard/grafana/myWorkspace?api-version=2024-10-01

{
  "sku": {
    "name": "Standard"
  },
  "properties": {
    "publicNetworkAccess": "Enabled",
    "zoneRedundancy": "Enabled",
    "apiKey": "Enabled",
    "deterministicOutboundIP": "Enabled",
    "grafanaConfigurations": {
      "smtp": {
        "enabled": true,
        "host": "smtp.sendemail.com:587",
        "user": "username",
        "password": "<password>",
        "fromAddress": "test@sendemail.com",
        "fromName": "emailsender",
        "startTLSPolicy": "OpportunisticStartTLS",
        "skipVerify": true
      },
      "snapshots": {
        "externalEnabled": true
      },
      "users": {
        "viewersCanEdit": true
      },
      "security": {
        "csrfAlwaysCheck": false
      }
    },
    "grafanaIntegrations": {
      "azureMonitorWorkspaceIntegrations": [
        {
          "azureMonitorWorkspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
        }
      ]
    },
    "enterpriseConfigurations": {
      "marketplacePlanId": "myPlanId",
      "marketplaceAutoRenew": "Enabled"
    },
    "grafanaPlugins": {
      "sample-plugin-id": {}
    },
    "grafanaMajorVersion": "9"
  },
  "identity": {
    "type": "SystemAssigned"
  },
  "tags": {
    "Environment": "Dev"
  },
  "location": "West US"
}

Sample response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace",
  "name": "myWorkspace",
  "type": "Microsoft.Dashboard/grafana",
  "sku": {
    "name": "Standard"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "grafanaVersion": "9.4.5",
    "endpoint": "https://myworkspace-abcdefghijklmnop.wus.grafana.azure.com",
    "zoneRedundancy": "Enabled",
    "apiKey": "Enabled",
    "deterministicOutboundIP": "Enabled",
    "outboundIPs": [
      "192.168.0.1",
      "192.168.0.2"
    ],
    "publicNetworkAccess": "Enabled",
    "autoGeneratedDomainNameLabelScope": "TenantReuse",
    "grafanaConfigurations": {
      "smtp": {
        "enabled": true,
        "host": "smtp.sendemail.com:587",
        "user": "username",
        "fromAddress": "test@sendemail.com",
        "fromName": "emailsender",
        "startTLSPolicy": "OpportunisticStartTLS",
        "skipVerify": true
      },
      "snapshots": {
        "externalEnabled": true
      },
      "users": {
        "viewersCanEdit": true
      },
      "security": {
        "csrfAlwaysCheck": false
      }
    },
    "grafanaIntegrations": {
      "azureMonitorWorkspaceIntegrations": [
        {
          "azureMonitorWorkspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
        }
      ]
    },
    "enterpriseConfigurations": {
      "marketplacePlanId": "myPlanId",
      "marketplaceAutoRenew": "Enabled"
    },
    "grafanaPlugins": {
      "sample-plugin-id": {
        "pluginId": "sample-plugin-id"
      }
    },
    "grafanaMajorVersion": "9"
  },
  "identity": {
    "type": "SystemAssigned"
  },
  "tags": {
    "Environment": "Dev"
  },
  "location": "West US",
  "systemData": {
    "createdBy": "string",
    "createdByType": "User",
    "createdAt": "2020-02-03T01:01:01.1075056Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Dashboard/locations/eastus2/operationStatuses/sample-op-status?api-version=2024-10-01
{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/grafana/myWorkspace",
  "name": "myWorkspace",
  "type": "Microsoft.Dashboard/grafana",
  "sku": {
    "name": "Standard"
  },
  "properties": {
    "provisioningState": "Accepted",
    "grafanaVersion": "9.4.5",
    "endpoint": "https://myworkspace-abcdefghijklmnop.wus.grafana.azure.com",
    "zoneRedundancy": "Enabled",
    "apiKey": "Enabled",
    "deterministicOutboundIP": "Enabled",
    "publicNetworkAccess": "Enabled",
    "autoGeneratedDomainNameLabelScope": "TenantReuse",
    "grafanaConfigurations": {
      "smtp": {
        "enabled": true,
        "host": "smtp.sendemail.com:587",
        "user": "username",
        "fromAddress": "test@sendemail.com",
        "fromName": "emailsender",
        "startTLSPolicy": "OpportunisticStartTLS",
        "skipVerify": true
      },
      "snapshots": {
        "externalEnabled": true
      },
      "users": {
        "viewersCanEdit": true
      },
      "security": {
        "csrfAlwaysCheck": false
      }
    },
    "grafanaIntegrations": {
      "azureMonitorWorkspaceIntegrations": [
        {
          "azureMonitorWorkspaceResourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/myResourceGroup/providers/microsoft.monitor/accounts/myAzureMonitorWorkspace"
        }
      ]
    },
    "grafanaMajorVersion": "9"
  },
  "tags": {
    "Environment": "Dev"
  },
  "location": "West US",
  "systemData": {
    "createdBy": "string",
    "createdByType": "User",
    "createdAt": "2020-02-03T01:01:01.1075056Z",
    "lastModifiedBy": "string",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-02-04T02:03:01.1974346Z"
  }
}

Definitions

Name Description
ApiKey
AutoGeneratedDomainNameLabelScope

Scope for dns deterministic name hash calculation

AzureMonitorWorkspaceIntegration

Integrations for Azure Monitor Workspace.

createdByType

The type of identity that created the resource.

DeterministicOutboundIP
EnterpriseConfigurations

Enterprise settings of a Grafana instance

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

GrafanaConfigurations

Server configurations of a Grafana instance

GrafanaIntegrations

GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios.

GrafanaPlugin

Plugin of Grafana

ManagedGrafana

The grafana resource type.

ManagedGrafanaProperties

Properties specific to the grafana resource.

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

MarketplaceAutoRenew

The AutoRenew setting of the Enterprise subscription

PrivateEndpoint

The Private Endpoint resource.

PrivateEndpointConnection

The Private Endpoint Connection resource.

PrivateEndpointConnectionProvisioningState

The current provisioning state.

PrivateEndpointServiceConnectionStatus

The private endpoint connection status.

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

ProvisioningState
PublicNetworkAccess

Indicate the state for enable or disable traffic over the public interface.

ResourceSku
Security

Grafana security settings

Smtp

Email server settings. https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp

Snapshots

Grafana Snapshots settings

StartTLSPolicy

The StartTLSPolicy setting of the SMTP configuration https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy

systemData

Metadata pertaining to creation and last modification of the resource.

UserAssignedIdentity

User assigned identity properties

Users

Grafana users settings

ZoneRedundancy

ApiKey

Value Description
Disabled
Enabled

AutoGeneratedDomainNameLabelScope

Scope for dns deterministic name hash calculation

Value Description
TenantReuse

AzureMonitorWorkspaceIntegration

Integrations for Azure Monitor Workspace.

Name Type Description
azureMonitorWorkspaceResourceId

string

The resource Id of the connected Azure Monitor Workspace.

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

DeterministicOutboundIP

Value Description
Disabled
Enabled

EnterpriseConfigurations

Enterprise settings of a Grafana instance

Name Type Description
marketplaceAutoRenew

MarketplaceAutoRenew

The AutoRenew setting of the Enterprise subscription

marketplacePlanId

string

The Plan Id of the Azure Marketplace subscription for the Enterprise plugins

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

GrafanaConfigurations

Server configurations of a Grafana instance

Name Type Description
security

Security

Grafana security settings

smtp

Smtp

Email server settings. https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp

snapshots

Snapshots

Grafana Snapshots settings

users

Users

Grafana users settings

GrafanaIntegrations

GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios.

Name Type Description
azureMonitorWorkspaceIntegrations

AzureMonitorWorkspaceIntegration[]

Integrations for Azure Monitor Workspace.

GrafanaPlugin

Plugin of Grafana

Name Type Description
pluginId

string

Grafana plugin id

ManagedGrafana

The grafana resource type.

Name Type Description
id

string

ARM id of the grafana resource

identity

ManagedServiceIdentity

The managed identity of the grafana resource.

location

string

The geo-location where the grafana resource lives

name

string

Name of the grafana resource.

properties

ManagedGrafanaProperties

Properties specific to the grafana resource.

sku

ResourceSku

The Sku of the grafana resource.

systemData

systemData

The system meta data relating to this grafana resource.

tags

object

The tags for grafana resource.

type

string

The type of the grafana resource.

ManagedGrafanaProperties

Properties specific to the grafana resource.

Name Type Default value Description
apiKey

ApiKey

Disabled

The api key setting of the Grafana instance.

autoGeneratedDomainNameLabelScope

AutoGeneratedDomainNameLabelScope

Scope for dns deterministic name hash calculation.

deterministicOutboundIP

DeterministicOutboundIP

Disabled

Whether a Grafana instance uses deterministic outbound IPs.

endpoint

string

The endpoint of the Grafana instance.

enterpriseConfigurations

EnterpriseConfigurations

Enterprise settings of a Grafana instance

grafanaConfigurations

GrafanaConfigurations

Server configurations of a Grafana instance

grafanaIntegrations

GrafanaIntegrations

GrafanaIntegrations is a bundled observability experience (e.g. pre-configured data source, tailored Grafana dashboards, alerting defaults) for common monitoring scenarios.

grafanaMajorVersion

string

The major Grafana software version to target.

grafanaPlugins

<string,  GrafanaPlugin>

Installed plugin list of the Grafana instance. Key is plugin id, value is plugin definition.

grafanaVersion

string

The Grafana software version.

outboundIPs

string[]

List of outbound IPs if deterministicOutboundIP is enabled.

privateEndpointConnections

PrivateEndpointConnection[]

The private endpoint connections of the Grafana instance.

provisioningState

ProvisioningState

Provisioning state of the resource.

publicNetworkAccess

PublicNetworkAccess

Enabled

Indicate the state for enable or disable traffic over the public interface.

zoneRedundancy

ZoneRedundancy

Disabled

The zone redundancy setting of the Grafana instance.

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

Name Type Description
principalId

string (uuid)

The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string (uuid)

The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.

type

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned Identities
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

Value Description
None
SystemAssigned
UserAssigned
SystemAssigned,UserAssigned

MarketplaceAutoRenew

The AutoRenew setting of the Enterprise subscription

Value Description
Disabled
Enabled

PrivateEndpoint

The Private Endpoint resource.

Name Type Description
id

string

The ARM identifier for Private Endpoint

PrivateEndpointConnection

The Private Endpoint Connection resource.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

The name of the resource

properties.groupIds

string[]

The private endpoint connection group ids.

properties.privateEndpoint

PrivateEndpoint

The resource of private end point.

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

properties.provisioningState

PrivateEndpointConnectionProvisioningState

The provisioning state of the private endpoint connection resource.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

PrivateEndpointConnectionProvisioningState

The current provisioning state.

Value Description
Succeeded
Creating
Deleting
Failed

PrivateEndpointServiceConnectionStatus

The private endpoint connection status.

Value Description
Pending
Approved
Rejected

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

Name Type Description
actionsRequired

string

A message indicating if changes on the service provider require any updates on the consumer.

description

string

The reason for approval/rejection of the connection.

status

PrivateEndpointServiceConnectionStatus

Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.

ProvisioningState

Value Description
Accepted
Creating
Updating
Deleting
Succeeded
Failed
Canceled
Deleted
NotSpecified

PublicNetworkAccess

Indicate the state for enable or disable traffic over the public interface.

Value Description
Enabled
Disabled

ResourceSku

Name Type Description
name

string

Security

Grafana security settings

Name Type Description
csrfAlwaysCheck

boolean

Set to true to execute the CSRF check even if the login cookie is not in a request (default false).

Smtp

Email server settings. https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana/#smtp

Name Type Default value Description
enabled

boolean

False

Enable this to allow Grafana to send email. Default is false

fromAddress

string

Address used when sending out emails https://pkg.go.dev/net/mail#Address

fromName

string

Name to be used when sending out emails. Default is "Azure Managed Grafana Notification" https://pkg.go.dev/net/mail#Address

host

string

SMTP server hostname with port, e.g. test.email.net:587

password

string

Password of SMTP auth. If the password contains # or ;, then you have to wrap it with triple quotes

skipVerify

boolean

Verify SSL for SMTP server. Default is false https://pkg.go.dev/crypto/tls#Config

startTLSPolicy

StartTLSPolicy

The StartTLSPolicy setting of the SMTP configuration https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy

user

string

User of SMTP auth

Snapshots

Grafana Snapshots settings

Name Type Description
externalEnabled

boolean

Set to false to disable external snapshot publish endpoint

StartTLSPolicy

The StartTLSPolicy setting of the SMTP configuration https://pkg.go.dev/github.com/go-mail/mail#StartTLSPolicy

Value Description
OpportunisticStartTLS
MandatoryStartTLS
NoStartTLS

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

UserAssignedIdentity

User assigned identity properties

Name Type Description
clientId

string (uuid)

The client ID of the assigned identity.

principalId

string (uuid)

The principal ID of the assigned identity.

Users

Grafana users settings

Name Type Description
viewersCanEdit

boolean

Set to true so viewers can access and use explore and perform temporary edits on panels in dashboards they have access to. They cannot save their changes.

ZoneRedundancy

Value Description
Disabled
Enabled