ListMemoryRules

Updated at:
Copy as MD

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

GET /workspaces/{workspaceId}/memorystores/{memoryStoreName}/memory-rules HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspaceId

string

Yes

The workspace ID.

ws-2f5f9c5a8d0e4c3b

memoryStoreName

string

Yes

The name of the memory store.

customer-memory

Request parameters

Parameter

Type

Required

Description

Example

nameLike

string

No

nameLike

Preference

enabled

boolean

No

Filters rules by enabled status.

maxResults

integer

No

The page size.

100

nextToken

string

No

The pagination token returned for the same resource and filter conditions.

eyJvZmZzZXQiOjIwMH0=

Response elements

Element

Type

Description

Example

object

requestId

string

requestId

01A00000-0000-0000-0000-000000000001

message

string

message

success

httpStatusCode

integer

httpStatusCode

200

code

string

code

SUCCESS

success

boolean

success

maxResults

integer

maxResults

100

nextToken

string

nextToken

eyJvZmZzZXQiOjIwMH0=

totalCount

integer

totalCount

20

items

array<object>

items

array<object>

ruleId

string

ruleId

rule-2f5f9c5a8d0e4c3b

memoryStoreId

string

memoryStoreId

ms-2f5f9c5a8d0e4c3b

name

string

name

Long-term preference

description

string

description

Extracts long-term preferences explicitly expressed by users

enabled

boolean

enabled

strategy

object

strategy

type

string

type

Valid values:

  • auto
  • semantic
  • skill
  • user_profile
  • session_summary

auto

instruction

string

The strategy-level instruction. This instruction takes effect together with the store-level instruction. If a conflict occurs, this field takes precedence.

Retains only long-term preferences explicitly expressed by users

createdAt

string

createdAt

2026-09-23T10:00:00Z

updatedAt

string

updatedAt

2026-09-23T10:00:00Z

Examples

Success response

JSON format

{
  "requestId": "01A00000-0000-0000-0000-000000000001",
  "message": "success",
  "httpStatusCode": 200,
  "code": "SUCCESS",
  "success": false,
  "maxResults": 100,
  "nextToken": "eyJvZmZzZXQiOjIwMH0=",
  "totalCount": 20,
  "items": [
    {
      "ruleId": "rule-2f5f9c5a8d0e4c3b",
      "memoryStoreId": "ms-2f5f9c5a8d0e4c3b",
      "name": "长期偏好",
      "description": "提取用户明确表达的长期偏好。",
      "enabled": false,
      "strategy": {
        "type": "auto",
        "instruction": "仅保留用户明确表达的长期偏好。"
      },
      "createdAt": "2026-09-23T10:00:00Z",
      "updatedAt": "2026-09-23T10:00:00Z"
    }
  ]
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidParameter The specified request parameter is invalid.
400 UnsupportedOperation The memory store does not support this operation.
500 UnknownError The request processing has failed due to some unknown error.
500 InternalError The memory rule data could not be processed.
404 Resource.NotFound The specified AgentCore workspace does not exist.
429 Throttling Request was denied due to request throttling.
409 Operation.Conflict The memory store is not in a state that permits this operation.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.