scripts/enableorgscp-customlambdaresource.py [21:36]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            getRootId = org.list_roots()
            rootId = getRootId['Roots'][0]['Id']
    
            enableSCP = org.enable_policy_type(
                RootId=rootId,
                PolicyType='SERVICE_CONTROL_POLICY'
            )
            print("SCP has been enabled")

            responseData['response'] = enableSCP
            responseData['statusMessage'] = 'SCP Enabled'
            cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData)

            return {
                'body': 'Organization exists & SCP Policy Type is enabled.'
            }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



scripts/enableorgscp-customlambdaresource.py [61:76]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        getRootId = org.list_roots()
        rootId = getRootId['Roots'][0]['Id']

        enableSCP = org.enable_policy_type(
            RootId=rootId,
            PolicyType='SERVICE_CONTROL_POLICY'
        )
        print("SCP has been enabled")

        responseData['response'] = enableSCP
        responseData['statusMessage'] = 'SCP Enabled'
        cfnresponse.send(event, context, cfnresponse.SUCCESS, responseData)

        return {
            'body': 'Organization exists & SCP Policy Type is enabled.'
        }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



