Skip to content

stop_runtime_session

Operation

stop_runtime_session

stop_runtime_session(request: StopRuntimeSessionInput | StopRuntimeSessionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[StopRuntimeSessionInputDict]) -> StopRuntimeSessionOutput

Stops a session that is running in an running AgentCore Runtime agent.

Parameters:

Name Type Description Default
request StopRuntimeSessionInput | StopRuntimeSessionInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[StopRuntimeSessionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
StopRuntimeSessionOutput

An instance of StopRuntimeSessionOutput.

stop_runtime_session async

stop_runtime_session(request: StopRuntimeSessionInput | StopRuntimeSessionInputDict | None = None, /, *, plugins: list[Plugin] | None = None, **kwargs: Unpack[StopRuntimeSessionInputDict]) -> StopRuntimeSessionOutput

Stops a session that is running in an running AgentCore Runtime agent.

Parameters:

Name Type Description Default
request StopRuntimeSessionInput | StopRuntimeSessionInputDict | None

The input as a model or dictionary. Pass this or keyword arguments, not both.

None
plugins list[Plugin] | None

A list of callables that modify the configuration dynamically. Changes made by these plugins only apply for the duration of the operation execution and will not affect any other operation invocations.

None
**kwargs Unpack[StopRuntimeSessionInputDict]

The input fields as keyword arguments.

{}

Returns:

Type Description
StopRuntimeSessionOutput

An instance of StopRuntimeSessionOutput.

Input

Pass the input as keyword arguments, a positional dictionary, or a positional model object. Pass plugins separately as a keyword argument.

StopRuntimeSessionInputDict

Bases: TypedDict

Dictionary form of StopRuntimeSessionInput.

Attributes

agent_runtime_arn instance-attribute
agent_runtime_arn: Required[str]

The ARN of the agent that contains the session that you want to stop.

client_token instance-attribute
client_token: str | None

Idempotent token used to identify the request. If you use the same token with multiple requests, the same response is returned. Use ClientToken to prevent the same request from being processed more than once.

This field is autopopulated if not provided.

qualifier instance-attribute
qualifier: str | None

Optional qualifier to specify an agent alias, such as prodcode> or dev. If you don't provide a value, the DEFAULT alias is used.

runtime_session_id instance-attribute
runtime_session_id: Required[str]

The ID of the session that you want to stop.

StopRuntimeSessionInput dataclass

Bases: _SerdeShape

Dataclass for StopRuntimeSessionInput structure.

Attributes

agent_runtime_arn class-attribute instance-attribute
agent_runtime_arn: str | None = ...

The ARN of the agent that contains the session that you want to stop.

client_token class-attribute instance-attribute
client_token: str | None = ...

Idempotent token used to identify the request. If you use the same token with multiple requests, the same response is returned. Use ClientToken to prevent the same request from being processed more than once.

This field is autopopulated if not provided.

qualifier class-attribute instance-attribute
qualifier: str | None = ...

Optional qualifier to specify an agent alias, such as prodcode> or dev. If you don't provide a value, the DEFAULT alias is used.

runtime_session_id class-attribute instance-attribute
runtime_session_id: str | None = ...

The ID of the session that you want to stop.

Output

StopRuntimeSessionOutput dataclass

Bases: _SerdeShape

Dataclass for StopRuntimeSessionOutput structure.

Attributes

response_metadata class-attribute instance-attribute
response_metadata: ResponseMetadata = ...

Metadata about the response that produced this output. Use this to recover the request identifiers a service's support team needs in order to investigate a call. Members of the metadata are individually optional.

runtime_session_id class-attribute instance-attribute
runtime_session_id: str | None = ...

The ID of the session that you requested to stop.

status_code class-attribute instance-attribute
status_code: int | None = ...

The status code of the request to stop the session.