Request basic configuration settings from the user. Each request will be retried until the answer is in the correct format.
(self)
| 243 | self._encrypt_cb_api_token() |
| 244 | |
| 245 | def configure(self) -> None: |
| 246 | """Request basic configuration settings from the user. |
| 247 | |
| 248 | Each request will be retried until the answer is in the correct format. |
| 249 | """ |
| 250 | get_input('AWS Account ID', self.aws_account_id, self, 'aws_account_id') |
| 251 | get_input('AWS Region', self.aws_region, self, 'aws_region') |
| 252 | get_input('Unique name prefix, e.g. "company_team"', self.name_prefix, self, 'name_prefix') |
| 253 | enable_downloader = get_input('Enable the CarbonBlack downloader?', |
| 254 | 'yes' if self.enable_carbon_black_downloader else 'no') |
| 255 | self.enable_carbon_black_downloader = (enable_downloader == 'yes') |
| 256 | |
| 257 | if self.enable_carbon_black_downloader: |
| 258 | self._configure_carbon_black() |
| 259 | |
| 260 | # Save the updated configuration. |
| 261 | self.save() |
| 262 | |
| 263 | def validate(self) -> None: |
| 264 | """Validate config values against their expected formats. |