create_agentic_persona_configuration
¶
create_agentic_persona_configuration(
name: AgenticPersonaConfigurationName,
model_ids: AgenticModelIdList,
*,
config_overrides: Optional[WorkSpacesClientConfig] = None,
client_token: Optional[IdempotencyToken] = None,
description: Optional[AgenticPersonaConfigurationDescription] = None,
agentic_connector_ids: Optional[AgenticConnectorIdList] = None,
agentic_context_ids: Optional[AgenticContextIdList] = None,
workspace_enforced_policy_id: Optional[WorkspaceEnforcedPolicyId] = None,
agent_enforced_policy_id: Optional[AgentEnforcedPolicyId] = None,
tags: Optional[TagList] = None,
) -> CreateAgenticPersonaConfigurationResult
Creates an Amazon WorkSpaces agentic persona configuration with the specified models, connectors, contexts, and enforced policies. The name must be unique among the persona configurations in your account.
If the name is in use, the operation returns ConflictException, and its ResourceId identifies the existing persona configuration. If you exceed the persona or tag limit, it returns ServiceQuotaExceededException.
Parameters:
-
client_token(Optional[IdempotencyToken], default:None) –A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If this token matches a previous request with the same parameters, the service returns the result of that request and doesn't create another persona configuration.
If you reuse the token with different parameters, the operation returns
ValidationException. If you deleted the persona configuration created with this token, the operation returnsResourceNotFoundException. -
name(AgenticPersonaConfigurationName) –The name of the persona configuration.
-
description(Optional[AgenticPersonaConfigurationDescription], default:None) –The description of the persona configuration.
-
model_ids(AgenticModelIdList) –The identifiers of the models that WorkSpaces created with this configuration can use. Specify 1–25 models. The models must be on your account's model list.
-
agentic_connector_ids(Optional[AgenticConnectorIdList], default:None) –The identifiers of the connectors to add to WorkSpaces created with this configuration. The connectors must be activated for your account.
-
agentic_context_ids(Optional[AgenticContextIdList], default:None) –The identifiers of the contexts to add to WorkSpaces created with this configuration.
-
workspace_enforced_policy_id(Optional[WorkspaceEnforcedPolicyId], default:None) –The identifier of the WorkSpace-enforced policy to apply to WorkSpaces created with this configuration.
-
agent_enforced_policy_id(Optional[AgentEnforcedPolicyId], default:None) –The identifier of the agent-enforced policy to apply to WorkSpaces created with this configuration.
-
tags(Optional[TagList], default:None) –The tags to add to the persona configuration.
Raises:
-
AccessDeniedException–The user is not authorized to access a resource.
-
ConflictException–The request conflicts with the current state of a resource, for example because a name is already in use or the resource is still in use. Resolve the conflict, and then retry your request.
-
ResourceNotFoundException–The resource could not be found.
-
ServiceQuotaExceededException–The request would exceed a service quota. Request a quota increase or reduce the number of resources in your request.
-
ThrottlingException–The request was throttled. Retry the request with exponential backoff.
-
ValidationException–Your request failed validation. Check the error message for the parameter that isn't valid.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Example – Creating a persona configuration The following example creates a persona configuration with two models, a connector, a context, and both enforced policies.
>>> client.create_agentic_persona_configuration(client_token='a1b2c3d4-5678-90ab-cdef-EXAMPLE11111', name='backend-developer', description='Persona for backend developers.', model_ids=['anthropic.claude-sonnet-5-5', 'anthropic.claude-opus-5-5'], agentic_connector_ids=['wsacn-github'], agentic_context_ids=['wsactx-a1b2c3d4'], workspace_enforced_policy_id='wsep-a1b2c3d4', agent_enforced_policy_id='wsae-a1b2c3d4', tags=[{'Key': 'team', 'Value': 'platform'}])
Source code in docs_src/capo_workspaces/_services/work_spaces.py
2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 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 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 | |