-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from akamai/release/3.1.0
Release/3.1.0 --> Master
- Loading branch information
Showing
23 changed files
with
1,093 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
let AccountProtectionAdvancedSettings = require('../../src/accountprotectionadvancedsettings') | ||
.accountProtectionAdvancedSettings; | ||
let out = require('./lib/out'); | ||
|
||
class GetAccountProtectionTransactionEndpointProtectionCommand { | ||
constructor() { | ||
this.flags = 'account-protection-transactional-endpoint-protection'; | ||
this.desc = 'Display account protected advanced settings for transactional endpoints.'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}); | ||
} | ||
run(options) { | ||
out.print({ | ||
promise: new AccountProtectionAdvancedSettings(options).getTransactionalEndpointProtection(), | ||
args: options, | ||
success: (args, data) => { | ||
return JSON.stringify(data); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new GetAccountProtectionTransactionEndpointProtectionCommand(); |
50 changes: 50 additions & 0 deletions
50
bin/commands/accountprotectionadvancedsettingstep.modify.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
let AccountProtectionAdvancedSettings = require('../../src/accountprotectionadvancedsettings') | ||
.accountProtectionAdvancedSettings; | ||
let out = require('./lib/out'); | ||
|
||
class ModifyAccountProtectionTransactionEndpointProtectionCommand { | ||
constructor() { | ||
this.flags = 'modify-account-protection-transactional-endpoint-protection'; | ||
this.desc = 'Modify account protected advanced settings for transactional endpoints.'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.positional('<@path>', { | ||
paramsDesc: 'The input file path.' | ||
}) | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.check((argv, context) => { | ||
if (!argv['@path'].startsWith('@')) { | ||
return context.cliMessage("ERROR: Invalid file name, should start with '@'"); | ||
} | ||
}); | ||
} | ||
run(options) { | ||
options.file = options['@path'].replace('@', ''); | ||
|
||
out.print({ | ||
promise: new AccountProtectionAdvancedSettings( | ||
options | ||
).updateTransactionalEndpointProtection(), | ||
args: options, | ||
success: (args, data) => { | ||
return JSON.stringify(data); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new ModifyAccountProtectionTransactionEndpointProtectionCommand(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
let AccountProtectionRiskActions = require('../../src/accountprotectionriskactions') | ||
.accountProtectionRiskAction; | ||
let out = require('./lib/out'); | ||
|
||
class GetAccountProtectionRiskActionsCommand { | ||
constructor() { | ||
this.flags = 'account-protection-risk-actions'; | ||
this.desc = 'Display allowed risk actions for account protected endpoints.'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}); | ||
} | ||
run(options) { | ||
out.print({ | ||
promise: new AccountProtectionRiskActions(options).getRiskActions(), | ||
args: options, | ||
success: (args, data) => { | ||
return JSON.stringify(data); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new GetAccountProtectionRiskActionsCommand(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
let AccountProtectionPolicySettings = require('../../src/accountprotectionpolicysettings') | ||
.accountProtectionPolicySettings; | ||
let out = require('./lib/out'); | ||
|
||
class GetAccountProtectionSettingsCommand { | ||
constructor() { | ||
this.flags = 'account-protection-settings'; | ||
this.desc = 'Display account protection settings for a security policy.'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--policy <id>', { | ||
desc: | ||
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.', | ||
group: 'Optional:', | ||
required: false | ||
}); | ||
} | ||
run(options) { | ||
out.print({ | ||
promise: new AccountProtectionPolicySettings(options).getAccountProtectionSettings(), | ||
args: options, | ||
success: (args, data) => { | ||
return JSON.stringify(data); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new GetAccountProtectionSettingsCommand(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
let AccountProtectionPolicySettings = require('../../src/accountprotectionpolicysettings') | ||
.accountProtectionPolicySettings; | ||
let out = require('./lib/out'); | ||
|
||
class ModifyAccountProtectionSettingsCommand { | ||
constructor() { | ||
this.flags = 'modify-account-protection-settings'; | ||
this.desc = 'Modify account protection settings for a security policy.'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.positional('<@path>', { | ||
paramsDesc: 'The input file path.' | ||
}) | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--policy <id>', { | ||
desc: | ||
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.check((argv, context) => { | ||
if (!argv['@path'].startsWith('@')) { | ||
return context.cliMessage("ERROR: Invalid file name, should start with '@'"); | ||
} | ||
}); | ||
} | ||
run(options) { | ||
options.file = options['@path'].replace('@', ''); | ||
|
||
out.print({ | ||
promise: new AccountProtectionPolicySettings(options).updateAccountProtectionSettings(), | ||
args: options, | ||
success: (args, data) => { | ||
return JSON.stringify(data); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new ModifyAccountProtectionSettingsCommand(); |
51 changes: 51 additions & 0 deletions
51
bin/commands/accountprotectiontransactionalendpoint.delete.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
let AccountProtectionTransactionalEndpoint = require('../../src/accountprotectiontransactionalendpoint') | ||
.accountProtectionTransactionalEndpoint; | ||
let out = require('./lib/out'); | ||
|
||
const objectType = 'operations'; | ||
|
||
class DeleteAccountProtectionTransactionEndpointCommand { | ||
constructor() { | ||
this.flags = 'delete-account-protection-transactional-endpoint'; | ||
this.desc = 'Delete account protection transactional endpoint by operation id.'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.positional('<operation-id>', { | ||
paramsDesc: 'Operation ID' | ||
}) | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--policy <id>', { | ||
desc: | ||
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.', | ||
group: 'Optional:', | ||
required: false | ||
}); | ||
} | ||
run(options) { | ||
options.operation_id = options['operation-id']; | ||
|
||
out.print({ | ||
promise: new AccountProtectionTransactionalEndpoint(options).deleteTransactionalEndpoint(), | ||
args: options, | ||
success: (args, data) => { | ||
return data; | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new DeleteAccountProtectionTransactionEndpointCommand(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
let AccountProtectionTransactionalEndpoint = require('../../src/accountprotectiontransactionalendpoint') | ||
.accountProtectionTransactionalEndpoint; | ||
let out = require('./lib/out'); | ||
|
||
const objectType = 'operations'; | ||
|
||
class GetAccountProtectionTransactionEndpointCommand { | ||
constructor() { | ||
this.flags = 'account-protection-transactional-endpoint'; | ||
this.desc = 'Get a transactional endpoint by operation id for account protection.'; | ||
this.setup = this.setup.bind(this); | ||
this.run = this.run.bind(this); | ||
} | ||
|
||
setup(sywac) { | ||
sywac | ||
.positional('<operation-id>', { | ||
paramsDesc: 'Operation ID' | ||
}) | ||
.number('--config <id>', { | ||
desc: 'Configuration ID. Mandatory if you have more than one configuration.', | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--version <id>', { | ||
desc: | ||
"Version Number. It can also take the values 'PROD' or 'PRODUCTION' or 'STAGING'. If not provided, latest version is assumed.", | ||
group: 'Optional:', | ||
required: false | ||
}) | ||
.string('--policy <id>', { | ||
desc: | ||
'Policy ID. If not provided, we try to use the policy available on file. If you have more than one policy, this option must be provided.', | ||
group: 'Optional:', | ||
required: false | ||
}); | ||
} | ||
run(options) { | ||
options.operation_id = options['operation-id']; | ||
|
||
out.print({ | ||
promise: new AccountProtectionTransactionalEndpoint(options).getTransactionalEndpointById(), | ||
args: options, | ||
success: (args, data) => { | ||
return data; | ||
} | ||
}); | ||
} | ||
} | ||
|
||
module.exports = new GetAccountProtectionTransactionEndpointCommand(); |
Oops, something went wrong.