create_question_set
async
¶
create_question_set(
name: ResourceName,
*,
config_overrides: Optional[AsyncElementalInferenceClientConfig] = None,
yes_no: Optional[YesNoQuestionList] = None,
yes_no_per_option: Optional[YesNoPerOptionQuestionList] = None,
choose_one: Optional[ChooseOneQuestionList] = None,
tags: Optional[TagMap] = None,
) -> CreateQuestionSetResponse
Creates a question set. Use a question set to get answers about content that's specific to your business, in addition to the built-in contextual metadata classifications. A question set contains your own questions. You ask Elemental Inference these questions about each shot or scene of the media in a contextual metadata output, and Elemental Inference answers each question with scores. To use a question set, reference it in the customQuestions property of the contextual metadata configuration of a feed output.
CreateQuestionSet creates the question set with a DRAFT version that contains the questions in the request. To change DRAFT, use UpdateQuestionSet. To publish DRAFT as a numbered version, use CreateQuestionSetVersion. You can't change a published version.
A question set can contain the following types of questions. You must specify at least one question.
-
yesNo – Elemental Inference answers yes or no.
-
yesNoPerOption – Elemental Inference answers yes or no for each option.
-
chooseOne – Elemental Inference chooses one of the options.
A version can contain up to 100 scored items, where each yesNo question, each option of a yesNoPerOption question, and each chooseOne question counts as one item. The name of each question must be unique across all three types.
Parameters:
-
yes_no(Optional[YesNoQuestionList], default:None) –An array of questions that Elemental Inference answers with yes or no. You can specify up to 50 yesNo questions. An empty array is the same as omitting this property.
-
yes_no_per_option(Optional[YesNoPerOptionQuestionList], default:None) –An array of questions that you ask about each of their options. Elemental Inference answers yes or no for each option. You can specify up to 10 yesNoPerOption questions. An empty array is the same as omitting this property.
-
choose_one(Optional[ChooseOneQuestionList], default:None) –An array of questions that Elemental Inference answers by choosing one of their options. You can specify up to 10 chooseOne questions. An empty array is the same as omitting this property.
-
name(ResourceName) –A user-friendly name for this question set.
-
tags(Optional[TagMap], default:None) –Optional tags to associate with the question set. You can also add tags later, using TagResource.
Raises:
-
AccessDeniedException–You do not have sufficient access to perform this action.
-
ConflictException–The request could not be completed due to a conflict.
-
InternalServerErrorException–An internal server error occurred. This is a temporary condition and the request can be retried. If the problem persists, contact AWS Support.
-
ServiceQuotaExceededException–The request was rejected because it would exceed one or more service quotas for your account. Review your service quotas and either delete unused resources or request a quota increase.
-
TooManyRequestException–The request was denied due to request throttling. Too many requests have been made within a given time period. Reduce the frequency of requests and use exponential backoff when retrying.
-
ValidationException–The input fails to satisfy the constraints specified by the service. Check the error message for details about which parameter or field is invalid and correct the request before retrying.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_elementalinference/_services/async_elemental_inference.py
2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 | |