There are more AWS SDK examples available in the AWS Doc SDK Examples
Scenarios for Organizations using AWS SDKs
The following code examples show you how to implement common scenarios in Organizations with AWS SDKs. These scenarios show you how to accomplish specific tasks by calling multiple functions within Organizations or combined with other AWS services. Each scenario includes a link to the complete source code, where you can find instructions on how to set up and run the code.
Scenarios target an intermediate level of experience to help you understand service actions in context.
Examples
Permission policy allows AWS Compute Optimizer Automation to apply recommended actions
Permission policy to enable Automation across your organization
Permission policy to grant full access to Compute Optimizer Automation for standalone AWS accounts
Permission policy to grant service-linked role permissions for Compute Optimization Automation