DisableHealthServiceAccessForOrganizationCommand

Disables Health from working with Organizations. To call this operation, you must sign in to the organization's management account. For more information, see Aggregating Health events  in the Health User Guide.

This operation doesn't remove the service-linked role from the management account in your organization. You must use the IAM console, API, or Command Line Interface (CLI) to remove the service-linked role. For more information, see Deleting a Service-Linked Role  in the IAM User Guide.

You can also disable the organizational feature by using the Organizations DisableAWSServiceAccess  API operation. After you call this operation, Health stops aggregating events for all other Amazon Web Services accounts in your organization. If you call the Health API operations for organizational view, Health returns an error. Health continues to aggregate health events for your Amazon Web Services account.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { HealthClient, DisableHealthServiceAccessForOrganizationCommand } from "@aws-sdk/client-health"; // ES Modules import
// const { HealthClient, DisableHealthServiceAccessForOrganizationCommand } = require("@aws-sdk/client-health"); // CommonJS import
const client = new HealthClient(config);
const input = {};
const command = new DisableHealthServiceAccessForOrganizationCommand(input);
const response = await client.send(command);
// {};

DisableHealthServiceAccessForOrganizationCommand Input

See DisableHealthServiceAccessForOrganizationCommandInput for more details
DisableHealthServiceAccessForOrganizationCommandInput 

DisableHealthServiceAccessForOrganizationCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
ConcurrentModificationException
client

EnableHealthServiceAccessForOrganization  is already in progress. Wait for the action to complete before trying again. To get the current status, use the DescribeHealthServiceStatusForOrganization  operation.

HealthServiceException
Base exception class for all service exceptions from Health service.