createAgentRuntimeEndpoint method
Creates an AgentCore Runtime endpoint.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter agentRuntimeId :
The unique identifier of the AgentCore Runtime to create an endpoint for.
Parameter name :
The name of the AgentCore Runtime endpoint.
Parameter agentRuntimeVersion :
The version of the AgentCore Runtime to use for the endpoint.
Parameter clientToken :
A unique, case-sensitive identifier to ensure idempotency of the request.
Parameter description :
The description of the AgentCore Runtime endpoint.
Parameter tags :
A map of tag keys and values to assign to the agent runtime endpoint. Tags
enable you to categorize your resources in different ways, for example, by
purpose, owner, or environment.
Implementation
Future<CreateAgentRuntimeEndpointResponse> createAgentRuntimeEndpoint({
required String agentRuntimeId,
required String name,
String? agentRuntimeVersion,
String? clientToken,
String? description,
Map<String, String>? tags,
}) async {
final $payload = <String, dynamic>{
'name': name,
if (agentRuntimeVersion != null)
'agentRuntimeVersion': agentRuntimeVersion,
'clientToken': clientToken ?? _s.generateIdempotencyToken(),
if (description != null) 'description': description,
if (tags != null) 'tags': tags,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/runtimes/${Uri.encodeComponent(agentRuntimeId)}/runtime-endpoints/',
exceptionFnMap: _exceptionFns,
);
return CreateAgentRuntimeEndpointResponse.fromJson(response);
}