

# Code examples for Organizations using AWS SDKs
<a name="service_code_examples"></a>

The following code examples show how to use Organizations with an AWS software development kit (SDK). 

*Actions* are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios.

*Scenarios* are code examples that show you how to accomplish specific tasks by calling multiple functions within a service or combined with other AWS services.

For a complete list of AWS SDK developer guides and code examples, see [Using AWS Organizations with an AWS SDK](sdk-general-information-section.md). This topic also includes information about getting started and details about previous SDK versions.

**Contents**
+ [Basics](service_code_examples_basics.md)
  + [Actions](service_code_examples_actions.md)
    + [`AttachPolicy`](example_organizations_AttachPolicy_section.md)
    + [`CreateAccount`](example_organizations_CreateAccount_section.md)
    + [`CreateOrganization`](example_organizations_CreateOrganization_section.md)
    + [`CreateOrganizationalUnit`](example_organizations_CreateOrganizationalUnit_section.md)
    + [`CreatePolicy`](example_organizations_CreatePolicy_section.md)
    + [`DeleteOrganization`](example_organizations_DeleteOrganization_section.md)
    + [`DeleteOrganizationalUnit`](example_organizations_DeleteOrganizationalUnit_section.md)
    + [`DeletePolicy`](example_organizations_DeletePolicy_section.md)
    + [`DescribePolicy`](example_organizations_DescribePolicy_section.md)
    + [`DetachPolicy`](example_organizations_DetachPolicy_section.md)
    + [`ListAccounts`](example_organizations_ListAccounts_section.md)
    + [`ListOrganizationalUnitsForParent`](example_organizations_ListOrganizationalUnitsForParent_section.md)
    + [`ListPolicies`](example_organizations_ListPolicies_section.md)
+ [Scenarios](service_code_examples_scenarios.md)
  + [Permission policy allows AWS Compute Optimizer Automation to apply recommended actions](example_iam-policies.AWSMettleDocs.latest.userguide.managed-policies.xml.10_section.md)
  + [Permission policy to enable Automation across your organization](example_iam-policies.AWSMettleDocs.latest.userguide.automation.xml.2_section.md)
  + [Permission policy to enable Automation for your account](example_iam-policies.AWSMettleDocs.latest.userguide.automation.xml.1_section.md)
  + [Permission policy to grant full access to Compute Optimizer Automation for a management account of an organization](example_iam-policies.AWSMettleDocs.latest.userguide.automation.xml.5_section.md)
  + [Permission policy to grant full access to Compute Optimizer Automation for standalone AWS accounts](example_iam-policies.AWSMettleDocs.latest.userguide.automation.xml.3_section.md)
  + [Permission policy to grant read-only access to Compute Optimizer Automation for a management account of an organization](example_iam-policies.AWSMettleDocs.latest.userguide.automation.xml.6_section.md)
  + [Permission policy to grant read-only access to Compute Optimizer Automation for standalone AWS accounts](example_iam-policies.AWSMettleDocs.latest.userguide.automation.xml.4_section.md)
  + [Permission policy to grant service-linked role permissions for Compute Optimization Automation](example_iam-policies.AWSMettleDocs.latest.userguide.slr-automation.xml.1_section.md)