Creates an Organizational Report, which is an asynchronously-materialized, point-in-time snapshot of recommendations across all Agent Profiles within the caller's AWS Organization. You can optionally narrow the scope with filters. The operation is idempotent on the caller-supplied clientToken. The AWS Organization the report belongs to is inferred from the caller's authorization context. Reports are retained for 90 days from creation, after which they are automatically deleted. Use DeleteAgentOrganizationalReport to delete a report earlier.
Parameters:
-
client_token
(Optional[str], default:
None
)
–
A caller-supplied idempotency token. Two create calls sharing the same token within the service's idempotency window return the same reportId.
-
label
(Optional[ReportLabel], default:
None
)
–
Optional human-readable label (1-500 characters) that helps callers distinguish reports created with the same filters. Carried through list and get responses.
-
filters
(Optional[OrganizationalReportFilters], default:
None
)
–
Optional filters narrowing the report's scope. Absent means the report covers the whole organization.
Raises:
Source code in docs_src/capo_wellarchitected/_services/async_well_architected.py
| async def create_agent_organizational_report(
self,
*,
config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
client_token: Optional[str] = None,
label: Optional["capo_wellarchitected.types.report_label.ReportLabel"] = None,
filters: Optional[
"capo_wellarchitected.types.organizational_report_filters.OrganizationalReportFilters"
] = None,
) -> "capo_wellarchitected.types.create_agent_organizational_report_response.CreateAgentOrganizationalReportResponse":
"""<p>Creates an Organizational Report, which is an asynchronously-materialized, point-in-time snapshot of recommendations across all Agent Profiles within the caller's AWS Organization. You can optionally narrow the scope with filters. The operation is idempotent on the caller-supplied clientToken. The AWS Organization the report belongs to is inferred from the caller's authorization context. Reports are retained for 90 days from creation, after which they are automatically deleted. Use DeleteAgentOrganizationalReport to delete a report earlier.</p>
Args:
client_token: <p>A caller-supplied idempotency token. Two create calls sharing the same token within the service's idempotency window return the same reportId.</p>
label: <p>Optional human-readable label (1-500 characters) that helps callers distinguish reports created with the same filters. Carried through list and get responses.</p>
filters: <p>Optional filters narrowing the report's scope. Absent means the report covers the whole organization.</p>
Raises:
capo_wellarchitected.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
capo_wellarchitected.errors.conflict_exception.ConflictException: <p>The resource has already been processed, was deleted, or is too large.</p>
capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
capo_wellarchitected.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The user has reached their resource quota.</p>
capo_wellarchitected.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
capo_wellarchitected.errors.validation_exception.ValidationException: <p>The user input is not valid.</p>
capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_wellarchitected.types.create_agent_organizational_report_request.CreateAgentOrganizationalReportRequest]",
) -> AsyncOperationResponse[
"capo_wellarchitected.types.create_agent_organizational_report_response.CreateAgentOrganizationalReportResponse"
]:
import capo_wellarchitected._operations.well_architected_api_service_lambda.create_agent_organizational_report
(
output,
http_response,
) = await capo_wellarchitected._operations.well_architected_api_service_lambda.create_agent_organizational_report.async_create_agent_organizational_report(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateAgentOrganizationalReport")
)
input_: capo_wellarchitected.types.create_agent_organizational_report_request.CreateAgentOrganizationalReportRequest = {}
if client_token is None:
client_token = str(uuid.uuid4())
input_["client_token"] = client_token
if label is not None:
input_["label"] = label
if filters is not None:
input_["filters"] = filters
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|