Add operation field to Aws nodes

This commit is contained in:
Matheus Cansian
2019-10-15 14:24:45 -03:00
parent 0fcbe409b6
commit 087199798c
2 changed files with 77 additions and 0 deletions

View File

@@ -32,6 +32,20 @@ export class AwsLambda implements INodeType {
} }
], ],
properties: [ properties: [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
options: [
{
name: 'Invoke',
value: 'invoke',
description: 'Invoke a function',
},
],
default: 'invoke',
description: 'The operation to perform.',
},
{ {
displayName: 'Function', displayName: 'Function',
name: 'function', name: 'function',
@@ -39,6 +53,13 @@ export class AwsLambda implements INodeType {
typeOptions: { typeOptions: {
loadOptionsMethod: 'getFunctions', loadOptionsMethod: 'getFunctions',
}, },
displayOptions: {
show: {
operation: [
'invoke',
],
},
},
options: [], options: [],
default: '', default: '',
required: true, required: true,
@@ -48,6 +69,13 @@ export class AwsLambda implements INodeType {
displayName: 'Qualifier', displayName: 'Qualifier',
name: 'qualifier', name: 'qualifier',
type: 'string', type: 'string',
displayOptions: {
show: {
operation: [
'invoke',
],
},
},
required: true, required: true,
default: '$LATEST', default: '$LATEST',
description: 'Specify a version or alias to invoke a published version of the function', description: 'Specify a version or alias to invoke a published version of the function',
@@ -68,6 +96,13 @@ export class AwsLambda implements INodeType {
description: 'Invoke the function and immediately continue the workflow', description: 'Invoke the function and immediately continue the workflow',
}, },
], ],
displayOptions: {
show: {
operation: [
'invoke',
],
},
},
default: 'RequestResponse', default: 'RequestResponse',
description: 'Specify if the workflow should wait for the function to return the results', description: 'Specify if the workflow should wait for the function to return the results',
}, },
@@ -75,6 +110,13 @@ export class AwsLambda implements INodeType {
displayName: 'JSON Input', displayName: 'JSON Input',
name: 'payload', name: 'payload',
type: 'string', type: 'string',
displayOptions: {
show: {
operation: [
'invoke',
],
},
},
default: '', default: '',
description: 'The JSON that you want to provide to your Lambda function as input', description: 'The JSON that you want to provide to your Lambda function as input',
typeOptions: { typeOptions: {

View File

@@ -32,6 +32,20 @@ export class AwsSns implements INodeType {
} }
], ],
properties: [ properties: [
{
displayName: 'Operation',
name: 'operation',
type: 'options',
options: [
{
name: 'Publish',
value: 'publish',
description: 'Publish a message to a topic',
},
],
default: 'invoke',
description: 'The operation to perform.',
},
{ {
displayName: 'Topic', displayName: 'Topic',
name: 'topic', name: 'topic',
@@ -39,6 +53,13 @@ export class AwsSns implements INodeType {
typeOptions: { typeOptions: {
loadOptionsMethod: 'getTopics', loadOptionsMethod: 'getTopics',
}, },
displayOptions: {
show: {
operation: [
'publish',
],
},
},
options: [], options: [],
default: '', default: '',
required: true, required: true,
@@ -48,6 +69,13 @@ export class AwsSns implements INodeType {
displayName: 'Subject', displayName: 'Subject',
name: 'subject', name: 'subject',
type: 'string', type: 'string',
displayOptions: {
show: {
operation: [
'publish',
],
},
},
default: '', default: '',
required: true, required: true,
description: 'Subject when the message is delivered to email endpoints', description: 'Subject when the message is delivered to email endpoints',
@@ -56,6 +84,13 @@ export class AwsSns implements INodeType {
displayName: 'Message', displayName: 'Message',
name: 'message', name: 'message',
type: 'string', type: 'string',
displayOptions: {
show: {
operation: [
'publish',
],
},
},
required: true, required: true,
typeOptions: { typeOptions: {
alwaysOpenEditWindow: true, alwaysOpenEditWindow: true,