import { AccessLevelList } from '../shared/access-level' ; import { PolicyStatement , Operator } from '../shared' ; param sid export class Health extends PolicyStatement { public servicePrefix = 'health' ; param sid constructor ( sid ? ) { super ( sid ) ; } /**
     * Gets a list of accounts that have been affected by the specified events in organization.
     *
     * Access Level: Read
     *
     * Dependent actions:
     * - organizations:ListAccounts
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedAccountsForOrganization.html
     */ public toDescribeAffectedAccountsForOrganization ( ) { return this . to ( 'DescribeAffectedAccountsForOrganization' ) ; } /**
     * Gets a list of entities that have been affected by the specified events.
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifEventTypeCode()
     * - .ifService()
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntities.html
     */ public toDescribeAffectedEntities ( ) { return this . to ( 'DescribeAffectedEntities' ) ; } /**
     * Gets a list of entities that have been affected by the specified events and accounts in organization.
     *
     * Access Level: Read
     *
     * Dependent actions:
     * - organizations:ListAccounts
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeAffectedEntitiesForOrganization.html
     */ public toDescribeAffectedEntitiesForOrganization ( ) { return this . to ( 'DescribeAffectedEntitiesForOrganization' ) ; } /**
     * Returns the number of entities that are affected by each of the specified events.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEntityAggregates.html
     */ public toDescribeEntityAggregates ( ) { return this . to ( 'DescribeEntityAggregates' ) ; } /**
     * Returns the number of events of each event type (issue, scheduled change, and account notification).
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventAggregates.html
     */ public toDescribeEventAggregates ( ) { return this . to ( 'DescribeEventAggregates' ) ; } /**
     * Returns detailed information about one or more specified events.
     *
     * Access Level: Read
     *
     * Possible conditions:
     * - .ifEventTypeCode()
     * - .ifService()
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetails.html
     */ public toDescribeEventDetails ( ) { return this . to ( 'DescribeEventDetails' ) ; } /**
     * Returns detailed information about one or more specified events for provided accounts in organization.
     *
     * Access Level: Read
     *
     * Dependent actions:
     * - organizations:ListAccounts
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventDetailsForOrganization.html
     */ public toDescribeEventDetailsForOrganization ( ) { return this . to ( 'DescribeEventDetailsForOrganization' ) ; } /**
     * Returns the event types that meet the specified filter criteria.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventTypes.html
     */ public toDescribeEventTypes ( ) { return this . to ( 'DescribeEventTypes' ) ; } /**
     * Returns information about events that meet the specified filter criteria.
     *
     * Access Level: Read
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEvents.html
     */ public toDescribeEvents ( ) { return this . to ( 'DescribeEvents' ) ; } /**
     * Returns information about events that meet the specified filter criteria in organization.
     *
     * Access Level: Read
     *
     * Dependent actions:
     * - organizations:ListAccounts
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeEventsForOrganization.html
     */ public toDescribeEventsForOrganization ( ) { return this . to ( 'DescribeEventsForOrganization' ) ; } /**
     * Returns the status of enabling or disabling the Organizational View feature
     *
     * Access Level: Read
     *
     * Dependent actions:
     * - organizations:ListAccounts
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DescribeHealthServiceStatusForOrganization.html
     */ public toDescribeHealthServiceStatusForOrganization ( ) { return this . to ( 'DescribeHealthServiceStatusForOrganization' ) ; } /**
     * Disables the Organizational View feature.
     *
     * Access Level: Permissions management
     *
     * Dependent actions:
     * - organizations:DisableAWSServiceAccess
     * - organizations:ListAccounts
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_DisableHealthServiceAccessForOrganization.html
     */ public toDisableHealthServiceAccessForOrganization ( ) { return this . to ( 'DisableHealthServiceAccessForOrganization' ) ; } /**
     * Enables the Organizational View feature.
     *
     * Access Level: Permissions management
     *
     * Dependent actions:
     * - iam:CreateServiceLinkedRole
     * - organizations:EnableAWSServiceAccess
     * - organizations:ListAccounts
     *
     * https://docs.aws.amazon.com/health/latest/APIReference/API_EnableHealthServiceAccessForOrganization.html
     */ public toEnableHealthServiceAccessForOrganization ( ) { return this . to ( 'EnableHealthServiceAccessForOrganization' ) ; } protected accessLevelList : AccessLevelList = { Read : [ 'DescribeAffectedAccountsForOrganization' , 'DescribeAffectedEntities' , 'DescribeAffectedEntitiesForOrganization' , 'DescribeEntityAggregates' , 'DescribeEventAggregates' , 'DescribeEventDetails' , 'DescribeEventDetailsForOrganization' , 'DescribeEventTypes' , 'DescribeEvents' , 'DescribeEventsForOrganization' , 'DescribeHealthServiceStatusForOrganization' ] , 'Permissions management' : [ 'DisableHealthServiceAccessForOrganization' , 'EnableHealthServiceAccessForOrganization' ] } ; param service param eventTypeCode param eventTypePlusId param account param region param partition public onEvent ( service , eventTypeCode , eventTypePlusId , account ? , region ? , partition ? ) { return this . on ( `arn:${ partition || 'aws' }:health:${ region || '*' }:${ account || '*' }:event/${ service }/${ eventTypeCode }/${ eventTypePlusId }` ) ; } param value param operator public ifEventTypeCode ( value , operator ? ) { return this . if ( `eventTypeCode` , value , operator || 'StringLike' ) ; } param value param operator public ifService ( value , operator ? ) { return this . if ( `service` , value , operator || 'StringLike' ) ; } }