你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Monitors - Create Or Update
Create a NewRelicMonitorResource
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/NewRelic.Observability/monitors/{monitorName}?api-version=2024-10-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
monitor
|
path | True |
string |
Name of the Monitors resource |
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 |
identity |
The managed service identities assigned to this resource. |
||
properties.accountCreationSource |
Source of account creation |
||
properties.newRelicAccountProperties |
MarketplaceSubscriptionStatus of the resource |
||
properties.orgCreationSource |
Source of org creation |
||
properties.planData |
Plan details |
||
properties.saaSAzureSubscriptionStatus |
string |
Status of Azure Subscription where Marketplace SaaS is located. |
|
properties.subscriptionState |
string |
State of the Azure Subscription containing the monitor resource |
|
properties.userInfo |
User Info |
||
tags |
object |
Resource tags. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
ARM operation completed successfully. |
|
201 Created |
ARM create operation completed successfully. Headers Retry-After: integer |
|
Other Status Codes |
An unexpected error response. |
Security
azure_auth
Microsoft Entra ID 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
Monitors_CreateOrUpdate_MaximumSet_Gen
Sample request
PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgNewRelic/providers/NewRelic.Observability/monitors/cdlymktqw?api-version=2024-10-01
{
"properties": {
"provisioningState": "Accepted",
"monitoringStatus": "Enabled",
"marketplaceSubscriptionStatus": "Active",
"newRelicAccountProperties": {
"userId": "vcscxlncofcuduadesd",
"accountInfo": {
"accountId": "xhqmg",
"ingestionKey": "wltnimmhqt",
"region": "ljcf"
},
"organizationInfo": {
"organizationId": "k"
},
"singleSignOnProperties": {
"singleSignOnState": "Initial",
"enterpriseAppId": "kwiwfz",
"singleSignOnUrl": "kvseueuljsxmfwpqctz",
"provisioningState": "Accepted"
}
},
"userInfo": {
"firstName": "vdftzcggirefejajwahhwhyibutramdaotvnuf",
"lastName": "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc",
"emailAddress": "%6%@4-g.N1.3F-kI1.Ue-.lJso",
"phoneNumber": "krf",
"country": "hslqnwdanrconqyekwbnttaetv"
},
"planData": {
"usageType": "PAYG",
"billingCycle": "Yearly",
"planDetails": "tbbiaga",
"effectiveDate": "2022-12-05T14:11:37.786Z"
},
"liftrResourceCategory": "Unknown",
"orgCreationSource": "LIFTR",
"accountCreationSource": "LIFTR",
"subscriptionState": "Suspended",
"saaSAzureSubscriptionStatus": "Subscribed"
},
"identity": {
"type": "None",
"userAssignedIdentities": {
"key8903": {}
}
},
"tags": {
"key6976": "oaxfhf"
},
"location": "k"
}
Sample response
{
"properties": {
"provisioningState": "Accepted",
"monitoringStatus": "Enabled",
"marketplaceSubscriptionStatus": "Active",
"marketplaceSubscriptionId": "jizcsbgrdjhrfqqvvruhgftqhra",
"newRelicAccountProperties": {
"userId": "vcscxlncofcuduadesd",
"accountInfo": {
"accountId": "xhqmg",
"region": "ljcf"
},
"organizationInfo": {
"organizationId": "k"
},
"singleSignOnProperties": {
"singleSignOnState": "Initial",
"enterpriseAppId": "kwiwfz",
"singleSignOnUrl": "kvseueuljsxmfwpqctz",
"provisioningState": "Accepted"
}
},
"userInfo": {
"firstName": "vdftzcggirefejajwahhwhyibutramdaotvnuf",
"lastName": "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc",
"emailAddress": "%6%@4-g.N1.3F-kI1.Ue-.lJso",
"phoneNumber": "krf",
"country": "hslqnwdanrconqyekwbnttaetv"
},
"planData": {
"usageType": "PAYG",
"billingCycle": "Yearly",
"planDetails": "tbbiaga",
"effectiveDate": "2022-12-05T14:11:37.786Z"
},
"liftrResourceCategory": "Unknown",
"liftrResourcePreference": 12,
"orgCreationSource": "LIFTR",
"accountCreationSource": "LIFTR",
"subscriptionState": "Suspended",
"saaSAzureSubscriptionStatus": "Subscribed"
},
"identity": {
"principalId": "cac47a92-2856-11ed-a261-0242ac120002",
"tenantId": "cac47a92-2856-11ed-a261-0242ac120002",
"type": "None",
"userAssignedIdentities": {
"key8903": {
"principalId": "cac47a92-2856-11ed-a261-0242ac120002",
"clientId": "cac47a92-2856-11ed-a261-0242ac120002"
}
}
},
"tags": {
"key6976": "oaxfhf"
},
"location": "k",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor",
"name": "fteaqmtwspcfgyopqzrepiqu",
"type": "hdj",
"systemData": {
"createdBy": "pcdjzdldbwsdlfi",
"createdByType": "User",
"createdAt": "2022-12-05T14:11:37.787Z",
"lastModifiedBy": "xbsjrxmwwlmpnpvcica",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-12-05T14:11:37.787Z"
}
}
Azure-AsyncOperation: https://contoso.com/operationstatus
{
"properties": {
"provisioningState": "Accepted",
"monitoringStatus": "Enabled",
"marketplaceSubscriptionStatus": "Active",
"marketplaceSubscriptionId": "jizcsbgrdjhrfqqvvruhgftqhra",
"newRelicAccountProperties": {
"userId": "vcscxlncofcuduadesd",
"accountInfo": {
"accountId": "xhqmg",
"region": "ljcf"
},
"organizationInfo": {
"organizationId": "k"
},
"singleSignOnProperties": {
"singleSignOnState": "Initial",
"enterpriseAppId": "kwiwfz",
"singleSignOnUrl": "kvseueuljsxmfwpqctz",
"provisioningState": "Accepted"
}
},
"userInfo": {
"firstName": "vdftzcggirefejajwahhwhyibutramdaotvnuf",
"lastName": "bcsztgqovdlmzfkjdrngidwzqsevagexzzilnlc",
"emailAddress": "%6%@4-g.N1.3F-kI1.Ue-.lJso",
"phoneNumber": "krf",
"country": "hslqnwdanrconqyekwbnttaetv"
},
"planData": {
"usageType": "PAYG",
"billingCycle": "Yearly",
"planDetails": "tbbiaga",
"effectiveDate": "2022-12-05T14:11:37.786Z"
},
"liftrResourceCategory": "Unknown",
"liftrResourcePreference": 12,
"orgCreationSource": "LIFTR",
"accountCreationSource": "LIFTR",
"subscriptionState": "Suspended",
"saaSAzureSubscriptionStatus": "Subscribed"
},
"identity": {
"principalId": "cac47a92-2856-11ed-a261-0242ac120002",
"tenantId": "cac47a92-2856-11ed-a261-0242ac120002",
"type": "None",
"userAssignedIdentities": {
"key8903": {
"principalId": "cac47a92-2856-11ed-a261-0242ac120002",
"clientId": "cac47a92-2856-11ed-a261-0242ac120002"
}
}
},
"tags": {
"key6976": "oaxfhf"
},
"location": "k",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/NewRelic.Observability/monitors/myMonitor",
"name": "fteaqmtwspcfgyopqzrepiqu",
"type": "hdj",
"systemData": {
"createdBy": "pcdjzdldbwsdlfi",
"createdByType": "User",
"createdAt": "2022-12-05T14:11:37.787Z",
"lastModifiedBy": "xbsjrxmwwlmpnpvcica",
"lastModifiedByType": "User",
"lastModifiedAt": "2022-12-05T14:11:37.787Z"
}
}
Definitions
Name | Description |
---|---|
Account |
Source of Account creation |
Account |
Account Info of the NewRelic account |
created |
The type of identity that created the resource. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
Liftr |
Liftr Resource category. |
Managed |
Managed service identity (system assigned and/or user assigned identities) |
Managed |
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). |
Marketplace |
Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state. |
Monitoring |
Flag specifying if the resource monitoring is enabled or disabled. |
New |
Properties of the NewRelic account |
New |
A Monitor Resource by NewRelic |
New |
Single sign on Info of the NewRelic account |
Organization |
Organization Info of the NewRelic account |
Org |
Source of Org creation |
Plan |
Plan data of NewRelic Monitor resource |
Provisioning |
Provisioning State of the Monitor resource |
Single |
Various states of the SSO resource |
system |
Metadata pertaining to creation and last modification of the resource. |
Usage |
Different usage type like PAYG/COMMITTED |
User |
User assigned identity properties |
User |
User Info of NewRelic Monitor resource |
AccountCreationSource
Source of Account creation
Name | Type | Description |
---|---|---|
LIFTR |
string |
Account is created from LIFTR |
NEWRELIC |
string |
Account is created from NEWRELIC |
AccountInfo
Account Info of the NewRelic account
Name | Type | Description |
---|---|---|
accountId |
string |
Account id |
ingestionKey |
string |
ingestion key of account |
region |
string |
Region where New Relic account is present |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
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. |
LiftrResourceCategories
Liftr Resource category.
Name | Type | Description |
---|---|---|
MonitorLogs |
string |
|
Unknown |
string |
ManagedServiceIdentity
Managed service identity (system assigned and/or user assigned identities)
Name | Type | Description |
---|---|---|
principalId |
string |
The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. |
tenantId |
string |
The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. |
type |
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). |
|
userAssignedIdentities |
<string,
User |
User-Assigned Identities |
ManagedServiceIdentityType
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
Name | Type | Description |
---|---|---|
None |
string |
|
SystemAssigned |
string |
|
SystemAssigned, UserAssigned |
string |
|
UserAssigned |
string |
MarketplaceSubscriptionStatus
Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.
Name | Type | Description |
---|---|---|
Active |
string |
monitoring is enabled |
Suspended |
string |
monitoring is disabled |
MonitoringStatus
Flag specifying if the resource monitoring is enabled or disabled.
Name | Type | Description |
---|---|---|
Disabled |
string |
monitoring is disabled |
Enabled |
string |
monitoring is enabled |
NewRelicAccountProperties
Properties of the NewRelic account
Name | Type | Description |
---|---|---|
accountInfo |
NewRelic Account Information |
|
organizationInfo |
NewRelic Organization Information |
|
singleSignOnProperties |
date when plan was applied |
|
userId |
string |
User id |
NewRelicMonitorResource
A Monitor Resource by NewRelic
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
identity |
The managed service identities assigned to this resource. |
|
location |
string |
The geo-location where the resource lives |
name |
string |
The name of the resource |
properties.accountCreationSource |
Source of account creation |
|
properties.liftrResourceCategory |
Liftr resource category |
|
properties.liftrResourcePreference |
integer |
Liftr resource preference. The priority of the resource. |
properties.marketplaceSubscriptionId |
string |
Marketplace Subscription Id |
properties.marketplaceSubscriptionStatus |
NewRelic Organization properties of the resource |
|
properties.monitoringStatus |
MonitoringStatus of the resource |
|
properties.newRelicAccountProperties |
MarketplaceSubscriptionStatus of the resource |
|
properties.orgCreationSource |
Source of org creation |
|
properties.planData |
Plan details |
|
properties.provisioningState |
Provisioning State of the resource |
|
properties.saaSAzureSubscriptionStatus |
string |
Status of Azure Subscription where Marketplace SaaS is located. |
properties.subscriptionState |
string |
State of the Azure Subscription containing the monitor resource |
properties.userInfo |
User Info |
|
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" |
NewRelicSingleSignOnProperties
Single sign on Info of the NewRelic account
Name | Type | Description |
---|---|---|
enterpriseAppId |
string |
The Id of the Enterprise App used for Single sign-on. |
provisioningState |
Provisioning state |
|
singleSignOnState |
Single sign-on state |
|
singleSignOnUrl |
string |
The login URL specific to this NewRelic Organization |
OrganizationInfo
Organization Info of the NewRelic account
Name | Type | Description |
---|---|---|
organizationId |
string |
Organization id |
OrgCreationSource
Source of Org creation
Name | Type | Description |
---|---|---|
LIFTR |
string |
Org is created from LIFTR |
NEWRELIC |
string |
Org is created from NEWRELIC |
PlanData
Plan data of NewRelic Monitor resource
Name | Type | Description |
---|---|---|
billingCycle |
string |
Different billing cycles like Monthly/Weekly. |
effectiveDate |
string |
date when plan was applied |
planDetails |
string |
plan id as published by NewRelic |
usageType |
Different usage type like PAYG/COMMITTED. this could be enum |
ProvisioningState
Provisioning State of the Monitor resource
Name | Type | Description |
---|---|---|
Accepted |
string |
Monitor resource creation request accepted |
Canceled |
string |
Monitor resource creation canceled |
Creating |
string |
Monitor resource creation started |
Deleted |
string |
Monitor resource is deleted |
Deleting |
string |
Monitor resource deletion started |
Failed |
string |
Monitor resource creation failed |
NotSpecified |
string |
Monitor resource state is unknown |
Succeeded |
string |
Monitor resource creation successful |
Updating |
string |
Monitor resource is being updated |
SingleSignOnStates
Various states of the SSO resource
Name | Type | Description |
---|---|---|
Disable |
string |
|
Enable |
string |
|
Existing |
string |
|
Initial |
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. |
UsageType
Different usage type like PAYG/COMMITTED
Name | Type | Description |
---|---|---|
COMMITTED |
string |
Usage type is COMMITTED |
PAYG |
string |
Usage type is PAYG |
UserAssignedIdentity
User assigned identity properties
Name | Type | Description |
---|---|---|
clientId |
string |
The client ID of the assigned identity. |
principalId |
string |
The principal ID of the assigned identity. |
UserInfo
User Info of NewRelic Monitor resource
Name | Type | Description |
---|---|---|
country |
string |
country if user |
emailAddress |
string |
User Email |
firstName |
string |
First name |
lastName |
string |
Last name |
phoneNumber |
string |
Contact phone number |