mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
feat: Add credential only node for Microsoft Azure Monitor (#12645)
This commit is contained in:
parent
216d5ed243
commit
6ef8882a10
|
@ -0,0 +1,77 @@
|
||||||
|
import type { Icon, ICredentialType, INodeProperties } from 'n8n-workflow';
|
||||||
|
|
||||||
|
export class MicrosoftAzureMonitorOAuth2Api implements ICredentialType {
|
||||||
|
name = 'microsoftAzureMonitorOAuth2Api';
|
||||||
|
|
||||||
|
displayName = 'Microsoft Azure Monitor OAuth2 API';
|
||||||
|
|
||||||
|
extends = ['microsoftOAuth2Api'];
|
||||||
|
|
||||||
|
documentationUrl = 'microsoftazuremonitor';
|
||||||
|
|
||||||
|
icon: Icon = 'file:icons/Microsoft.svg';
|
||||||
|
|
||||||
|
httpRequestNode = {
|
||||||
|
name: 'Microsoft Azure Monitor',
|
||||||
|
docsUrl: 'https://learn.microsoft.com/en-us/azure/azure-monitor/logs/api/request-format',
|
||||||
|
apiBaseUrlPlaceholder: 'https://api.loganalytics.azure.com/v1/workspaces/[workspace_id]/query',
|
||||||
|
};
|
||||||
|
|
||||||
|
properties: INodeProperties[] = [
|
||||||
|
{
|
||||||
|
displayName: 'Tenant ID',
|
||||||
|
required: true,
|
||||||
|
name: 'tenantId',
|
||||||
|
type: 'string',
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Resource',
|
||||||
|
name: 'resource',
|
||||||
|
type: 'options',
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: 'Azure Log Analytics',
|
||||||
|
value: 'https://api.loganalytics.azure.com',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Log Analytics',
|
||||||
|
value: 'https://api.loganalytics.io',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Azure Monitor',
|
||||||
|
value: 'https://monitor.azure.com',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Azure Management',
|
||||||
|
value: 'https://management.azure.com',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
default: 'https://api.loganalytics.azure.com',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Authorization URL',
|
||||||
|
name: 'authUrl',
|
||||||
|
type: 'hidden',
|
||||||
|
default: '=https://login.microsoftonline.com/{{$self["tenantId"]}}/oauth2/authorize',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Access Token URL',
|
||||||
|
name: 'accessTokenUrl',
|
||||||
|
type: 'hidden',
|
||||||
|
default: '=https://login.microsoftonline.com/{{$self["tenantId"]}}/oauth2/token',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Auth URI Query Parameters',
|
||||||
|
name: 'authQueryParameters',
|
||||||
|
type: 'hidden',
|
||||||
|
default: '=resource={{$self["resource"]}}',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Scope',
|
||||||
|
name: 'scope',
|
||||||
|
type: 'hidden',
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
|
@ -176,6 +176,9 @@ export const getOAuth2AdditionalParameters = (nodeCredentialType: string) => {
|
||||||
mauticOAuth2Api: {
|
mauticOAuth2Api: {
|
||||||
includeCredentialsOnRefreshOnBody: true,
|
includeCredentialsOnRefreshOnBody: true,
|
||||||
},
|
},
|
||||||
|
microsoftAzureMonitorOAuth2Api: {
|
||||||
|
tokenExpiredStatusCode: 403,
|
||||||
|
},
|
||||||
microsoftDynamicsOAuth2Api: {
|
microsoftDynamicsOAuth2Api: {
|
||||||
property: 'id_token',
|
property: 'id_token',
|
||||||
},
|
},
|
||||||
|
|
|
@ -217,6 +217,7 @@
|
||||||
"dist/credentials/MetabaseApi.credentials.js",
|
"dist/credentials/MetabaseApi.credentials.js",
|
||||||
"dist/credentials/MessageBirdApi.credentials.js",
|
"dist/credentials/MessageBirdApi.credentials.js",
|
||||||
"dist/credentials/MetabaseApi.credentials.js",
|
"dist/credentials/MetabaseApi.credentials.js",
|
||||||
|
"dist/credentials/MicrosoftAzureMonitorOAuth2Api.credentials.js",
|
||||||
"dist/credentials/MicrosoftDynamicsOAuth2Api.credentials.js",
|
"dist/credentials/MicrosoftDynamicsOAuth2Api.credentials.js",
|
||||||
"dist/credentials/MicrosoftEntraOAuth2Api.credentials.js",
|
"dist/credentials/MicrosoftEntraOAuth2Api.credentials.js",
|
||||||
"dist/credentials/MicrosoftExcelOAuth2Api.credentials.js",
|
"dist/credentials/MicrosoftExcelOAuth2Api.credentials.js",
|
||||||
|
|
Loading…
Reference in a new issue