If your organization has hundreds or even thousands of accounts, you can use the corresponding REST APIs to add these accounts to the system and manage your AWS accounts. This chapter illustrates the main flow and explains how to use these APIs.
For a complete list of APIs, refer to https://github.com/NetBrainAPI/NetBrain-REST-API-R10/tree/master/REST%20APIs%20Documentation/API%20Server%20Management.
Onboarding New Accounts:
If you want to have the scripts integrated into your account onboarding process, you can use the REST APIs to perform the following tasks after adding the new accounts:
- Add AWS Accounts to NetBrain: You will need to define your strategy to choose what types of accounts to add to NetBrain, either by using the tag or OU (organizational unit) as a filter based on your preference.
- Update Schedule Discovery Tasks: After adding the AWS accounts into NetBrain, you will need to add these accounts into the scheduled discovery process.
Note: You only need to discover the new accounts once (when you add these new accounts to NetBrain). After the data of these accounts are discovered and initialized, you don’t need to discover them for a second time. You can use the Rest API to query the discovery results (succeed or fail). If some accounts are discovered successfully, you could use the API to delete these accounts from the schedule discovery task.
- Update Schedule Benchmark Task: After the discovery process, the corresponding data for the AWS accounts will be added to the system. The system will then need to run the benchmark to update the AWS data. If you have selected certain AWS accounts for the discovery, you will need to add these newly added accounts to the benchmark scope, as shown in the screenshot below.
Offboarding Old Accounts:
When you want to remove some AWS accounts that are not in use, you can use the REST APIs to remove these accounts and data from NetBrain.
- Remove AWS API Instance Data: You will need to call this API to remove the AWS API instance data so that all the data for the current AWS API Server will be removed from the NetBrain system.
- Remove AWS API Server: After successfully removing the AWS API instance data, you can safely remove the AWS API server, so this server will no longer be shown in the API Server Manager.