Azure Monitor Workspaces - Create
Creates or updates an Azure Monitor Workspace
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Monitor/accounts/{azureMonitorWorkspaceName}?api-version=2023-04-03
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
azure
|
path | True |
string |
The name of the Azure Monitor Workspace. The name is case insensitive Regex pattern: |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string |
The ID of the target subscription. |
api-version
|
query | True |
string |
The API version to use for this operation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
location | True |
string |
The geo-location where the resource lives |
properties.publicNetworkAccess |
Gets or sets allow or disallow public network access to Azure Monitor Workspace |
||
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Azure Monitor Workspace was successfully updated |
|
201 Created |
Azure Monitor Workspace was successfully created |
|
Other Status Codes |
Error |
Security
azure_auth
Azure Active Directory OAuth2 Flow
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
Create or update an Azure Monitor Workspace
Sample request
PUT https://management.azure.com/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Monitor/accounts/myAzureMonitorWorkspace?api-version=2023-04-03
{
"location": "eastus"
}
Sample response
{
"id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Monitor/accounts/myAzureMonitorWorkspace",
"name": "myAzureMonitorWorkspace",
"type": "Microsoft.Monitor/accounts",
"location": "eastus",
"tags": {
"tag1": "A",
"tag2": "B"
},
"properties": {
"accountId": "2df515bf-c3ce-4920-84d4-1d9d16542d9f",
"metrics": {
"prometheusQueryEndpoint": "https://myAzureMonitorWorkspace-v8hx.eastus.prometheus.monitor.azure.com",
"internalId": "mac_2df515bf-c3ce-4920-84d4-1d9d16542d9f"
},
"provisioningState": "Succeeded",
"defaultIngestionSettings": {
"dataCollectionRuleResourceId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/MA_myAzureMonitorWorkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionRules/myAzureMonitorWorkspace",
"dataCollectionEndpointResourceId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/MA_myAzureMonitorWorkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionEndpoints/myAzureMonitorWorkspace"
},
"privateEndpointConnections": [
{
"id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Monitor/accounts/myAzureMonitorWorkspace/privateEndpointConnections/myPrivateEndpointConnection",
"name": "myPrivateEndpointConnection",
"type": "Microsoft.Monitor/accounts/privateEndpointConnections",
"properties": {
"provisioningState": "Updating",
"privateEndpoint": {
"id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointConnection"
},
"groupIds": [
"prometheusMetrics"
],
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Auto-approved",
"actionsRequired": "None"
}
}
}
],
"publicNetworkAccess": "Enabled"
},
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2021-04-01T12:34:56.1234567Z",
"lastModifiedBy": "user2",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-04-02T12:34:56.1234567Z"
},
"etag": "070057da-0000-0000-0000-5ba70d6c0000"
}
{
"id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Monitor/accounts/myAzureMonitorWorkspace",
"name": "myAzureMonitorWorkspace",
"type": "Microsoft.Monitor/accounts",
"location": "eastus",
"tags": {
"tag1": "A",
"tag2": "B"
},
"properties": {
"accountId": "2df515bf-c3ce-4920-84d4-1d9d16542d9f",
"metrics": {
"prometheusQueryEndpoint": "https://myAzureMonitorWorkspace-v8hx.eastus.prometheus.monitor.azure.com",
"internalId": "mac_2df515bf-c3ce-4920-84d4-1d9d16542d9f"
},
"provisioningState": "Creating",
"defaultIngestionSettings": {
"dataCollectionRuleResourceId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/MA_myAzureMonitorWorkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionRules/myAzureMonitorWorkspace",
"dataCollectionEndpointResourceId": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/MA_myAzureMonitorWorkspace_eastus_managed/providers/Microsoft.Insights/dataCollectionEndpoints/myAzureMonitorWorkspace"
},
"privateEndpointConnections": [
{
"id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Monitor/accounts/myAzureMonitorWorkspace/privateEndpointConnections/myPrivateEndpointConnection",
"name": "myPrivateEndpointConnection",
"type": "Microsoft.Monitor/accounts/privateEndpointConnections",
"properties": {
"provisioningState": "Succeeded",
"privateEndpoint": {
"id": "/subscriptions/703362b3-f278-4e4b-9179-c76eaf41ffc2/resourceGroups/myResourceGroup/providers/Microsoft.Network/privateEndpoints/myPrivateEndpointConnection"
},
"groupIds": [
"prometheusMetrics"
],
"privateLinkServiceConnectionState": {
"status": "Approved",
"description": "Auto-approved",
"actionsRequired": "None"
}
}
}
],
"publicNetworkAccess": "Enabled"
},
"systemData": {
"createdBy": "user1",
"createdByType": "User",
"createdAt": "2021-04-01T12:34:56.1234567Z",
"lastModifiedBy": "user2",
"lastModifiedByType": "User",
"lastModifiedAt": "2021-04-02T12:34:56.1234567Z"
},
"etag": "070057da-0000-0000-0000-5ba70d6c0000"
}
Definitions
Name | Description |
---|---|
Azure |
An Azure Monitor Workspace definition |
created |
The type of identity that created the resource. |
Default |
The Data Collection Rule and Endpoint used for ingestion by default. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Metrics |
Properties related to the metrics container in the Azure Monitor Workspace |
Private |
The private endpoint resource. |
Private |
The private endpoint connection resource. |
Private |
The current provisioning state. |
Private |
The private endpoint connection status. |
Private |
A collection of information about the state of the connection between service consumer and provider. |
Provisioning |
The provisioning state of the Azure Monitor Workspace. Set to Succeeded if everything is healthy. |
Public |
Gets or sets allow or disallow public network access to Azure Monitor Workspace |
system |
Metadata pertaining to creation and last modification of the resource. |
AzureMonitorWorkspaceResource
An Azure Monitor Workspace definition
Name | Type | Description |
---|---|---|
etag |
string |
Resource entity tag (ETag) |
id |
string |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
location |
string |
The geo-location where the resource lives |
name |
string |
The name of the resource |
properties.accountId |
string |
The immutable Id of the Azure Monitor Workspace. This property is read-only. |
properties.defaultIngestionSettings |
The Data Collection Rule and Endpoint used for ingestion by default. |
|
properties.metrics |
Properties related to the metrics container in the Azure Monitor Workspace |
|
properties.privateEndpointConnections |
List of private endpoint connections |
|
properties.provisioningState |
The provisioning state of the Azure Monitor Workspace. Set to Succeeded if everything is healthy. |
|
properties.publicNetworkAccess |
Gets or sets allow or disallow public network access to Azure Monitor Workspace |
|
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
tags |
object |
Resource tags. |
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
DefaultIngestionSettings
The Data Collection Rule and Endpoint used for ingestion by default.
Name | Type | Description |
---|---|---|
dataCollectionEndpointResourceId |
string |
The Azure resource Id of the default data collection endpoint for this Azure Monitor Workspace. |
dataCollectionRuleResourceId |
string |
The Azure resource Id of the default data collection rule for this Azure Monitor Workspace. |
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 |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
Metrics
Properties related to the metrics container in the Azure Monitor Workspace
Name | Type | Description |
---|---|---|
internalId |
string |
An internal identifier for the metrics container. Only to be used by the system |
prometheusQueryEndpoint |
string |
The Prometheus query endpoint for the Azure Monitor Workspace |
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. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name |
string |
The name of the resource |
properties.groupIds |
string[] |
The group ids for the private endpoint resource. |
properties.privateEndpoint |
The private endpoint resource. |
|
properties.privateLinkServiceConnectionState |
A collection of information about the state of the connection between service consumer and provider. |
|
properties.provisioningState |
The provisioning state of the private endpoint connection resource. |
|
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.
Name | Type | Description |
---|---|---|
Creating |
string |
|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
PrivateEndpointServiceConnectionStatus
The private endpoint connection status.
Name | Type | Description |
---|---|---|
Approved |
string |
|
Pending |
string |
|
Rejected |
string |
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 |
Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. |
ProvisioningState
The provisioning state of the Azure Monitor Workspace. Set to Succeeded if everything is healthy.
Name | Type | Description |
---|---|---|
Canceled |
string |
|
Creating |
string |
|
Deleting |
string |
|
Failed |
string |
|
Succeeded |
string |
PublicNetworkAccess
Gets or sets allow or disallow public network access to Azure Monitor Workspace
Name | Type | Description |
---|---|---|
Disabled |
string |
|
Enabled |
string |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |