1import * as agentcore from "@distilled.cloud/aws/bedrock-agentcore";
2import * as Layer from "effect/Layer";
3import * as Output from "../../Output.ts";
4import { makeAgentCoreHttpBinding } from "./BindingHttp.ts";
5import { StopRuntimeSession } from "./StopRuntimeSession.ts";
6import type { Runtime } from "./Runtime.ts";
7
8export const StopRuntimeSessionHttp = Layer.effect(
9 StopRuntimeSession,
10 makeAgentCoreHttpBinding({
11 tag: "AWS.BedrockAgentCore.StopRuntimeSession",
12 operation: agentcore.stopRuntimeSession,
13 actions: ["bedrock-agentcore:StopRuntimeSession"],
14 requestKey: "agentRuntimeArn",
15 identifier: (runtime: Runtime) => runtime.agentRuntimeArn,
16 arns: (runtime: Runtime) => [
17 runtime.agentRuntimeArn,
18 // qualified invocations target a runtime endpoint sub-resource.
19 Output.interpolate`${runtime.agentRuntimeArn}/runtime-endpoint/*`,
20 ],
21 }),
22);