create_code_review
async
¶
create_code_review(
title: str,
agent_space_id: str,
assets: Assets,
*,
config_overrides: Optional[AsyncSecurityAgentClientConfig] = None,
service_role: Optional[ServiceRole] = None,
log_config: Optional[CloudWatchLog] = None,
code_remediation_strategy: Optional[CodeRemediationStrategy] = None,
validation_mode: Optional[ValidationMode] = None,
max_task_hours: Optional[float] = None,
report_destination: Optional[ReportDestination] = None,
report_filters: Optional[ReportFilters] = None,
) -> CreateCodeReviewOutput
Creates a new code review configuration in an agent space. A code review defines the parameters for automated security-focused code analysis.
Parameters:
-
title(str) –The title of the code review.
-
agent_space_id(str) –The unique identifier of the agent space to create the code review in.
-
assets(Assets) –The assets to include in the code review, such as documents and source code.
-
service_role(Optional[ServiceRole], default:None) –The IAM service role to use for the code review.
-
log_config(Optional[CloudWatchLog], default:None) –The CloudWatch Logs configuration for the code review.
-
code_remediation_strategy(Optional[CodeRemediationStrategy], default:None) –The code remediation strategy for the code review. Valid values are AUTOMATIC and DISABLED.
-
validation_mode(Optional[ValidationMode], default:None) –The validation mode for the code review. Valid values are SIMULATED and DISABLED.
-
max_task_hours(Optional[float], default:None) –The maximum number of billable task hours allowed for jobs started from this code review. Must be a positive number. If not set, jobs run to completion with no budget cap.
-
report_destination(Optional[ReportDestination], default:None) –The destination for publishing scan reports to an integrated document provider.
-
report_filters(Optional[ReportFilters], default:None) –The report-generation filters applied when the report is exported.
Raises:
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_securityagent/_services/async_security_agent.py
1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 | |