Policy Recommendations and Consolidation =======================================+
Recommendation Strategies
- class oci_policy_analysis.logic.intelligence_strategies.recommendations.OverallRecommendationStrategy(strategy_id: str = 'recommendations', display_name: str = 'Overall recommendations', category: str = 'recommendation')[source]
Bases:
objectIntelligence strategy: build overall recommendations from cleanup, consolidation, etc.
- strategy_id: str = 'recommendations'
- display_name: str = 'Overall recommendations'
- category: str = 'recommendation'
- class oci_policy_analysis.logic.intelligence_strategies.consolidation_suggestion.ConsolidationSuggestionStrategy(strategy_id: str = 'consolidation_suggestion', display_name: str = 'Consolidation suggestions', category: str = 'consolidation_suggestion')[source]
Bases:
objectIntelligence strategy: suggest policy consolidation opportunities.
- strategy_id: str = 'consolidation_suggestion'
- display_name: str = 'Consolidation suggestions'
- category: str = 'consolidation_suggestion'
- class oci_policy_analysis.logic.intelligence_strategies.risk.RiskScoreStrategy(strategy_id: str = 'risk_scores', display_name: str = 'Risk scores', category: str = 'risk')[source]
Bases:
objectIntelligence strategy: calculate potential risk scores for policy statements.
- strategy_id: str = 'risk_scores'
- display_name: str = 'Risk scores'
- category: str = 'risk'
- class oci_policy_analysis.logic.intelligence_strategies.overlap.OverlapStrategy(strategy_id: str = 'overlap', display_name: str = 'Policy overlap', category: str = 'overlap')[source]
Bases:
objectIntelligence strategy: analyze policy statement overlaps.
- strategy_id: str = 'overlap'
- display_name: str = 'Policy overlap'
- category: str = 'overlap'
- class oci_policy_analysis.logic.intelligence_strategies.base.IntelligenceStrategy(*args, **kwargs)[source]
Bases:
ProtocolProtocol for pluggable intelligence strategies.
Implement this protocol in a separate module and register with PolicyIntelligenceEngine.register_strategy() or pass strategies= into the constructor.
- strategy_id: str
Unique machine-readable id (e.g. for persistence and settings).
- display_name: str
Human-readable name shown in the UI (e.g. Settings checkboxes).
- category: str
risk, overlap, cleanup, consolidation_suggestion, recommendation.
- Type:
One of
- run(repo: PolicyAnalysisRepository, overlay: dict, params: dict | None = None) None[source]
Run this strategy and write results into overlay.
- Parameters:
repo – Policy repository with policies, compartments, regular_statements, etc.
overlay – Mutable dict to write results into (risk_scores, overlaps, cleanup_items, etc.).
params – Optional params (e.g. where_clause_reduction_pct, engine reference for indexes).
- class oci_policy_analysis.logic.intelligence_strategies.cleanup_anyuser_no_where.AnyuserNoWhereCheck(strategy_id: str = 'anyuser_no_where', display_name: str = 'Any-user without where', category: str = 'cleanup')[source]
Bases:
objectIntelligence strategy: collect any-user statements with no where clause.
- strategy_id: str = 'anyuser_no_where'
- display_name: str = 'Any-user without where'
- category: str = 'cleanup'
- class oci_policy_analysis.logic.intelligence_strategies.cleanup_invalid.InvalidStatementsCheck(strategy_id: str = 'invalid_statements', display_name: str = 'Invalid statements', category: str = 'cleanup')[source]
Bases:
objectIntelligence strategy: collect invalid policy statements for cleanup.
- strategy_id: str = 'invalid_statements'
- display_name: str = 'Invalid statements'
- category: str = 'cleanup'
- class oci_policy_analysis.logic.intelligence_strategies.cleanup_statements_too_open.StatementsTooOpenCheck(strategy_id: str = 'statements_too_open', display_name: str = 'Overly broad statements', category: str = 'cleanup')[source]
Bases:
objectIntelligence strategy: collect overly broad manage all-resources statements.
- strategy_id: str = 'statements_too_open'
- display_name: str = 'Overly broad statements'
- category: str = 'cleanup'
- class oci_policy_analysis.logic.intelligence_strategies.cleanup_unused_dynamic_groups.UnusedDynamicGroupsCheck(strategy_id: str = 'unused_dynamic_groups', display_name: str = 'Unused dynamic groups', category: str = 'cleanup')[source]
Bases:
objectIntelligence strategy: collect unused dynamic groups for cleanup.
- strategy_id: str = 'unused_dynamic_groups'
- display_name: str = 'Unused dynamic groups'
- category: str = 'cleanup'
- class oci_policy_analysis.logic.intelligence_strategies.cleanup_unused_groups.UnusedGroupsCheck(strategy_id: str = 'unused_groups', display_name: str = 'Unused groups', category: str = 'cleanup')[source]
Bases:
objectIntelligence strategy: collect groups with no users for cleanup.
- strategy_id: str = 'unused_groups'
- display_name: str = 'Unused groups'
- category: str = 'cleanup'