get_retrieval_instruction¶
Operation¶
get_retrieval_instruction
¶
get_retrieval_instruction(request: GetRetrievalInstructionInput | GetRetrievalInstructionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetRetrievalInstructionInputDict]) -> GetRetrievalInstructionOutput
Gets a retrieval instruction. Also used to poll the terminal reporting of an asynchronous create or update.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
GetRetrievalInstructionInput | GetRetrievalInstructionInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[GetRetrievalInstructionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetRetrievalInstructionOutput
|
An instance of |
get_retrieval_instruction
async
¶
get_retrieval_instruction(request: GetRetrievalInstructionInput | GetRetrievalInstructionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[GetRetrievalInstructionInputDict]) -> GetRetrievalInstructionOutput
Gets a retrieval instruction. Also used to poll the terminal reporting of an asynchronous create or update.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
GetRetrievalInstructionInput | GetRetrievalInstructionInputDict | None
|
The input as a model or dictionary. Pass this or keyword arguments, not both. |
None
|
plugins
|
list[Plugin] | None
|
A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations. |
None
|
**kwargs
|
Unpack[GetRetrievalInstructionInputDict]
|
The input fields as keyword arguments. |
{}
|
Returns:
| Type | Description |
|---|---|
GetRetrievalInstructionOutput
|
An instance of |
Input¶
Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.
GetRetrievalInstructionInputDict
¶
Bases: TypedDict
Dictionary form of GetRetrievalInstructionInput.
Attributes¶
retrieval_instruction_id
instance-attribute
¶
The identifier of the retrieval instruction to get.
retrieval_instruction_version
instance-attribute
¶
retrieval_instruction_version: str | None
The version to return: a version number, or DRAFT for the retrieval instruction's current reviewed content. When omitted, DRAFT is used. This default is permanent: omitting retrievalInstructionVersion will never resolve to a numbered version.
GetRetrievalInstructionInput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetRetrievalInstructionInput structure.
Attributes¶
retrieval_instruction_id
class-attribute
instance-attribute
¶
retrieval_instruction_id: str | None = ...
The identifier of the retrieval instruction to get.
retrieval_instruction_version
class-attribute
instance-attribute
¶
retrieval_instruction_version: str | None = ...
The version to return: a version number, or DRAFT for the retrieval instruction's current reviewed content. When omitted, DRAFT is used. This default is permanent: omitting retrievalInstructionVersion will never resolve to a numbered version.
Output¶
GetRetrievalInstructionOutput
dataclass
¶
Bases: _SerdeShape
Dataclass for GetRetrievalInstructionOutput structure.
Attributes¶
created_at
instance-attribute
¶
created_at: datetime
When the retrieval instruction was created. On a numbered version, when that version was created.
customer_encryption_key_arn
class-attribute
instance-attribute
¶
customer_encryption_key_arn: str | None = ...
The ARN of the customer managed KMS key protecting this content, when one was supplied at create.
description
class-attribute
instance-attribute
¶
description: str | None = ...
A description of the retrieval instruction. On a numbered version, the description of that version.
instruction
class-attribute
instance-attribute
¶
instruction: RetrievalInstructionContent | None = ...
The reviewed content this instruction serves --- what AgenticRetrieveStream resolves while status is ACTIVE. Absent until the first create review passes. Always present on a numbered version.
last_transition_status
instance-attribute
¶
last_transition_status: str
The outcome or in-progress state of the most recent create or update. CREATING or UPDATING means the operation is still running. Independent of status. Always has a value from the create 202 onward. On a numbered version this is always CREATE_SUCCESSFUL: a version is created once, from reviewed content, and is immutable.
last_transition_status_reasons
class-attribute
instance-attribute
¶
last_transition_status_reasons: list[RetrievalInstructionFailureReason] | None = ...
Why the most recent create or update was rejected. One entry for each rejected field, or a single entry when the review itself failed. Each entry has a machine-readable code and a message, and names the field when it applies to one. The service includes this field only when lastTransitionStatus is CREATE_FAILED or UPDATE_FAILED. Never present on a numbered version.
latest_version
class-attribute
instance-attribute
¶
latest_version: str | None = ...
The largest version number that currently exists for this retrieval instruction, that is, the newest version you can retrieve. Present only on a DRAFT read, and only when at least one version exists. Because version numbers are never reused, deleting versions can leave gaps: this is the newest existing version, not a count and not the highest number ever created.
response_metadata
class-attribute
instance-attribute
¶
Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.
retrieval_instruction_arn
instance-attribute
¶
retrieval_instruction_arn: str
The ARN of the retrieval instruction.
retrieval_instruction_id
instance-attribute
¶
retrieval_instruction_id: str
The identifier of the retrieval instruction.
status
instance-attribute
¶
status: str
Specifies whether you can use the instruction. You can resolve only an ACTIVE instruction at retrieval time. Monotone: INACTIVE to ACTIVE once, never back. Numbered versions are always ACTIVE.