| 1 | import * as agentcore from "@distilled.cloud/aws/bedrock-agentcore"; |
| 2 | import * as Layer from "effect/Layer"; |
| 3 | import * as Output from "../../Output.ts"; |
| 4 | import { makeAgentCoreHttpBinding } from "./BindingHttp.ts"; |
| 5 | import { StopRuntimeSession } from "./StopRuntimeSession.ts"; |
| 6 | import type { Runtime } from "./Runtime.ts"; |
| 7 | |
| 8 | export 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 | ); |