There are more AWS SDK examples available in the AWS Doc SDK Examples
Policy to grant read-only access to Compute Optimizer Automation for a management account of an organization
The following code example shows how to This permission-based policy grants read-only access to Compute Optimizer Automation for a management account of an organization