你当前正在访问 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
monitorName
path True

string

Name of the Monitors resource

resourceGroupName
path True

string

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

subscriptionId
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

ManagedServiceIdentity

The managed service identities assigned to this resource.

properties.accountCreationSource

AccountCreationSource

Source of account creation

properties.newRelicAccountProperties

NewRelicAccountProperties

MarketplaceSubscriptionStatus of the resource

properties.orgCreationSource

OrgCreationSource

Source of org creation

properties.planData

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

UserInfo

User Info

tags

object

Resource tags.

Responses

Name Type Description
200 OK

NewRelicMonitorResource

ARM operation completed successfully.

201 Created

NewRelicMonitorResource

ARM create operation completed successfully.

Headers

Retry-After: integer

Other Status Codes

ErrorResponse

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
AccountCreationSource

Source of Account creation

AccountInfo

Account Info of the NewRelic account

createdByType

The type of identity that created the resource.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

LiftrResourceCategories

Liftr Resource category.

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).

MarketplaceSubscriptionStatus

Flag specifying the Marketplace Subscription Status of the resource. If payment is not made in time, the resource will go in Suspended state.

MonitoringStatus

Flag specifying if the resource monitoring is enabled or disabled.

NewRelicAccountProperties

Properties of the NewRelic account

NewRelicMonitorResource

A Monitor Resource by NewRelic

NewRelicSingleSignOnProperties

Single sign on Info of the NewRelic account

OrganizationInfo

Organization Info of the NewRelic account

OrgCreationSource

Source of Org creation

PlanData

Plan data of NewRelic Monitor resource

ProvisioningState

Provisioning State of the Monitor resource

SingleSignOnStates

Various states of the SSO resource

systemData

Metadata pertaining to creation and last modification of the resource.

UsageType

Different usage type like PAYG/COMMITTED

UserAssignedIdentity

User assigned identity properties

UserInfo

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

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.

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

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).

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

AccountInfo

NewRelic Account Information

organizationInfo

OrganizationInfo

NewRelic Organization Information

singleSignOnProperties

NewRelicSingleSignOnProperties

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

ManagedServiceIdentity

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

AccountCreationSource

Source of account creation

properties.liftrResourceCategory

LiftrResourceCategories

Liftr resource category

properties.liftrResourcePreference

integer

Liftr resource preference. The priority of the resource.

properties.marketplaceSubscriptionId

string

Marketplace Subscription Id

properties.marketplaceSubscriptionStatus

MarketplaceSubscriptionStatus

NewRelic Organization properties of the resource

properties.monitoringStatus

MonitoringStatus

MonitoringStatus of the resource

properties.newRelicAccountProperties

NewRelicAccountProperties

MarketplaceSubscriptionStatus of the resource

properties.orgCreationSource

OrgCreationSource

Source of org creation

properties.planData

PlanData

Plan details

properties.provisioningState

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

UserInfo

User Info

systemData

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

ProvisioningState

Provisioning state

singleSignOnState

SingleSignOnStates

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

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

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

createdByType

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