list_curation_policies
¶
list_curation_policies(
*,
config_overrides: Optional[ContextClientConfig] = None,
agent_context_id: Optional[AgentContextIdentifier] = None,
status: Optional[CurationPolicyStatusFilter] = None,
max_results: Optional[MaxResults] = None,
next_token: Optional[PaginationToken] = None,
) -> ListCurationPoliciesResponse
Lists the curation policies in your account, or the ones associated with an agent context. Each item is a summary without the policy document. GetCurationPolicy returns the document. If agentContextId doesn't name an agent context in your account, the operation returns an empty page instead of an error.
Parameters:
-
agent_context_id(Optional[AgentContextIdentifier], default:None) –The agent context whose associated policies you want to list, by its ID or ARN. If you omit it, every policy in your account is listed.
-
status(Optional[CurationPolicyStatusFilter], default:None) –Return only policies with this status. If you omit it, policies in both statuses are returned.
Valid values:
-
DRAFT- Policies that have never been published. -
ACTIVE- Policies with a published version.
-
-
max_results(Optional[MaxResults], default:None) –Maximum number of results per page (upper bound, not a target). The service might return fewer. Defaults to 50. A value outside 1–100 fails with
ValidationException. -
next_token(Optional[PaginationToken], default:None) –Opaque pagination cursor from a prior response. Omit for the first page.
Raises:
-
AccessDeniedException–You don't have sufficient access to perform this operation. Verify that you have permission to perform the operation on the resource.
-
InternalServerException–The request failed because of an internal error. Retry the request.
-
ThrottlingException–The request was denied because it exceeded a request rate quota. Wait, then retry the request.
-
ValidationException–The input fails to satisfy the constraints of the operation. Correct the input before you retry the request.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
List the curation policies in your account The following example lists the curation policies in the account, one published and one still a draft.
Source code in docs_src/capo_context/_services/context.py
2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 | |