Security: Sync from Public / sync-from-public (push) Has been cancelled
Test: Benchmark Nightly / build (push) Has been cancelled
Test: Benchmark Nightly / Notify Cats on failure (push) Has been cancelled
CI: Python / Checks (push) Has been cancelled
Test: Evals Python / Workflow Comparison Python (push) Has been cancelled
Util: Check Docs URLs / check-docs-urls (push) Has been cancelled
Test: Visual Storybook / Cloudflare Pages (push) Has been cancelled
Test: E2E Performance / build-and-test-performance (push) Has been cancelled
Test: Workflows Nightly / Run Workflow Tests (push) Has been cancelled
Util: Cleanup CI Docker Images / Delete stale CI images (push) Has been cancelled
Test: Benchmark Destroy Env / build (push) Has been cancelled
Util: Update Node Popularity / update-popularity (push) Has been cancelled
Test: E2E Coverage Weekly / Coverage Tests (push) Has been cancelled
71 lines
1.5 KiB
TypeScript
71 lines
1.5 KiB
TypeScript
import type { INodeType, INodeTypeDescription } from 'n8n-workflow';
|
|
import { NodeConnectionTypes } from 'n8n-workflow';
|
|
|
|
import { user, group } from './descriptions';
|
|
import { BASE_URL } from './helpers/constants';
|
|
import { encodeBodyAsFormUrlEncoded } from './helpers/utils';
|
|
import { searchGroups, searchUsers, searchGroupsForUser } from './methods/listSearch';
|
|
|
|
export class AwsIam implements INodeType {
|
|
description: INodeTypeDescription = {
|
|
displayName: 'AWS IAM',
|
|
name: 'awsIam',
|
|
icon: 'file:AwsIam.svg',
|
|
group: ['output'],
|
|
version: 1,
|
|
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
description: 'Interacts with Amazon IAM',
|
|
schemaPath: 'Aws/IAM',
|
|
defaults: { name: 'AWS IAM' },
|
|
inputs: [NodeConnectionTypes.Main],
|
|
outputs: [NodeConnectionTypes.Main],
|
|
credentials: [
|
|
{
|
|
name: 'aws',
|
|
required: true,
|
|
},
|
|
],
|
|
requestDefaults: {
|
|
baseURL: BASE_URL,
|
|
json: true,
|
|
headers: {
|
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
},
|
|
},
|
|
properties: [
|
|
{
|
|
displayName: 'Resource',
|
|
name: 'resource',
|
|
type: 'options',
|
|
noDataExpression: true,
|
|
default: 'user',
|
|
options: [
|
|
{
|
|
name: 'User',
|
|
value: 'user',
|
|
},
|
|
{
|
|
name: 'Group',
|
|
value: 'group',
|
|
},
|
|
],
|
|
routing: {
|
|
send: {
|
|
preSend: [encodeBodyAsFormUrlEncoded],
|
|
},
|
|
},
|
|
},
|
|
...user.description,
|
|
...group.description,
|
|
],
|
|
};
|
|
|
|
methods = {
|
|
listSearch: {
|
|
searchGroups,
|
|
searchUsers,
|
|
searchGroupsForUser,
|
|
},
|
|
};
|
|
}
|