update_agent_context
async
¶
update_agent_context(
agent_context_id: AgentContextIdentifier,
*,
config_overrides: Optional[AsyncContextClientConfig] = None,
name: Optional[ResourceName] = None,
description: Optional[UserDefinedString] = None,
connection_mappings: Optional[ConnectionMappingList] = None,
trace_analysis_config: Optional[TraceAnalysisConfig] = None,
workforce_sign_in_config: Optional[WorkforceSignInConfig] = None,
entity_resolution_config: Optional[EntityResolutionConfig] = None,
trusted_identity_sources: Optional[TrustedIdentitySourceList] = None,
) -> UpdateAgentContextResponse
Updates an agent context's configuration.
Parameters:
-
agent_context_id(AgentContextIdentifier) –The agent context to update, by its ID or ARN.
-
name(Optional[ResourceName], default:None) –The new name. If you omit it, the name is unchanged.
-
description(Optional[UserDefinedString], default:None) –The new description. Absent leaves the description unchanged. An empty string removes it.
-
connection_mappings(Optional[ConnectionMappingList], default:None) –The connection mappings for this agent context, 0–20 entries. If you provide a list, it replaces the stored set: AWS Context removes entries that are not in the list, adds new entries, and overwrites retained entries with exactly the values that you provide, without merging fields. An empty list removes all connection links. If you omit this member, the existing links are unchanged.
Each newly referenced connection must exist, be owned by your account, and be
ACTIVE. Order is significant. When several connections reach the same AWS Glue Data Catalog table, AWS Context tries the connection mapped first, with its own access, and then the next. -
trace_analysis_config(Optional[TraceAnalysisConfig], default:None) –Merged into the agent context's trace analysis settings: an absent member leaves its stored value unchanged.
statusENABLED requires a role, supplied here or already on the agent context. A role supplied withoutstatusrequires the agent context'sstatusto read ENABLED. -
workforce_sign_in_config(Optional[WorkforceSignInConfig], default:None) –Merged into the agent context's workforce sign-in settings: an absent member leaves its stored value unchanged.
signInUrlreplaces the stored URL and reads ENABLED.statusDISABLED removes the stored URL.statusENABLED requires a URL, supplied here or already on the agent context. -
entity_resolution_config(Optional[EntityResolutionConfig], default:None) –Merged into the agent context's entity resolution settings: an absent member leaves its stored value unchanged.
-
trusted_identity_sources(Optional[TrustedIdentitySourceList], default:None) –Identity sources to trust in addition to your account. A present list replaces the stored list,
[]clears it so only your account is trusted, and an absent field leaves it unchanged. Order is not significant: a list with the stored entries in another order changes nothing. A change takes effect within about a minute.
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.
-
ConflictException–The request conflicts with the current state of the resource. Check the resource's current state before you retry the request.
-
ResourceNotFoundException–The specified resource was not found. Check that the ID is correct and that the resource exists in your account and Region.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Turn on trace analysis for an agent context The following example turns on trace analysis for the agent context ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53 with an IAM role in the same account, and updates its description.
>>> await client.update_agent_context(agent_context_id='ac-3f9c2e7a1b8d4c56a0e4f7b29d1c8e53', description='Sales pipeline, revenue, and forecast tables for the analytics agents.', trace_analysis_config={'status': 'ENABLED', 'traceAnalysisRole': 'arn:aws:iam::111122223333:role/ContextTraceAnalysisRole'})
Source code in docs_src/capo_context/_services/async_context.py
4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 | |