ElementalInference / Client / update_question_set
update_question_set¶
- ElementalInference.Client.update_question_set(**kwargs)¶
Updates the DRAFT version of the specified question set. UpdateQuestionSet doesn’t create a version and doesn’t change published versions. To publish the updated DRAFT as a new version, use CreateQuestionSetVersion.
UpdateQuestionSet replaces questions one type at a time. For each of yesNo, yesNoPerOption, and chooseOne: if you omit the array, DRAFT keeps its questions of that type. If you include the array, it replaces all the questions of that type in DRAFT. If you include an empty array, DRAFT no longer has questions of that type. The updated DRAFT must follow the same rules as in CreateQuestionSet, and Elemental Inference applies those rules to the questions that DRAFT keeps as well as to the questions in the request.
Feeds that reference the DRAFT version use the updated questions. To make sure that the questions for a feed don’t change, reference a published version instead.
See also: AWS API Documentation
Request Syntax
response = client.update_question_set( id='string', yesNo=[ { 'name': 'string', 'question': 'string' }, ], yesNoPerOption=[ { 'name': 'string', 'question': 'string', 'options': [ { 'name': 'string', 'text': 'string' }, ] }, ], chooseOne=[ { 'name': 'string', 'question': 'string', 'options': [ { 'name': 'string', 'text': 'string' }, ] }, ], name='string' )
- Parameters:
id (string) –
[REQUIRED]
The ID of the question set to update.
yesNo (list) –
An array of questions that Elemental Inference answers with yes or no, to replace all the yesNo questions in DRAFT. You can specify up to 50 yesNo questions. If not specified, the yesNo questions are not changed. To remove all the yesNo questions, specify an empty array.
(dict) –
A question that you ask Elemental Inference, which answers with yes or no. You specify it in the yesNo array of a question set.
name (string) – [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) – [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters:
. , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
yesNoPerOption (list) –
An array of questions that you ask about each of their options, to replace all the yesNoPerOption questions in DRAFT. You can specify up to 10 yesNoPerOption questions. If not specified, the yesNoPerOption questions are not changed. To remove all the yesNoPerOption questions, specify an empty array.
(dict) –
A question that you ask Elemental Inference separately about each of its options. Elemental Inference answers yes or no for each option. Word the question so that it fits any of the options. For example, ask Is this overlay visible? with one option for each overlay. You specify it in the yesNoPerOption array of a question set.
name (string) – [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) – [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters:
. , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).options (list) – [REQUIRED]
The options that you ask the question about. You can specify from 1 to 50 options. Each option counts as one item toward the limit of 100 scored items in a version.
(dict) –
An option in a yesNoPerOption question or a chooseOne question.
name (string) – [REQUIRED]
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) – [REQUIRED]
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
chooseOne (list) –
An array of questions that Elemental Inference answers by choosing one of their options, to replace all the chooseOne questions in DRAFT. You can specify up to 10 chooseOne questions. If not specified, the chooseOne questions are not changed. To remove all the chooseOne questions, specify an empty array.
(dict) –
A question that you ask Elemental Inference, which answers by choosing one of its options. You specify it in the chooseOne array of a question set.
name (string) – [REQUIRED]
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) – [REQUIRED]
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters:
. , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).options (list) – [REQUIRED]
The options that Elemental Inference chooses from. You can specify from 2 to 26 options. The question counts as one item toward the limit of 100 scored items in a version, regardless of how many options it has.
(dict) –
An option in a yesNoPerOption question or a chooseOne question.
name (string) – [REQUIRED]
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) – [REQUIRED]
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
name (string) – A new name for the question set. If not specified, the name is not changed.
- Return type:
dict
- Returns:
Response Syntax
{ 'yesNo': [ { 'name': 'string', 'question': 'string' }, ], 'yesNoPerOption': [ { 'name': 'string', 'question': 'string', 'options': [ { 'name': 'string', 'text': 'string' }, ] }, ], 'chooseOne': [ { 'name': 'string', 'question': 'string', 'options': [ { 'name': 'string', 'text': 'string' }, ] }, ], 'arn': 'string', 'id': 'string', 'name': 'string', 'version': 'string', 'description': 'string', 'latestVersion': 'string', 'sha256': 'string', 'references': [ 'string', ], 'tags': { 'string': 'string' } }
Response Structure
(dict) –
yesNo (list) –
The yesNo questions in this version. Elemental Inference doesn’t return this property if the version has no yesNo questions.
(dict) –
A question that you ask Elemental Inference, which answers with yes or no. You specify it in the yesNo array of a question set.
name (string) –
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) –
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters:
. , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).
yesNoPerOption (list) –
The yesNoPerOption questions in this version. Elemental Inference doesn’t return this property if the version has no yesNoPerOption questions.
(dict) –
A question that you ask Elemental Inference separately about each of its options. Elemental Inference answers yes or no for each option. Word the question so that it fits any of the options. For example, ask Is this overlay visible? with one option for each overlay. You specify it in the yesNoPerOption array of a question set.
name (string) –
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) –
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters:
. , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).options (list) –
The options that you ask the question about. You can specify from 1 to 50 options. Each option counts as one item toward the limit of 100 scored items in a version.
(dict) –
An option in a yesNoPerOption question or a chooseOne question.
name (string) –
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) –
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
chooseOne (list) –
The chooseOne questions in this version. Elemental Inference doesn’t return this property if the version has no chooseOne questions.
(dict) –
A question that you ask Elemental Inference, which answers by choosing one of its options. You specify it in the chooseOne array of a question set.
name (string) –
A name for the question. The name must be unique among all the questions in the version, across all question types. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
question (string) –
The text of the question. The text can be up to 256 bytes, encoded in UTF-8. It can contain letters in any language, combining marks, digits, spaces, and the following characters:
. , ? ! ' " ( ) - : ; / & %, plus the curly apostrophe and quotation marks (U+2019, U+201C, and U+201D).options (list) –
The options that Elemental Inference chooses from. You can specify from 2 to 26 options. The question counts as one item toward the limit of 100 scored items in a version, regardless of how many options it has.
(dict) –
An option in a yesNoPerOption question or a chooseOne question.
name (string) –
A name for the option. The name must be unique among the options of the question. The name can be up to 64 characters. It must start with a letter or an underscore, and can contain only the letters A-Z and a-z, the digits 0-9, and underscores.
text (string) –
The text of the option. The text must be unique among the options of the question, ignoring case. The text can be up to 16 bytes, encoded in UTF-8. It can contain the same characters as the text of a question.
arn (string) –
The ARN of the question set.
id (string) –
The ID of the question set.
name (string) –
The updated or original name of the question set.
version (string) –
The version that this response describes. For UpdateQuestionSet, the version is always DRAFT.
description (string) –
The description of the version. Elemental Inference doesn’t return this property for UpdateQuestionSet, because the DRAFT version has no description.
latestVersion (string) –
The number of the highest version that you have published for this question set, even if you have since deleted that version. Elemental Inference doesn’t return this property if you haven’t published a version.
sha256 (string) –
The SHA-256 hash of the DRAFT version after the update, as 64 lowercase hexadecimal characters. The hash covers the name of the question set and its questions, so it changes when you rename the question set. You can specify this value in a CreateQuestionSetVersion request, so that Elemental Inference publishes DRAFT only if it hasn’t changed since this update.
references (list) –
A list of feed IDs that reference the DRAFT version of the question set.
(string) –
tags (dict) –
Any tags associated with the question set.
(string) –
(string) –
Exceptions