ElementalInference / Client / create_question_set_version
create_question_set_version¶
- ElementalInference.Client.create_question_set_version(**kwargs)¶
Publishes the DRAFT version of the specified question set as a new version. The new version has the same name and questions as DRAFT, and you can’t change it. DRAFT doesn’t change, so you can continue to update it.
Version numbers start at 1, and each new version has the next number. Elemental Inference never reuses a version number, even after you delete that version.
If DRAFT hasn’t changed since the latest published version, Elemental Inference doesn’t create a version. Instead, it returns the latest version. A change to the name of the question set counts as a change to DRAFT.
A question set can have a limited number of versions. If the question set already has the maximum number of versions, Elemental Inference returns ServiceQuotaExceededException. To free space for a new version, delete a version that you no longer need, or create a new question set.
See also: AWS API Documentation
Request Syntax
response = client.create_question_set_version( id='string', sha256='string', description='string' )
- Parameters:
id (string) –
[REQUIRED]
The ID of the question set whose DRAFT version you want to publish.
sha256 (string) –
The SHA-256 hash of the DRAFT version that you want to publish, as returned by GetQuestionSet or UpdateQuestionSet. If you specify this value, Elemental Inference publishes DRAFT only if its current hash matches. If it doesn’t match, because DRAFT changed after you retrieved it, the request fails with ConflictException.
If you don’t specify this value, Elemental Inference publishes DRAFT as it is when it receives the request.
description (string) –
A description of the new version. You can’t change the description after Elemental Inference publishes the version. If DRAFT hasn’t changed since the latest version, Elemental Inference ignores this value and returns the latest version with its existing description.
The description can be up to 256 characters. It can contain the letters A-Z and a-z, the digits 0-9, underscores, spaces, and the following characters:
- . ' , @ : ;.
- 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 name of the question set at this version.
version (string) –
The number of the version that Elemental Inference published. If DRAFT hadn’t changed since the latest version, this is the number of that existing version.
description (string) –
The description of the version. For a new version, this is the description that you specified in the request. If DRAFT hadn’t changed since the latest version, this is the description of that existing version. Elemental Inference doesn’t return this property if the version has no description.
latestVersion (string) –
The number of the highest version that you have published for this question set. It’s the same as version.
sha256 (string) –
The SHA-256 hash of the version, as 64 lowercase hexadecimal characters. It’s the same as the hash of the DRAFT version that Elemental Inference published.
references (list) –
A list of feed IDs that reference this version of the question set. For a new version, the list is empty.
(string) –
tags (dict) –
Any tags associated with the question set.
(string) –
(string) –
Exceptions