

# Enabling organizational view
<a name="enable-organizational-view"></a>

You can use the Amazon Health console to get a centralized view for health events in your Amazon organization.

Organizational view is available in the Amazon Health console for all Amazon Web Services Support plans at no additional cost.

**Note**  
If you want to allow users access to this feature in the management account, they must have permissions such as the [https://console.amazonaws.cn//iam/home?#/policies/arn:aws:iam::aws:policy/AWSHealthFullAccess](https://console.amazonaws.cn//iam/home?#/policies/arn:aws:iam::aws:policy/AWSHealthFullAccess) policy. For more information, see [Amazon Health identity-based policy examples](security_iam_id-based-policy-examples.md).

------
#### [ Enabling organizational view (Console) ]

You can enable organizational view from the Amazon Health console. You must sign in to the management account of your Amazon organization.

**To view the Amazon Health Dashboard for your organization**

1. Open your Amazon Health Dashboard at [https://health.aws.amazon.com/health/home](https://health.aws.amazon.com/health/).

1. In the navigation pane, under **Your organization health**, choose **Configurations**.

1. On the **Enable organizational view** page, choose **Enable organizational view**.

1. (Optional) If you want to make changes to your Amazon organizations, such as creating organizational units (OUs), choose **Manage Amazon Organizations**. 

   For more information, see [Getting started with Amazon Organizations](https://docs.amazonaws.cn//organizations/latest/userguide/orgs_tutorials_basic.html) in the *Amazon Organizations User Guide*.

**Notes**  
When you enable Amazon Health organizational view, the initial account loading process runs in the background and might take several minutes to complete. You can close the Amazon Health console and return later, as you don't need to wait for the process to finish. Historical health events (those created before you enabled the feature) might take up to 24 hours to appear in your organizational view.
 If you have a Amazon Business Support\$1, Amazon Enterprise Support, or Amazon Unified Operations plan, you can call the [DescribeHealthServiceStatusForOrganization](https://docs.amazonaws.cn/health/latest/APIReference/API_DescribeHealthServiceStatusForOrganization.html) API operation to check the status of the process.
When you enable this feature, the `AWSServiceRoleForHealth_Organizations` service-linked role with the `Health_OrganizationsServiceRolePolicy` Amazon managed policy is applied to the management account in the organization. For more information, see [Using service-linked roles for Amazon Health](using-service-linked-roles.md).

------
#### [ Enabling organizational view (CLI) ]

You can enable organizational view by using the [EnableHealthServiceAccessForOrganization](https://docs.amazonaws.cn/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) API operation.

You can use the Amazon Command Line Interface (Amazon CLI) or your own code to call this operation. 

**Note**  
You must have a [Business](https://www.amazonaws.cn/premiumsupport/plans/business/), [Enterprise On-Ramp](https://www.amazonaws.cn/premiumsupport/plans/enterprise-onramp), or [Enterprise](https://www.amazonaws.cn/premiumsupport/plans/enterprise) Support plan to call the Amazon Health API.
You must use the US East (N. Virginia) Region endpoint.

**Example**  
The following Amazon CLI command enables this feature from your Amazon account. You can use this command from the management account or from an account that can assume the role with the required permissions.   

```
aws health enable-health-service-access-for-organization --region us-east-1
```

The following code examples call the [EnableHealthServiceAccessForOrganization](https://docs.amazonaws.cn/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html) API operation.

**Python**

```
import boto3

client = boto3.client('health', region_name='us-east-1')

response = client.enable_health_service_access_for_organization()

print(response)
```

**Java**

You can use the Amazon SDK for version Java 2.0 for the following example.

```
import software.amazon.awssdk.services.health.HealthClient;
import software.amazon.awssdk.services.health.HealthClientBuilder;
 
import software.amazon.awssdk.services.health.model.ConcurrentModificationException;
import software.amazon.awssdk.services.health.model.EnableHealthServiceAccessForOrganizationRequest;
import software.amazon.awssdk.services.health.model.EnableHealthServiceAccessForOrganizationResponse;
import software.amazon.awssdk.services.health.model.DescribeHealthServiceStatusForOrganizationRequest;
import software.amazon.awssdk.services.health.model.DescribeHealthServiceStatusForOrganizationResponse;
 
import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider;
 
import software.amazon.awssdk.regions.Region;
 
public class EnableHealthServiceAccessDemo {
    public static void main(String[] args) {
        HealthClient client = HealthClient.builder()
            .region(Region.US_EAST_1)
            .credentialsProvider(
                DefaultCredentialsProvider.builder().build()
            )
            .build();
 
        try {
            DescribeHealthServiceStatusForOrganizationResponse statusResponse = client.describeHealthServiceStatusForOrganization(
                DescribeHealthServiceStatusForOrganizationRequest.builder().build()
            );
 
            String status = statusResponse.healthServiceAccessStatusForOrganization();
            if ("ENABLED".equals(status)) {
                System.out.println("EnableHealthServiceAccessForOrganization already enabled!");
                return;
            }
 
            client.enableHealthServiceAccessForOrganization(
                EnableHealthServiceAccessForOrganizationRequest.builder().build()
            );
 
            System.out.println("EnableHealthServiceAccessForOrganization is in progress");
        } catch (ConcurrentModificationException cme) {
            System.out.println("EnableHealthServiceAccessForOrganization is already in progress. Wait for the action to complete before trying again.");
        } catch (Exception e) {
            System.out.println("EnableHealthServiceAccessForOrganization FAILED: " + e);
        }
    }
}
```

For more information, see the [Amazon SDK for Java 2.0 Developer Guide](https://docs.amazonaws.cn/sdk-for-java/latest/developer-guide/).

When you enable this feature, the `AWSServiceRoleForHealth_Organizations` [service-linked role](https://docs.amazonaws.cn/IAM/latest/UserGuide/using-service-linked-roles.html) with the `Health_OrganizationsServiceRolePolicy` Amazon managed policy is applied to the management account in the organization.

**Note**  
Enabling this feature is an asynchronous process and takes time to complete. You can call the [DescribeHealthServiceStatusForOrganization](https://docs.amazonaws.cn/health/latest/APIReference/API_DescribeHealthServiceStatusForOrganization.html) operation to check the status of the process.

------