2026/11/29 - CloudWatch Omni - 28 new 24 updated api methods
Changes Amazon CloudWatch Omni adds SLOs, agent and application evaluation experiments, and lookup tables. It also introduces a preview of Observations for anomaly monitoring, in-service feedback, and an operation to create the IAM roles required before setting up a space in an organization member account.
Deletes a run that has ended.
Also deletes the run's stored results and cases, and the live control run of a target run. Records in the experiment's results log group, in the log stream {experimentId}/{runId}, are kept, so a deleted run's ID cannot be reused: PutExperimentRunResults fails with a ConflictException (RUN_ID_DELETED). Deleting a run that does not exist or was already deleted succeeds, but the experiment must exist.
Fails with a ConflictException (RUN_ACTIVE) while the run is RUNNING or STOPPING; stop or complete it first. Also fails with RUN_REFERENCED for a live control run while its target run exists, and for the control of a RUNNING or STOPPING run. A run with many cases can need more than one call: DELETE_IN_PROGRESS means the delete is still in progress, and repeating the call continues it.
See also: AWS API Documentation
Request Syntax
client.delete_experiment_run(
experimentId='string',
runId='string'
)
string
[REQUIRED]
The ID of the experiment the run belongs to. The experiment must exist.
string
[REQUIRED]
The ID of the run to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Deletes an SLO by its identifier and stops its evaluation.
Idempotent: deleting an SLO that has already been removed succeeds without error.
An SLO that alerts reference is refused with a ConflictException (conflictType RESOURCE_IN_USE) unless force is true. The error does not name the alerts; ListAlerts with filterCriteria.sloIds lists them. With force, the alerts are not changed: the SLO's metrics stop being published, so they report their noData state (NODATA by default) until they are deleted or pointed at another SLO.
See also: AWS API Documentation
Request Syntax
client.delete_omni_slo(
spaceId='string',
sloId='string',
force=True|False
)
string
[REQUIRED]
The unique ID of the space that owns the SLO.
string
[REQUIRED]
The SLO to delete.
boolean
Delete the SLO even when alerts reference it. Those alerts go to their noData state. Defaults to false.
dict
Response Syntax
{}
Response Structure
(dict) --
Completes a run that is reported from the caller's code.
Call this after reporting the run's cases with PutExperimentRunResults. The run's status becomes COMPLETED, and the service computes its summary and, when it has a rule, its verdict. Cases that were never reported count as not run. The run record is written to the run's log stream in the experiment's results log group.
After the run ends, PutExperimentRunResults calls for it fail with a ConflictException (RUN_TERMINAL).
See also: AWS API Documentation
Request Syntax
client.complete_experiment_run(
experimentId='string',
runId='string'
)
string
[REQUIRED]
The ID of the experiment the run belongs to.
string
[REQUIRED]
The ID of the run to complete.
dict
Response Syntax
{
'run': {
'experimentId': 'string',
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'statusDetail': 'string',
'producer': {
'kind': 'SDK'|'CUSTOM',
'name': 'string',
'version': 'string',
'externalId': 'string'
},
'producerPrincipal': 'string',
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'control': {
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'runId': 'string',
'latestPassed': {
'endpointArn': 'string'
}
},
'controlRunId': 'string',
'role': 'TARGET'|'CONTROL',
'targetRunId': 'string',
'dataset': {
'source': 'AGENTCORE'|'FILE'|'OTHER',
'id': 'string',
'name': 'string',
'version': 'string',
'caseCount': 123,
'contentHash': 'string'
},
'evaluators': [
{
'evaluatorId': 'string',
'ratingScale': 'NUMERIC'|'CATEGORICAL',
'scoreDirection': 'HIGHER_IS_BETTER'|'LOWER_IS_BETTER'
},
],
'rule': {
'source': 'FILE'|'INLINE',
'name': 'string',
'caseCriteria': [
{
'evaluator': {
'evaluatorId': 'string',
'threshold': {
'minScore': 123.0,
'maxScore': 123.0,
'passLabels': [
'string',
]
}
}
},
],
'gates': [
{
'metric': {
'passRate': {},
'notScoredRate': {},
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {},
'fixedCases': {},
'regressedScores': {},
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
}
},
],
'contentHash': 'string'
},
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'batchEvaluation': {
'batchEvaluationArn': 'string',
'totalSessions': 123,
'sessionsCompleted': 123,
'sessionsInProgress': 123,
'sessionsFailed': 123,
'sessionsIgnored': 123
},
'summary': {
'casesTotal': 123,
'casesReported': 123,
'casesDone': 123,
'passed': 123,
'failed': 123,
'completed': 123,
'targetError': 123,
'timedOut': 123,
'notScored': 123,
'notRun': 123,
'passRate': 123.0,
'notScoredRate': 123.0
},
'metrics': [
{
'evaluatorId': 'string',
'average': 123.0,
'min': 123.0,
'max': 123.0,
'labelCounts': {
'string': 123
},
'scoredCount': 123,
'passedCount': 123
},
],
'caseRecordsWritten': 123,
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'checks': [
{
'metric': {
'passRate': {},
'notScoredRate': {},
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {},
'fixedCases': {},
'regressedScores': {},
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
},
'observed': 123.0,
'controlObserved': 123.0,
'delta': 123.0,
'passed': True|False,
'decisive': True|False,
'observedByEvaluator': [
{
'evaluatorId': 'string',
'count': 123
},
]
},
],
'createdAt': datetime(2015, 1, 1),
'startedAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
run (dict) --
The details of the completed run, with its summary, evaluator metrics, and its verdict when it has a rule.
experimentId (string) --
The ID of the experiment the run belongs to.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
statusDetail (string) --
Additional detail about the status: the StopExperimentRun detail, or for RUNNER_FAILED, the AgentCore error details as one string of up to 1,000 characters.
producer (dict) --
The producer that reports the run. Reported runs only.
kind (string) --
The kind of producer.
name (string) --
The name of the producer, from 1 to 128 characters.
version (string) --
The version of the producer, from 1 to 64 characters.
externalId (string) --
The ID of the job in the producing system, such as a CI run ID.
producerPrincipal (string) --
The IAM principal that started the run, without the session name.
target (dict) --
The version of the experiment's target that the run tested, as given when the run was started or created.
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) --
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
control (dict) --
What the run is compared against, as given.
target (dict) --
A version of the experiment's target to run alongside the run as a live control. Hosted runs only. Must be the same kind as the experiment's target (TARGET_MISMATCH); not supported on reported runs (CONTROL_TARGET_UNSUPPORTED).
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) --
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
runId (string) --
The ID of an earlier run of this experiment. The run must be COMPLETED, must not be a CONTROL run, and must match this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Fails with CONTROL_RUN_INVALID otherwise, naming what differs: the dataset version expected and found, or the evaluators the control is missing or has in extra.
latestPassed (dict) --
Uses the newest earlier run of this experiment with verdict PASSED that matches this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Resolved when the run starts, with the endpointArn filter when given. Fails with CONTROL_RUN_NOT_FOUND if there is none.
endpointArn (string) --
The ARN of an endpoint of the experiment's AgentCore runtime. Selects only runs whose target is this endpoint (TARGET_MISMATCH otherwise).
controlRunId (string) --
The ID of the run this run is compared with, resolved when the run starts: either the live control run or the earlier run.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
targetRunId (string) --
For a CONTROL run, the ID of the run it is the control for.
dataset (dict) --
The dataset the run tested.
source (string) --
Where the dataset comes from.
id (string) --
The ID of the dataset, from 1 to 256 characters. Required for AGENTCORE datasets. FILE and OTHER datasets require an id or a name (DATASET_ID_REQUIRED).
name (string) --
The name of the dataset, from 1 to 256 characters. FILE and OTHER datasets require an id or a name.
version (string) --
The version of the dataset. For AGENTCORE datasets, a published version number. Required for hosted runs (FIELD_REQUIRED without it), and DRAFT is rejected. Optional and informational for reported runs.
caseCount (integer) --
The number of cases the run will report. Cases that are never reported count as not run. Output only for hosted runs.
contentHash (string) --
A SHA-256 hash of the dataset's content, in the form sha256:<64 hex digits>. Output only for hosted runs.
evaluators (list) --
The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.
(dict) --
An evaluator that a run is scored with.
evaluatorId (string) --
The ID of the evaluator, unique among the run's evaluators. The run's rule and case results refer to the evaluator by this ID.
ratingScale (string) --
The kind of result the evaluator produces. Must be NUMERIC when the run's rule has an evaluatorAverage gate on this evaluator. When set, a case criterion's threshold must match it: minScore or maxScore for NUMERIC, passLabels for CATEGORICAL.
scoreDirection (string) --
Whether a higher or a lower score is better for the evaluator. The default is HIGHER_IS_BETTER. A case criterion and an evaluatorAverage gate on this evaluator must follow it: minScore and min for HIGHER_IS_BETTER, maxScore and max for LOWER_IS_BETTER. When the run is compared with a control, a score that moves the other way counts as a regression. Not valid when ratingScale is CATEGORICAL.
rule (dict) --
The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.
source (string) --
The origin of the rule. Informational only; it does not change how the rule is applied.
name (string) --
The name of the rule, from 1 to 256 characters.
caseCriteria (list) --
The conditions each case must meet to pass, up to 20. May be empty when the rule gates only on run-level metrics.
(dict) --
A condition a case must meet to pass.
evaluator (dict) --
A condition on the case's result for one of the run's evaluators.
evaluatorId (string) --
The ID of the evaluator to check. Must be one of the run's evaluators.
threshold (dict) --
The minimum score, the maximum score or the passing labels for the evaluator.
minScore (float) --
The minimum passing score, for a numeric evaluator. A finite number from -1e9 to 1e9.
maxScore (float) --
The maximum passing score, for a numeric evaluator whose scoreDirection is LOWER_IS_BETTER. A finite number from -1e9 to 1e9.
passLabels (list) --
The labels that pass, for a categorical evaluator. From 1 to 16 labels, each up to 256 characters.
(string) --
An evaluator's categorical label, derived from model output over customer prompts.
gates (list) --
The run-level checks the run must meet to pass, from 1 to 20.
(dict) --
A run-level check, made of a metric and the bound it must meet.
metric (dict) --
The metric the gate measures over the run's cases.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) --
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The bound the metric must meet for the gate to hold. Required for every metric except regressedScores, which takes no bound (RULE_BOUND_INVALID if it has one, FIELD_REQUIRED if another metric has none).
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) --
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) --
Whether minDelta is an absolute change or a change relative to the control's value.
contentHash (string) --
A SHA-256 hash of the rule's caseCriteria and gates, in the form sha256:<64 hex digits>. Output only; ignored on input. Member order and explicit default values do not affect the hash; list order does.
metadata (dict) --
Key-value facts about what the run tested, as given when the run was created.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when none was given.
traceStats (dict) --
Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
batchEvaluation (dict) --
The progress of the hosted run's batch evaluation. Hosted runs only.
batchEvaluationArn (string) --
The ARN of the AgentCore batch evaluation that runs the hosted run. Absent until AgentCore accepts the start of the hosted run.
totalSessions (integer) --
The total number of sessions in the batch evaluation.
sessionsCompleted (integer) --
The number of sessions that have completed.
sessionsInProgress (integer) --
The number of sessions in progress.
sessionsFailed (integer) --
The number of sessions that failed.
sessionsIgnored (integer) --
The number of sessions the batch evaluation ignored.
summary (dict) --
Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.
casesTotal (integer) --
The total number of cases in the run.
casesReported (integer) --
The number of cases reported so far.
casesDone (integer) --
The number of cases that have reached a final status.
passed (integer) --
The number of cases with status PASSED.
failed (integer) --
The number of cases with status FAILED.
completed (integer) --
The number of cases with status COMPLETED.
targetError (integer) --
The number of cases with status TARGET_ERROR.
timedOut (integer) --
The number of cases with status TIMED_OUT.
notScored (integer) --
The number of cases with status NOT_SCORED.
notRun (integer) --
The number of cases with status NOT_RUN, including cases that were never reported.
passRate (float) --
The share of cases that passed, from 0 to 1. Present only for runs with a rule.
notScoredRate (float) --
The share of cases with no score, from 0 to 1.
metrics (list) --
Statistics for each of the run's evaluators.
(dict) --
Statistics for one of the run's evaluators across the run's cases.
evaluatorId (string) --
The ID of the evaluator.
average (float) --
The average score across the scored cases, for a numeric evaluator.
min (float) --
The lowest score across the scored cases, for a numeric evaluator.
max (float) --
The highest score across the scored cases, for a numeric evaluator.
labelCounts (dict) --
The number of cases with each label, for a categorical evaluator.
(string) --
(integer) --
scoredCount (integer) --
The number of cases the evaluator scored.
passedCount (integer) --
The number of cases that met the rule's criterion for this evaluator. Runs with a rule only.
caseRecordsWritten (integer) --
The number of case records written, across every attempt and revision.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
checks (list) --
The result of checking each of the rule's gates.
(dict) --
The result of checking one of the rule's gates when the run ended.
metric (dict) --
The gate's metric.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) --
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The gate's bound. Absent for regressedScores, which takes none.
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) --
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) --
Whether minDelta is an absolute change or a change relative to the control's value.
observed (float) --
The metric's value for this run.
controlObserved (float) --
The control's value of the metric. Present for vsControl checks.
delta (float) --
The change from the control, in the bound's mode, signed so that positive is better. Absent when the change is not finite, such as in RATIO mode against a control value of 0.
passed (boolean) --
Whether the gate held.
decisive (boolean) --
Whether this check decided a FAILED verdict.
observedByEvaluator (list) --
The regressed scores for each evaluator: one entry for each evaluator both runs have on which the target scored at least one case worse than the control. Present only on a regressedScores check, where it's empty when nothing regressed.
(dict) --
A check's count for one evaluator.
evaluatorId (string) --
The ID of the evaluator.
count (integer) --
For regressedScores, the number of cases the target scored worse than the control on this evaluator.
createdAt (datetime) --
The time when the run was created.
startedAt (datetime) --
The time when the run started. For reported runs, the declared run.startedAt, or createdAt if none was declared. For hosted runs, the time when the batch evaluation was created.
completedAt (datetime) --
The time when the run ended.
updatedAt (datetime) --
The time when the run was last updated.
This operation is in preview release for Amazon CloudWatch Omni and is subject to change.
Sends feedback about the CloudWatch Omni observability experience. Describe what was helpful, wrong, or missing in the text member. The feedback is recorded against the calling account, which is taken from the caller's identity rather than from the request.
See also: AWS API Documentation
Request Syntax
client.submit_feedback(
text='string'
)
string
[REQUIRED]
The feedback to record, as free text — what was helpful, wrong, or missing. A request that omits it, or whose value is only whitespace, returns a ValidationException.
dict
Response Syntax
{}
Response Structure
(dict) --
SubmitFeedback returns no body: feedback is opaque to the caller once sent (there is no retrieval path), so the server-minted id is not surfaced.
Lists the SLOs in a space, with their current state, optionally filtered and sorted, with pagination.
Each item reports the measurement taken when its state last changed.
See also: AWS API Documentation
Request Syntax
client.list_omni_slos(
spaceId='string',
filterCriteria={
'namePrefix': 'string',
'names': [
'string',
],
'ids': [
'string',
],
'stateValue': [
'OK'|'WARNING'|'CRITICAL'|'NODATA',
]
},
sortBy='NAME'|'STATE',
sortOrder='ASC'|'DESC',
nextToken='string',
maxResults=123
)
string
[REQUIRED]
The unique ID of the space.
dict
Filters that narrow which SLOs are returned. All members are optional; the names, namePrefix and ids filters are mutually exclusive.
namePrefix (string) --
SLOs whose name starts with this prefix. Mutually exclusive with names and ids.
names (list) --
SLOs whose name exactly matches any entry. Mutually exclusive with namePrefix and ids.
(string) --
Display name of an SLO. Not unique within a space: two SLOs can share a name, and the sloId is what identifies an SLO.
ids (list) --
SLOs whose sloId exactly matches any entry. Mutually exclusive with names and namePrefix.
(string) --
Server-generated identifier of an SLO: 32 lowercase hexadecimal characters. It never changes, including when the SLO is renamed, and it is the resource ID in the SLO's ARN.
stateValue (list) --
SLOs currently in any of these states.
(string) --
The state of an SLO.
string
The field to sort results by. Defaults to NAME.
string
The order in which to sort results.
string
A token to retrieve the next page of results.
integer
The maximum number of SLOs to return per page. Defaults to 50.
dict
Response Syntax
{
'items': [
{
'name': 'string',
'sloId': 'string',
'spaceId': 'string',
'serviceAttributes': {
'serviceName': 'string',
'serviceNamespace': 'string',
'cloudProvider': 'string',
'cloudAccountId': 'string',
'cloudRegion': 'string',
'deploymentEnvironmentName': 'string'
},
'objective': {
'target': 123.0,
'warningBudgetConsumedRatio': 123.0,
'timeWindow': {
'rolling': {
'days': 123
},
'calendar': {
'unit': 'WEEK'|'MONTH',
'weekStartDay': 'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY',
'timeZone': 'string'
}
}
},
'state': {
'value': 'OK'|'WARNING'|'CRITICAL'|'NODATA',
'noDataReason': 'string',
'transitionedAt': datetime(2015, 1, 1),
'stateTransitionMeasurement': {
'attainment': 123.0,
'errorBudgetConsumedRatio': 123.0,
'errorBudget': {
'unit': 'EVENTS'|'PERIODS',
'total': 123.0,
'consumed': 123.0
}
}
},
'updatedAt': datetime(2015, 1, 1),
'sloArn': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The SLO summaries on this page.
(dict) --
A summary of an SLO, returned by ListOmniSlos. It omits the definition; use GetOmniSlo for it.
name (string) --
The display name of the SLO.
sloId (string) --
The stable identifier of the SLO.
spaceId (string) --
The ID of the space that owns the SLO.
serviceAttributes (dict) --
The service the SLO is about. Absent when the SLO has none.
serviceName (string) --
The name of the service, the OpenTelemetry service.name attribute.
serviceNamespace (string) --
The namespace of the service, the OpenTelemetry service.namespace attribute.
cloudProvider (string) --
The cloud provider the service runs on, the OpenTelemetry cloud.provider attribute, such as aws.
cloudAccountId (string) --
The cloud account the service runs in, the OpenTelemetry cloud.account.id attribute.
cloudRegion (string) --
The cloud region the service runs in, the OpenTelemetry cloud.region attribute, such as us-east-1.
deploymentEnvironmentName (string) --
The deployment environment of the service, the OpenTelemetry deployment.environment.name attribute, such as prod.
objective (dict) --
The target, warning ratio and time window of the SLO, so a list page can show them without a GetOmniSlo per item.
target (float) --
The target attainment as a percentage, greater than 0 and less than 100, with at most three decimal places. For example, 99.9.
warningBudgetConsumedRatio (float) --
The share of the error budget consumed at which the SLO enters the WARNING state, greater than 0 and less than 1. There is no default: when absent, the SLO is never WARNING.
timeWindow (dict) --
The window the target is measured over. Together with the target it defines the error budget.
rolling (dict) --
A window covering the most recent days, moving with every evaluation.
days (integer) --
The length of the window in days: 1, 7, 28 or 30.
calendar (dict) --
A calendar week or month. The totals restart at each boundary.
unit (string) --
The calendar unit of the window.
weekStartDay (string) --
The day a week starts on. Allowed only when the unit is WEEK. Defaults to MONDAY.
timeZone (string) --
The IANA time zone that defines the period boundaries, such as Europe/London. Defaults to UTC.
state (dict) --
The current state of the SLO. Absent when the SLO has not been evaluated yet.
value (string) --
The current state of the SLO.
noDataReason (string) --
Why the SLO cannot be measured. Set only when the state is NODATA.
transitionedAt (datetime) --
When the state last changed.
stateTransitionMeasurement (dict) --
The measurement at the time the state last changed. Not a live figure.
attainment (float) --
The percentage of good events or good periods over the window, from 0 to 100.
errorBudgetConsumedRatio (float) --
The share of the error budget consumed. Greater than 1 when the state is CRITICAL.
errorBudget (dict) --
The error budget allowed and consumed over the window so far.
unit (string) --
Whether the budget is counted in events or in periods.
total (float) --
The budget allowed in the window so far.
consumed (float) --
The budget spent in the window so far.
updatedAt (datetime) --
The timestamp when the SLO was last updated.
sloArn (string) --
The Amazon Resource Name (ARN) of the SLO.
nextToken (string) --
A token to retrieve the next page of results, or absent if there are no more results.
Updates an experiment.
Only the provided fields are changed; omitted fields are left unchanged. A request must set at least one of name, description, experimentConfig, or baselineRunId, and the target and type cannot be changed.
Fails with a ConflictException if experimentConfig is changed while a run is RUNNING or STOPPING. Changes to the name, description, or baseline run are always allowed.
See also: AWS API Documentation
Request Syntax
client.update_experiment(
experimentId='string',
name='string',
description='string',
experimentConfig={
'dataset': {
'executionRoleArn': 'string',
'resultsLogGroup': 'string',
'traceLogGroups': [
'string',
],
'collectTraceStats': True|False
}
},
baselineRunId='string'
)
string
[REQUIRED]
The ID of the experiment to update.
string
A new name for the experiment. Omit to leave unchanged.
string
A new description of the experiment. Omit to leave unchanged; an empty string clears it.
dict
A new configuration for the experiment. Omit to leave unchanged. Replaces the configuration in full, and its member must match the experiment's type: a DATASET experiment takes only experimentConfig.dataset. The configuration is validated as in CreateExperiment: a new execution role requires iam:PassRole, the role must be assumable, and the results log group must exist and use the Standard log class. Applies to runs started after the update.
dataset (dict) --
The configuration of a DATASET experiment.
executionRoleArn (string) -- [REQUIRED]
The ARN of the IAM role that the service assumes to perform hosted runs and write run records.
resultsLogGroup (string) -- [REQUIRED]
The name of a Standard-class log group in the caller's account for run results. Each run writes to its own log stream in it.
traceLogGroups (list) --
The log groups that contain the target's spans, if they are not in aws/spans. 1 to 10 log groups.
(string) --
CloudWatch Logs log group name.
collectTraceStats (boolean) --
Whether to collect statistics from the agent's spans after each run ends. When true, the service collects them for the run's cases (models, tools, calls, tokens, latency, and failures) and includes them on the run as traceStats. When absent or false, runs have no trace stats.
When true, the execution role needs telemetry query permissions, and the queries are billed to the caller's account. The service verifies the role's access when this is set: the call fails with TRACE_STATS_ACCESS_DENIED if access is denied, with TRACE_STATS_CHECK_FAILED if the check fails for another reason, and with TRACE_STATS_UNAVAILABLE where trace stats are not yet available.
string
The ID of the run to make the experiment's baseline. Omit to leave unchanged; an empty string clears it. The run must be a COMPLETED target run of this experiment. A live control's run is rejected whether or not it has ended, but a run used as another run's historical control is a target run and is accepted. Otherwise fails with a ValidationException. Deleting the baseline run clears the baseline.
dict
Response Syntax
{
'experiment': {
'experimentId': 'string',
'experimentArn': 'string',
'name': 'string',
'description': 'string',
'target': {
'name': 'string',
'serviceName': 'string',
'environment': 'string',
'definition': {
'agentCoreRuntime': {
'runtimeArn': 'string'
},
'httpsEndpoint': {
'baseUrl': 'string'
},
'custom': {}
}
},
'experimentType': 'DATASET',
'experimentConfig': {
'dataset': {
'executionRoleArn': 'string',
'resultsLogGroup': 'string',
'traceLogGroups': [
'string',
],
'collectTraceStats': True|False
}
},
'runCount': 123,
'targetRunCount': 123,
'latestRun': {
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'producerKind': 'SDK'|'CUSTOM',
'targetVersion': 'string',
'datasetSource': 'AGENTCORE'|'FILE'|'OTHER',
'datasetId': 'string',
'datasetName': 'string',
'datasetVersion': 'string',
'ruleName': 'string',
'ruleContentHash': 'string',
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'passRate': 123.0,
'controlPassRate': 123.0,
'role': 'TARGET'|'CONTROL',
'controlRunId': 'string',
'casesTotal': 123,
'passed': 123,
'createdAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1)
},
'baselineRunId': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
experiment (dict) --
The updated details of the experiment.
experimentId (string) --
The ID of the experiment.
experimentArn (string) --
The ARN of the experiment.
name (string) --
The name of the experiment.
description (string) --
The description of the experiment.
target (dict) --
What the experiment tests.
name (string) --
A display name for the target.
serviceName (string) --
The service.name of the target's spans. Copied, with environment, into every case and run record. Control characters, apostrophes and backslashes are not allowed, because this value and environment are matched against span attributes and interpolated into telemetry query filters.
environment (string) --
The environment the target runs in, for example beta or prod. Copied, with serviceName, into every case and run record.
definition (dict) --
The kind of target and its identity. Cannot be changed after the experiment is created.
agentCoreRuntime (dict) --
An AgentCore Runtime, identified by its ARN.
runtimeArn (string) --
The ARN of the AgentCore Runtime. Each run specifies one of its endpoints.
httpsEndpoint (dict) --
A service reached over HTTPS, identified by its base URL.
baseUrl (string) --
The base URL of the service. Must use https:// and cannot include userinfo, a query, or a fragment.
custom (dict) --
Any other target, such as a prompt, a model, or a script. Reported runs only.
experimentType (string) --
The type of the experiment.
experimentConfig (dict) --
The configuration for the experiment's type.
dataset (dict) --
The configuration of a DATASET experiment.
executionRoleArn (string) --
The ARN of the IAM role that the service assumes to perform hosted runs and write run records.
resultsLogGroup (string) --
The name of a Standard-class log group in the caller's account for run results. Each run writes to its own log stream in it.
traceLogGroups (list) --
The log groups that contain the target's spans, if they are not in aws/spans. 1 to 10 log groups.
(string) --
CloudWatch Logs log group name.
collectTraceStats (boolean) --
Whether to collect statistics from the agent's spans after each run ends. When true, the service collects them for the run's cases (models, tools, calls, tokens, latency, and failures) and includes them on the run as traceStats. When absent or false, runs have no trace stats.
When true, the execution role needs telemetry query permissions, and the queries are billed to the caller's account. The service verifies the role's access when this is set: the call fails with TRACE_STATS_ACCESS_DENIED if access is denied, with TRACE_STATS_CHECK_FAILED if the check fails for another reason, and with TRACE_STATS_UNAVAILABLE where trace stats are not yet available.
runCount (integer) --
The number of runs of the experiment, including live control runs.
targetRunCount (integer) --
The number of runs of the experiment, excluding live control runs, which share the number of their target run.
latestRun (dict) --
The most recently started run, including its verdict when it has a rule.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
producerKind (string) --
The kind of producer that reports the run. Reported runs only.
targetVersion (string) --
The version of the run's target.
datasetSource (string) --
The source of the run's dataset. FILE and OTHER datasets might have only a name, without an ID.
datasetId (string) --
The ID of the run's dataset.
datasetName (string) --
The name of the run's dataset.
datasetVersion (string) --
The version of the run's dataset.
ruleName (string) --
The name of the run's rule.
ruleContentHash (string) --
The contentHash of the run's rule. Runs with equal hashes have the same case criteria and gates.
metadata (dict) --
Key-value facts about what the run tested.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run.
traceStats (dict) --
The trace stats of the run. Absent on an experiment's latestRun.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
passRate (float) --
The share of the run's cases that passed, from 0 to 1. Runs with a rule only.
controlPassRate (float) --
The control's pass rate under this run's caseCriteria, set when the run ends.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
controlRunId (string) --
The ID of the run this run is compared with.
casesTotal (integer) --
The total number of cases in the run.
passed (integer) --
The number of cases that passed.
createdAt (datetime) --
The time when the run was created.
completedAt (datetime) --
The time when the run ended.
baselineRunId (string) --
The ID of the run chosen as the experiment's baseline with UpdateExperiment. Always a COMPLETED target run, never a live control run. Absent when no baseline is set; deleting that run clears it.
createdAt (datetime) --
The time when the experiment was created.
updatedAt (datetime) --
The time when the experiment was last updated.
Retrieves a single service level objective (SLO) by its identifier, including its definition and its current state.
The state reports the measurement taken when the state last changed, not a live figure. Use ListOmniSlos to enumerate the SLOs in a space.
See also: AWS API Documentation
Request Syntax
client.get_omni_slo(
spaceId='string',
sloId='string'
)
string
[REQUIRED]
The unique ID of the space that owns the SLO.
string
[REQUIRED]
The identifier of the SLO to retrieve.
dict
Response Syntax
{
'slo': {
'name': 'string',
'sloId': 'string',
'description': 'string',
'accountId': 'string',
'spaceId': 'string',
'serviceAttributes': {
'serviceName': 'string',
'serviceNamespace': 'string',
'cloudProvider': 'string',
'cloudAccountId': 'string',
'cloudRegion': 'string',
'deploymentEnvironmentName': 'string'
},
'sli': {
'events': {
'bad': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'good': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'total': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
}
},
'periods': {
'periodMinutes': 123,
'query': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'good': {
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'threshold': 123.0
},
'bad': {
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'threshold': 123.0
}
}
},
'objective': {
'target': 123.0,
'warningBudgetConsumedRatio': 123.0,
'timeWindow': {
'rolling': {
'days': 123
},
'calendar': {
'unit': 'WEEK'|'MONTH',
'weekStartDay': 'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY',
'timeZone': 'string'
}
}
},
'revision': 123,
'state': {
'value': 'OK'|'WARNING'|'CRITICAL'|'NODATA',
'noDataReason': 'string',
'transitionedAt': datetime(2015, 1, 1),
'stateTransitionMeasurement': {
'attainment': 123.0,
'errorBudgetConsumedRatio': 123.0,
'errorBudget': {
'unit': 'EVENTS'|'PERIODS',
'total': 123.0,
'consumed': 123.0
}
}
},
'updatedAt': datetime(2015, 1, 1),
'sloArn': 'string'
}
}
Response Structure
(dict) --
slo (dict) --
The full SLO entity, including its current state.
name (string) --
The display name of the SLO.
sloId (string) --
The stable identifier of the SLO, used to address it in every operation.
description (string) --
An optional description of the SLO.
accountId (string) --
The AWS account ID that owns the SLO.
spaceId (string) --
The ID of the space that owns the SLO.
serviceAttributes (dict) --
The service the SLO is about. Absent when the SLO has none. Descriptive only: never used for authorization.
serviceName (string) --
The name of the service, the OpenTelemetry service.name attribute.
serviceNamespace (string) --
The namespace of the service, the OpenTelemetry service.namespace attribute.
cloudProvider (string) --
The cloud provider the service runs on, the OpenTelemetry cloud.provider attribute, such as aws.
cloudAccountId (string) --
The cloud account the service runs in, the OpenTelemetry cloud.account.id attribute.
cloudRegion (string) --
The cloud region the service runs in, the OpenTelemetry cloud.region attribute, such as us-east-1.
deploymentEnvironmentName (string) --
The deployment environment of the service, the OpenTelemetry deployment.environment.name attribute, such as prod.
sli (dict) --
What the SLO measures.
events (dict) --
Request-based: the share of events that were good, out of all events.
bad (dict) --
Query counting bad events over the given range.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
good (dict) --
Query counting good events over the given range.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
total (dict) --
Query counting all events over the given range.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
periods (dict) --
Time-slice: the share of periods that were good.
periodMinutes (integer) --
The length of each period in minutes, aligned to the clock: 1 or 5. Defaults to 1. The error budget is counted in periods.
query (dict) --
Query for the per-period value, such as a p99 latency or a success ratio, evaluated once per period over that period's data only.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
good (dict) --
A period is good when its value meets this condition.
comparator (string) --
The comparison applied to the period's value.
threshold (float) --
The value the period's result is compared against.
bad (dict) --
A period is bad when its value meets this condition.
comparator (string) --
The comparison applied to the period's value.
threshold (float) --
The value the period's result is compared against.
objective (dict) --
The reliability target, the warning threshold and the window the target is measured over.
target (float) --
The target attainment as a percentage, greater than 0 and less than 100, with at most three decimal places. For example, 99.9.
warningBudgetConsumedRatio (float) --
The share of the error budget consumed at which the SLO enters the WARNING state, greater than 0 and less than 1. There is no default: when absent, the SLO is never WARNING.
timeWindow (dict) --
The window the target is measured over. Together with the target it defines the error budget.
rolling (dict) --
A window covering the most recent days, moving with every evaluation.
days (integer) --
The length of the window in days: 1, 7, 28 or 30.
calendar (dict) --
A calendar week or month. The totals restart at each boundary.
unit (string) --
The calendar unit of the window.
weekStartDay (string) --
The day a week starts on. Allowed only when the unit is WEEK. Defaults to MONDAY.
timeZone (string) --
The IANA time zone that defines the period boundaries, such as Europe/London. Defaults to UTC.
revision (integer) --
Increments when the SLI changes, including its period length. Marks the point at which the window totals restarted.
state (dict) --
The current state of the SLO. Read-only and system-managed. Absent when the SLO has not been evaluated yet.
value (string) --
The current state of the SLO.
noDataReason (string) --
Why the SLO cannot be measured. Set only when the state is NODATA.
transitionedAt (datetime) --
When the state last changed.
stateTransitionMeasurement (dict) --
The measurement at the time the state last changed. Not a live figure.
attainment (float) --
The percentage of good events or good periods over the window, from 0 to 100.
errorBudgetConsumedRatio (float) --
The share of the error budget consumed. Greater than 1 when the state is CRITICAL.
errorBudget (dict) --
The error budget allowed and consumed over the window so far.
unit (string) --
Whether the budget is counted in events or in periods.
total (float) --
The budget allowed in the window so far.
consumed (float) --
The budget spent in the window so far.
updatedAt (datetime) --
The timestamp when the SLO was last updated.
sloArn (string) --
The Amazon Resource Name (ARN) of the SLO.
Retrieves the details of an experiment by ID.
The response includes the experiment's target, type, configuration, run count, latest run, and baseline run. To read the experiment's tags, call ListTagsForResource with its ARN. Use ListExperiments to enumerate experiments.
See also: AWS API Documentation
Request Syntax
client.get_experiment(
experimentId='string'
)
string
[REQUIRED]
The ID of the experiment.
dict
Response Syntax
{
'experiment': {
'experimentId': 'string',
'experimentArn': 'string',
'name': 'string',
'description': 'string',
'target': {
'name': 'string',
'serviceName': 'string',
'environment': 'string',
'definition': {
'agentCoreRuntime': {
'runtimeArn': 'string'
},
'httpsEndpoint': {
'baseUrl': 'string'
},
'custom': {}
}
},
'experimentType': 'DATASET',
'experimentConfig': {
'dataset': {
'executionRoleArn': 'string',
'resultsLogGroup': 'string',
'traceLogGroups': [
'string',
],
'collectTraceStats': True|False
}
},
'runCount': 123,
'targetRunCount': 123,
'latestRun': {
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'producerKind': 'SDK'|'CUSTOM',
'targetVersion': 'string',
'datasetSource': 'AGENTCORE'|'FILE'|'OTHER',
'datasetId': 'string',
'datasetName': 'string',
'datasetVersion': 'string',
'ruleName': 'string',
'ruleContentHash': 'string',
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'passRate': 123.0,
'controlPassRate': 123.0,
'role': 'TARGET'|'CONTROL',
'controlRunId': 'string',
'casesTotal': 123,
'passed': 123,
'createdAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1)
},
'baselineRunId': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
experiment (dict) --
The details of the experiment, including its run count and latest run.
experimentId (string) --
The ID of the experiment.
experimentArn (string) --
The ARN of the experiment.
name (string) --
The name of the experiment.
description (string) --
The description of the experiment.
target (dict) --
What the experiment tests.
name (string) --
A display name for the target.
serviceName (string) --
The service.name of the target's spans. Copied, with environment, into every case and run record. Control characters, apostrophes and backslashes are not allowed, because this value and environment are matched against span attributes and interpolated into telemetry query filters.
environment (string) --
The environment the target runs in, for example beta or prod. Copied, with serviceName, into every case and run record.
definition (dict) --
The kind of target and its identity. Cannot be changed after the experiment is created.
agentCoreRuntime (dict) --
An AgentCore Runtime, identified by its ARN.
runtimeArn (string) --
The ARN of the AgentCore Runtime. Each run specifies one of its endpoints.
httpsEndpoint (dict) --
A service reached over HTTPS, identified by its base URL.
baseUrl (string) --
The base URL of the service. Must use https:// and cannot include userinfo, a query, or a fragment.
custom (dict) --
Any other target, such as a prompt, a model, or a script. Reported runs only.
experimentType (string) --
The type of the experiment.
experimentConfig (dict) --
The configuration for the experiment's type.
dataset (dict) --
The configuration of a DATASET experiment.
executionRoleArn (string) --
The ARN of the IAM role that the service assumes to perform hosted runs and write run records.
resultsLogGroup (string) --
The name of a Standard-class log group in the caller's account for run results. Each run writes to its own log stream in it.
traceLogGroups (list) --
The log groups that contain the target's spans, if they are not in aws/spans. 1 to 10 log groups.
(string) --
CloudWatch Logs log group name.
collectTraceStats (boolean) --
Whether to collect statistics from the agent's spans after each run ends. When true, the service collects them for the run's cases (models, tools, calls, tokens, latency, and failures) and includes them on the run as traceStats. When absent or false, runs have no trace stats.
When true, the execution role needs telemetry query permissions, and the queries are billed to the caller's account. The service verifies the role's access when this is set: the call fails with TRACE_STATS_ACCESS_DENIED if access is denied, with TRACE_STATS_CHECK_FAILED if the check fails for another reason, and with TRACE_STATS_UNAVAILABLE where trace stats are not yet available.
runCount (integer) --
The number of runs of the experiment, including live control runs.
targetRunCount (integer) --
The number of runs of the experiment, excluding live control runs, which share the number of their target run.
latestRun (dict) --
The most recently started run, including its verdict when it has a rule.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
producerKind (string) --
The kind of producer that reports the run. Reported runs only.
targetVersion (string) --
The version of the run's target.
datasetSource (string) --
The source of the run's dataset. FILE and OTHER datasets might have only a name, without an ID.
datasetId (string) --
The ID of the run's dataset.
datasetName (string) --
The name of the run's dataset.
datasetVersion (string) --
The version of the run's dataset.
ruleName (string) --
The name of the run's rule.
ruleContentHash (string) --
The contentHash of the run's rule. Runs with equal hashes have the same case criteria and gates.
metadata (dict) --
Key-value facts about what the run tested.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run.
traceStats (dict) --
The trace stats of the run. Absent on an experiment's latestRun.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
passRate (float) --
The share of the run's cases that passed, from 0 to 1. Runs with a rule only.
controlPassRate (float) --
The control's pass rate under this run's caseCriteria, set when the run ends.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
controlRunId (string) --
The ID of the run this run is compared with.
casesTotal (integer) --
The total number of cases in the run.
passed (integer) --
The number of cases that passed.
createdAt (datetime) --
The time when the run was created.
completedAt (datetime) --
The time when the run ended.
baselineRunId (string) --
The ID of the run chosen as the experiment's baseline with UpdateExperiment. Always a COMPLETED target run, never a live control run. Absent when no baseline is set; deleting that run clears it.
createdAt (datetime) --
The time when the experiment was created.
updatedAt (datetime) --
The time when the experiment was last updated.
Lists the runs of an experiment.
Returns a summary for each run, newest first. Use GetExperimentRun to retrieve a single run's full details.
See also: AWS API Documentation
Request Syntax
client.list_experiment_runs(
experimentId='string',
maxResults=123,
nextToken='string'
)
string
[REQUIRED]
The ID of the experiment to list runs for.
integer
The maximum number of runs to return in one page, from 1 to 100. Defaults to 50.
string
A token to retrieve the next page of results.
dict
Response Syntax
{
'items': [
{
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'producerKind': 'SDK'|'CUSTOM',
'targetVersion': 'string',
'datasetSource': 'AGENTCORE'|'FILE'|'OTHER',
'datasetId': 'string',
'datasetName': 'string',
'datasetVersion': 'string',
'ruleName': 'string',
'ruleContentHash': 'string',
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'passRate': 123.0,
'controlPassRate': 123.0,
'role': 'TARGET'|'CONTROL',
'controlRunId': 'string',
'casesTotal': 123,
'passed': 123,
'createdAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The summaries of the experiment's runs on this page, newest first.
(dict) --
Summary of a run, as returned by ListExperimentRuns. Call GetExperimentRun for the full run.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
producerKind (string) --
The kind of producer that reports the run. Reported runs only.
targetVersion (string) --
The version of the run's target.
datasetSource (string) --
The source of the run's dataset. FILE and OTHER datasets might have only a name, without an ID.
datasetId (string) --
The ID of the run's dataset.
datasetName (string) --
The name of the run's dataset.
datasetVersion (string) --
The version of the run's dataset.
ruleName (string) --
The name of the run's rule.
ruleContentHash (string) --
The contentHash of the run's rule. Runs with equal hashes have the same case criteria and gates.
metadata (dict) --
Key-value facts about what the run tested.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run.
traceStats (dict) --
The trace stats of the run. Absent on an experiment's latestRun.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
passRate (float) --
The share of the run's cases that passed, from 0 to 1. Runs with a rule only.
controlPassRate (float) --
The control's pass rate under this run's caseCriteria, set when the run ends.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
controlRunId (string) --
The ID of the run this run is compared with.
casesTotal (integer) --
The total number of cases in the run.
passed (integer) --
The number of cases that passed.
createdAt (datetime) --
The time when the run was created.
completedAt (datetime) --
The time when the run ended.
nextToken (string) --
A token to retrieve the next page of results, or null if there are no more results.
Stops a run.
Applies to runs reported from the caller's code and to hosted runs. The run ends as DID_NOT_FINISH with statusReason STOPPED; a hosted run is STOPPING until its batch evaluation has stopped. Stopping a run that is STOPPING or has ended returns its current state.
Fails with a ConflictException (RUN_TERMINAL) while a CompleteExperimentRun call is finishing the run; retry CompleteExperimentRun instead.
See also: AWS API Documentation
Request Syntax
client.stop_experiment_run(
experimentId='string',
runId='string',
detail='string'
)
string
[REQUIRED]
The ID of the experiment the run belongs to.
string
[REQUIRED]
The ID of the run to stop.
string
An optional reason for stopping the run, stored as the run's statusDetail. For example, "agent unreachable after 5 consecutive errors".
dict
Response Syntax
{
'run': {
'experimentId': 'string',
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'statusDetail': 'string',
'producer': {
'kind': 'SDK'|'CUSTOM',
'name': 'string',
'version': 'string',
'externalId': 'string'
},
'producerPrincipal': 'string',
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'control': {
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'runId': 'string',
'latestPassed': {
'endpointArn': 'string'
}
},
'controlRunId': 'string',
'role': 'TARGET'|'CONTROL',
'targetRunId': 'string',
'dataset': {
'source': 'AGENTCORE'|'FILE'|'OTHER',
'id': 'string',
'name': 'string',
'version': 'string',
'caseCount': 123,
'contentHash': 'string'
},
'evaluators': [
{
'evaluatorId': 'string',
'ratingScale': 'NUMERIC'|'CATEGORICAL',
'scoreDirection': 'HIGHER_IS_BETTER'|'LOWER_IS_BETTER'
},
],
'rule': {
'source': 'FILE'|'INLINE',
'name': 'string',
'caseCriteria': [
{
'evaluator': {
'evaluatorId': 'string',
'threshold': {
'minScore': 123.0,
'maxScore': 123.0,
'passLabels': [
'string',
]
}
}
},
],
'gates': [
{
'metric': {
'passRate': {},
'notScoredRate': {},
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {},
'fixedCases': {},
'regressedScores': {},
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
}
},
],
'contentHash': 'string'
},
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'batchEvaluation': {
'batchEvaluationArn': 'string',
'totalSessions': 123,
'sessionsCompleted': 123,
'sessionsInProgress': 123,
'sessionsFailed': 123,
'sessionsIgnored': 123
},
'summary': {
'casesTotal': 123,
'casesReported': 123,
'casesDone': 123,
'passed': 123,
'failed': 123,
'completed': 123,
'targetError': 123,
'timedOut': 123,
'notScored': 123,
'notRun': 123,
'passRate': 123.0,
'notScoredRate': 123.0
},
'metrics': [
{
'evaluatorId': 'string',
'average': 123.0,
'min': 123.0,
'max': 123.0,
'labelCounts': {
'string': 123
},
'scoredCount': 123,
'passedCount': 123
},
],
'caseRecordsWritten': 123,
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'checks': [
{
'metric': {
'passRate': {},
'notScoredRate': {},
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {},
'fixedCases': {},
'regressedScores': {},
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
},
'observed': 123.0,
'controlObserved': 123.0,
'delta': 123.0,
'passed': True|False,
'decisive': True|False,
'observedByEvaluator': [
{
'evaluatorId': 'string',
'count': 123
},
]
},
],
'createdAt': datetime(2015, 1, 1),
'startedAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
run (dict) --
The details of the run after the stop request.
experimentId (string) --
The ID of the experiment the run belongs to.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
statusDetail (string) --
Additional detail about the status: the StopExperimentRun detail, or for RUNNER_FAILED, the AgentCore error details as one string of up to 1,000 characters.
producer (dict) --
The producer that reports the run. Reported runs only.
kind (string) --
The kind of producer.
name (string) --
The name of the producer, from 1 to 128 characters.
version (string) --
The version of the producer, from 1 to 64 characters.
externalId (string) --
The ID of the job in the producing system, such as a CI run ID.
producerPrincipal (string) --
The IAM principal that started the run, without the session name.
target (dict) --
The version of the experiment's target that the run tested, as given when the run was started or created.
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) --
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
control (dict) --
What the run is compared against, as given.
target (dict) --
A version of the experiment's target to run alongside the run as a live control. Hosted runs only. Must be the same kind as the experiment's target (TARGET_MISMATCH); not supported on reported runs (CONTROL_TARGET_UNSUPPORTED).
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) --
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
runId (string) --
The ID of an earlier run of this experiment. The run must be COMPLETED, must not be a CONTROL run, and must match this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Fails with CONTROL_RUN_INVALID otherwise, naming what differs: the dataset version expected and found, or the evaluators the control is missing or has in extra.
latestPassed (dict) --
Uses the newest earlier run of this experiment with verdict PASSED that matches this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Resolved when the run starts, with the endpointArn filter when given. Fails with CONTROL_RUN_NOT_FOUND if there is none.
endpointArn (string) --
The ARN of an endpoint of the experiment's AgentCore runtime. Selects only runs whose target is this endpoint (TARGET_MISMATCH otherwise).
controlRunId (string) --
The ID of the run this run is compared with, resolved when the run starts: either the live control run or the earlier run.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
targetRunId (string) --
For a CONTROL run, the ID of the run it is the control for.
dataset (dict) --
The dataset the run tested.
source (string) --
Where the dataset comes from.
id (string) --
The ID of the dataset, from 1 to 256 characters. Required for AGENTCORE datasets. FILE and OTHER datasets require an id or a name (DATASET_ID_REQUIRED).
name (string) --
The name of the dataset, from 1 to 256 characters. FILE and OTHER datasets require an id or a name.
version (string) --
The version of the dataset. For AGENTCORE datasets, a published version number. Required for hosted runs (FIELD_REQUIRED without it), and DRAFT is rejected. Optional and informational for reported runs.
caseCount (integer) --
The number of cases the run will report. Cases that are never reported count as not run. Output only for hosted runs.
contentHash (string) --
A SHA-256 hash of the dataset's content, in the form sha256:<64 hex digits>. Output only for hosted runs.
evaluators (list) --
The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.
(dict) --
An evaluator that a run is scored with.
evaluatorId (string) --
The ID of the evaluator, unique among the run's evaluators. The run's rule and case results refer to the evaluator by this ID.
ratingScale (string) --
The kind of result the evaluator produces. Must be NUMERIC when the run's rule has an evaluatorAverage gate on this evaluator. When set, a case criterion's threshold must match it: minScore or maxScore for NUMERIC, passLabels for CATEGORICAL.
scoreDirection (string) --
Whether a higher or a lower score is better for the evaluator. The default is HIGHER_IS_BETTER. A case criterion and an evaluatorAverage gate on this evaluator must follow it: minScore and min for HIGHER_IS_BETTER, maxScore and max for LOWER_IS_BETTER. When the run is compared with a control, a score that moves the other way counts as a regression. Not valid when ratingScale is CATEGORICAL.
rule (dict) --
The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.
source (string) --
The origin of the rule. Informational only; it does not change how the rule is applied.
name (string) --
The name of the rule, from 1 to 256 characters.
caseCriteria (list) --
The conditions each case must meet to pass, up to 20. May be empty when the rule gates only on run-level metrics.
(dict) --
A condition a case must meet to pass.
evaluator (dict) --
A condition on the case's result for one of the run's evaluators.
evaluatorId (string) --
The ID of the evaluator to check. Must be one of the run's evaluators.
threshold (dict) --
The minimum score, the maximum score or the passing labels for the evaluator.
minScore (float) --
The minimum passing score, for a numeric evaluator. A finite number from -1e9 to 1e9.
maxScore (float) --
The maximum passing score, for a numeric evaluator whose scoreDirection is LOWER_IS_BETTER. A finite number from -1e9 to 1e9.
passLabels (list) --
The labels that pass, for a categorical evaluator. From 1 to 16 labels, each up to 256 characters.
(string) --
An evaluator's categorical label, derived from model output over customer prompts.
gates (list) --
The run-level checks the run must meet to pass, from 1 to 20.
(dict) --
A run-level check, made of a metric and the bound it must meet.
metric (dict) --
The metric the gate measures over the run's cases.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) --
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The bound the metric must meet for the gate to hold. Required for every metric except regressedScores, which takes no bound (RULE_BOUND_INVALID if it has one, FIELD_REQUIRED if another metric has none).
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) --
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) --
Whether minDelta is an absolute change or a change relative to the control's value.
contentHash (string) --
A SHA-256 hash of the rule's caseCriteria and gates, in the form sha256:<64 hex digits>. Output only; ignored on input. Member order and explicit default values do not affect the hash; list order does.
metadata (dict) --
Key-value facts about what the run tested, as given when the run was created.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when none was given.
traceStats (dict) --
Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
batchEvaluation (dict) --
The progress of the hosted run's batch evaluation. Hosted runs only.
batchEvaluationArn (string) --
The ARN of the AgentCore batch evaluation that runs the hosted run. Absent until AgentCore accepts the start of the hosted run.
totalSessions (integer) --
The total number of sessions in the batch evaluation.
sessionsCompleted (integer) --
The number of sessions that have completed.
sessionsInProgress (integer) --
The number of sessions in progress.
sessionsFailed (integer) --
The number of sessions that failed.
sessionsIgnored (integer) --
The number of sessions the batch evaluation ignored.
summary (dict) --
Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.
casesTotal (integer) --
The total number of cases in the run.
casesReported (integer) --
The number of cases reported so far.
casesDone (integer) --
The number of cases that have reached a final status.
passed (integer) --
The number of cases with status PASSED.
failed (integer) --
The number of cases with status FAILED.
completed (integer) --
The number of cases with status COMPLETED.
targetError (integer) --
The number of cases with status TARGET_ERROR.
timedOut (integer) --
The number of cases with status TIMED_OUT.
notScored (integer) --
The number of cases with status NOT_SCORED.
notRun (integer) --
The number of cases with status NOT_RUN, including cases that were never reported.
passRate (float) --
The share of cases that passed, from 0 to 1. Present only for runs with a rule.
notScoredRate (float) --
The share of cases with no score, from 0 to 1.
metrics (list) --
Statistics for each of the run's evaluators.
(dict) --
Statistics for one of the run's evaluators across the run's cases.
evaluatorId (string) --
The ID of the evaluator.
average (float) --
The average score across the scored cases, for a numeric evaluator.
min (float) --
The lowest score across the scored cases, for a numeric evaluator.
max (float) --
The highest score across the scored cases, for a numeric evaluator.
labelCounts (dict) --
The number of cases with each label, for a categorical evaluator.
(string) --
(integer) --
scoredCount (integer) --
The number of cases the evaluator scored.
passedCount (integer) --
The number of cases that met the rule's criterion for this evaluator. Runs with a rule only.
caseRecordsWritten (integer) --
The number of case records written, across every attempt and revision.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
checks (list) --
The result of checking each of the rule's gates.
(dict) --
The result of checking one of the rule's gates when the run ended.
metric (dict) --
The gate's metric.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) --
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The gate's bound. Absent for regressedScores, which takes none.
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) --
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) --
Whether minDelta is an absolute change or a change relative to the control's value.
observed (float) --
The metric's value for this run.
controlObserved (float) --
The control's value of the metric. Present for vsControl checks.
delta (float) --
The change from the control, in the bound's mode, signed so that positive is better. Absent when the change is not finite, such as in RATIO mode against a control value of 0.
passed (boolean) --
Whether the gate held.
decisive (boolean) --
Whether this check decided a FAILED verdict.
observedByEvaluator (list) --
The regressed scores for each evaluator: one entry for each evaluator both runs have on which the target scored at least one case worse than the control. Present only on a regressedScores check, where it's empty when nothing regressed.
(dict) --
A check's count for one evaluator.
evaluatorId (string) --
The ID of the evaluator.
count (integer) --
For regressedScores, the number of cases the target scored worse than the control on this evaluator.
createdAt (datetime) --
The time when the run was created.
startedAt (datetime) --
The time when the run started. For reported runs, the declared run.startedAt, or createdAt if none was declared. For hosted runs, the time when the batch evaluation was created.
completedAt (datetime) --
The time when the run ended.
updatedAt (datetime) --
The time when the run was last updated.
Updates an existing SLO.
Omitted members are left unchanged, and a member that is present replaces that block whole, so read the SLO, change it, and write it back. Changing the SLI starts a new revision, which restarts the window totals.
See also: AWS API Documentation
Request Syntax
client.update_omni_slo(
spaceId='string',
sloId='string',
name='string',
description='string',
serviceAttributes={
'serviceName': 'string',
'serviceNamespace': 'string',
'cloudProvider': 'string',
'cloudAccountId': 'string',
'cloudRegion': 'string',
'deploymentEnvironmentName': 'string'
},
sli={
'events': {
'bad': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'good': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'total': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
}
},
'periods': {
'periodMinutes': 123,
'query': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'good': {
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'threshold': 123.0
},
'bad': {
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'threshold': 123.0
}
}
},
objective={
'target': 123.0,
'warningBudgetConsumedRatio': 123.0,
'timeWindow': {
'rolling': {
'days': 123
},
'calendar': {
'unit': 'WEEK'|'MONTH',
'weekStartDay': 'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY',
'timeZone': 'string'
}
}
}
)
string
[REQUIRED]
The unique ID of the space that owns the SLO.
string
[REQUIRED]
The SLO to update.
string
A new display name. Renaming never changes the sloId or the ARN.
string
A new description.
dict
Replaces the whole service attributes block, so resend every member to keep. Omit it to leave the stored attributes unchanged.
serviceName (string) -- [REQUIRED]
The name of the service, the OpenTelemetry service.name attribute.
serviceNamespace (string) --
The namespace of the service, the OpenTelemetry service.namespace attribute.
cloudProvider (string) --
The cloud provider the service runs on, the OpenTelemetry cloud.provider attribute, such as aws.
cloudAccountId (string) --
The cloud account the service runs in, the OpenTelemetry cloud.account.id attribute.
cloudRegion (string) --
The cloud region the service runs in, the OpenTelemetry cloud.region attribute, such as us-east-1.
deploymentEnvironmentName (string) --
The deployment environment of the service, the OpenTelemetry deployment.environment.name attribute, such as prod.
dict
Replaces the whole SLI. Starts a new revision.
events (dict) --
Request-based: the share of events that were good, out of all events.
bad (dict) --
Query counting bad events over the given range.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
good (dict) --
Query counting good events over the given range.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
total (dict) -- [REQUIRED]
Query counting all events over the given range.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
periods (dict) --
Time-slice: the share of periods that were good.
periodMinutes (integer) --
The length of each period in minutes, aligned to the clock: 1 or 5. Defaults to 1. The error budget is counted in periods.
query (dict) -- [REQUIRED]
Query for the per-period value, such as a p99 latency or a success ratio, evaluated once per period over that period's data only.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
good (dict) --
A period is good when its value meets this condition.
comparator (string) -- [REQUIRED]
The comparison applied to the period's value.
threshold (float) -- [REQUIRED]
The value the period's result is compared against.
bad (dict) --
A period is bad when its value meets this condition.
comparator (string) -- [REQUIRED]
The comparison applied to the period's value.
threshold (float) -- [REQUIRED]
The value the period's result is compared against.
dict
Replaces the whole objective, including the time window, so resend every member to keep. The error budget is recomputed from the stored window totals; no new revision starts.
target (float) -- [REQUIRED]
The target attainment as a percentage, greater than 0 and less than 100, with at most three decimal places. For example, 99.9.
warningBudgetConsumedRatio (float) --
The share of the error budget consumed at which the SLO enters the WARNING state, greater than 0 and less than 1. There is no default: when absent, the SLO is never WARNING.
timeWindow (dict) -- [REQUIRED]
The window the target is measured over. Together with the target it defines the error budget.
rolling (dict) --
A window covering the most recent days, moving with every evaluation.
days (integer) -- [REQUIRED]
The length of the window in days: 1, 7, 28 or 30.
calendar (dict) --
A calendar week or month. The totals restart at each boundary.
unit (string) -- [REQUIRED]
The calendar unit of the window.
weekStartDay (string) --
The day a week starts on. Allowed only when the unit is WEEK. Defaults to MONDAY.
timeZone (string) --
The IANA time zone that defines the period boundaries, such as Europe/London. Defaults to UTC.
dict
Response Syntax
{}
Response Structure
(dict) --
Reports a batch of scored cases for a run.
Applies to runs reported from the caller's code (REPORTED runs). Each call reports up to 25 cases. The first call with a new runId creates the run and must include the run block. Repeat the call to report more cases, then call CompleteExperimentRun to end the run. Fails with a ConflictException (RUN_TERMINAL) for a run that has ended, and (RUN_ID_DELETED) for the runId of a deleted run.
The batch is atomic: an invalid item fails the whole request with a ValidationException that names the item and field (for example, results[3].caseId), and nothing is written. A request is at most 1 MB, and each results item at most 256 KB as canonical JSON. A larger item fails with a ValidationException, and a larger request is rejected before it reaches the API.
See also: AWS API Documentation
Request Syntax
client.put_experiment_run_results(
experimentId='string',
runId='string',
clientToken='string',
run={
'producer': {
'kind': 'SDK'|'CUSTOM',
'name': 'string',
'version': 'string',
'externalId': 'string'
},
'rule': {
'source': 'FILE'|'INLINE',
'name': 'string',
'caseCriteria': [
{
'evaluator': {
'evaluatorId': 'string',
'threshold': {
'minScore': 123.0,
'maxScore': 123.0,
'passLabels': [
'string',
]
}
}
},
],
'gates': [
{
'metric': {
'passRate': {}
,
'notScoredRate': {}
,
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {}
,
'fixedCases': {}
,
'regressedScores': {}
,
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
}
},
],
'contentHash': 'string'
},
'control': {
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'runId': 'string',
'latestPassed': {
'endpointArn': 'string'
}
},
'evaluators': [
{
'evaluatorId': 'string',
'ratingScale': 'NUMERIC'|'CATEGORICAL',
'scoreDirection': 'HIGHER_IS_BETTER'|'LOWER_IS_BETTER'
},
],
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'dataset': {
'source': 'AGENTCORE'|'FILE'|'OTHER',
'id': 'string',
'name': 'string',
'version': 'string',
'caseCount': 123,
'contentHash': 'string'
},
'metadata': {
'string': 'string'
},
'description': 'string',
'startedAt': datetime(2015, 1, 1)
},
results=[
{
'caseId': 'string',
'sessionId': 'string',
'executionStatus': 'COMPLETED'|'TARGET_ERROR'|'TIMED_OUT'|'NOT_RUN',
'statusReason': 'TARGET_INVOKE_ERROR'|'TARGET_RESPONSE_INVALID'|'TURN_TIME_LIMIT'|'RUN_STOPPED'|'SCORING_THROTTLED'|'SCORING_ERROR'|'EVALUATOR_ERROR'|'SPANS_MISSING',
'turns': [
{
'traceId': 'string',
'input': 'string',
'output': 'string',
'truncated': [
'input'|'output',
]
},
],
'evaluators': [
{
'evaluatorId': 'string',
'score': 123.0,
'label': 'string',
'explanation': 'string',
'explanationTruncated': True|False,
'error': {
'code': 'SCORING_THROTTLED'|'SCORING_ERROR'|'EVALUATOR_ERROR'|'SPANS_MISSING'
}
},
]
},
]
)
string
[REQUIRED]
The ID of the experiment the run belongs to.
string
[REQUIRED]
The ID of the run, chosen by the caller. A runId that is new to the experiment creates a run. A call that fails validation does not create the run.
string
Idempotency token for safe retries. Repeated requests with the same token and identical input return the recorded response. A call that fails validation frees the token, so the corrected batch can be resent with the same token.
This field is autopopulated if not provided.
dict
The details of the run. Required on the call that creates the run; optional afterwards, and must match the run when present.
producer (dict) -- [REQUIRED]
The tool or system that runs the cases and reports their results.
kind (string) -- [REQUIRED]
The kind of producer.
name (string) -- [REQUIRED]
The name of the producer, from 1 to 128 characters.
version (string) --
The version of the producer, from 1 to 64 characters.
externalId (string) --
The ID of the job in the producing system, such as a CI run ID.
rule (dict) --
The rule to check the run against. Optional; with a rule, the run gets a verdict when it completes.
source (string) -- [REQUIRED]
The origin of the rule. Informational only; it does not change how the rule is applied.
name (string) --
The name of the rule, from 1 to 256 characters.
caseCriteria (list) --
The conditions each case must meet to pass, up to 20. May be empty when the rule gates only on run-level metrics.
(dict) --
A condition a case must meet to pass.
evaluator (dict) --
A condition on the case's result for one of the run's evaluators.
evaluatorId (string) -- [REQUIRED]
The ID of the evaluator to check. Must be one of the run's evaluators.
threshold (dict) -- [REQUIRED]
The minimum score, the maximum score or the passing labels for the evaluator.
minScore (float) --
The minimum passing score, for a numeric evaluator. A finite number from -1e9 to 1e9.
maxScore (float) --
The maximum passing score, for a numeric evaluator whose scoreDirection is LOWER_IS_BETTER. A finite number from -1e9 to 1e9.
passLabels (list) --
The labels that pass, for a categorical evaluator. From 1 to 16 labels, each up to 256 characters.
(string) --
An evaluator's categorical label, derived from model output over customer prompts.
gates (list) -- [REQUIRED]
The run-level checks the run must meet to pass, from 1 to 20.
(dict) --
A run-level check, made of a metric and the bound it must meet.
metric (dict) -- [REQUIRED]
The metric the gate measures over the run's cases.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) -- [REQUIRED]
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The bound the metric must meet for the gate to hold. Required for every metric except regressedScores, which takes no bound (RULE_BOUND_INVALID if it has one, FIELD_REQUIRED if another metric has none).
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) -- [REQUIRED]
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) -- [REQUIRED]
Whether minDelta is an absolute change or a change relative to the control's value.
contentHash (string) --
A SHA-256 hash of the rule's caseCriteria and gates, in the form sha256:<64 hex digits>. Output only; ignored on input. Member order and explicit default values do not affect the hash; list order does.
control (dict) --
An earlier run to compare this run with. Only runId or latestPassed is supported (CONTROL_TARGET_UNSUPPORTED for target). Required by rules that use vsControl bounds or paired metrics.
target (dict) --
A version of the experiment's target to run alongside the run as a live control. Hosted runs only. Must be the same kind as the experiment's target (TARGET_MISMATCH); not supported on reported runs (CONTROL_TARGET_UNSUPPORTED).
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) -- [REQUIRED]
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
runId (string) --
The ID of an earlier run of this experiment. The run must be COMPLETED, must not be a CONTROL run, and must match this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Fails with CONTROL_RUN_INVALID otherwise, naming what differs: the dataset version expected and found, or the evaluators the control is missing or has in extra.
latestPassed (dict) --
Uses the newest earlier run of this experiment with verdict PASSED that matches this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Resolved when the run starts, with the endpointArn filter when given. Fails with CONTROL_RUN_NOT_FOUND if there is none.
endpointArn (string) --
The ARN of an endpoint of the experiment's AgentCore runtime. Selects only runs whose target is this endpoint (TARGET_MISMATCH otherwise).
evaluators (list) --
The evaluators the run is scored with, from 1 to 20. Required on the creating call. The rule and every reported case can name only these evaluators. Later calls must repeat it exactly or omit the run block (RUN_DEFINITION_MISMATCH).
(dict) --
An evaluator that a run is scored with.
evaluatorId (string) -- [REQUIRED]
The ID of the evaluator, unique among the run's evaluators. The run's rule and case results refer to the evaluator by this ID.
ratingScale (string) --
The kind of result the evaluator produces. Must be NUMERIC when the run's rule has an evaluatorAverage gate on this evaluator. When set, a case criterion's threshold must match it: minScore or maxScore for NUMERIC, passLabels for CATEGORICAL.
scoreDirection (string) --
Whether a higher or a lower score is better for the evaluator. The default is HIGHER_IS_BETTER. A case criterion and an evaluatorAverage gate on this evaluator must follow it: minScore and min for HIGHER_IS_BETTER, maxScore and max for LOWER_IS_BETTER. When the run is compared with a control, a score that moves the other way counts as a regression. Not valid when ratingScale is CATEGORICAL.
target (dict) --
The version of the experiment's target that the run tested. Must be the same kind as the experiment's target.
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) -- [REQUIRED]
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
dataset (dict) -- [REQUIRED]
The dataset the run tested. Required on the creating call, with its identity and caseCount. Later calls must repeat it exactly or omit the run block (RUN_DEFINITION_MISMATCH).
source (string) -- [REQUIRED]
Where the dataset comes from.
id (string) --
The ID of the dataset, from 1 to 256 characters. Required for AGENTCORE datasets. FILE and OTHER datasets require an id or a name (DATASET_ID_REQUIRED).
name (string) --
The name of the dataset, from 1 to 256 characters. FILE and OTHER datasets require an id or a name.
version (string) --
The version of the dataset. For AGENTCORE datasets, a published version number. Required for hosted runs (FIELD_REQUIRED without it), and DRAFT is rejected. Optional and informational for reported runs.
caseCount (integer) --
The number of cases the run will report. Cases that are never reported count as not run. Output only for hosted runs.
contentHash (string) --
A SHA-256 hash of the dataset's content, in the form sha256:<64 hex digits>. Output only for hosted runs.
metadata (dict) --
Key-value facts about what the run tested, beyond the target and dataset versions.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
A description of what the run is for, up to 1024 characters with no control characters. Later calls must repeat it exactly or omit the run block (RUN_DEFINITION_MISMATCH).
startedAt (datetime) --
The time when the producer started the run, if it began before the first PutExperimentRunResults call.
list
[REQUIRED]
The cases to report: up to 25 distinct cases, written atomically so that all are accepted or none are. Each item is at most 256 KB as canonical JSON.
(dict) --
The result of running and scoring one dataset case in a run, as reported with PutExperimentRunResults.
caseId (string) -- [REQUIRED]
The ID of the dataset case. Each case can appear at most once in a request.
sessionId (string) --
The ID of the session in which the target ran the case.
executionStatus (string) -- [REQUIRED]
The outcome of running the case against the target, before scoring.
statusReason (string) --
The reason for the execution status. Required when executionStatus is TARGET_ERROR or TIMED_OUT, optional for NOT_RUN, and absent for COMPLETED.
turns (list) --
The turns of the case, up to 50, in the order they ran.
(dict) --
One turn of a case: an input sent to the target and the target's response. Turns are ordered by their position in the list.
traceId (string) --
The trace ID of the turn. Required on every turn of a COMPLETED case. A case that didn't complete may end in turns without a trace ID, such as turns that weren't run; every turn before them must have one.
input (string) --
The input sent to the target for the turn. Truncated above 16 KB (UTF-8) in the case record, and then listed in truncated.
output (string) --
The target's response to the turn. Truncated above 16 KB (UTF-8) in the case record.
truncated (list) --
The fields that were truncated. List the fields shortened before sending; the service adds the fields it truncates.
(string) --
A turn field that was truncated.
evaluators (list) --
The evaluator results for the case, up to 20. Each entry refers to one of the run's evaluators.
(dict) --
One evaluator's result for a case: a score or label, or an error.
evaluatorId (string) -- [REQUIRED]
The ID of the evaluator that produced this result. Must be one of the run's evaluators.
score (float) --
The numeric score, a finite number from -1e9 to 1e9. The service keeps up to 12 decimal places.
label (string) --
The categorical label the evaluator assigned to the case.
explanation (string) --
The evaluator's explanation of the result. Truncated above 4 KB, in which case explanationTruncated is true.
explanationTruncated (boolean) --
Whether explanation was truncated.
error (dict) --
The error, when the evaluator produced no result for the case. Cannot be set together with score or label.
code (string) -- [REQUIRED]
The reason the evaluator produced no result.
dict
Response Syntax
{
'experimentId': 'string',
'runId': 'string',
'caseWrites': [
{
'caseId': 'string',
'status': 'PASSED'|'FAILED'|'COMPLETED'|'TARGET_ERROR'|'TIMED_OUT'|'NOT_SCORED'|'NOT_RUN',
'statusReason': 'TARGET_INVOKE_ERROR'|'TARGET_RESPONSE_INVALID'|'TURN_TIME_LIMIT'|'RUN_STOPPED'|'SCORING_THROTTLED'|'SCORING_ERROR'|'EVALUATOR_ERROR'|'SPANS_MISSING'
},
],
'runCreated': True|False
}
Response Structure
(dict) --
experimentId (string) --
The ID of the experiment the run belongs to.
runId (string) --
The ID of the run the cases were reported for.
caseWrites (list) --
One entry for each reported case, with the status the service derived from its scores and the run's rule.
(dict) --
The result of writing one case with PutExperimentRunResults.
caseId (string) --
The ID of the case that was written.
status (string) --
The status of the case, derived from its scores and the run's rule, if the run has one.
statusReason (string) --
The reason for the status. Present only for statuses that have a reason.
runCreated (boolean) --
Whether this call created the run.
Returns the content of the specified lookup table as CSV.
See also: AWS API Documentation
Request Syntax
client.get_lookup_data(
identifier='string'
)
string
[REQUIRED]
The id of the lookup table whose content to return.
dict
Response Syntax
{
'rows': 'string'
}
Response Structure
(dict) --
rows (string) --
The content of the lookup table in CSV: a header record of the column names, then one record per row.
Starts a hosted run of an experiment.
The service runs the dataset's cases against the given version of the experiment's target with an Amazon Bedrock AgentCore batch evaluation and scores them with the given evaluators. The run starts as RUNNING and ends as COMPLETED, or as DID_NOT_FINISH when it is stopped or fails. Use GetExperimentRun to check the run's progress.
When the run has a rule, it gets a verdict when it ends. A target control starts a second, live control run alongside this one.
See also: AWS API Documentation
Request Syntax
client.start_experiment_run(
experimentId='string',
clientToken='string',
rule={
'source': 'FILE'|'INLINE',
'name': 'string',
'caseCriteria': [
{
'evaluator': {
'evaluatorId': 'string',
'threshold': {
'minScore': 123.0,
'maxScore': 123.0,
'passLabels': [
'string',
]
}
}
},
],
'gates': [
{
'metric': {
'passRate': {}
,
'notScoredRate': {}
,
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {}
,
'fixedCases': {}
,
'regressedScores': {}
,
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
}
},
],
'contentHash': 'string'
},
evaluators=[
{
'evaluatorId': 'string',
'ratingScale': 'NUMERIC'|'CATEGORICAL',
'scoreDirection': 'HIGHER_IS_BETTER'|'LOWER_IS_BETTER'
},
],
target={
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
dataset={
'source': 'AGENTCORE'|'FILE'|'OTHER',
'id': 'string',
'name': 'string',
'version': 'string',
'caseCount': 123,
'contentHash': 'string'
},
control={
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'runId': 'string',
'latestPassed': {
'endpointArn': 'string'
}
},
metadata={
'string': 'string'
},
description='string'
)
string
[REQUIRED]
The ID of the experiment to start the run in.
string
Idempotency token for safe retries. Repeated requests with the same token return the original run instead of starting another.
This field is autopopulated if not provided.
dict
An optional rule. When present, the run gets a verdict when it ends.
source (string) -- [REQUIRED]
The origin of the rule. Informational only; it does not change how the rule is applied.
name (string) --
The name of the rule, from 1 to 256 characters.
caseCriteria (list) --
The conditions each case must meet to pass, up to 20. May be empty when the rule gates only on run-level metrics.
(dict) --
A condition a case must meet to pass.
evaluator (dict) --
A condition on the case's result for one of the run's evaluators.
evaluatorId (string) -- [REQUIRED]
The ID of the evaluator to check. Must be one of the run's evaluators.
threshold (dict) -- [REQUIRED]
The minimum score, the maximum score or the passing labels for the evaluator.
minScore (float) --
The minimum passing score, for a numeric evaluator. A finite number from -1e9 to 1e9.
maxScore (float) --
The maximum passing score, for a numeric evaluator whose scoreDirection is LOWER_IS_BETTER. A finite number from -1e9 to 1e9.
passLabels (list) --
The labels that pass, for a categorical evaluator. From 1 to 16 labels, each up to 256 characters.
(string) --
An evaluator's categorical label, derived from model output over customer prompts.
gates (list) -- [REQUIRED]
The run-level checks the run must meet to pass, from 1 to 20.
(dict) --
A run-level check, made of a metric and the bound it must meet.
metric (dict) -- [REQUIRED]
The metric the gate measures over the run's cases.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) -- [REQUIRED]
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The bound the metric must meet for the gate to hold. Required for every metric except regressedScores, which takes no bound (RULE_BOUND_INVALID if it has one, FIELD_REQUIRED if another metric has none).
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) -- [REQUIRED]
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) -- [REQUIRED]
Whether minDelta is an absolute change or a change relative to the control's value.
contentHash (string) --
A SHA-256 hash of the rule's caseCriteria and gates, in the form sha256:<64 hex digits>. Output only; ignored on input. Member order and explicit default values do not affect the hash; list order does.
list
[REQUIRED]
The evaluators to score the run with, from 1 to 10 for a hosted run. The run's rule can reference only these evaluators.
(dict) --
An evaluator that a run is scored with.
evaluatorId (string) -- [REQUIRED]
The ID of the evaluator, unique among the run's evaluators. The run's rule and case results refer to the evaluator by this ID.
ratingScale (string) --
The kind of result the evaluator produces. Must be NUMERIC when the run's rule has an evaluatorAverage gate on this evaluator. When set, a case criterion's threshold must match it: minScore or maxScore for NUMERIC, passLabels for CATEGORICAL.
scoreDirection (string) --
Whether a higher or a lower score is better for the evaluator. The default is HIGHER_IS_BETTER. A case criterion and an evaluatorAverage gate on this evaluator must follow it: minScore and min for HIGHER_IS_BETTER, maxScore and max for LOWER_IS_BETTER. When the run is compared with a control, a score that moves the other way counts as a regression. Not valid when ratingScale is CATEGORICAL.
dict
[REQUIRED]
The version of the experiment's target to run. Hosted runs support only agentCoreRuntime.
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) -- [REQUIRED]
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
dict
[REQUIRED]
The dataset to run, with source AGENTCORE, an id and a published version. Fails with FIELD_REQUIRED without a version, and the version cannot be DRAFT. Omit caseCount and contentHash.
source (string) -- [REQUIRED]
Where the dataset comes from.
id (string) --
The ID of the dataset, from 1 to 256 characters. Required for AGENTCORE datasets. FILE and OTHER datasets require an id or a name (DATASET_ID_REQUIRED).
name (string) --
The name of the dataset, from 1 to 256 characters. FILE and OTHER datasets require an id or a name.
version (string) --
The version of the dataset. For AGENTCORE datasets, a published version number. Required for hosted runs (FIELD_REQUIRED without it), and DRAFT is rejected. Optional and informational for reported runs.
caseCount (integer) --
The number of cases the run will report. Cases that are never reported count as not run. Output only for hosted runs.
contentHash (string) --
A SHA-256 hash of the dataset's content, in the form sha256:<64 hex digits>. Output only for hosted runs.
dict
An optional control to compare the run with. A target control starts a second run on the same dataset alongside this one, which uses a second AgentCore batch evaluation and counts toward the experiment's run quota. Required by rules that use vsControl or paired metrics (RULE_CONTROL_REQUIRED).
target (dict) --
A version of the experiment's target to run alongside the run as a live control. Hosted runs only. Must be the same kind as the experiment's target (TARGET_MISMATCH); not supported on reported runs (CONTROL_TARGET_UNSUPPORTED).
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) -- [REQUIRED]
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
runId (string) --
The ID of an earlier run of this experiment. The run must be COMPLETED, must not be a CONTROL run, and must match this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Fails with CONTROL_RUN_INVALID otherwise, naming what differs: the dataset version expected and found, or the evaluators the control is missing or has in extra.
latestPassed (dict) --
Uses the newest earlier run of this experiment with verdict PASSED that matches this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Resolved when the run starts, with the endpointArn filter when given. Fails with CONTROL_RUN_NOT_FOUND if there is none.
endpointArn (string) --
The ARN of an endpoint of the experiment's AgentCore runtime. Selects only runs whose target is this endpoint (TARGET_MISMATCH otherwise).
dict
Additional details about what the run tested, beyond the target and dataset versions.
(string) --
(string) --
A run metadata value. Customer content; never logged.
string
An optional description of the run, up to 1024 characters with no control characters. Cannot be changed after the run starts.
dict
Response Syntax
{
'run': {
'experimentId': 'string',
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'statusDetail': 'string',
'producer': {
'kind': 'SDK'|'CUSTOM',
'name': 'string',
'version': 'string',
'externalId': 'string'
},
'producerPrincipal': 'string',
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'control': {
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'runId': 'string',
'latestPassed': {
'endpointArn': 'string'
}
},
'controlRunId': 'string',
'role': 'TARGET'|'CONTROL',
'targetRunId': 'string',
'dataset': {
'source': 'AGENTCORE'|'FILE'|'OTHER',
'id': 'string',
'name': 'string',
'version': 'string',
'caseCount': 123,
'contentHash': 'string'
},
'evaluators': [
{
'evaluatorId': 'string',
'ratingScale': 'NUMERIC'|'CATEGORICAL',
'scoreDirection': 'HIGHER_IS_BETTER'|'LOWER_IS_BETTER'
},
],
'rule': {
'source': 'FILE'|'INLINE',
'name': 'string',
'caseCriteria': [
{
'evaluator': {
'evaluatorId': 'string',
'threshold': {
'minScore': 123.0,
'maxScore': 123.0,
'passLabels': [
'string',
]
}
}
},
],
'gates': [
{
'metric': {
'passRate': {},
'notScoredRate': {},
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {},
'fixedCases': {},
'regressedScores': {},
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
}
},
],
'contentHash': 'string'
},
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'batchEvaluation': {
'batchEvaluationArn': 'string',
'totalSessions': 123,
'sessionsCompleted': 123,
'sessionsInProgress': 123,
'sessionsFailed': 123,
'sessionsIgnored': 123
},
'summary': {
'casesTotal': 123,
'casesReported': 123,
'casesDone': 123,
'passed': 123,
'failed': 123,
'completed': 123,
'targetError': 123,
'timedOut': 123,
'notScored': 123,
'notRun': 123,
'passRate': 123.0,
'notScoredRate': 123.0
},
'metrics': [
{
'evaluatorId': 'string',
'average': 123.0,
'min': 123.0,
'max': 123.0,
'labelCounts': {
'string': 123
},
'scoredCount': 123,
'passedCount': 123
},
],
'caseRecordsWritten': 123,
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'checks': [
{
'metric': {
'passRate': {},
'notScoredRate': {},
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {},
'fixedCases': {},
'regressedScores': {},
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
},
'observed': 123.0,
'controlObserved': 123.0,
'delta': 123.0,
'passed': True|False,
'decisive': True|False,
'observedByEvaluator': [
{
'evaluatorId': 'string',
'count': 123
},
]
},
],
'createdAt': datetime(2015, 1, 1),
'startedAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
run (dict) --
The details of the started run, including its service-generated runId.
experimentId (string) --
The ID of the experiment the run belongs to.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
statusDetail (string) --
Additional detail about the status: the StopExperimentRun detail, or for RUNNER_FAILED, the AgentCore error details as one string of up to 1,000 characters.
producer (dict) --
The producer that reports the run. Reported runs only.
kind (string) --
The kind of producer.
name (string) --
The name of the producer, from 1 to 128 characters.
version (string) --
The version of the producer, from 1 to 64 characters.
externalId (string) --
The ID of the job in the producing system, such as a CI run ID.
producerPrincipal (string) --
The IAM principal that started the run, without the session name.
target (dict) --
The version of the experiment's target that the run tested, as given when the run was started or created.
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) --
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
control (dict) --
What the run is compared against, as given.
target (dict) --
A version of the experiment's target to run alongside the run as a live control. Hosted runs only. Must be the same kind as the experiment's target (TARGET_MISMATCH); not supported on reported runs (CONTROL_TARGET_UNSUPPORTED).
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) --
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
runId (string) --
The ID of an earlier run of this experiment. The run must be COMPLETED, must not be a CONTROL run, and must match this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Fails with CONTROL_RUN_INVALID otherwise, naming what differs: the dataset version expected and found, or the evaluators the control is missing or has in extra.
latestPassed (dict) --
Uses the newest earlier run of this experiment with verdict PASSED that matches this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Resolved when the run starts, with the endpointArn filter when given. Fails with CONTROL_RUN_NOT_FOUND if there is none.
endpointArn (string) --
The ARN of an endpoint of the experiment's AgentCore runtime. Selects only runs whose target is this endpoint (TARGET_MISMATCH otherwise).
controlRunId (string) --
The ID of the run this run is compared with, resolved when the run starts: either the live control run or the earlier run.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
targetRunId (string) --
For a CONTROL run, the ID of the run it is the control for.
dataset (dict) --
The dataset the run tested.
source (string) --
Where the dataset comes from.
id (string) --
The ID of the dataset, from 1 to 256 characters. Required for AGENTCORE datasets. FILE and OTHER datasets require an id or a name (DATASET_ID_REQUIRED).
name (string) --
The name of the dataset, from 1 to 256 characters. FILE and OTHER datasets require an id or a name.
version (string) --
The version of the dataset. For AGENTCORE datasets, a published version number. Required for hosted runs (FIELD_REQUIRED without it), and DRAFT is rejected. Optional and informational for reported runs.
caseCount (integer) --
The number of cases the run will report. Cases that are never reported count as not run. Output only for hosted runs.
contentHash (string) --
A SHA-256 hash of the dataset's content, in the form sha256:<64 hex digits>. Output only for hosted runs.
evaluators (list) --
The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.
(dict) --
An evaluator that a run is scored with.
evaluatorId (string) --
The ID of the evaluator, unique among the run's evaluators. The run's rule and case results refer to the evaluator by this ID.
ratingScale (string) --
The kind of result the evaluator produces. Must be NUMERIC when the run's rule has an evaluatorAverage gate on this evaluator. When set, a case criterion's threshold must match it: minScore or maxScore for NUMERIC, passLabels for CATEGORICAL.
scoreDirection (string) --
Whether a higher or a lower score is better for the evaluator. The default is HIGHER_IS_BETTER. A case criterion and an evaluatorAverage gate on this evaluator must follow it: minScore and min for HIGHER_IS_BETTER, maxScore and max for LOWER_IS_BETTER. When the run is compared with a control, a score that moves the other way counts as a regression. Not valid when ratingScale is CATEGORICAL.
rule (dict) --
The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.
source (string) --
The origin of the rule. Informational only; it does not change how the rule is applied.
name (string) --
The name of the rule, from 1 to 256 characters.
caseCriteria (list) --
The conditions each case must meet to pass, up to 20. May be empty when the rule gates only on run-level metrics.
(dict) --
A condition a case must meet to pass.
evaluator (dict) --
A condition on the case's result for one of the run's evaluators.
evaluatorId (string) --
The ID of the evaluator to check. Must be one of the run's evaluators.
threshold (dict) --
The minimum score, the maximum score or the passing labels for the evaluator.
minScore (float) --
The minimum passing score, for a numeric evaluator. A finite number from -1e9 to 1e9.
maxScore (float) --
The maximum passing score, for a numeric evaluator whose scoreDirection is LOWER_IS_BETTER. A finite number from -1e9 to 1e9.
passLabels (list) --
The labels that pass, for a categorical evaluator. From 1 to 16 labels, each up to 256 characters.
(string) --
An evaluator's categorical label, derived from model output over customer prompts.
gates (list) --
The run-level checks the run must meet to pass, from 1 to 20.
(dict) --
A run-level check, made of a metric and the bound it must meet.
metric (dict) --
The metric the gate measures over the run's cases.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) --
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The bound the metric must meet for the gate to hold. Required for every metric except regressedScores, which takes no bound (RULE_BOUND_INVALID if it has one, FIELD_REQUIRED if another metric has none).
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) --
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) --
Whether minDelta is an absolute change or a change relative to the control's value.
contentHash (string) --
A SHA-256 hash of the rule's caseCriteria and gates, in the form sha256:<64 hex digits>. Output only; ignored on input. Member order and explicit default values do not affect the hash; list order does.
metadata (dict) --
Key-value facts about what the run tested, as given when the run was created.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when none was given.
traceStats (dict) --
Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
batchEvaluation (dict) --
The progress of the hosted run's batch evaluation. Hosted runs only.
batchEvaluationArn (string) --
The ARN of the AgentCore batch evaluation that runs the hosted run. Absent until AgentCore accepts the start of the hosted run.
totalSessions (integer) --
The total number of sessions in the batch evaluation.
sessionsCompleted (integer) --
The number of sessions that have completed.
sessionsInProgress (integer) --
The number of sessions in progress.
sessionsFailed (integer) --
The number of sessions that failed.
sessionsIgnored (integer) --
The number of sessions the batch evaluation ignored.
summary (dict) --
Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.
casesTotal (integer) --
The total number of cases in the run.
casesReported (integer) --
The number of cases reported so far.
casesDone (integer) --
The number of cases that have reached a final status.
passed (integer) --
The number of cases with status PASSED.
failed (integer) --
The number of cases with status FAILED.
completed (integer) --
The number of cases with status COMPLETED.
targetError (integer) --
The number of cases with status TARGET_ERROR.
timedOut (integer) --
The number of cases with status TIMED_OUT.
notScored (integer) --
The number of cases with status NOT_SCORED.
notRun (integer) --
The number of cases with status NOT_RUN, including cases that were never reported.
passRate (float) --
The share of cases that passed, from 0 to 1. Present only for runs with a rule.
notScoredRate (float) --
The share of cases with no score, from 0 to 1.
metrics (list) --
Statistics for each of the run's evaluators.
(dict) --
Statistics for one of the run's evaluators across the run's cases.
evaluatorId (string) --
The ID of the evaluator.
average (float) --
The average score across the scored cases, for a numeric evaluator.
min (float) --
The lowest score across the scored cases, for a numeric evaluator.
max (float) --
The highest score across the scored cases, for a numeric evaluator.
labelCounts (dict) --
The number of cases with each label, for a categorical evaluator.
(string) --
(integer) --
scoredCount (integer) --
The number of cases the evaluator scored.
passedCount (integer) --
The number of cases that met the rule's criterion for this evaluator. Runs with a rule only.
caseRecordsWritten (integer) --
The number of case records written, across every attempt and revision.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
checks (list) --
The result of checking each of the rule's gates.
(dict) --
The result of checking one of the rule's gates when the run ended.
metric (dict) --
The gate's metric.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) --
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The gate's bound. Absent for regressedScores, which takes none.
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) --
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) --
Whether minDelta is an absolute change or a change relative to the control's value.
observed (float) --
The metric's value for this run.
controlObserved (float) --
The control's value of the metric. Present for vsControl checks.
delta (float) --
The change from the control, in the bound's mode, signed so that positive is better. Absent when the change is not finite, such as in RATIO mode against a control value of 0.
passed (boolean) --
Whether the gate held.
decisive (boolean) --
Whether this check decided a FAILED verdict.
observedByEvaluator (list) --
The regressed scores for each evaluator: one entry for each evaluator both runs have on which the target scored at least one case worse than the control. Present only on a regressedScores check, where it's empty when nothing regressed.
(dict) --
A check's count for one evaluator.
evaluatorId (string) --
The ID of the evaluator.
count (integer) --
For regressedScores, the number of cases the target scored worse than the control on this evaluator.
createdAt (datetime) --
The time when the run was created.
startedAt (datetime) --
The time when the run started. For reported runs, the declared run.startedAt, or createdAt if none was declared. For hosted runs, the time when the batch evaluation was created.
completedAt (datetime) --
The time when the run ended.
updatedAt (datetime) --
The time when the run was last updated.
Creates a service level objective (SLO) within a space.
The SLO measures a service against a reliability target over a time window.
See also: AWS API Documentation
Request Syntax
client.create_omni_slo(
spaceId='string',
name='string',
description='string',
serviceAttributes={
'serviceName': 'string',
'serviceNamespace': 'string',
'cloudProvider': 'string',
'cloudAccountId': 'string',
'cloudRegion': 'string',
'deploymentEnvironmentName': 'string'
},
sli={
'events': {
'bad': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'good': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'total': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
}
},
'periods': {
'periodMinutes': 123,
'query': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'good': {
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'threshold': 123.0
},
'bad': {
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'threshold': 123.0
}
}
},
objective={
'target': 123.0,
'warningBudgetConsumedRatio': 123.0,
'timeWindow': {
'rolling': {
'days': 123
},
'calendar': {
'unit': 'WEEK'|'MONTH',
'weekStartDay': 'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY',
'timeZone': 'string'
}
}
},
tags={
'string': 'string'
},
clientToken='string'
)
string
[REQUIRED]
The unique ID of the space to create the SLO in.
string
[REQUIRED]
The display name of the SLO. Not unique within a space; the sloId returned in the response identifies the SLO.
string
An optional description of the SLO.
dict
[REQUIRED]
The service the SLO is about. Descriptive only: it is not checked against the SLI and never used for authorization.
serviceName (string) -- [REQUIRED]
The name of the service, the OpenTelemetry service.name attribute.
serviceNamespace (string) --
The namespace of the service, the OpenTelemetry service.namespace attribute.
cloudProvider (string) --
The cloud provider the service runs on, the OpenTelemetry cloud.provider attribute, such as aws.
cloudAccountId (string) --
The cloud account the service runs in, the OpenTelemetry cloud.account.id attribute.
cloudRegion (string) --
The cloud region the service runs in, the OpenTelemetry cloud.region attribute, such as us-east-1.
deploymentEnvironmentName (string) --
The deployment environment of the service, the OpenTelemetry deployment.environment.name attribute, such as prod.
dict
[REQUIRED]
What the SLO measures.
events (dict) --
Request-based: the share of events that were good, out of all events.
bad (dict) --
Query counting bad events over the given range.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
good (dict) --
Query counting good events over the given range.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
total (dict) -- [REQUIRED]
Query counting all events over the given range.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
periods (dict) --
Time-slice: the share of periods that were good.
periodMinutes (integer) --
The length of each period in minutes, aligned to the clock: 1 or 5. Defaults to 1. The error budget is counted in periods.
query (dict) -- [REQUIRED]
Query for the per-period value, such as a p99 latency or a success ratio, evaluated once per period over that period's data only.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
good (dict) --
A period is good when its value meets this condition.
comparator (string) -- [REQUIRED]
The comparison applied to the period's value.
threshold (float) -- [REQUIRED]
The value the period's result is compared against.
bad (dict) --
A period is bad when its value meets this condition.
comparator (string) -- [REQUIRED]
The comparison applied to the period's value.
threshold (float) -- [REQUIRED]
The value the period's result is compared against.
dict
[REQUIRED]
The reliability target, the warning threshold and the window the target is measured over.
target (float) -- [REQUIRED]
The target attainment as a percentage, greater than 0 and less than 100, with at most three decimal places. For example, 99.9.
warningBudgetConsumedRatio (float) --
The share of the error budget consumed at which the SLO enters the WARNING state, greater than 0 and less than 1. There is no default: when absent, the SLO is never WARNING.
timeWindow (dict) -- [REQUIRED]
The window the target is measured over. Together with the target it defines the error budget.
rolling (dict) --
A window covering the most recent days, moving with every evaluation.
days (integer) -- [REQUIRED]
The length of the window in days: 1, 7, 28 or 30.
calendar (dict) --
A calendar week or month. The totals restart at each boundary.
unit (string) -- [REQUIRED]
The calendar unit of the window.
weekStartDay (string) --
The day a week starts on. Allowed only when the unit is WEEK. Defaults to MONDAY.
timeZone (string) --
The IANA time zone that defines the period boundaries, such as Europe/London. Defaults to UTC.
dict
The tags to associate with the SLO.
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
string
Idempotency token for safe retries. Retrying with the same token returns the original SLO instead of creating a duplicate.
This field is autopopulated if not provided.
dict
Response Syntax
{
'slo': {
'name': 'string',
'sloId': 'string',
'description': 'string',
'accountId': 'string',
'spaceId': 'string',
'serviceAttributes': {
'serviceName': 'string',
'serviceNamespace': 'string',
'cloudProvider': 'string',
'cloudAccountId': 'string',
'cloudRegion': 'string',
'deploymentEnvironmentName': 'string'
},
'sli': {
'events': {
'bad': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'good': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'total': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
}
},
'periods': {
'periodMinutes': 123,
'query': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'good': {
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'threshold': 123.0
},
'bad': {
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'threshold': 123.0
}
}
},
'objective': {
'target': 123.0,
'warningBudgetConsumedRatio': 123.0,
'timeWindow': {
'rolling': {
'days': 123
},
'calendar': {
'unit': 'WEEK'|'MONTH',
'weekStartDay': 'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY',
'timeZone': 'string'
}
}
},
'revision': 123,
'state': {
'value': 'OK'|'WARNING'|'CRITICAL'|'NODATA',
'noDataReason': 'string',
'transitionedAt': datetime(2015, 1, 1),
'stateTransitionMeasurement': {
'attainment': 123.0,
'errorBudgetConsumedRatio': 123.0,
'errorBudget': {
'unit': 'EVENTS'|'PERIODS',
'total': 123.0,
'consumed': 123.0
}
}
},
'updatedAt': datetime(2015, 1, 1),
'sloArn': 'string'
}
}
Response Structure
(dict) --
slo (dict) --
The SLO that was created, in the same shape GetOmniSlo returns. The state is absent, because a new SLO has not been evaluated yet.
name (string) --
The display name of the SLO.
sloId (string) --
The stable identifier of the SLO, used to address it in every operation.
description (string) --
An optional description of the SLO.
accountId (string) --
The AWS account ID that owns the SLO.
spaceId (string) --
The ID of the space that owns the SLO.
serviceAttributes (dict) --
The service the SLO is about. Absent when the SLO has none. Descriptive only: never used for authorization.
serviceName (string) --
The name of the service, the OpenTelemetry service.name attribute.
serviceNamespace (string) --
The namespace of the service, the OpenTelemetry service.namespace attribute.
cloudProvider (string) --
The cloud provider the service runs on, the OpenTelemetry cloud.provider attribute, such as aws.
cloudAccountId (string) --
The cloud account the service runs in, the OpenTelemetry cloud.account.id attribute.
cloudRegion (string) --
The cloud region the service runs in, the OpenTelemetry cloud.region attribute, such as us-east-1.
deploymentEnvironmentName (string) --
The deployment environment of the service, the OpenTelemetry deployment.environment.name attribute, such as prod.
sli (dict) --
What the SLO measures.
events (dict) --
Request-based: the share of events that were good, out of all events.
bad (dict) --
Query counting bad events over the given range.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
good (dict) --
Query counting good events over the given range.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
total (dict) --
Query counting all events over the given range.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
periods (dict) --
Time-slice: the share of periods that were good.
periodMinutes (integer) --
The length of each period in minutes, aligned to the clock: 1 or 5. Defaults to 1. The error budget is counted in periods.
query (dict) --
Query for the per-period value, such as a p99 latency or a success ratio, evaluated once per period over that period's data only.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
good (dict) --
A period is good when its value meets this condition.
comparator (string) --
The comparison applied to the period's value.
threshold (float) --
The value the period's result is compared against.
bad (dict) --
A period is bad when its value meets this condition.
comparator (string) --
The comparison applied to the period's value.
threshold (float) --
The value the period's result is compared against.
objective (dict) --
The reliability target, the warning threshold and the window the target is measured over.
target (float) --
The target attainment as a percentage, greater than 0 and less than 100, with at most three decimal places. For example, 99.9.
warningBudgetConsumedRatio (float) --
The share of the error budget consumed at which the SLO enters the WARNING state, greater than 0 and less than 1. There is no default: when absent, the SLO is never WARNING.
timeWindow (dict) --
The window the target is measured over. Together with the target it defines the error budget.
rolling (dict) --
A window covering the most recent days, moving with every evaluation.
days (integer) --
The length of the window in days: 1, 7, 28 or 30.
calendar (dict) --
A calendar week or month. The totals restart at each boundary.
unit (string) --
The calendar unit of the window.
weekStartDay (string) --
The day a week starts on. Allowed only when the unit is WEEK. Defaults to MONDAY.
timeZone (string) --
The IANA time zone that defines the period boundaries, such as Europe/London. Defaults to UTC.
revision (integer) --
Increments when the SLI changes, including its period length. Marks the point at which the window totals restarted.
state (dict) --
The current state of the SLO. Read-only and system-managed. Absent when the SLO has not been evaluated yet.
value (string) --
The current state of the SLO.
noDataReason (string) --
Why the SLO cannot be measured. Set only when the state is NODATA.
transitionedAt (datetime) --
When the state last changed.
stateTransitionMeasurement (dict) --
The measurement at the time the state last changed. Not a live figure.
attainment (float) --
The percentage of good events or good periods over the window, from 0 to 100.
errorBudgetConsumedRatio (float) --
The share of the error budget consumed. Greater than 1 when the state is CRITICAL.
errorBudget (dict) --
The error budget allowed and consumed over the window so far.
unit (string) --
Whether the budget is counted in events or in periods.
total (float) --
The budget allowed in the window so far.
consumed (float) --
The budget spent in the window so far.
updatedAt (datetime) --
The timestamp when the SLO was last updated.
sloArn (string) --
The Amazon Resource Name (ARN) of the SLO.
Returns the current measurements of up to 50 SLOs in one space: state, attainment, error budget consumed, burn rate over one recent window, and the estimated time the budget runs out.
GetOmniSlo and ListOmniSlos report the measurement taken when the state last changed; this operation reports it as of now. Each requested SLO appears exactly once, in reports or in errors. An SLO that does not exist in the space is a NOT_FOUND entry in errors, not a failure of the call.
See also: AWS API Documentation
Request Syntax
client.batch_get_omni_slo_report(
spaceId='string',
sloIds=[
'string',
],
burnRate={
'windowMinutes': 123
}
)
string
[REQUIRED]
The unique ID of the space that owns the SLOs.
list
[REQUIRED]
The SLOs to report on: 1 to 50 identifiers, each at most once.
(string) --
Server-generated identifier of an SLO: 32 lowercase hexadecimal characters. It never changes, including when the SLO is renamed, and it is the resource ID in the SLO's ARN.
dict
The burn-rate window. Omitted means a 60-minute window.
windowMinutes (integer) --
The window in minutes: 10 to 10080 (7 days), a multiple of 5. Defaults to 60.
dict
Response Syntax
{
'reports': [
{
'sloId': 'string',
'state': {
'value': 'OK'|'WARNING'|'CRITICAL'|'NODATA',
'noDataReason': 'string',
'transitionedAt': datetime(2015, 1, 1)
},
'measuredAt': datetime(2015, 1, 1),
'attainment': 123.0,
'errorBudgetConsumedRatio': 123.0,
'burnRate': {
'windowMinutes': 123,
'value': 123.0,
'estimatedExhaustionTime': datetime(2015, 1, 1)
}
},
],
'errors': [
{
'sloId': 'string',
'errorCode': 'NOT_FOUND',
'message': 'string'
},
]
}
Response Structure
(dict) --
reports (list) --
One report for each requested SLO that exists in the space.
(dict) --
The current measurements of one SLO. The figures are absent when the SLO is in the NODATA state, when nothing was counted in its window, or when its figures are not fresh; the state and measuredAt are always present.
sloId (string) --
The identifier of the SLO, as requested.
state (dict) --
The current state of the SLO.
value (string) --
The current state of the SLO.
noDataReason (string) --
Why the SLO cannot be measured. Set only when the state is NODATA.
transitionedAt (datetime) --
When the state last changed. Absent when the SLO has not been evaluated yet.
measuredAt (datetime) --
The time the report was computed. The same for every report in a response. The figures reflect readings published shortly before this time; a reading too old to use leaves the figures absent rather than reporting a stale value.
attainment (float) --
The percentage of good events or good periods over the SLO's own window, from 0 to 100.
errorBudgetConsumedRatio (float) --
The share of the error budget consumed over the window: 0 means untouched, 1 means used up, and above 1 means overspent.
burnRate (dict) --
The burn rate over the requested window.
windowMinutes (integer) --
The window actually used, in minutes: the requested window, shortened to the time the SLO's current SLI took effect when it reaches back before it.
value (float) --
The rate of budget spend over the window. 1 means on pace to use exactly the budget over the SLO's window. Absent when there was no traffic in it.
estimatedExhaustionTime (datetime) --
When the error budget runs out if this burn rate continues. A projection, not a guarantee. Absent when the budget is used up or the rate does not exhaust it before the window ends.
errors (list) --
One entry for each requested SLO that could not be reported on.
(dict) --
An SLO a BatchGetOmniSloReport request could not report on.
sloId (string) --
The identifier of the SLO, as requested.
errorCode (string) --
Why the SLO could not be reported on.
message (string) --
A description of the error.
Returns the metadata of the specified lookup table.
See also: AWS API Documentation
Request Syntax
client.get_lookup(
identifier='string'
)
string
[REQUIRED]
The id of the lookup table to return.
dict
Response Syntax
{
'name': 'string',
'arn': 'string',
'description': 'string',
'columns': [
'string',
],
'rowCount': 123,
'sizeBytes': 123,
'kmsKeyArn': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
name (string) --
The name of the lookup table.
arn (string) --
The ARN of the lookup table.
description (string) --
The description of the lookup table.
columns (list) --
The column names, in header order.
(string) --
A column name of a lookup table: lowercase letters, digits and underscores, not starting with a digit.
rowCount (integer) --
The number of data rows, excluding the CSV header record.
sizeBytes (integer) --
The size in bytes of the CSV content the table was last written from.
kmsKeyArn (string) --
The ARN of the customer managed KMS key the lookup table's content is encrypted with, if one was supplied when the table was created.
createdAt (datetime) --
The timestamp when the lookup table was created.
updatedAt (datetime) --
The timestamp when the lookup table's content was last written.
Lists the lookup tables in the caller's account and Region.
Returns a summary for each table. Content is not included.
See also: AWS API Documentation
Request Syntax
client.list_lookups(
maxResults=123,
nextToken='string'
)
integer
The maximum number of lookup tables to return per page.
string
A token to retrieve the next page of results.
dict
Response Syntax
{
'items': [
{
'name': 'string',
'arn': 'string',
'description': 'string',
'columns': [
'string',
],
'rowCount': 123,
'sizeBytes': 123,
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The list of lookup table summaries.
(dict) --
Summary information about a lookup table. Does not include the table's content.
name (string) --
The name of the lookup table.
arn (string) --
The ARN of the lookup table.
description (string) --
The description of the lookup table.
columns (list) --
The column names, in header order.
(string) --
A column name of a lookup table: lowercase letters, digits and underscores, not starting with a digit.
rowCount (integer) --
The number of data rows, excluding the CSV header record.
sizeBytes (integer) --
The size in bytes of the CSV content the table was last written from.
createdAt (datetime) --
The timestamp when the lookup table was created.
updatedAt (datetime) --
The timestamp when the lookup table's content was last written.
nextToken (string) --
A token to retrieve the next page of results, or null if there are no more results.
Deletes the specified lookup table.
Queries that join against the lookup table fail after it is deleted.
See also: AWS API Documentation
Request Syntax
client.delete_lookup(
identifier='string'
)
string
[REQUIRED]
The id of the lookup table to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Creates the IAM roles that an organization member account needs before a space can be set up in it: the provisioning role, the space data access role, and the dataset integration role. It also creates an AgentCore evaluation role when agentCoreEvaluationRoleConfiguration is set. The provisioning role is reused when it already exists in the target account. The other roles are created once per clientToken: retrying with the same token and input returns the same roles.
The caller must be the organization's management account or a delegated administrator with an access grant on the organization domain. The target account must be an active member of the same organization as the domain, and must not be the management account.
Fails with ServiceQuotaExceededException when the target member account already has the maximum number of roles of a type the call creates, or has reached an IAM quota.
See also: AWS API Documentation
Request Syntax
client.create_provisioning_roles_for_organization(
domainId='string',
targetAccountId='string',
spaceDataAccessRoleConfiguration={
'includePolicies': [
'MODEL_INFERENCE'|'DEVOPS_AGENT'|'AWS_INTEGRATION',
]
},
agentCoreEvaluationRoleConfiguration={}
,
clientToken='string'
)
string
[REQUIRED]
The ID of the organization domain.
string
[REQUIRED]
The ID of the member account to create the roles in.
dict
Settings for the space data access role, which is always created. Omit for the default: only CloudWatchOmniSpaceAccessPolicy is attached.
includePolicies (list) --
Optional AWS managed policies to attach to the space data access role. Omit or leave empty for none.
(string) --
An optional AWS managed policy to attach to the space data access role.
dict
Settings for the AgentCore evaluation role. Omit this to create none.
string
A unique token that makes retries create a single set of roles. Reusing a token with different input is an error. A concurrent request with the same token returns a ConflictException and can be retried.
This field is autopopulated if not provided.
dict
Response Syntax
{
'provisioningRole': {
'arn': 'string'
},
'spaceDataAccessRole': {
'arn': 'string'
},
'datasetIntegrationRole': {
'arn': 'string'
},
'agentCoreEvaluationRole': {
'arn': 'string'
}
}
Response Structure
(dict) --
provisioningRole (dict) --
The provisioning role in the target account.
arn (string) --
The ARN of the provisioning role in the target account.
spaceDataAccessRole (dict) --
The space data access role in the target account.
arn (string) --
The ARN of the space data access role in the target account.
datasetIntegrationRole (dict) --
The dataset integration role in the target account.
arn (string) --
The ARN of the dataset integration role in the target account.
agentCoreEvaluationRole (dict) --
The AgentCore evaluation role in the target account, for the service's Region. Present only when agentCoreEvaluationRoleConfiguration is set.
arn (string) --
The ARN of the AgentCore evaluation role in the target account.
This operation is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
Lists observations matching the given filters.
See also: AWS API Documentation
Request Syntax
client.list_observations(
filters={
'status': [
'ACTIVE'|'INACTIVE',
],
'severity': [
'LOW'|'MEDIUM'|'HIGH',
],
'services': [
'string',
],
'timeRange': {
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
}
},
maxResults=123,
nextToken='string',
observationIds=[
'string',
]
)
dict
Criteria restricting which observations are returned.
status (list) --
Match observations in any of these statuses.
(string) --
The lifecycle status of an observation. ACTIVE and INACTIVE are reversible — an observation transitions between the two states in both directions.
severity (list) --
Match observations at any of these severities.
(string) --
The severity level assigned to an observation. These values are uppercase, and anomaly severities (Severity) are lowercase.
services (list) --
Match observations affecting any of these services.
(string) --
Service name filter value.
timeRange (dict) --
Match observations whose lifetime overlaps this range — those created at or before end and last updated at or after start.
start (datetime) --
The inclusive start of the range.
end (datetime) --
The inclusive end of the range.
integer
The maximum number of observations to return in a single page. Valid range is 1 to 100. When omitted, the service defaults to 50.
string
Pagination token from a previous response, to retrieve the next page.
list
Optional batch-get filter. When set, observations are fetched by ID under the caller's account. Pagination still applies: maxResults bounds the returned observations per page; nextToken cursors through the input ID list. An ID that does not exist, or that the caller is not permitted to read, is omitted from items; compare the IDs you requested against the IDs returned across all pages to find them.
observationIds is mutually exclusive with filters: passing filters alongside observationIds returns a ValidationException. Use a follow-up ListObservations call without observationIds for filtered queries.
(string) --
Observation ID. Lowercase alphanumeric; length is bounded generically to allow for future evolution of the identifier scheme without a wire-breaking model change.
dict
Response Syntax
{
'items': [
{
'observationId': 'string',
'accountId': 'string',
'title': 'string',
'summary': 'string',
'severity': 'LOW'|'MEDIUM'|'HIGH',
'status': 'ACTIVE'|'INACTIVE',
'reasoning': 'string',
'anomalies': [
'string',
],
'affectedNodes': [
{
'name': 'string',
'nodeType': 'SERVICE'|'RESOURCE'|'REMOTE_SERVICE',
'accountId': 'string',
'sourceAccountId': 'string',
'region': 'string',
'cloudProvider': 'string',
'nodeId': 'string'
},
],
'relatedChanges': [
{
'changeId': 'string',
'changedAt': datetime(2015, 1, 1),
'type': 'DEPLOY'|'CONFIG_CHANGE',
'source': 'string',
'summary': 'string',
'node': {
'name': 'string',
'nodeType': 'SERVICE'|'RESOURCE'|'REMOTE_SERVICE',
'accountId': 'string',
'sourceAccountId': 'string',
'region': 'string',
'cloudProvider': 'string',
'nodeId': 'string'
}
},
],
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
The response containing the matching observations.
items (list) --
The observations matching the request, most recently updated first.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
An issue that Observations raises from correlated anomalies.
observationId (string) --
The unique identifier of the observation.
accountId (string) --
The account the observation belongs to.
title (string) --
A short human-readable headline for the observation.
summary (string) --
A human-readable summary of what was found.
severity (string) --
The severity assigned to the observation.
status (string) --
The current status of the observation.
reasoning (string) --
The explanation of how the correlated anomalies led to this observation. It is either plain text, or a JSON array written as a string, where each element is an object with a statement and the anomalyIds that statement is based on, in the order of the explanation. It is the array form only if it parses as a JSON array of objects, each with a statement; any other value is plain text. The value can be empty.
anomalies (list) --
The identifiers of the anomalies this observation correlates. At most 100 are listed: when it correlates more, the 100 most recent.
(string) --
affectedNodes (list) --
The nodes this observation affects.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
A node affected by an observation.
name (string) --
The display name of the affected node.
nodeType (string) --
Whether the affected node is a service, a resource, or a remote service.
accountId (string) --
The account that owns the affected node.
sourceAccountId (string) --
Account where the signal was detected (may differ for centralized monitoring).
region (string) --
The region the affected node is in.
cloudProvider (string) --
The cloud provider hosting the affected node.
nodeId (string) --
The context graph identifier of the affected node, when the observation resolved to a node already in the graph.
relatedChanges (list) --
The changes that the observation cites as related, oldest first. A change tied to more than one node appears once for each node, with the same changeId. At most 50 are listed: when the observation cites more, the 50 oldest. Absent when it cites none.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
A change that an observation cites as related.
changeId (string) --
The identifier of the change.
changedAt (datetime) --
When the change happened at its source.
type (string) --
The kind of change.
source (string) --
The system that reported the change.
summary (string) --
One line on what the change did.
node (dict) --
The node where the change happened, in the same shape as an affected node.
name (string) --
The display name of the affected node.
nodeType (string) --
Whether the affected node is a service, a resource, or a remote service.
accountId (string) --
The account that owns the affected node.
sourceAccountId (string) --
Account where the signal was detected (may differ for centralized monitoring).
region (string) --
The region the affected node is in.
cloudProvider (string) --
The cloud provider hosting the affected node.
nodeId (string) --
The context graph identifier of the affected node, when the observation resolved to a node already in the graph.
createdAt (datetime) --
When the observation was created.
updatedAt (datetime) --
When the observation was last modified.
nextToken (string) --
Pagination token for the next page; absent when there are no more results.
Lists the experiments in the caller's account.
Returns a summary for each experiment, newest first. Results can be filtered by experiment type, target service name, and creation time. An experiment is returned only when it matches every specified filter. Use GetExperiment to retrieve a single experiment's full detail. To find experiments by tag, use the Resource Groups Tagging API.
See also: AWS API Documentation
Request Syntax
client.list_experiments(
maxResults=123,
nextToken='string',
experimentType='DATASET',
targetServiceName='string',
createdAfter=datetime(2015, 1, 1),
createdBefore=datetime(2015, 1, 1)
)
integer
The maximum number of experiments to return in one page, from 1 to 100. Defaults to 50.
string
A token to retrieve the next page of results.
string
Filter by experiment type.
string
Filter by target service name.
datetime
Returns only experiments created after this time.
datetime
Returns only experiments created before this time.
dict
Response Syntax
{
'items': [
{
'experimentId': 'string',
'experimentArn': 'string',
'name': 'string',
'target': {
'name': 'string',
'serviceName': 'string',
'environment': 'string',
'definition': {
'agentCoreRuntime': {
'runtimeArn': 'string'
},
'httpsEndpoint': {
'baseUrl': 'string'
},
'custom': {}
}
},
'experimentType': 'DATASET',
'experimentConfig': {
'dataset': {
'executionRoleArn': 'string',
'resultsLogGroup': 'string',
'traceLogGroups': [
'string',
],
'collectTraceStats': True|False
}
},
'runCount': 123,
'targetRunCount': 123,
'latestRun': {
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'producerKind': 'SDK'|'CUSTOM',
'targetVersion': 'string',
'datasetSource': 'AGENTCORE'|'FILE'|'OTHER',
'datasetId': 'string',
'datasetName': 'string',
'datasetVersion': 'string',
'ruleName': 'string',
'ruleContentHash': 'string',
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'passRate': 123.0,
'controlPassRate': 123.0,
'role': 'TARGET'|'CONTROL',
'controlRunId': 'string',
'casesTotal': 123,
'passed': 123,
'createdAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1)
},
'baselineRunId': 'string',
'createdAt': datetime(2015, 1, 1)
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The list of experiment summaries on this page, newest first.
(dict) --
Summary of an experiment, as returned by ListExperiments. Call GetExperiment for the full experiment.
experimentId (string) --
The ID of the experiment.
experimentArn (string) --
The ARN of the experiment.
name (string) --
The name of the experiment.
target (dict) --
What the experiment tests.
name (string) --
A display name for the target.
serviceName (string) --
The service.name of the target's spans. Copied, with environment, into every case and run record. Control characters, apostrophes and backslashes are not allowed, because this value and environment are matched against span attributes and interpolated into telemetry query filters.
environment (string) --
The environment the target runs in, for example beta or prod. Copied, with serviceName, into every case and run record.
definition (dict) --
The kind of target and its identity. Cannot be changed after the experiment is created.
agentCoreRuntime (dict) --
An AgentCore Runtime, identified by its ARN.
runtimeArn (string) --
The ARN of the AgentCore Runtime. Each run specifies one of its endpoints.
httpsEndpoint (dict) --
A service reached over HTTPS, identified by its base URL.
baseUrl (string) --
The base URL of the service. Must use https:// and cannot include userinfo, a query, or a fragment.
custom (dict) --
Any other target, such as a prompt, a model, or a script. Reported runs only.
experimentType (string) --
The type of the experiment.
experimentConfig (dict) --
The configuration for the experiment's type.
dataset (dict) --
The configuration of a DATASET experiment.
executionRoleArn (string) --
The ARN of the IAM role that the service assumes to perform hosted runs and write run records.
resultsLogGroup (string) --
The name of a Standard-class log group in the caller's account for run results. Each run writes to its own log stream in it.
traceLogGroups (list) --
The log groups that contain the target's spans, if they are not in aws/spans. 1 to 10 log groups.
(string) --
CloudWatch Logs log group name.
collectTraceStats (boolean) --
Whether to collect statistics from the agent's spans after each run ends. When true, the service collects them for the run's cases (models, tools, calls, tokens, latency, and failures) and includes them on the run as traceStats. When absent or false, runs have no trace stats.
When true, the execution role needs telemetry query permissions, and the queries are billed to the caller's account. The service verifies the role's access when this is set: the call fails with TRACE_STATS_ACCESS_DENIED if access is denied, with TRACE_STATS_CHECK_FAILED if the check fails for another reason, and with TRACE_STATS_UNAVAILABLE where trace stats are not yet available.
runCount (integer) --
The number of runs of the experiment, including live control runs.
targetRunCount (integer) --
The number of runs of the experiment, excluding live control runs, which share the number of their target run.
latestRun (dict) --
The most recently started run, including its verdict when it has a rule.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
producerKind (string) --
The kind of producer that reports the run. Reported runs only.
targetVersion (string) --
The version of the run's target.
datasetSource (string) --
The source of the run's dataset. FILE and OTHER datasets might have only a name, without an ID.
datasetId (string) --
The ID of the run's dataset.
datasetName (string) --
The name of the run's dataset.
datasetVersion (string) --
The version of the run's dataset.
ruleName (string) --
The name of the run's rule.
ruleContentHash (string) --
The contentHash of the run's rule. Runs with equal hashes have the same case criteria and gates.
metadata (dict) --
Key-value facts about what the run tested.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run.
traceStats (dict) --
The trace stats of the run. Absent on an experiment's latestRun.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
passRate (float) --
The share of the run's cases that passed, from 0 to 1. Runs with a rule only.
controlPassRate (float) --
The control's pass rate under this run's caseCriteria, set when the run ends.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
controlRunId (string) --
The ID of the run this run is compared with.
casesTotal (integer) --
The total number of cases in the run.
passed (integer) --
The number of cases that passed.
createdAt (datetime) --
The time when the run was created.
completedAt (datetime) --
The time when the run ended.
baselineRunId (string) --
The ID of the run chosen as the experiment's baseline with UpdateExperiment. Always a COMPLETED target run, never a live control run. Absent when no baseline is set; deleting that run clears it.
createdAt (datetime) --
The time when the experiment was created.
nextToken (string) --
A token to retrieve the next page of results, or null if there are no more results.
Creates a lookup table from CSV content.
A lookup table is a named set of rows that telemetry queries can join against. Every column is stored as a string. Lookup table names must be unique within the account and Region.
See also: AWS API Documentation
Request Syntax
client.create_lookup(
name='string',
description='string',
body='string',
queryId='string',
kmsKeyArn='string',
tags={
'string': 'string'
},
clientToken='string'
)
string
[REQUIRED]
The name of the lookup table. Lookup table names must be unique within the account and Region.
string
A description of the lookup table. An empty string is equivalent to omitting this field: the table is created with no description.
string
The CSV content of the lookup table. Exactly one of body and queryId must be specified.
string
The identifier of a query whose results become the lookup table's content.
string
The ARN of a customer managed KMS key used to encrypt the lookup table's content.
dict
Resource tags.
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
string
Idempotency token for safe retries. Retrying with the same token returns the original lookup table instead of creating a duplicate.
This field is autopopulated if not provided.
dict
Response Syntax
{
'arn': 'string',
'createdAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
arn (string) --
The ARN of the lookup table.
createdAt (datetime) --
The timestamp when the lookup table was created.
Creates an experiment.
An experiment defines the target its runs are tested against and the configuration for its type; each run specifies the dataset it tests and the evaluators it is scored with. The name, description, and configuration can be changed later, but the target and type cannot.
Use GetExperiment to retrieve the experiment, ListExperiments to enumerate experiments, UpdateExperiment to modify it, and DeleteExperiment to remove it.
See also: AWS API Documentation
Request Syntax
client.create_experiment(
clientToken='string',
name='string',
description='string',
target={
'name': 'string',
'serviceName': 'string',
'environment': 'string',
'definition': {
'agentCoreRuntime': {
'runtimeArn': 'string'
},
'httpsEndpoint': {
'baseUrl': 'string'
},
'custom': {}
}
},
experimentType='DATASET',
experimentConfig={
'dataset': {
'executionRoleArn': 'string',
'resultsLogGroup': 'string',
'traceLogGroups': [
'string',
],
'collectTraceStats': True|False
}
},
tags={
'string': 'string'
}
)
string
Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a second experiment.
This field is autopopulated if not provided.
string
The name of the experiment.
string
An optional description of the experiment. Up to 1,024 characters, with no control characters.
dict
[REQUIRED]
The target that the experiment tests, including its service name, environment, and definition. Cannot be changed after the experiment is created.
name (string) --
A display name for the target.
serviceName (string) -- [REQUIRED]
The service.name of the target's spans. Copied, with environment, into every case and run record. Control characters, apostrophes and backslashes are not allowed, because this value and environment are matched against span attributes and interpolated into telemetry query filters.
environment (string) -- [REQUIRED]
The environment the target runs in, for example beta or prod. Copied, with serviceName, into every case and run record.
definition (dict) -- [REQUIRED]
The kind of target and its identity. Cannot be changed after the experiment is created.
agentCoreRuntime (dict) --
An AgentCore Runtime, identified by its ARN.
runtimeArn (string) -- [REQUIRED]
The ARN of the AgentCore Runtime. Each run specifies one of its endpoints.
httpsEndpoint (dict) --
A service reached over HTTPS, identified by its base URL.
baseUrl (string) -- [REQUIRED]
The base URL of the service. Must use https:// and cannot include userinfo, a query, or a fragment.
custom (dict) --
Any other target, such as a prompt, a model, or a script. Reported runs only.
string
[REQUIRED]
The type of the experiment. Cannot be changed after the experiment is created.
dict
[REQUIRED]
The configuration for the experiment's type. Its member must match experimentType: a DATASET experiment takes experimentConfig.dataset. The caller must have iam:PassRole on the execution role, the role must be assumable, and the results log group must exist and use the Standard log class.
dataset (dict) --
The configuration of a DATASET experiment.
executionRoleArn (string) -- [REQUIRED]
The ARN of the IAM role that the service assumes to perform hosted runs and write run records.
resultsLogGroup (string) -- [REQUIRED]
The name of a Standard-class log group in the caller's account for run results. Each run writes to its own log stream in it.
traceLogGroups (list) --
The log groups that contain the target's spans, if they are not in aws/spans. 1 to 10 log groups.
(string) --
CloudWatch Logs log group name.
collectTraceStats (boolean) --
Whether to collect statistics from the agent's spans after each run ends. When true, the service collects them for the run's cases (models, tools, calls, tokens, latency, and failures) and includes them on the run as traceStats. When absent or false, runs have no trace stats.
When true, the execution role needs telemetry query permissions, and the queries are billed to the caller's account. The service verifies the role's access when this is set: the call fails with TRACE_STATS_ACCESS_DENIED if access is denied, with TRACE_STATS_CHECK_FAILED if the check fails for another reason, and with TRACE_STATS_UNAVAILABLE where trace stats are not yet available.
dict
The tags to associate with the experiment. Tag keys that begin with the reserved aws: prefix are rejected with a ValidationException.
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
dict
Response Syntax
{
'experiment': {
'experimentId': 'string',
'experimentArn': 'string',
'name': 'string',
'description': 'string',
'target': {
'name': 'string',
'serviceName': 'string',
'environment': 'string',
'definition': {
'agentCoreRuntime': {
'runtimeArn': 'string'
},
'httpsEndpoint': {
'baseUrl': 'string'
},
'custom': {}
}
},
'experimentType': 'DATASET',
'experimentConfig': {
'dataset': {
'executionRoleArn': 'string',
'resultsLogGroup': 'string',
'traceLogGroups': [
'string',
],
'collectTraceStats': True|False
}
},
'runCount': 123,
'targetRunCount': 123,
'latestRun': {
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'producerKind': 'SDK'|'CUSTOM',
'targetVersion': 'string',
'datasetSource': 'AGENTCORE'|'FILE'|'OTHER',
'datasetId': 'string',
'datasetName': 'string',
'datasetVersion': 'string',
'ruleName': 'string',
'ruleContentHash': 'string',
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'passRate': 123.0,
'controlPassRate': 123.0,
'role': 'TARGET'|'CONTROL',
'controlRunId': 'string',
'casesTotal': 123,
'passed': 123,
'createdAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1)
},
'baselineRunId': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
experiment (dict) --
The details of the created experiment.
experimentId (string) --
The ID of the experiment.
experimentArn (string) --
The ARN of the experiment.
name (string) --
The name of the experiment.
description (string) --
The description of the experiment.
target (dict) --
What the experiment tests.
name (string) --
A display name for the target.
serviceName (string) --
The service.name of the target's spans. Copied, with environment, into every case and run record. Control characters, apostrophes and backslashes are not allowed, because this value and environment are matched against span attributes and interpolated into telemetry query filters.
environment (string) --
The environment the target runs in, for example beta or prod. Copied, with serviceName, into every case and run record.
definition (dict) --
The kind of target and its identity. Cannot be changed after the experiment is created.
agentCoreRuntime (dict) --
An AgentCore Runtime, identified by its ARN.
runtimeArn (string) --
The ARN of the AgentCore Runtime. Each run specifies one of its endpoints.
httpsEndpoint (dict) --
A service reached over HTTPS, identified by its base URL.
baseUrl (string) --
The base URL of the service. Must use https:// and cannot include userinfo, a query, or a fragment.
custom (dict) --
Any other target, such as a prompt, a model, or a script. Reported runs only.
experimentType (string) --
The type of the experiment.
experimentConfig (dict) --
The configuration for the experiment's type.
dataset (dict) --
The configuration of a DATASET experiment.
executionRoleArn (string) --
The ARN of the IAM role that the service assumes to perform hosted runs and write run records.
resultsLogGroup (string) --
The name of a Standard-class log group in the caller's account for run results. Each run writes to its own log stream in it.
traceLogGroups (list) --
The log groups that contain the target's spans, if they are not in aws/spans. 1 to 10 log groups.
(string) --
CloudWatch Logs log group name.
collectTraceStats (boolean) --
Whether to collect statistics from the agent's spans after each run ends. When true, the service collects them for the run's cases (models, tools, calls, tokens, latency, and failures) and includes them on the run as traceStats. When absent or false, runs have no trace stats.
When true, the execution role needs telemetry query permissions, and the queries are billed to the caller's account. The service verifies the role's access when this is set: the call fails with TRACE_STATS_ACCESS_DENIED if access is denied, with TRACE_STATS_CHECK_FAILED if the check fails for another reason, and with TRACE_STATS_UNAVAILABLE where trace stats are not yet available.
runCount (integer) --
The number of runs of the experiment, including live control runs.
targetRunCount (integer) --
The number of runs of the experiment, excluding live control runs, which share the number of their target run.
latestRun (dict) --
The most recently started run, including its verdict when it has a rule.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
producerKind (string) --
The kind of producer that reports the run. Reported runs only.
targetVersion (string) --
The version of the run's target.
datasetSource (string) --
The source of the run's dataset. FILE and OTHER datasets might have only a name, without an ID.
datasetId (string) --
The ID of the run's dataset.
datasetName (string) --
The name of the run's dataset.
datasetVersion (string) --
The version of the run's dataset.
ruleName (string) --
The name of the run's rule.
ruleContentHash (string) --
The contentHash of the run's rule. Runs with equal hashes have the same case criteria and gates.
metadata (dict) --
Key-value facts about what the run tested.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run.
traceStats (dict) --
The trace stats of the run. Absent on an experiment's latestRun.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
passRate (float) --
The share of the run's cases that passed, from 0 to 1. Runs with a rule only.
controlPassRate (float) --
The control's pass rate under this run's caseCriteria, set when the run ends.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
controlRunId (string) --
The ID of the run this run is compared with.
casesTotal (integer) --
The total number of cases in the run.
passed (integer) --
The number of cases that passed.
createdAt (datetime) --
The time when the run was created.
completedAt (datetime) --
The time when the run ended.
baselineRunId (string) --
The ID of the run chosen as the experiment's baseline with UpdateExperiment. Always a COMPLETED target run, never a live control run. Absent when no baseline is set; deleting that run clears it.
createdAt (datetime) --
The time when the experiment was created.
updatedAt (datetime) --
The time when the experiment was last updated.
This operation is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
Retrieves the anomalies matching the given filters.
See also: AWS API Documentation
Request Syntax
client.list_anomalies(
timeRange={
'start': datetime(2015, 1, 1),
'end': datetime(2015, 1, 1)
},
services=[
'string',
],
signalTypes=[
'logs'|'metrics'|'traces',
],
maxResults=123,
nextToken='string',
severity='info'|'low'|'medium'|'high'|'critical',
sourceAccountId=[
'string',
],
anomalyIds=[
'string',
]
)
dict
Time window to scope the anomaly search.
start (datetime) --
The inclusive start of the range.
end (datetime) --
The inclusive end of the range.
list
Filter by service names.
(string) --
Service name filter value.
list
Filter by signal types (e.g. logs, metrics, traces).
(string) --
The telemetry signal type in which an anomaly was detected. These values are lowercase, and the context graph signal types are uppercase.
integer
Maximum number of anomalies to return per page.
string
Pagination token from a previous response.
string
Filter by severity level. Anomaly severities are lowercase, so send "high", not "HIGH". One level only; there is no severity list and no minimum-severity filter.
list
Filter by the accounts that produced the signal.
(string) --
list
Optional batch-get filter. When set, anomalies are fetched by ID under the caller's account. Pagination still applies: maxResults bounds the returned anomalies per page; nextToken cursors through the input ID list. An ID that does not exist, or that the caller is not permitted to read, is omitted from items; compare the IDs you requested against the IDs returned across all pages to find them.
anomalyIds is mutually exclusive with the other filters (timeRange, services, signalTypes, severity, sourceAccountId) — passing any of them alongside anomalyIds returns a ValidationException. Use a follow-up ListAnomalies call without anomalyIds for filtered queries.
(string) --
Unique identifier of an anomaly episode, exactly 64 lowercase hexadecimal characters. The current per-episode identifier and the legacy series-hash identifier share this format.
dict
Response Syntax
{
'items': [
{
'anomalyId': 'string',
'service': 'string',
'signalType': 'logs'|'metrics'|'traces',
'anomalyType': 'string',
'severity': 'info'|'low'|'medium'|'high'|'critical',
'description': 'string',
'lastSeenAt': datetime(2015, 1, 1),
'firstSeenAt': datetime(2015, 1, 1),
'details': {
'string': 'string'
},
'title': 'string',
'occurrenceCount': 123,
'sourceAccountId': 'string',
'sourceRegion': 'string',
'nodeId': 'string',
'nodeType': 'SERVICE'|'RESOURCE'|'REMOTE_SERVICE',
'cloudProvider': 'string',
'evidenceSamples': [
{
'startedAt': datetime(2015, 1, 1),
'endedAt': datetime(2015, 1, 1),
'measurement': {
'quantity': 'string',
'statistic': 'string',
'unit': 'string',
'transform': 'string',
'currentValue': 123.0,
'expectedValue': 123.0,
'expectedLower': 123.0,
'expectedUpper': 123.0,
'threshold': 123.0,
'sampleCount': 123,
'periodMinutes': 123,
'baselineIsNew': True|False
},
'detector': 'string',
'source': 'string',
'sampledFraction': 123.0,
'topContributors': [
{
'dimension': 'string',
'name': 'string',
'share': 123.0
},
],
'omittedContributors': 123,
'telemetrySamples': [
{
'recordedAt': datetime(2015, 1, 1),
'message': 'string'
},
],
'signalDetails': {
'log': {
'statusClass': 'string',
'statusCodeField': 'string'
},
'metric': {
'signalLoss': {
'lastReportedAt': datetime(2015, 1, 1),
'missingMinutes': 123,
'lastValue': 123.0
},
'signalOnset': {
'firstValue': 123.0,
'absentMinutes': 123
},
'countDrop': {
'zeroCount': 123,
'tailProbability': 123.0
}
},
'trace': {
'errorCount': 123,
'alarmedTools': [
'string',
],
'alarmedToolsOmitted': 123
}
}
},
]
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
Output of the ListAnomalies operation.
items (list) --
The anomalies matching the request, up to maxResults.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
An anomaly detected for a monitored service.
anomalyId (string) --
The unique identifier of the anomaly episode.
service (string) --
The monitored service the anomaly was detected on.
signalType (string) --
The kind of telemetry signal the anomaly was detected in.
anomalyType (string) --
The analyzer-specific classification of what kind of anomaly this is.
severity (string) --
The severity of the anomaly as most recently evaluated.
description (string) --
A human-readable description of the detected behavior. Sensitive customer content.
lastSeenAt (datetime) --
Timestamp of the most recent occurrence in this episode, serialized as epoch seconds.
firstSeenAt (datetime) --
Timestamp of the first occurrence in this episode, serialized as epoch seconds.
details (dict) --
Arbitrary key-value details. Nested values are flattened to strings. Sensitive customer content.
(string) --
(string) --
title (string) --
Short human-readable label assigned by the analyzer. Sensitive customer content.
occurrenceCount (integer) --
Total occurrences merged into this anomaly episode.
sourceAccountId (string) --
Account that produced the signal (may differ from owner for centralized monitoring).
sourceRegion (string) --
Region where the source signal was produced.
nodeId (string) --
Topology graph node ID resolved at write time. Absent when the topology resolver could not match the service to a graph node.
nodeType (string) --
Whether the node is a service, a resource, or a remote service.
cloudProvider (string) --
Cloud provider from the topology node identity (e.g. "aws", "azure").
evidenceSamples (list) --
Up to 100 timestamped per-occurrence samples.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
A single per-occurrence evidence sample retained for an anomaly episode. Sensitive customer content.
startedAt (datetime) --
Start of the window these figures cover.
endedAt (datetime) --
End of the window these figures cover.
measurement (dict) --
What was measured in this window and how it compared to expectation.
quantity (string) --
What was measured. Absent on a metric anomaly, where the anomaly itself already names the metric.
statistic (string) --
How the quantity was aggregated, as a CloudWatch statistic name — "Sum", "Average", "Maximum", "Minimum", "SampleCount" or a percentile. Absent when nothing aggregated the figure in CloudWatch's sense, as on a derived error rate or request rate.
unit (string) --
Unit of currentValue, expectedValue, expectedLower and expectedUpper. On a metric anomaly this is the unit CloudWatch published the metric as, so it is absent when the metric was published without one, and on a counted statistic, which has no unit.
transform (string) --
Transform applied before comparison. Absent when the raw value was compared.
currentValue (float) --
The value observed in this window.
expectedValue (float) --
The point prediction. Absent when the detector produces a band instead.
expectedLower (float) --
Lower bound of the expected range. Absent when the detector produces a point prediction instead, or bounds only the other side.
expectedUpper (float) --
Upper bound of the expected range. Absent when the detector produces a point prediction instead, or bounds only the other side.
threshold (float) --
The value the comparison had to cross for this detector to fire, in the same unit as currentValue. Distinct from expectedLower and expectedUpper, which describe the learned normal range: a detector can fire on a boundary it chose rather than on the edge of that range. Absent whenever the band itself was the boundary, which is every anomaly but a trace one today.
sampleCount (integer) --
How many units the figures were computed over — calls for an error rate, turns for a per-turn quantity, events for a log count, buckets for a volume drop. A rate alone cannot distinguish 5 failures in 20 calls from 5 in 20,000.
periodMinutes (integer) --
Minutes the figures cover: the aggregation bucket width on most detectors, and the elapsed span of the episode so far on detectors that report running totals.
baselineIsNew (boolean) --
True when the expectation came from a newly learned, still-thin baseline, so the comparison is less reliable than usual.
detector (string) --
The rule that raised this occurrence. May differ between occurrences in the same episode.
source (string) --
What the figures were computed from.
sampledFraction (float) --
The trace sampling rate: the share of the service's calls that its raw spans kept, measured over the last hour against a view that counts every call. When source is "raw", this is the lowest share measured against any of the service's views. When source names a view, it is the share measured against that view. Absent when the view it is measured against (for raw evidence, every view of the service) counted too few calls in the last hour. Present only on trace evidence.
topContributors (list) --
What accounted for the anomalous excess, by dimension.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
One contributor to the anomalous excess in an evidence window, and the share of that excess it accounts for.
dimension (string) --
The dimension this contributor is a value of.
name (string) --
The contributor's name.
share (float) --
Share attributed to this contributor, from 0.0 to 1.0. The basis differs by dimension: a tool share is a share of the anomalous excess, while an error-class or status-code share is a share of the total. The total is not on the response, so the bases cannot be reconciled — compare shares within a dimension, and do not sum across dimensions.
omittedContributors (integer) --
Contributors with excess beyond those listed in topContributors.
telemetrySamples (list) --
Telemetry recorded in this window. May be absent on older occurrences even when the signal type produces samples, because the total retained per anomaly is bounded and the most recent occurrences are kept.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
One sample from a telemetry stream attached to an anomaly.
For a log anomaly this is a real log line of the matched pattern. The structure is reused for other anomaly sample types; when a sample type records its own time it populates recordedAt, and when it does not (log lines today) the member is absent.
recordedAt (datetime) --
Time the sample was recorded. Absent for log samples — the service does not store a per-line time, so the member is omitted. Present when a sample type records one.
message (string) --
The sample text, as it was recorded.
signalDetails (dict) --
Fields specific to the signal type.
log (dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
Fields specific to a log anomaly's evidence window.
statusClass (string) --
The class of HTTP status code a status-code anomaly counted: "1xx" through "5xx". Open-ended — treat an unrecognized value as opaque rather than failing.
statusCodeField (string) --
The name of the log field the status codes were read from.
metric (dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
Fields specific to a metric anomaly's evidence window. At most one member is present, matching the family of detector that raised the occurrence; a plain deviation carries none of them and relies on measurement alone.
signalLoss (dict) --
Present when the metric stopped reporting.
lastReportedAt (datetime) --
When the metric last reported a value.
missingMinutes (integer) --
Minutes with no data as of this occurrence.
lastValue (float) --
The last value reported before the gap.
signalOnset (dict) --
Present when the metric resumed reporting after an absence.
firstValue (float) --
The first value reported after the gap.
absentMinutes (integer) --
Minutes the metric was absent before it returned.
countDrop (dict) --
Present when the metric's event volume fell away.
zeroCount (integer) --
Buckets in the examined window that reported exactly zero, out of measurement.sampleCount.
tailProbability (float) --
Probability of seeing this many zero buckets under the learned zero rate.
trace (dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
Fields specific to a trace anomaly's evidence window.
errorCount (integer) --
Failed calls in this window — the exact numerator behind an error-rate measurement. Kept rather than derived because reconstructing it from a rounded rate loses precision at high call volumes.
alarmedTools (list) --
Tools that also crossed their own threshold in this window. See topContributors for what accounted for the excess.
(string) --
A tool name, as the emitting application named it. Not redacted by the service. Render as TEXT, never as HTML.
alarmedToolsOmitted (integer) --
Tools that also alarmed beyond those listed in alarmedTools.
nextToken (string) --
Opaque cursor for fetching the next page of results.
Deletes an experiment and its runs.
The runs' stored results and cases are also deleted; records in the caller's log group are kept. Fails with a ConflictException while a run is RUNNING or STOPPING; stop the runs first. Deleting an experiment that does not exist or was already deleted succeeds.
A large experiment can take more than one call: while the delete is still in progress, the call fails with a ConflictException (DELETE_IN_PROGRESS), and repeating the call continues it.
See also: AWS API Documentation
Request Syntax
client.delete_experiment(
experimentId='string'
)
string
[REQUIRED]
The ID of the experiment to delete.
dict
Response Syntax
{}
Response Structure
(dict) --
Retrieves the details of a run.
The response includes the run's status, progress, case summary, evaluator metrics and, when it has a rule, its verdict and the checks behind it. For a hosted run, it also includes the batch evaluation's progress.
See also: AWS API Documentation
Request Syntax
client.get_experiment_run(
experimentId='string',
runId='string'
)
string
[REQUIRED]
The ID of the experiment the run belongs to.
string
[REQUIRED]
The ID of the run to retrieve.
dict
Response Syntax
{
'run': {
'experimentId': 'string',
'runId': 'string',
'source': 'REPORTED'|'HOSTED',
'status': 'RUNNING'|'STOPPING'|'COMPLETED'|'DID_NOT_FINISH',
'statusReason': 'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'RESULTS_WRITE_FAILED',
'statusDetail': 'string',
'producer': {
'kind': 'SDK'|'CUSTOM',
'name': 'string',
'version': 'string',
'externalId': 'string'
},
'producerPrincipal': 'string',
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'control': {
'target': {
'agentCoreRuntime': {
'endpointArn': 'string',
'requestTemplate': 'string',
'version': 'string'
},
'httpsEndpoint': {
'url': 'string',
'version': 'string'
},
'custom': {
'version': 'string',
'endpoint': 'string'
}
},
'runId': 'string',
'latestPassed': {
'endpointArn': 'string'
}
},
'controlRunId': 'string',
'role': 'TARGET'|'CONTROL',
'targetRunId': 'string',
'dataset': {
'source': 'AGENTCORE'|'FILE'|'OTHER',
'id': 'string',
'name': 'string',
'version': 'string',
'caseCount': 123,
'contentHash': 'string'
},
'evaluators': [
{
'evaluatorId': 'string',
'ratingScale': 'NUMERIC'|'CATEGORICAL',
'scoreDirection': 'HIGHER_IS_BETTER'|'LOWER_IS_BETTER'
},
],
'rule': {
'source': 'FILE'|'INLINE',
'name': 'string',
'caseCriteria': [
{
'evaluator': {
'evaluatorId': 'string',
'threshold': {
'minScore': 123.0,
'maxScore': 123.0,
'passLabels': [
'string',
]
}
}
},
],
'gates': [
{
'metric': {
'passRate': {},
'notScoredRate': {},
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {},
'fixedCases': {},
'regressedScores': {},
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
}
},
],
'contentHash': 'string'
},
'metadata': {
'string': 'string'
},
'description': 'string',
'traceStats': {
'status': 'PENDING'|'AVAILABLE'|'UNAVAILABLE',
'statusReason': 'NO_TRACES'|'SPANS_NOT_FOUND'|'ACCESS_DENIED'|'SCAN_LIMIT'|'QUERY_FAILED'|'INTERNAL_ERROR',
'casesRead': 123,
'sampled': True|False,
'casesWithSpans': 123,
'attributes': [
{
'name': 'MODEL'|'TOOL_NAME'|'SYSTEM_INSTRUCTIONS',
'version': 123,
'distinct': 123,
'valuesHash': 'string',
'values': [
{
'value': 'string',
'cases': 123
},
]
},
],
'metrics': [
{
'name': 'MODEL_CALLS'|'TOOL_CALLS'|'INPUT_TOKENS'|'OUTPUT_TOKENS'|'TURN_LATENCY_MS'|'FAILED',
'version': 123,
'count': 123,
'mean': 123.0,
'p50': 123.0,
'p90': 123.0
},
],
'computedAt': datetime(2015, 1, 1)
},
'batchEvaluation': {
'batchEvaluationArn': 'string',
'totalSessions': 123,
'sessionsCompleted': 123,
'sessionsInProgress': 123,
'sessionsFailed': 123,
'sessionsIgnored': 123
},
'summary': {
'casesTotal': 123,
'casesReported': 123,
'casesDone': 123,
'passed': 123,
'failed': 123,
'completed': 123,
'targetError': 123,
'timedOut': 123,
'notScored': 123,
'notRun': 123,
'passRate': 123.0,
'notScoredRate': 123.0
},
'metrics': [
{
'evaluatorId': 'string',
'average': 123.0,
'min': 123.0,
'max': 123.0,
'labelCounts': {
'string': 123
},
'scoredCount': 123,
'passedCount': 123
},
],
'caseRecordsWritten': 123,
'verdict': 'PASSED'|'FAILED'|'DID_NOT_FINISH',
'verdictReasonCode': 'PASSED'|'NOT_SCORED_RATE_ABOVE_MAX'|'PASS_RATE_BELOW_MIN'|'AVERAGE_BELOW_MIN'|'AVERAGE_ABOVE_MAX'|'STOPPED'|'RUNNER_FAILED'|'RESULTS_WRITE_DENIED'|'INTERNAL_ERROR'|'BELOW_CONTROL'|'REGRESSED_CASES_ABOVE_MAX'|'FIXED_CASES_BELOW_MIN'|'UNPAIRED_CASE_RATE_ABOVE_MAX'|'SCORE_REGRESSED'|'CONTROL_DID_NOT_FINISH'|'RESULTS_WRITE_FAILED',
'verdictReason': 'string',
'checks': [
{
'metric': {
'passRate': {},
'notScoredRate': {},
'evaluatorAverage': {
'evaluatorId': 'string'
},
'regressedCases': {},
'fixedCases': {},
'regressedScores': {},
'unpairedCaseRate': {}
},
'bound': {
'min': 123.0,
'max': 123.0,
'vsControl': {
'minDelta': 123.0,
'mode': 'ABSOLUTE'|'RATIO'
}
},
'observed': 123.0,
'controlObserved': 123.0,
'delta': 123.0,
'passed': True|False,
'decisive': True|False,
'observedByEvaluator': [
{
'evaluatorId': 'string',
'count': 123
},
]
},
],
'createdAt': datetime(2015, 1, 1),
'startedAt': datetime(2015, 1, 1),
'completedAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
run (dict) --
The details of the run in its current state.
experimentId (string) --
The ID of the experiment the run belongs to.
runId (string) --
The ID of the run.
source (string) --
Whether the run is reported by the caller's code or hosted by the service.
status (string) --
The status of the run.
statusReason (string) --
Why the run did not finish. Present when status is DID_NOT_FINISH.
statusDetail (string) --
Additional detail about the status: the StopExperimentRun detail, or for RUNNER_FAILED, the AgentCore error details as one string of up to 1,000 characters.
producer (dict) --
The producer that reports the run. Reported runs only.
kind (string) --
The kind of producer.
name (string) --
The name of the producer, from 1 to 128 characters.
version (string) --
The version of the producer, from 1 to 64 characters.
externalId (string) --
The ID of the job in the producing system, such as a CI run ID.
producerPrincipal (string) --
The IAM principal that started the run, without the session name.
target (dict) --
The version of the experiment's target that the run tested, as given when the run was started or created.
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) --
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
control (dict) --
What the run is compared against, as given.
target (dict) --
A version of the experiment's target to run alongside the run as a live control. Hosted runs only. Must be the same kind as the experiment's target (TARGET_MISMATCH); not supported on reported runs (CONTROL_TARGET_UNSUPPORTED).
agentCoreRuntime (dict) --
An endpoint of the experiment's AgentCore Runtime.
endpointArn (string) --
The ARN of the runtime endpoint. Must belong to the experiment's runtimeArn.
requestTemplate (string) --
The request sent to the agent for each turn, in the AgentCore datasetExecutionConfig format: a JSON object containing exactly one {{turn.input}} as a complete string value. The AgentCore default is {"prompt":"{{turn.input}}"}. An invalid template fails with a ValidationException.
version (string) --
The runtime version the endpoint pointed to. For hosted runs, output only and resolved when the run starts. Optional for reported runs.
httpsEndpoint (dict) --
A URL of the experiment's HTTPS service.
url (string) --
The URL of the service that the run tests. Userinfo and the query string are removed when it is stored.
version (string) --
The build or release deployed at url.
custom (dict) --
A label for what was tried, for a custom target.
version (string) --
A label for the version that was tried, for example "sonnet-5.5 + prompt-v3".
endpoint (string) --
A free-form description of where or how the custom target was invoked, for example a URL or a prompt name.
runId (string) --
The ID of an earlier run of this experiment. The run must be COMPLETED, must not be a CONTROL run, and must match this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Fails with CONTROL_RUN_INVALID otherwise, naming what differs: the dataset version expected and found, or the evaluators the control is missing or has in extra.
latestPassed (dict) --
Uses the newest earlier run of this experiment with verdict PASSED that matches this run: the same dataset at the same dataset version (a run with no version matches only a run with no version), and the same set of evaluator IDs, in any order. Resolved when the run starts, with the endpointArn filter when given. Fails with CONTROL_RUN_NOT_FOUND if there is none.
endpointArn (string) --
The ARN of an endpoint of the experiment's AgentCore runtime. Selects only runs whose target is this endpoint (TARGET_MISMATCH otherwise).
controlRunId (string) --
The ID of the run this run is compared with, resolved when the run starts: either the live control run or the earlier run.
role (string) --
The role of the run: TARGET, or CONTROL for a live control run.
targetRunId (string) --
For a CONTROL run, the ID of the run it is the control for.
dataset (dict) --
The dataset the run tested.
source (string) --
Where the dataset comes from.
id (string) --
The ID of the dataset, from 1 to 256 characters. Required for AGENTCORE datasets. FILE and OTHER datasets require an id or a name (DATASET_ID_REQUIRED).
name (string) --
The name of the dataset, from 1 to 256 characters. FILE and OTHER datasets require an id or a name.
version (string) --
The version of the dataset. For AGENTCORE datasets, a published version number. Required for hosted runs (FIELD_REQUIRED without it), and DRAFT is rejected. Optional and informational for reported runs.
caseCount (integer) --
The number of cases the run will report. Cases that are never reported count as not run. Output only for hosted runs.
contentHash (string) --
A SHA-256 hash of the dataset's content, in the form sha256:<64 hex digits>. Output only for hosted runs.
evaluators (list) --
The evaluators the run is scored with, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs.
(dict) --
An evaluator that a run is scored with.
evaluatorId (string) --
The ID of the evaluator, unique among the run's evaluators. The run's rule and case results refer to the evaluator by this ID.
ratingScale (string) --
The kind of result the evaluator produces. Must be NUMERIC when the run's rule has an evaluatorAverage gate on this evaluator. When set, a case criterion's threshold must match it: minScore or maxScore for NUMERIC, passLabels for CATEGORICAL.
scoreDirection (string) --
Whether a higher or a lower score is better for the evaluator. The default is HIGHER_IS_BETTER. A case criterion and an evaluatorAverage gate on this evaluator must follow it: minScore and min for HIGHER_IS_BETTER, maxScore and max for LOWER_IS_BETTER. When the run is compared with a control, a score that moves the other way counts as a regression. Not valid when ratingScale is CATEGORICAL.
rule (dict) --
The rule the run is checked against, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when the run has no rule, in which case the run has no verdict.
source (string) --
The origin of the rule. Informational only; it does not change how the rule is applied.
name (string) --
The name of the rule, from 1 to 256 characters.
caseCriteria (list) --
The conditions each case must meet to pass, up to 20. May be empty when the rule gates only on run-level metrics.
(dict) --
A condition a case must meet to pass.
evaluator (dict) --
A condition on the case's result for one of the run's evaluators.
evaluatorId (string) --
The ID of the evaluator to check. Must be one of the run's evaluators.
threshold (dict) --
The minimum score, the maximum score or the passing labels for the evaluator.
minScore (float) --
The minimum passing score, for a numeric evaluator. A finite number from -1e9 to 1e9.
maxScore (float) --
The maximum passing score, for a numeric evaluator whose scoreDirection is LOWER_IS_BETTER. A finite number from -1e9 to 1e9.
passLabels (list) --
The labels that pass, for a categorical evaluator. From 1 to 16 labels, each up to 256 characters.
(string) --
An evaluator's categorical label, derived from model output over customer prompts.
gates (list) --
The run-level checks the run must meet to pass, from 1 to 20.
(dict) --
A run-level check, made of a metric and the bound it must meet.
metric (dict) --
The metric the gate measures over the run's cases.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) --
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The bound the metric must meet for the gate to hold. Required for every metric except regressedScores, which takes no bound (RULE_BOUND_INVALID if it has one, FIELD_REQUIRED if another metric has none).
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) --
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) --
Whether minDelta is an absolute change or a change relative to the control's value.
contentHash (string) --
A SHA-256 hash of the rule's caseCriteria and gates, in the form sha256:<64 hex digits>. Output only; ignored on input. Member order and explicit default values do not affect the hash; list order does.
metadata (dict) --
Key-value facts about what the run tested, as given when the run was created.
(string) --
(string) --
A run metadata value. Customer content; never logged.
description (string) --
The description of the run, as given to StartExperimentRun for hosted runs or to the creating PutExperimentRunResults call for reported runs. Absent when none was given.
traceStats (dict) --
Statistics from the agent's spans for the run, read after the run ended. Present once collection has started, which happens for a run that ends while its experiment has collectTraceStats enabled. Absent otherwise, including while the run is open.
status (string) --
The status of the stats. PENDING from the end of the run until they are computed, usually a minute or two and up to about 15 minutes while the run's spans are still arriving.
statusReason (string) --
Why the stats are UNAVAILABLE. Absent otherwise.
casesRead (integer) --
The number of cases with a traced turn that were read. All such cases, up to 1,000; beyond that, the 1,000 whose caseId has the smallest SHA-256 hash, or fewer when their turns exceed 10,000 traces.
sampled (boolean) --
Whether the run had more cases with a traced turn than casesRead.
casesWithSpans (integer) --
The number of cases read that had at least one of the agent's spans. Every value in attributes and metrics is computed over these cases.
attributes (list) --
The values each span attribute took across the cases with spans, up to 20 attributes.
(dict) --
The values one span attribute took across the cases with spans.
name (string) --
The span attribute these values are for.
version (integer) --
The version of the attribute's definition. Two runs' stats are comparable only at equal versions.
distinct (integer) --
The number of distinct values across the cases.
valuesHash (string) --
A SHA-256 hash of the sorted distinct values, one per line, in the form sha256:<64 hex digits>. Equal sets of values have equal hashes, even when values is truncated.
values (list) --
The most common values, up to 10, ordered by number of cases (most first) and then by value.
(dict) --
One value of a span attribute and the number of cases it appeared in.
value (string) --
The value, as the spans carry it.
cases (integer) --
The number of cases with spans that had this value.
metrics (list) --
Per-case metrics, with their statistics across the cases with spans, up to 20 metrics.
(dict) --
A per-case metric, with its statistics across the cases with spans.
name (string) --
The metric these statistics are for.
version (integer) --
The version of the metric's definition. Two runs' stats are comparable only at equal versions.
count (integer) --
The number of cases with spans that had a value. The statistics are computed over these cases.
mean (float) --
The mean across the cases. Absent when count is 0.
p50 (float) --
The median across the cases. Absent when count is 0.
p90 (float) --
The 90th percentile across the cases. Absent when count is 0.
computedAt (datetime) --
The time when the stats were computed.
batchEvaluation (dict) --
The progress of the hosted run's batch evaluation. Hosted runs only.
batchEvaluationArn (string) --
The ARN of the AgentCore batch evaluation that runs the hosted run. Absent until AgentCore accepts the start of the hosted run.
totalSessions (integer) --
The total number of sessions in the batch evaluation.
sessionsCompleted (integer) --
The number of sessions that have completed.
sessionsInProgress (integer) --
The number of sessions in progress.
sessionsFailed (integer) --
The number of sessions that failed.
sessionsIgnored (integer) --
The number of sessions the batch evaluation ignored.
summary (dict) --
Case counts and rates for the run. Updated live for reported runs; for hosted runs, filled in when the AgentCore batch evaluation finishes.
casesTotal (integer) --
The total number of cases in the run.
casesReported (integer) --
The number of cases reported so far.
casesDone (integer) --
The number of cases that have reached a final status.
passed (integer) --
The number of cases with status PASSED.
failed (integer) --
The number of cases with status FAILED.
completed (integer) --
The number of cases with status COMPLETED.
targetError (integer) --
The number of cases with status TARGET_ERROR.
timedOut (integer) --
The number of cases with status TIMED_OUT.
notScored (integer) --
The number of cases with status NOT_SCORED.
notRun (integer) --
The number of cases with status NOT_RUN, including cases that were never reported.
passRate (float) --
The share of cases that passed, from 0 to 1. Present only for runs with a rule.
notScoredRate (float) --
The share of cases with no score, from 0 to 1.
metrics (list) --
Statistics for each of the run's evaluators.
(dict) --
Statistics for one of the run's evaluators across the run's cases.
evaluatorId (string) --
The ID of the evaluator.
average (float) --
The average score across the scored cases, for a numeric evaluator.
min (float) --
The lowest score across the scored cases, for a numeric evaluator.
max (float) --
The highest score across the scored cases, for a numeric evaluator.
labelCounts (dict) --
The number of cases with each label, for a categorical evaluator.
(string) --
(integer) --
scoredCount (integer) --
The number of cases the evaluator scored.
passedCount (integer) --
The number of cases that met the rule's criterion for this evaluator. Runs with a rule only.
caseRecordsWritten (integer) --
The number of case records written, across every attempt and revision.
verdict (string) --
The verdict of the run. Present only for runs with a rule, once the run has ended.
verdictReasonCode (string) --
The reason for the run's verdict.
verdictReason (string) --
A readable explanation of verdictReasonCode, such as "pass rate 82% (required 90%)".
checks (list) --
The result of checking each of the rule's gates.
(dict) --
The result of checking one of the rule's gates when the run ended.
metric (dict) --
The gate's metric.
passRate (dict) --
The share of cases that pass. Higher is better.
notScoredRate (dict) --
The share of cases with no score. Lower is better. When no min or max gate names this metric, a max of 0.05 applies; a vsControl gate on it does not replace that default.
evaluatorAverage (dict) --
The average score of a numeric evaluator. Higher is better, so the gate takes min, unless the evaluator's scoreDirection is LOWER_IS_BETTER, when it takes max.
evaluatorId (string) --
The ID of the evaluator. Must be one of the run's evaluators.
regressedCases (dict) --
The cases that pass on the control and fail on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Lower is better. Requires a control (RULE_CONTROL_REQUIRED).
fixedCases (dict) --
The cases that fail on the control and pass on the target, of the cases both runs have, each judged on both sides by the rule's criteria on the evaluators both runs have. Higher is better. Requires a control (RULE_CONTROL_REQUIRED).
regressedScores (dict) --
Fails the run when, for any case that both runs scored, on any evaluator that both runs have, the target scored worse than the control: lower, or higher for an evaluator whose scoreDirection is LOWER_IS_BETTER on the target run. Requires a control (RULE_CONTROL_REQUIRED). Takes no bound.
unpairedCaseRate (dict) --
The share of cases that are not judged on both the target and the control. Lower is better. Requires a control (RULE_CONTROL_REQUIRED). Checked only when the rule has a gate on it: comparing with a control adds no gate.
bound (dict) --
The gate's bound. Absent for regressedScores, which takes none.
min (float) --
The minimum value of the metric. A finite number from 0 to 1 for a rate, or from -1e9 to 1e9 for an evaluator average.
max (float) --
The maximum value of the metric. A finite number from 0 to 1.
vsControl (dict) --
A bound relative to the control's value of the same metric, both over the cases both runs have: passRate and notScoredRate judged by the rule's criteria on the evaluators both runs have, evaluatorAverage over the cases both runs scored on it. A check with nothing to compare (an evaluator the control doesn't have, or no such cases) is skipped and left out of the checks. Not valid on regressedCases, fixedCases, regressedScores or unpairedCaseRate, which already compare with the control (RULE_BOUND_INVALID). Requires a control (RULE_CONTROL_REQUIRED).
minDelta (float) --
The least acceptable change, where positive is always better. For example, -0.02 allows at most 0.02 worse, 0 requires no worse, and 0.01 requires at least 0.01 better.
mode (string) --
Whether minDelta is an absolute change or a change relative to the control's value.
observed (float) --
The metric's value for this run.
controlObserved (float) --
The control's value of the metric. Present for vsControl checks.
delta (float) --
The change from the control, in the bound's mode, signed so that positive is better. Absent when the change is not finite, such as in RATIO mode against a control value of 0.
passed (boolean) --
Whether the gate held.
decisive (boolean) --
Whether this check decided a FAILED verdict.
observedByEvaluator (list) --
The regressed scores for each evaluator: one entry for each evaluator both runs have on which the target scored at least one case worse than the control. Present only on a regressedScores check, where it's empty when nothing regressed.
(dict) --
A check's count for one evaluator.
evaluatorId (string) --
The ID of the evaluator.
count (integer) --
For regressedScores, the number of cases the target scored worse than the control on this evaluator.
createdAt (datetime) --
The time when the run was created.
startedAt (datetime) --
The time when the run started. For reported runs, the declared run.startedAt, or createdAt if none was declared. For hosted runs, the time when the batch evaluation was created.
completedAt (datetime) --
The time when the run ended.
updatedAt (datetime) --
The time when the run was last updated.
Replaces a lookup table's content, its description, or both.
Only the fields you provide are changed. Replacing the content replaces every row: there is no partial row update.
See also: AWS API Documentation
Request Syntax
client.update_lookup(
identifier='string',
description='string',
body='string',
queryId='string',
kmsKeyArn='string'
)
string
[REQUIRED]
The id of the lookup table to update.
string
The new description of the lookup table. Omit to leave the description unchanged, or supply an empty string to remove it, leaving the table with no description.
string
The replacement CSV content of the lookup table. Omit to leave the content unchanged. At most one of body and queryId may be specified.
string
The identifier of a query whose results become the lookup table's content.
string
The ARN of a customer managed KMS key used to encrypt the lookup table's content.
dict
Response Syntax
{
'arn': 'string',
'updatedAt': datetime(2015, 1, 1)
}
Response Structure
(dict) --
arn (string) --
The ARN of the lookup table.
updatedAt (datetime) --
The timestamp when the lookup table's content was last written.
{'principal': {'principalType': {'SLO'}}}
Response {'accessGrant': {'principal': {'principalType': {'SLO'}}}}
Creates an AccessGrant that authorizes a principal to perform a set of actions on resources in a space.
Optionally narrow the grant with scoped actions that limit it to specific resources and fields. Use ListAccessGrants and GetAccessGrant to retrieve grants, and DeleteAccessGrant to remove them.
See also: AWS API Documentation
Request Syntax
client.create_access_grant(
domainId='string',
spaceId='string',
name='string',
principal={
'principalType': 'IDC_USER'|'IDC_GROUP'|'IAM_USER'|'IAM_ROLE'|'IAM_ROOT'|'ACCESS_PROFILE'|'ALERT'|'AGENT'|'SLO',
'principalId': 'string',
'principalAttributes': [
{
'key': 'string',
'value': 'string'
},
]
},
permission='SPACE_ADMIN'|'READ'|'READ_WRITE_DELETE'|'CUSTOM',
scopedActions=[
{
'actions': [
'string',
],
'resources': [
{
'resourceType': 'string',
'resourceArns': [
'string',
],
'tags': {
'string': 'string'
},
'signalTypes': [
'LOGS'|'TRACES',
],
'rowScopeGroups': [
[
{
'field': 'string',
'operator': 'IN',
'values': [
'string',
]
},
],
]
},
],
'contextConditions': {
'string': [
'string',
]
}
},
],
tags={
'string': 'string'
},
clientToken='string'
)
string
[REQUIRED]
The ID of the domain that contains the space.
string
[REQUIRED]
The ID of the space to scope the grant to.
string
[REQUIRED]
A name that identifies the access grant.
dict
[REQUIRED]
The principal receiving the grant.
principalType (string) -- [REQUIRED]
The type of principal receiving the grant.
principalId (string) --
The ID of the principal receiving the grant.
principalAttributes (list) --
Attribute conditions for attribute-based access. When provided, the grant targets any principal matching all specified conditions. Supported only for IDC_USER principals.
(dict) --
A single attribute condition used to match principals for attribute-based access.
key (string) -- [REQUIRED]
The Identity Center user attribute to match on. One of userName, active, userStatus, displayName, email, name.givenName, name.familyName, enterprise.department, enterprise.division, enterprise.organization, enterprise.costCenter, or enterprise.employeeNumber. Each key may appear only once per grant.
value (string) -- [REQUIRED]
The attribute value.
string
[REQUIRED]
The permission to grant. Exactly one permission is granted per request.
list
Groups of actions to allow, each with the resource scopes and conditions that limit those actions.
(dict) --
A group of actions within an access grant, together with the resource scopes and context conditions that apply to exactly those actions.
actions (list) -- [REQUIRED]
The actions this group applies to.
(string) --
A single scoped action in "vendor-code:Action" form (e.g. "bedrock:InvokeModel"). Wildcards are not permitted.
resources (list) --
Optional resource scopes constraining these actions to specific resources.
(dict) --
A single resource scope entry within an AccessGrant. Associates a resource type with optional ARN patterns, tag conditions, and row-level filters.
resourceType (string) -- [REQUIRED]
Resource type name (e.g., "DataSet", "OmniDashboard").
resourceArns (list) --
Specific resource ARNs or ARN patterns. When set, actions are limited to these resources. When absent, defaults to "*".
(string) --
tags (dict) --
Tag-based conditions for dynamic resource scoping. Access applies only to resources carrying all of the specified tag key/value pairs.
(string) --
(string) --
signalTypes (list) --
Signal types this scope's row filtering applies to. Required when rowScopeGroups is set.
(string) --
Telemetry signal type that row-scoped access control applies to.
rowScopeGroups (list) --
Row-level filters for this scope, as an OR of AND-groups: a row is visible when it matches every filter in any one group. Requires signalTypes.
Row filters are additive across a principal's matching grants. A signal type with no matching group is unrestricted, and when rowScopeGroups is omitted all rows are visible for all signal types.
(list) --
A group of row filters that must all match. A row satisfies the group only when it matches every filter in it.
(dict) --
A single additive row-level filter on an AccessGrant. A row is visible when its value for the given field matches the filter's values. Row filters are additive: the visible rows are the union of all row filters across a principal's matching grants.
field (string) -- [REQUIRED]
The field (column) the allowlist applies to (e.g., "serviceName", "accountId").
operator (string) -- [REQUIRED]
Match operator applied to this filter's values.
values (list) -- [REQUIRED]
The values the field is matched against.
(string) --
A single allowlist value for a RowScope field.
contextConditions (dict) --
Optional context conditions for fine-grained access control on these actions.
(string) --
(list) --
Generic list of strings.
(string) --
dict
The tags to associate with the access grant.
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
string
Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
This field is autopopulated if not provided.
dict
Response Syntax
{
'accessGrant': {
'grantId': 'string',
'grantArn': 'string',
'name': 'string',
'accountId': 'string',
'domainId': 'string',
'principal': {
'principalType': 'IDC_USER'|'IDC_GROUP'|'IAM_USER'|'IAM_ROLE'|'IAM_ROOT'|'ACCESS_PROFILE'|'ALERT'|'AGENT'|'SLO',
'principalId': 'string',
'principalAttributes': [
{
'key': 'string',
'value': 'string'
},
]
},
'permission': 'SPACE_ADMIN'|'READ'|'READ_WRITE_DELETE'|'CUSTOM',
'grantType': 'SERVICE_MANAGED'|'CUSTOMER_MANAGED',
'createdBy': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'spaceId': 'string',
'scopedActions': [
{
'actions': [
'string',
],
'resources': [
{
'resourceType': 'string',
'resourceArns': [
'string',
],
'tags': {
'string': 'string'
},
'signalTypes': [
'LOGS'|'TRACES',
],
'rowScopeGroups': [
[
{
'field': 'string',
'operator': 'IN',
'values': [
'string',
]
},
],
]
},
],
'contextConditions': {
'string': [
'string',
]
}
},
]
}
}
Response Structure
(dict) --
accessGrant (dict) --
The details of the created access grant.
grantId (string) --
The unique ID of the access grant.
grantArn (string) --
The Amazon Resource Name (ARN) of the access grant.
name (string) --
A name that identifies the access grant.
accountId (string) --
The AWS account ID that owns the grant.
domainId (string) --
The ID of the domain the grant belongs to.
principal (dict) --
The principal receiving the grant.
principalType (string) --
The type of principal receiving the grant.
principalId (string) --
The ID of the principal receiving the grant.
principalAttributes (list) --
Attribute conditions for attribute-based access. When provided, the grant targets any principal matching all specified conditions. Supported only for IDC_USER principals.
(dict) --
A single attribute condition used to match principals for attribute-based access.
key (string) --
The Identity Center user attribute to match on. One of userName, active, userStatus, displayName, email, name.givenName, name.familyName, enterprise.department, enterprise.division, enterprise.organization, enterprise.costCenter, or enterprise.employeeNumber. Each key may appear only once per grant.
value (string) --
The attribute value.
permission (string) --
The permission granted.
grantType (string) --
Who manages the grant.
createdBy (string) --
The principal that created the grant.
createdAt (datetime) --
The timestamp when the grant was created.
updatedAt (datetime) --
The timestamp when the grant was last updated.
spaceId (string) --
The space this grant applies to. Domain-scoped grants are returned by ListDomainAccessGrantsForOrganization instead.
scopedActions (list) --
Groups of actions allowed by the grant, each with the resource scopes and conditions that limit those actions.
(dict) --
A group of actions within an access grant, together with the resource scopes and context conditions that apply to exactly those actions.
actions (list) --
The actions this group applies to.
(string) --
A single scoped action in "vendor-code:Action" form (e.g. "bedrock:InvokeModel"). Wildcards are not permitted.
resources (list) --
Optional resource scopes constraining these actions to specific resources.
(dict) --
A single resource scope entry within an AccessGrant. Associates a resource type with optional ARN patterns, tag conditions, and row-level filters.
resourceType (string) --
Resource type name (e.g., "DataSet", "OmniDashboard").
resourceArns (list) --
Specific resource ARNs or ARN patterns. When set, actions are limited to these resources. When absent, defaults to "*".
(string) --
tags (dict) --
Tag-based conditions for dynamic resource scoping. Access applies only to resources carrying all of the specified tag key/value pairs.
(string) --
(string) --
signalTypes (list) --
Signal types this scope's row filtering applies to. Required when rowScopeGroups is set.
(string) --
Telemetry signal type that row-scoped access control applies to.
rowScopeGroups (list) --
Row-level filters for this scope, as an OR of AND-groups: a row is visible when it matches every filter in any one group. Requires signalTypes.
Row filters are additive across a principal's matching grants. A signal type with no matching group is unrestricted, and when rowScopeGroups is omitted all rows are visible for all signal types.
(list) --
A group of row filters that must all match. A row satisfies the group only when it matches every filter in it.
(dict) --
A single additive row-level filter on an AccessGrant. A row is visible when its value for the given field matches the filter's values. Row filters are additive: the visible rows are the union of all row filters across a principal's matching grants.
field (string) --
The field (column) the allowlist applies to (e.g., "serviceName", "accountId").
operator (string) --
Match operator applied to this filter's values.
values (list) --
The values the field is matched against.
(string) --
A single allowlist value for a RowScope field.
contextConditions (dict) --
Optional context conditions for fine-grained access control on these actions.
(string) --
(list) --
Generic list of strings.
(string) --
{'notificationRules': {'target': {'type': {'investigation'}}},
'rule': {'sloRule': {'condition': {'burnRate': {'criticalThreshold': 'double',
'shortWindowMinutes': 'integer',
'warningThreshold': 'double',
'windowMinutes': 'integer'},
'errorBudget': {'criticalThreshold': 'double',
'warningThreshold': 'double'}},
'evaluation': {'intervalSeconds': 'integer',
'pendingDurationSeconds': 'integer',
'recoveryDurationSeconds': 'integer'},
'noData': {'treatAs': 'OK | WARNING | CRITICAL | NODATA'},
'sloId': 'string'}}}
Response {'alert': {'notificationRules': {'target': {'type': {'investigation'}}},
'rule': {'sloRule': {'condition': {'burnRate': {'criticalThreshold': 'double',
'shortWindowMinutes': 'integer',
'warningThreshold': 'double',
'windowMinutes': 'integer'},
'errorBudget': {'criticalThreshold': 'double',
'warningThreshold': 'double'}},
'evaluation': {'intervalSeconds': 'integer',
'pendingDurationSeconds': 'integer',
'recoveryDurationSeconds': 'integer'},
'noData': {'treatAs': 'OK | WARNING | CRITICAL '
'| NODATA'},
'sloId': 'string'}}}}
Creates a new alert within a space.
Use GetAlert and ListAlerts to retrieve alerts, UpdateAlert to modify one, and DeleteAlert to remove it.
See also: AWS API Documentation
Request Syntax
client.create_alert(
spaceId='string',
profileId='string',
name='string',
description='string',
rule={
'telemetryRule': {
'query': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'condition': {
'thresholdMode': 'COUNT_OF_RESULTS'|'FIELD_VALUE',
'thresholdField': 'string',
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'warningThreshold': 123.0,
'criticalThreshold': 123.0
},
'evaluation': {
'intervalSeconds': 123,
'pendingDurationSeconds': 123,
'recoveryDurationSeconds': 123
},
'noData': {
'treatAs': 'OK'|'WARNING'|'CRITICAL'|'NODATA'
}
},
'sloRule': {
'sloId': 'string',
'condition': {
'burnRate': {
'windowMinutes': 123,
'shortWindowMinutes': 123,
'warningThreshold': 123.0,
'criticalThreshold': 123.0
},
'errorBudget': {
'warningThreshold': 123.0,
'criticalThreshold': 123.0
}
},
'evaluation': {
'intervalSeconds': 123,
'pendingDurationSeconds': 123,
'recoveryDurationSeconds': 123
},
'noData': {
'treatAs': 'OK'|'WARNING'|'CRITICAL'|'NODATA'
}
}
},
notificationsEnabled=True|False,
tags={
'string': 'string'
},
notificationRules=[
{
'trigger': {
'stateValues': [
'OK'|'WARNING'|'CRITICAL'|'NODATA',
]
},
'target': {
'type': 'sns'|'slack'|'pagerduty'|'investigation',
'arn': 'string',
'metadata': {
'string': 'string'
}
}
},
],
clientToken='string'
)
string
[REQUIRED]
The unique ID of the space to create the alert in.
string
[REQUIRED]
The ID of the access profile the alert uses to evaluate its query and execute notifications. The caller supplies it: there is no managed alert profile, and the service does not pick one on the caller's behalf.
string
[REQUIRED]
Alert name, for display. Max 256 (the AlarmName budget). Not the alert's identity: the backend mints a separate uuid as the {@link AlertId}, so the name need not be unique within a space and addressing an alert never depends on it. UpdateAlert accepts a new name to rename the alert.
string
An optional description of the alert.
dict
[REQUIRED]
The rule that defines how the alert is evaluated.
telemetryRule (dict) --
The telemetry-based rule definition.
query (dict) --
The query expression to evaluate.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
condition (dict) --
The condition that determines when the alert fires.
thresholdMode (string) --
How the threshold is applied to query results.
thresholdField (string) --
The field the threshold is evaluated against.
comparator (string) --
The comparison operator applied to the threshold.
warningThreshold (float) --
The value at which the alert enters the WARNING state.
criticalThreshold (float) --
The value at which the alert enters the CRITICAL state.
evaluation (dict) --
The evaluation cadence and durations.
intervalSeconds (integer) -- [REQUIRED]
The interval between evaluations, in seconds.
pendingDurationSeconds (integer) --
The duration a breach must persist before the alert fires, in seconds.
recoveryDurationSeconds (integer) --
The duration a recovery must persist before the alert clears, in seconds.
noData (dict) --
How the alert behaves when a query produces no data.
treatAs (string) -- [REQUIRED]
The state to report when an evaluation produces no data.
sloRule (dict) --
An alert on the burn rate or the error budget of a service level objective (SLO) in the same space. On UpdateAlert, omitted members stay unchanged and a supplied block replaces that block whole. An alert cannot switch between telemetryRule and sloRule.
sloId (string) --
The SLO the alert is built on. It must be in the same space as the alert, and the caller must be allowed to read it. Required on create; omit on update to keep the current SLO.
condition (dict) --
What makes the alert fire. Exactly one member is set. Required on create; omit on update to keep the current condition. When supplied on update, the condition block is replaced whole.
burnRate (dict) --
Fire on how fast the error budget is being spent.
windowMinutes (integer) -- [REQUIRED]
The burn-rate window in multiples of 5 minutes, from 5 through 10080 (7 days).
shortWindowMinutes (integer) --
The short window of a pair, in multiples of 5 minutes from 5 through 10080 and shorter than windowMinutes. Omit for a single window. Recommended pairs are 60/5, 360/30, 1440/60 and 4320/360.
warningThreshold (float) --
The alert is WARNING when the burn rate reaches or exceeds this multiple of the sustainable rate. Greater than 0.
criticalThreshold (float) --
The alert is CRITICAL when the burn rate reaches or exceeds this multiple of the sustainable rate. Greater than 0, and greater than warningThreshold when both are set.
errorBudget (dict) --
Fire on how much of the error budget has been spent.
warningThreshold (float) --
The alert is WARNING when the consumed ratio reaches or exceeds this value. Greater than 0 and at most 1.
criticalThreshold (float) --
The alert is CRITICAL when the consumed ratio reaches or exceeds this value. Greater than 0 and at most 1, and greater than warningThreshold when both are set.
evaluation (dict) --
The evaluation cadence and durations. Required on create; omit on update to keep the current evaluation settings. When supplied on update, the evaluation block is replaced whole.
intervalSeconds (integer) -- [REQUIRED]
The interval between evaluations, in seconds.
pendingDurationSeconds (integer) --
The duration a breach must persist before the alert fires, in seconds.
recoveryDurationSeconds (integer) --
The duration a recovery must persist before the alert clears, in seconds.
noData (dict) --
How the alert behaves when no fresh SLO measurement is available. Omit on create to use NODATA. Omit on update to keep the current behavior. When supplied on update, the noData block is replaced whole.
treatAs (string) -- [REQUIRED]
The state to report when an evaluation produces no data.
boolean
Whether actions (notifications) are enabled for this alert. Defaults to true when omitted.
dict
The tags to associate with the alert.
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
list
The notification rules that determine when and where notifications are sent.
(dict) --
Single notification rule: which transitions trigger this rule and where the resulting notification should be sent.
trigger (dict) -- [REQUIRED]
The conditions that trigger this notification rule.
stateValues (list) --
Alert state(s) that trigger this rule. Empty / omitted = any state.
(string) --
Flat alert state. Severity is folded in: a WARNING/CRITICAL alert reports that state directly. {@code NODATA} indicates the evaluation produced no data (subject to the rule's noData.treatAs handling).
target (dict) -- [REQUIRED]
The destination for notifications from this rule.
type (string) -- [REQUIRED]
The type of notification target.
arn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the notification target. For {@code slack} and {@code pagerduty}, an integration ARN as returned by {@code ListIntegrations}.
metadata (dict) --
Additional target-specific metadata.
(string) --
(string) --
string
Idempotency token for safe retries. Retrying with the same token within the idempotency window returns the original alert instead of creating a duplicate.
This field is autopopulated if not provided.
dict
Response Syntax
{
'alertArn': 'string',
'alert': {
'name': 'string',
'alertId': 'string',
'description': 'string',
'accountId': 'string',
'spaceId': 'string',
'profileId': 'string',
'rule': {
'telemetryRule': {
'query': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'condition': {
'thresholdMode': 'COUNT_OF_RESULTS'|'FIELD_VALUE',
'thresholdField': 'string',
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'warningThreshold': 123.0,
'criticalThreshold': 123.0
},
'evaluation': {
'intervalSeconds': 123,
'pendingDurationSeconds': 123,
'recoveryDurationSeconds': 123
},
'noData': {
'treatAs': 'OK'|'WARNING'|'CRITICAL'|'NODATA'
}
},
'sloRule': {
'sloId': 'string',
'condition': {
'burnRate': {
'windowMinutes': 123,
'shortWindowMinutes': 123,
'warningThreshold': 123.0,
'criticalThreshold': 123.0
},
'errorBudget': {
'warningThreshold': 123.0,
'criticalThreshold': 123.0
}
},
'evaluation': {
'intervalSeconds': 123,
'pendingDurationSeconds': 123,
'recoveryDurationSeconds': 123
},
'noData': {
'treatAs': 'OK'|'WARNING'|'CRITICAL'|'NODATA'
}
}
},
'notificationStatus': 'ENABLED'|'DISABLED',
'state': {
'value': 'OK'|'WARNING'|'CRITICAL'|'NODATA',
'transitionedAt': datetime(2015, 1, 1),
'contributorSummary': {
'warningCount': 123,
'criticalCount': 123
},
'data': {
'thresholdBreached': 123.0
}
},
'notificationRules': [
{
'trigger': {
'stateValues': [
'OK'|'WARNING'|'CRITICAL'|'NODATA',
]
},
'target': {
'type': 'sns'|'slack'|'pagerduty'|'investigation',
'arn': 'string',
'metadata': {
'string': 'string'
}
}
},
],
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'alertArn': 'string'
}
}
Response Structure
(dict) --
alertArn (string) --
Deprecated. Use alert.alertArn, which carries the same value. Kept so an existing caller keeps working while it moves to alert.
alert (dict) --
The alert that was created. The same Alert shape GetAlert returns, so a caller need not read the alert back to learn its timestamps or its minted alert id.
{@code alert.state} is absent here — see the state member of Alert. Every other member is populated exactly as GetAlert populates it.
name (string) --
The name of the alert.
alertId (string) --
The stable alert identifier (see {@link AlertId}), minted on create and immutable across updates. Use it (not {@code name}) to address the alert on GetAlert/UpdateAlert/DeleteAlert; it is also the ARN's resource id.
description (string) --
An optional description of the alert.
accountId (string) --
The AWS account ID that owns the alert.
spaceId (string) --
The ID of the space the alert belongs to.
profileId (string) --
The ID of the access profile associated with the alert.
rule (dict) --
The rule that defines how the alert is evaluated.
telemetryRule (dict) --
The telemetry-based rule definition.
query (dict) --
The query expression to evaluate.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
condition (dict) --
The condition that determines when the alert fires.
thresholdMode (string) --
How the threshold is applied to query results.
thresholdField (string) --
The field the threshold is evaluated against.
comparator (string) --
The comparison operator applied to the threshold.
warningThreshold (float) --
The value at which the alert enters the WARNING state.
criticalThreshold (float) --
The value at which the alert enters the CRITICAL state.
evaluation (dict) --
The evaluation cadence and durations.
intervalSeconds (integer) --
The interval between evaluations, in seconds.
pendingDurationSeconds (integer) --
The duration a breach must persist before the alert fires, in seconds.
recoveryDurationSeconds (integer) --
The duration a recovery must persist before the alert clears, in seconds.
noData (dict) --
How the alert behaves when a query produces no data.
treatAs (string) --
The state to report when an evaluation produces no data.
sloRule (dict) --
An alert on the burn rate or the error budget of a service level objective (SLO) in the same space. On UpdateAlert, omitted members stay unchanged and a supplied block replaces that block whole. An alert cannot switch between telemetryRule and sloRule.
sloId (string) --
The SLO the alert is built on. It must be in the same space as the alert, and the caller must be allowed to read it. Required on create; omit on update to keep the current SLO.
condition (dict) --
What makes the alert fire. Exactly one member is set. Required on create; omit on update to keep the current condition. When supplied on update, the condition block is replaced whole.
burnRate (dict) --
Fire on how fast the error budget is being spent.
windowMinutes (integer) --
The burn-rate window in multiples of 5 minutes, from 5 through 10080 (7 days).
shortWindowMinutes (integer) --
The short window of a pair, in multiples of 5 minutes from 5 through 10080 and shorter than windowMinutes. Omit for a single window. Recommended pairs are 60/5, 360/30, 1440/60 and 4320/360.
warningThreshold (float) --
The alert is WARNING when the burn rate reaches or exceeds this multiple of the sustainable rate. Greater than 0.
criticalThreshold (float) --
The alert is CRITICAL when the burn rate reaches or exceeds this multiple of the sustainable rate. Greater than 0, and greater than warningThreshold when both are set.
errorBudget (dict) --
Fire on how much of the error budget has been spent.
warningThreshold (float) --
The alert is WARNING when the consumed ratio reaches or exceeds this value. Greater than 0 and at most 1.
criticalThreshold (float) --
The alert is CRITICAL when the consumed ratio reaches or exceeds this value. Greater than 0 and at most 1, and greater than warningThreshold when both are set.
evaluation (dict) --
The evaluation cadence and durations. Required on create; omit on update to keep the current evaluation settings. When supplied on update, the evaluation block is replaced whole.
intervalSeconds (integer) --
The interval between evaluations, in seconds.
pendingDurationSeconds (integer) --
The duration a breach must persist before the alert fires, in seconds.
recoveryDurationSeconds (integer) --
The duration a recovery must persist before the alert clears, in seconds.
noData (dict) --
How the alert behaves when no fresh SLO measurement is available. Omit on create to use NODATA. Omit on update to keep the current behavior. When supplied on update, the noData block is replaced whole.
treatAs (string) --
The state to report when an evaluation produces no data.
notificationStatus (string) --
Whether notifications are enabled.
state (dict) --
Live evaluation state (read-only, system-managed). Populated by GetAlert. ListAlerts reports state on AlertSummary instead, where it stays required.
Absent on CreateAlert: a newly created alert has never been evaluated, so any state reported there would be a default rather than an observation. Call GetAlert for live state. Not @required for that reason — GetAlert always populates it.
contributorSummary is nested inside this member, so it too is absent on CreateAlert.
value (string) --
Current flat state.
transitionedAt (datetime) --
When the alert transitioned to its current state.
contributorSummary (dict) --
Counts of contributors currently breaching each severity threshold. Present only when contributor-level tracking is active; absent until the first contributor breaches a {@code WARNING} or {@code CRITICAL} threshold.
warningCount (integer) --
Number of contributors currently breaching the warning threshold.
criticalCount (integer) --
Number of contributors currently breaching the critical threshold.
data (dict) --
Structured detail about why the alert is in its current state.
thresholdBreached (float) --
For COUNT_OF_RESULTS alerts, the row count that breached; null for FIELD_VALUE (multi-contributor) alerts.
notificationRules (list) --
The notification rules for the alert.
(dict) --
Single notification rule: which transitions trigger this rule and where the resulting notification should be sent.
trigger (dict) --
The conditions that trigger this notification rule.
stateValues (list) --
Alert state(s) that trigger this rule. Empty / omitted = any state.
(string) --
Flat alert state. Severity is folded in: a WARNING/CRITICAL alert reports that state directly. {@code NODATA} indicates the evaluation produced no data (subject to the rule's noData.treatAs handling).
target (dict) --
The destination for notifications from this rule.
type (string) --
The type of notification target.
arn (string) --
The Amazon Resource Name (ARN) of the notification target. For {@code slack} and {@code pagerduty}, an integration ARN as returned by {@code ListIntegrations}.
metadata (dict) --
Additional target-specific metadata.
(string) --
(string) --
createdAt (datetime) --
The timestamp when the alert was created.
updatedAt (datetime) --
The timestamp when the alert was last updated.
alertArn (string) --
The Amazon Resource Name (ARN) of the alert.
{'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}
Response {'domain': {'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}}
Creates a domain with identity provider configuration.
Use GetDomain to retrieve the domain, UpdateDomain to change its configuration, and CreateSpace to add spaces within it.
See also: AWS API Documentation
Request Syntax
client.create_domain(
name='string',
identityProviders=[
'IAM'|'IDC',
],
identityProviderConfiguration={
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
},
tags={
'string': 'string'
},
clientToken='string'
)
string
[REQUIRED]
A name that identifies the domain. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
list
[REQUIRED]
The identity providers to configure for the domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
dict
Identity provider configuration for the domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) -- [REQUIRED]
Whether Spaces in this domain may use Identity Center in a different Region.
dict
The tags to associate with the domain.
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
string
Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
This field is autopopulated if not provided.
dict
Response Syntax
{
'domain': {
'domainId': 'string',
'domainArn': 'string',
'name': 'string',
'identityProviders': [
'IAM'|'IDC',
],
'identityProviderConfiguration': {
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
},
'domainEndpointUrl': 'string',
'customEndpointUrls': [
'string',
],
'identityCenterApplicationArn': 'string',
'region': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'status': 'ACTIVE'
}
}
Response Structure
(dict) --
domain (dict) --
The details of the created domain.
domainId (string) --
The unique ID of the domain.
domainArn (string) --
The Amazon Resource Name (ARN) of the domain.
name (string) --
A name that identifies the domain.
identityProviders (list) --
The identity providers configured for the domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
identityProviderConfiguration (dict) --
Identity provider configuration for the domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) --
Whether Spaces in this domain may use Identity Center in a different Region.
domainEndpointUrl (string) --
The HTTPS endpoint URL for accessing the domain.
customEndpointUrls (list) --
Additional endpoint URLs derived from the domain name.
(string) --
identityCenterApplicationArn (string) --
The ARN of the Identity Center application. Absent for IAM-only domains.
region (string) --
The Region where this domain was created.
createdAt (datetime) --
The timestamp when the domain was created.
updatedAt (datetime) --
The timestamp when the domain was last updated.
status (string) --
Current status of the domain.
{'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}
Response {'organizationDomain': {'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}}
Creates an organization-scoped domain for the caller's AWS Organization. Only the organization's management account can call this operation.
See also: AWS API Documentation
Request Syntax
client.create_domain_for_organization(
name='string',
identityProviders=[
'IAM'|'IDC',
],
identityProviderConfiguration={
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
},
domainAccessRoleArn='string',
tags={
'string': 'string'
},
clientToken='string'
)
string
[REQUIRED]
A name that identifies the organization domain. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
list
[REQUIRED]
The identity providers to configure for the domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
dict
Identity provider configuration for the domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) -- [REQUIRED]
Whether Spaces in this domain may use Identity Center in a different Region.
string
[REQUIRED]
The ARN of an IAM role in the management account used for domain access. You must create this role, and its trust policy must allow the service principal to assume it.
dict
The tags to associate with the domain.
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
string
Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
This field is autopopulated if not provided.
dict
Response Syntax
{
'organizationDomain': {
'domainId': 'string',
'domainArn': 'string',
'name': 'string',
'domainEndpointUrl': 'string',
'customEndpointUrls': [
'string',
],
'organizationId': 'string',
'ownerAccountId': 'string',
'identityProviders': [
'IAM'|'IDC',
],
'identityProviderConfiguration': {
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
},
'identityCenterApplicationArn': 'string',
'region': 'string',
'status': 'ACTIVE',
'domainAccessRoleArn': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
organizationDomain (dict) --
The details of the created organization domain.
domainId (string) --
The unique ID of the organization domain.
domainArn (string) --
The Amazon Resource Name (ARN) of the organization domain.
name (string) --
A name that identifies the organization domain.
domainEndpointUrl (string) --
The HTTPS endpoint URL for accessing the organization domain.
customEndpointUrls (list) --
Additional endpoint URLs derived from the domain name.
(string) --
organizationId (string) --
The ID of the AWS Organization that owns the domain.
ownerAccountId (string) --
The AWS account ID that owns the organization domain.
identityProviders (list) --
The identity providers configured for the organization domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
identityProviderConfiguration (dict) --
Identity provider configuration for the organization domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) --
Whether Spaces in this domain may use Identity Center in a different Region.
identityCenterApplicationArn (string) --
The ARN of the Identity Center application. Absent for IAM-only domains.
region (string) --
The Region where this organization domain was created.
status (string) --
Current status of the organization domain.
domainAccessRoleArn (string) --
The ARN of the customer-provided IAM role in the management account used for domain access.
createdAt (datetime) --
The timestamp when the organization domain was created.
updatedAt (datetime) --
The timestamp when the organization domain was last updated.
{'integrationType': {'GITHUB', 'PAGERDUTY', 'GITHUB_ENTERPRISE'}}
Response {'integration': {'integrationType': {'GITHUB',
'GITHUB_ENTERPRISE',
'PAGERDUTY'}}}
Creates an integration with a third-party provider. Returns the integration identifier and its initial status; when the provider requires interactive consent, an authorization URL is returned for the user to complete setup.
See also: AWS API Documentation
Request Syntax
client.create_integration(
integrationType='AWS_CONFIG_SLREC'|'AWS_CONFIG_AZURE_SLREC'|'GITHUB'|'SLACK'|'EXTERNAL_AGENT'|'AWS_INTEGRATION'|'PAGERDUTY'|'GITHUB_ENTERPRISE',
name='string',
credential={
'oauthCodeCredential': {
'authCode': 'string'
},
'oauthClientCredential': {
'clientId': 'string',
'clientSecret': 'string',
'providerId': 'string'
},
'apiKeyCredential': {
'apiKeyValue': 'string'
}
},
integrationAttributes={
'string': 'string'
},
roleArn='string',
tags={
'string': 'string'
},
clientToken='string'
)
string
[REQUIRED]
The type of third-party provider to integrate with.
string
[REQUIRED]
The name for the new integration; unique within the account.
dict
The credential used to authenticate with the third-party provider.
oauthCodeCredential (dict) --
Credentials for an OAuth 2.0 authorization-code grant.
authCode (string) -- [REQUIRED]
The OAuth 2.0 authorization code returned by the external system's authorization endpoint.
oauthClientCredential (dict) --
Credentials for an OAuth 2.0 client-credentials grant.
clientId (string) -- [REQUIRED]
The OAuth 2.0 client identifier registered with the external system.
clientSecret (string) -- [REQUIRED]
The OAuth 2.0 client secret that pairs with the client identifier.
providerId (string) --
The identifier of the OAuth provider that issued the client credentials.
apiKeyCredential (dict) --
An API key credential.
apiKeyValue (string) -- [REQUIRED]
The API key value used to authenticate with the external system.
dict
Provider-specific attributes to associate with the integration.
(string) --
(string) --
string
The Amazon Resource Name of the IAM role assumed to access the integration.
dict
Tags to apply to the integration at creation time (Tagris tag-on-create).
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
string
Idempotency token for safe retries. Retrying with the same token returns the original integration instead of creating a duplicate.
This field is autopopulated if not provided.
dict
Response Syntax
{
'integration': {
'integrationId': 'string',
'integrationArn': 'string',
'integrationType': 'AWS_CONFIG_SLREC'|'AWS_CONFIG_AZURE_SLREC'|'GITHUB'|'SLACK'|'EXTERNAL_AGENT'|'AWS_INTEGRATION'|'PAGERDUTY'|'GITHUB_ENTERPRISE',
'name': 'string',
'status': 'ACTIVE'|'DELETED'|'PENDING'|'PENDING_OAUTH'|'ERROR'|'FAILED',
'authType': 'NONE'|'OAUTH2'|'API_KEY',
'credentialArn': 'string',
'roleArn': 'string',
'integrationAttributes': {
'string': 'string'
},
'authorizationUrl': 'string',
'errorMessage': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'scope': 'ACCOUNT'|'ORGANIZATION'
}
}
Response Structure
(dict) --
The response from creating an integration.
integration (dict) --
The details of the created integration. This is the same object returned by GetIntegration and UpdateIntegration.
integrationId (string) --
The unique identifier of the integration.
integrationArn (string) --
The Amazon Resource Name (ARN) of the integration.
integrationType (string) --
The type of external system that an integration connects to, such as a source of configuration data, a messaging destination, or a model provider.
name (string) --
The customer-provided name of the integration.
status (string) --
The current lifecycle state of an integration.
authType (string) --
The authentication method that an integration uses to connect to its external system.
credentialArn (string) --
The Amazon Resource Name (ARN) of the secret that stores the integration's credentials.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to access the external system.
integrationAttributes (dict) --
Provider-specific key/value attributes that configure the integration.
(string) --
(string) --
authorizationUrl (string) --
The URL the customer visits to authorize the integration. Present while an OAuth authorization is pending.
errorMessage (string) --
A human-readable description of why the integration is in an ERROR or FAILED state. Present only when the integration has failed.
createdAt (datetime) --
The time at which the integration was created.
updatedAt (datetime) --
The time at which the integration was last updated.
scope (string) --
Whether this integration is account-scoped (ACCOUNT, customer-created) or organization-scoped (ORGANIZATION, created by an org-enablement rule). Absent on legacy records is treated as ACCOUNT.
{'identityCenterConfiguration': {'region': 'string'}}
Response {'space': {'identityCenterConfiguration': {'region': 'string'}}}
Creates a space in a domain.
Use GetSpace to retrieve the space, ListSpaces to enumerate spaces, UpdateSpace to modify it, and DeleteSpace to remove it.
See also: AWS API Documentation
Request Syntax
client.create_space(
name='string',
domainId='string',
identityCenterConfiguration={
'region': 'string'
},
dataAccessRoleArn='string',
agentCoreEvaluationRoleArn='string',
encryptionConfiguration={
'encryptionStrategy': 'AWS_OWNED'|'CUSTOMER_MANAGED',
'kmsKeyArn': 'string'
},
tags={
'string': 'string'
},
clientToken='string'
)
string
[REQUIRED]
A name that identifies the space. Must be 3-64 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
string
[REQUIRED]
The ID of the domain to create the space in.
dict
Identity Center settings for this space. Omit to use the space's Region.
region (string) -- [REQUIRED]
The Region where this space sends Identity Center requests.
string
[REQUIRED]
The ARN of the IAM role used for data access. The role must be in the caller's account.
string
The ARN of the IAM role used by AgentCore online evaluation. Must be in the caller's account. Omit if the space does not use AgentCore online evaluation.
dict
How to encrypt the space's data at rest. Omit for service owned encryption, which is equivalent to passing encryptionStrategy AWS_OWNED.
encryptionStrategy (string) -- [REQUIRED]
Which kind of key to use. Required.
kmsKeyArn (string) --
Customer managed KMS key ARN. Required when encryptionStrategy is CUSTOMER_MANAGED, and must be omitted when it is AWS_OWNED. Must be a symmetric ENCRYPT_DECRYPT key in the caller's account and region.
dict
The tags to associate with the space.
(string) --
Tag key. Must be non-empty; AWS-standard maximum length. Constraining the key (rather than a bare String) rejects empty-key payloads at the edge with a 400 ValidationException instead of faulting downstream as a 500.
(string) --
Tag value. AWS-standard maximum length; may be empty.
string
Idempotency token for safe retries. Repeated requests with the same token return the original result instead of creating a duplicate.
This field is autopopulated if not provided.
dict
Response Syntax
{
'space': {
'spaceId': 'string',
'name': 'string',
'spaceArn': 'string',
'domainArn': 'string',
'region': 'string',
'identityCenterConfiguration': {
'region': 'string'
},
'ownerAccountId': 'string',
'dataAccessRoleArn': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'agentCoreEvaluationRoleArn': 'string',
'status': 'ACTIVE'|'SUSPENDED'|'MOVING',
'statusReason': 'string',
'encryptionConfiguration': {
'encryptionStrategy': 'AWS_OWNED'|'CUSTOMER_MANAGED',
'kmsKeyArn': 'string'
}
}
}
Response Structure
(dict) --
space (dict) --
The details of the created space.
spaceId (string) --
The unique ID of the space.
name (string) --
A name that identifies the space.
spaceArn (string) --
The Amazon Resource Name (ARN) of the space.
domainArn (string) --
The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
region (string) --
The region where this space was created.
identityCenterConfiguration (dict) --
Identity Center settings for this space. Absent for IAM-only spaces.
region (string) --
The Region where this space sends Identity Center requests.
ownerAccountId (string) --
AWS account ID that owns this space.
dataAccessRoleArn (string) --
The ARN of the IAM role used for data access.
createdAt (datetime) --
The timestamp when the space was created.
updatedAt (datetime) --
The timestamp when the space was last updated.
agentCoreEvaluationRoleArn (string) --
The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
status (string) --
The status of the space.
statusReason (string) --
Reason for the current space status.
encryptionConfiguration (dict) --
How the space's data at rest is encrypted. Always populated: a space with no customer managed key reports encryptionStrategy AWS_OWNED and no kmsKeyArn.
encryptionStrategy (string) --
Which kind of key to use. Required.
kmsKeyArn (string) --
Customer managed KMS key ARN. Required when encryptionStrategy is CUSTOMER_MANAGED, and must be omitted when it is AWS_OWNED. Must be a symmetric ENCRYPT_DECRYPT key in the caller's account and region.
{'accessGrant': {'principal': {'principalType': {'SLO'}}}}
Retrieves the full detail of a single AccessGrant by ID.
See also: AWS API Documentation
Request Syntax
client.get_access_grant(
grantId='string'
)
string
[REQUIRED]
The ID of the access grant to retrieve.
dict
Response Syntax
{
'accessGrant': {
'grantId': 'string',
'grantArn': 'string',
'name': 'string',
'accountId': 'string',
'domainId': 'string',
'principal': {
'principalType': 'IDC_USER'|'IDC_GROUP'|'IAM_USER'|'IAM_ROLE'|'IAM_ROOT'|'ACCESS_PROFILE'|'ALERT'|'AGENT'|'SLO',
'principalId': 'string',
'principalAttributes': [
{
'key': 'string',
'value': 'string'
},
]
},
'permission': 'SPACE_ADMIN'|'READ'|'READ_WRITE_DELETE'|'CUSTOM',
'grantType': 'SERVICE_MANAGED'|'CUSTOMER_MANAGED',
'createdBy': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'spaceId': 'string',
'scopedActions': [
{
'actions': [
'string',
],
'resources': [
{
'resourceType': 'string',
'resourceArns': [
'string',
],
'tags': {
'string': 'string'
},
'signalTypes': [
'LOGS'|'TRACES',
],
'rowScopeGroups': [
[
{
'field': 'string',
'operator': 'IN',
'values': [
'string',
]
},
],
]
},
],
'contextConditions': {
'string': [
'string',
]
}
},
]
}
}
Response Structure
(dict) --
accessGrant (dict) --
The full details of the access grant.
grantId (string) --
The unique ID of the access grant.
grantArn (string) --
The Amazon Resource Name (ARN) of the access grant.
name (string) --
A name that identifies the access grant.
accountId (string) --
The AWS account ID that owns the grant.
domainId (string) --
The ID of the domain the grant belongs to.
principal (dict) --
The principal receiving the grant.
principalType (string) --
The type of principal receiving the grant.
principalId (string) --
The ID of the principal receiving the grant.
principalAttributes (list) --
Attribute conditions for attribute-based access. When provided, the grant targets any principal matching all specified conditions. Supported only for IDC_USER principals.
(dict) --
A single attribute condition used to match principals for attribute-based access.
key (string) --
The Identity Center user attribute to match on. One of userName, active, userStatus, displayName, email, name.givenName, name.familyName, enterprise.department, enterprise.division, enterprise.organization, enterprise.costCenter, or enterprise.employeeNumber. Each key may appear only once per grant.
value (string) --
The attribute value.
permission (string) --
The permission granted.
grantType (string) --
Who manages the grant.
createdBy (string) --
The principal that created the grant.
createdAt (datetime) --
The timestamp when the grant was created.
updatedAt (datetime) --
The timestamp when the grant was last updated.
spaceId (string) --
The space this grant applies to. Domain-scoped grants are returned by ListDomainAccessGrantsForOrganization instead.
scopedActions (list) --
Groups of actions allowed by the grant, each with the resource scopes and conditions that limit those actions.
(dict) --
A group of actions within an access grant, together with the resource scopes and context conditions that apply to exactly those actions.
actions (list) --
The actions this group applies to.
(string) --
A single scoped action in "vendor-code:Action" form (e.g. "bedrock:InvokeModel"). Wildcards are not permitted.
resources (list) --
Optional resource scopes constraining these actions to specific resources.
(dict) --
A single resource scope entry within an AccessGrant. Associates a resource type with optional ARN patterns, tag conditions, and row-level filters.
resourceType (string) --
Resource type name (e.g., "DataSet", "OmniDashboard").
resourceArns (list) --
Specific resource ARNs or ARN patterns. When set, actions are limited to these resources. When absent, defaults to "*".
(string) --
tags (dict) --
Tag-based conditions for dynamic resource scoping. Access applies only to resources carrying all of the specified tag key/value pairs.
(string) --
(string) --
signalTypes (list) --
Signal types this scope's row filtering applies to. Required when rowScopeGroups is set.
(string) --
Telemetry signal type that row-scoped access control applies to.
rowScopeGroups (list) --
Row-level filters for this scope, as an OR of AND-groups: a row is visible when it matches every filter in any one group. Requires signalTypes.
Row filters are additive across a principal's matching grants. A signal type with no matching group is unrestricted, and when rowScopeGroups is omitted all rows are visible for all signal types.
(list) --
A group of row filters that must all match. A row satisfies the group only when it matches every filter in it.
(dict) --
A single additive row-level filter on an AccessGrant. A row is visible when its value for the given field matches the filter's values. Row filters are additive: the visible rows are the union of all row filters across a principal's matching grants.
field (string) --
The field (column) the allowlist applies to (e.g., "serviceName", "accountId").
operator (string) --
Match operator applied to this filter's values.
values (list) --
The values the field is matched against.
(string) --
A single allowlist value for a RowScope field.
contextConditions (dict) --
Optional context conditions for fine-grained access control on these actions.
(string) --
(list) --
Generic list of strings.
(string) --
{'alert': {'notificationRules': {'target': {'type': {'investigation'}}},
'rule': {'sloRule': {'condition': {'burnRate': {'criticalThreshold': 'double',
'shortWindowMinutes': 'integer',
'warningThreshold': 'double',
'windowMinutes': 'integer'},
'errorBudget': {'criticalThreshold': 'double',
'warningThreshold': 'double'}},
'evaluation': {'intervalSeconds': 'integer',
'pendingDurationSeconds': 'integer',
'recoveryDurationSeconds': 'integer'},
'noData': {'treatAs': 'OK | WARNING | CRITICAL '
'| NODATA'},
'sloId': 'string'}}}}
Retrieves a single alert by its identifier.
Use ListAlerts to enumerate alerts in the space.
See also: AWS API Documentation
Request Syntax
client.get_alert(
spaceId='string',
alertId='string'
)
string
[REQUIRED]
The unique ID of the space.
string
[REQUIRED]
The alert to retrieve.
dict
Response Syntax
{
'alert': {
'name': 'string',
'alertId': 'string',
'description': 'string',
'accountId': 'string',
'spaceId': 'string',
'profileId': 'string',
'rule': {
'telemetryRule': {
'query': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'condition': {
'thresholdMode': 'COUNT_OF_RESULTS'|'FIELD_VALUE',
'thresholdField': 'string',
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'warningThreshold': 123.0,
'criticalThreshold': 123.0
},
'evaluation': {
'intervalSeconds': 123,
'pendingDurationSeconds': 123,
'recoveryDurationSeconds': 123
},
'noData': {
'treatAs': 'OK'|'WARNING'|'CRITICAL'|'NODATA'
}
},
'sloRule': {
'sloId': 'string',
'condition': {
'burnRate': {
'windowMinutes': 123,
'shortWindowMinutes': 123,
'warningThreshold': 123.0,
'criticalThreshold': 123.0
},
'errorBudget': {
'warningThreshold': 123.0,
'criticalThreshold': 123.0
}
},
'evaluation': {
'intervalSeconds': 123,
'pendingDurationSeconds': 123,
'recoveryDurationSeconds': 123
},
'noData': {
'treatAs': 'OK'|'WARNING'|'CRITICAL'|'NODATA'
}
}
},
'notificationStatus': 'ENABLED'|'DISABLED',
'state': {
'value': 'OK'|'WARNING'|'CRITICAL'|'NODATA',
'transitionedAt': datetime(2015, 1, 1),
'contributorSummary': {
'warningCount': 123,
'criticalCount': 123
},
'data': {
'thresholdBreached': 123.0
}
},
'notificationRules': [
{
'trigger': {
'stateValues': [
'OK'|'WARNING'|'CRITICAL'|'NODATA',
]
},
'target': {
'type': 'sns'|'slack'|'pagerduty'|'investigation',
'arn': 'string',
'metadata': {
'string': 'string'
}
}
},
],
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'alertArn': 'string'
}
}
Response Structure
(dict) --
alert (dict) --
The full alert entity.
name (string) --
The name of the alert.
alertId (string) --
The stable alert identifier (see {@link AlertId}), minted on create and immutable across updates. Use it (not {@code name}) to address the alert on GetAlert/UpdateAlert/DeleteAlert; it is also the ARN's resource id.
description (string) --
An optional description of the alert.
accountId (string) --
The AWS account ID that owns the alert.
spaceId (string) --
The ID of the space the alert belongs to.
profileId (string) --
The ID of the access profile associated with the alert.
rule (dict) --
The rule that defines how the alert is evaluated.
telemetryRule (dict) --
The telemetry-based rule definition.
query (dict) --
The query expression to evaluate.
language (string) --
The query language of the expression.
expression (string) --
The query expression to evaluate.
condition (dict) --
The condition that determines when the alert fires.
thresholdMode (string) --
How the threshold is applied to query results.
thresholdField (string) --
The field the threshold is evaluated against.
comparator (string) --
The comparison operator applied to the threshold.
warningThreshold (float) --
The value at which the alert enters the WARNING state.
criticalThreshold (float) --
The value at which the alert enters the CRITICAL state.
evaluation (dict) --
The evaluation cadence and durations.
intervalSeconds (integer) --
The interval between evaluations, in seconds.
pendingDurationSeconds (integer) --
The duration a breach must persist before the alert fires, in seconds.
recoveryDurationSeconds (integer) --
The duration a recovery must persist before the alert clears, in seconds.
noData (dict) --
How the alert behaves when a query produces no data.
treatAs (string) --
The state to report when an evaluation produces no data.
sloRule (dict) --
An alert on the burn rate or the error budget of a service level objective (SLO) in the same space. On UpdateAlert, omitted members stay unchanged and a supplied block replaces that block whole. An alert cannot switch between telemetryRule and sloRule.
sloId (string) --
The SLO the alert is built on. It must be in the same space as the alert, and the caller must be allowed to read it. Required on create; omit on update to keep the current SLO.
condition (dict) --
What makes the alert fire. Exactly one member is set. Required on create; omit on update to keep the current condition. When supplied on update, the condition block is replaced whole.
burnRate (dict) --
Fire on how fast the error budget is being spent.
windowMinutes (integer) --
The burn-rate window in multiples of 5 minutes, from 5 through 10080 (7 days).
shortWindowMinutes (integer) --
The short window of a pair, in multiples of 5 minutes from 5 through 10080 and shorter than windowMinutes. Omit for a single window. Recommended pairs are 60/5, 360/30, 1440/60 and 4320/360.
warningThreshold (float) --
The alert is WARNING when the burn rate reaches or exceeds this multiple of the sustainable rate. Greater than 0.
criticalThreshold (float) --
The alert is CRITICAL when the burn rate reaches or exceeds this multiple of the sustainable rate. Greater than 0, and greater than warningThreshold when both are set.
errorBudget (dict) --
Fire on how much of the error budget has been spent.
warningThreshold (float) --
The alert is WARNING when the consumed ratio reaches or exceeds this value. Greater than 0 and at most 1.
criticalThreshold (float) --
The alert is CRITICAL when the consumed ratio reaches or exceeds this value. Greater than 0 and at most 1, and greater than warningThreshold when both are set.
evaluation (dict) --
The evaluation cadence and durations. Required on create; omit on update to keep the current evaluation settings. When supplied on update, the evaluation block is replaced whole.
intervalSeconds (integer) --
The interval between evaluations, in seconds.
pendingDurationSeconds (integer) --
The duration a breach must persist before the alert fires, in seconds.
recoveryDurationSeconds (integer) --
The duration a recovery must persist before the alert clears, in seconds.
noData (dict) --
How the alert behaves when no fresh SLO measurement is available. Omit on create to use NODATA. Omit on update to keep the current behavior. When supplied on update, the noData block is replaced whole.
treatAs (string) --
The state to report when an evaluation produces no data.
notificationStatus (string) --
Whether notifications are enabled.
state (dict) --
Live evaluation state (read-only, system-managed). Populated by GetAlert. ListAlerts reports state on AlertSummary instead, where it stays required.
Absent on CreateAlert: a newly created alert has never been evaluated, so any state reported there would be a default rather than an observation. Call GetAlert for live state. Not @required for that reason — GetAlert always populates it.
contributorSummary is nested inside this member, so it too is absent on CreateAlert.
value (string) --
Current flat state.
transitionedAt (datetime) --
When the alert transitioned to its current state.
contributorSummary (dict) --
Counts of contributors currently breaching each severity threshold. Present only when contributor-level tracking is active; absent until the first contributor breaches a {@code WARNING} or {@code CRITICAL} threshold.
warningCount (integer) --
Number of contributors currently breaching the warning threshold.
criticalCount (integer) --
Number of contributors currently breaching the critical threshold.
data (dict) --
Structured detail about why the alert is in its current state.
thresholdBreached (float) --
For COUNT_OF_RESULTS alerts, the row count that breached; null for FIELD_VALUE (multi-contributor) alerts.
notificationRules (list) --
The notification rules for the alert.
(dict) --
Single notification rule: which transitions trigger this rule and where the resulting notification should be sent.
trigger (dict) --
The conditions that trigger this notification rule.
stateValues (list) --
Alert state(s) that trigger this rule. Empty / omitted = any state.
(string) --
Flat alert state. Severity is folded in: a WARNING/CRITICAL alert reports that state directly. {@code NODATA} indicates the evaluation produced no data (subject to the rule's noData.treatAs handling).
target (dict) --
The destination for notifications from this rule.
type (string) --
The type of notification target.
arn (string) --
The Amazon Resource Name (ARN) of the notification target. For {@code slack} and {@code pagerduty}, an integration ARN as returned by {@code ListIntegrations}.
metadata (dict) --
Additional target-specific metadata.
(string) --
(string) --
createdAt (datetime) --
The timestamp when the alert was created.
updatedAt (datetime) --
The timestamp when the alert was last updated.
alertArn (string) --
The Amazon Resource Name (ARN) of the alert.
{'nodes': {'edges': {'metadata': {'metrics': {'operations': ['string']},
'profiles': [{'attributes': {'string': 'string'}}]},
'signalTypes': {'PROFILES'}},
'metadata': {'metrics': {'operations': ['string']},
'profiles': [{'attributes': {'string': 'string'}}]},
'signalTypes': {'PROFILES'}}}
Queries the context graph with filtering, traversal, and pagination support.
Pagination note: nodes and edges are returned together as a coherent subgraph. Pagination cursors advance over nodes (the primary collection); each page includes all edges connecting nodes within that page. Callers should treat nodes as the paginated collection and edges as supplementary relationship data attached to those nodes.
See also: AWS API Documentation
Request Syntax
client.get_context_graph(
nodeFilters={
'nodeId': 'string',
'nodeType': 'SERVICE'|'RESOURCE'|'REMOTE_SERVICE',
'name': 'string',
'tags': [
{
'key': 'string',
'values': [
'string',
]
},
],
'telemetryAttributes': [
{
'key': 'string',
'values': [
'string',
]
},
],
'region': [
'string',
],
'cloudProvider': [
'string',
],
'sourceAccountId': [
'string',
],
'namespace': [
'string',
],
'category': [
'GEN_AI_AGENT'|'GEN_AI_MODEL'|'DATABASE'|'MESSAGING_QUEUE'|'COMPUTE'|'STORAGE'|'NETWORK',
],
'stage': [
'string',
],
'sources': [
'VPC_FLOW_LOG'|'CLOUDTRAIL'|'IAM_POLICY'|'CODE_SEMANTICS'|'TELEMETRY'|'AZURE_VNET_FLOW_LOG'|'ELB_ACCESS_LOG'|'CLOUDFRONT_ACCESS_LOG'|'S3_ACCESS_LOG'|'WAF_ACCESS_LOG'|'AWS_INTEGRATION'|'CONFIG',
]
},
edgeFilters={
'edgeId': 'string',
'from': 'string',
'to': 'string',
'edgeType': 'CALLS'|'ACCESSES'|'RUNS_ON',
'operations': [
'string',
],
'telemetryAttributes': [
{
'key': 'string',
'values': [
'string',
]
},
],
'sources': [
'VPC_FLOW_LOG'|'CLOUDTRAIL'|'IAM_POLICY'|'CODE_SEMANTICS'|'TELEMETRY'|'AZURE_VNET_FLOW_LOG'|'ELB_ACCESS_LOG'|'CLOUDFRONT_ACCESS_LOG'|'S3_ACCESS_LOG'|'WAF_ACCESS_LOG'|'AWS_INTEGRATION'|'CONFIG',
]
},
startTime=datetime(2015, 1, 1),
endTime=datetime(2015, 1, 1),
depth=123,
maxResults=123,
maxEdgesPerNode=123,
includeMetadata=True|False,
nextToken='string'
)
dict
Criteria restricting which nodes are returned.
nodeId (string) --
Match only the node with this identifier.
nodeType (string) --
Match only nodes of this type.
name (string) --
Match only nodes with this name.
tags (list) --
Match nodes by the tags on the underlying resource.
(dict) --
Key-value filter used for tags and attributes filtering. Multiple KeyFilters are AND'ed. Multiple values within a single KeyFilter are OR'ed. Values support pattern syntax: exact, negation (!value), wildcard (value, value*, *value).
key (string) -- [REQUIRED]
The tag or attribute key to filter on.
values (list) --
The values to match for this key, OR'ed together. Each supports exact, negation (!value), and wildcard (value, value*, *value) syntax.
(string) --
Key filter value string.
telemetryAttributes (list) --
Match nodes by their OpenTelemetry (OTel) telemetry attributes.
(dict) --
Key-value filter used for tags and attributes filtering. Multiple KeyFilters are AND'ed. Multiple values within a single KeyFilter are OR'ed. Values support pattern syntax: exact, negation (!value), wildcard (value, value*, *value).
key (string) -- [REQUIRED]
The tag or attribute key to filter on.
values (list) --
The values to match for this key, OR'ed together. Each supports exact, negation (!value), and wildcard (value, value*, *value) syntax.
(string) --
Key filter value string.
region (list) --
Match nodes in any of these regions.
(string) --
cloudProvider (list) --
Match nodes on any of these cloud providers.
(string) --
sourceAccountId (list) --
Match nodes discovered from telemetry produced by any of these accounts.
(string) --
namespace (list) --
Match nodes in any of these logical service groupings.
(string) --
category (list) --
Match nodes of any of these categories.
(string) --
Coarse classification of what a node is. Orthogonal to NodeType, which says whether the node is a service, a resource, or a remote service. Absent on most nodes today because few producers emit the source attribute.
stage (list) --
Match nodes observed in any of these deployment environments.
(string) --
sources (list) --
Match nodes contributed by any of these discovery sources.
(string) --
Data source enum for context graph queries.
dict
Criteria restricting which edges are returned.
edgeId (string) --
Match only the edge with this identifier.
from (string) --
Match only edges originating from this node identifier.
to (string) --
Match only edges pointing to this node identifier.
edgeType (string) --
Match only edges of this relationship kind.
operations (list) --
Match edges carrying any of these operations.
(string) --
telemetryAttributes (list) --
Match edges by their OpenTelemetry (OTel) telemetry attributes. Not yet enforced: currently accepted but ignored (does not filter), matching nodeFilters.telemetryAttributes.
(dict) --
Key-value filter used for tags and attributes filtering. Multiple KeyFilters are AND'ed. Multiple values within a single KeyFilter are OR'ed. Values support pattern syntax: exact, negation (!value), wildcard (value, value*, *value).
key (string) -- [REQUIRED]
The tag or attribute key to filter on.
values (list) --
The values to match for this key, OR'ed together. Each supports exact, negation (!value), and wildcard (value, value*, *value) syntax.
(string) --
Key filter value string.
sources (list) --
Match edges contributed by any of these discovery sources.
(string) --
Data source enum for context graph queries.
datetime
[REQUIRED]
Start of the time range (UTC), inclusive.
datetime
[REQUIRED]
End of the time range (UTC), inclusive.
integer
How many hops to traverse out from the nodes matched by nodeFilters. 0 returns only the matched nodes themselves.
integer
The maximum number of nodes to return in a single page.
integer
The maximum number of edges to return per node, bounding the fan-out of a densely connected node.
boolean
Whether to return the metadata block, semantics included, on each node and edge. Off by default because it costs an extra lookup per returned node.
string
Pagination token from a previous response, to retrieve the next page.
dict
Response Syntax
{
'nodes': [
{
'nodeId': 'string',
'nodeType': 'SERVICE'|'RESOURCE'|'REMOTE_SERVICE',
'name': 'string',
'alternateNames': [
'string',
],
'tags': {
'string': 'string'
},
'nodeProperties': {
'region': 'string',
'cloudProvider': 'string',
'sourceAccountId': 'string',
'namespace': 'string',
'category': 'GEN_AI_AGENT'|'GEN_AI_MODEL'|'DATABASE'|'MESSAGING_QUEUE'|'COMPUTE'|'STORAGE'|'NETWORK',
'stage': 'string'
},
'telemetryAttributes': {
'string': 'string'
},
'operationDetails': {
'string': [
{
'string': 'string'
},
]
},
'signalTypes': [
'LOGS'|'METRICS'|'TRACES'|'CONFIG'|'UNKNOWN'|'PROFILES',
],
'sources': [
'VPC_FLOW_LOG'|'CLOUDTRAIL'|'IAM_POLICY'|'CODE_SEMANTICS'|'TELEMETRY'|'AZURE_VNET_FLOW_LOG'|'ELB_ACCESS_LOG'|'CLOUDFRONT_ACCESS_LOG'|'S3_ACCESS_LOG'|'WAF_ACCESS_LOG'|'AWS_INTEGRATION'|'CONFIG',
],
'metadata': {
'metrics': [
{
'name': 'string',
'preferredStat': 'string',
'metricType': 'string',
'attributes': {
'string': 'string'
},
'semantics': {
'description': 'string',
'unit': 'string'
},
'aggregationTemporality': 'delta'|'cumulative',
'monotonicity': 'monotonic'|'non_monotonic',
'operations': [
'string',
]
},
],
'semantics': {
'purpose': 'string',
'language': 'string',
'framework': 'string',
'kind': 'string',
'repository': 'string'
},
'logs': [
{
'attributes': {
'string': 'string'
}
},
],
'traces': [
{
'attributes': {
'string': 'string'
}
},
],
'profiles': [
{
'attributes': {
'string': 'string'
}
},
]
},
'firstObservedAt': datetime(2015, 1, 1),
'lastObservedAt': datetime(2015, 1, 1),
'edges': [
{
'edgeId': 'string',
'from': 'string',
'to': 'string',
'edgeType': 'CALLS'|'ACCESSES'|'RUNS_ON',
'operations': [
'string',
],
'edgeProperties': {
'protocol': 'string',
'sourcePort': 'string',
'destinationPort': 'string',
'blocked': True|False,
'errorCode': 'string',
'httpStatusCode': 'string',
'httpMethod': 'string',
'serviceInitiated': True|False,
'trafficStats': {
'bytes': 123,
'packets': 123,
'flows': 123,
'sentBytes': 123,
'receivedBytes': 123
}
},
'telemetryAttributes': {
'string': 'string'
},
'signalTypes': [
'LOGS'|'METRICS'|'TRACES'|'CONFIG'|'UNKNOWN'|'PROFILES',
],
'sources': [
'VPC_FLOW_LOG'|'CLOUDTRAIL'|'IAM_POLICY'|'CODE_SEMANTICS'|'TELEMETRY'|'AZURE_VNET_FLOW_LOG'|'ELB_ACCESS_LOG'|'CLOUDFRONT_ACCESS_LOG'|'S3_ACCESS_LOG'|'WAF_ACCESS_LOG'|'AWS_INTEGRATION'|'CONFIG',
],
'metadata': {
'metrics': [
{
'name': 'string',
'preferredStat': 'string',
'metricType': 'string',
'attributes': {
'string': 'string'
},
'semantics': {
'description': 'string',
'unit': 'string'
},
'aggregationTemporality': 'delta'|'cumulative',
'monotonicity': 'monotonic'|'non_monotonic',
'operations': [
'string',
]
},
],
'semantics': {
'purpose': 'string',
'language': 'string',
'framework': 'string',
'kind': 'string',
'repository': 'string'
},
'logs': [
{
'attributes': {
'string': 'string'
}
},
],
'traces': [
{
'attributes': {
'string': 'string'
}
},
],
'profiles': [
{
'attributes': {
'string': 'string'
}
},
]
},
'firstObservedAt': datetime(2015, 1, 1),
'lastObservedAt': datetime(2015, 1, 1)
},
]
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
The response containing the requested slice of the context graph.
nodes (list) --
The page of nodes matching the request. This is the paginated collection.
(dict) --
A node in the context graph representing a service, resource, or remote service.
nodeId (string) --
The unique identifier of the node within the context graph.
nodeType (string) --
Whether the node is a service, a resource, or a remote service.
name (string) --
The primary display name of the node.
alternateNames (list) --
Other names this node was observed under. A node that merged across sources reports one resolved name, and the names it was merged away from appear here.
(string) --
tags (dict) --
The tags observed on the underlying resource.
(string) --
(string) --
nodeProperties (dict) --
Identity attributes promoted out of the flat attribute map onto typed members.
region (string) --
The region the node runs in. Falls back to the region the telemetry was ingested from when the node does not report one.
cloudProvider (string) --
The cloud provider hosting the node, resolved from the reported provider, platform, or vendor namespace, and defaulting to "aws".
sourceAccountId (string) --
The account that produced the telemetry this node was discovered from.
namespace (string) --
The logical service grouping the node belongs to. This is not a metric namespace.
category (string) --
What kind of thing the node is, coarser than nodeType.
stage (string) --
The node's deployment environment. A node may be observed in several; this is the highest-precedence one. Match any of them with NodeFilters.stage.
telemetryAttributes (dict) --
The node's OpenTelemetry (OTel) attributes, as emitted by telemetry — the raw values, as opposed to the normalized nodeProperties. A key promoted onto a nodeProperties member is removed here, so no value appears twice.
(string) --
(string) --
operationDetails (dict) --
The operations observed on this node, keyed by operation name. Each value lists the dimension sets that identify the metric series for that operation.
(string) --
Operation name on a context graph node (typically OTel span.name).
(list) --
(dict) --
One OTel dimension set identifying a metric series for an operation.
(string) --
OTel dimension key on an operation identifier set (e.g. "http.request.method").
(string) --
OTel dimension value on an operation identifier set.
signalTypes (list) --
The kinds of telemetry signal observed on this node.
(string) --
Signal enum for context graph queries.
sources (list) --
The discovery sources that contributed this node.
(string) --
Data source enum for context graph queries.
metadata (dict) --
Descriptive metadata about the node. Present only when the request sets includeMetadata.
metrics (list) --
The metrics observed on the element.
(dict) --
A single metric observed on a context graph node or edge.
name (string) --
The metric name as emitted, such as "Duration".
preferredStat (string) --
The statistic to chart or alarm on, such as "p99" or "Sum". Free-form and frequently absent.
metricType (string) --
OTel metric kind: "gauge", "sum", "histogram", "exponential_histogram", or "summary" (CloudWatch-vended metrics carry the same kinds). Absent when the producer did not report one.
attributes (dict) --
Per-metric qualifying attributes used to query this metric's telemetry. Keys are the metric store's own label names, not bare OTel attribute names: service identity arrives as "@resource.service.name" and "@resource.service.namespace", and the instrumentation scope as "@instrumentation.@name". Span-derived metrics can additionally carry the service as a bare data point "service.name" label. Cloud provider, account and region are not repeated per metric — read those from the node. Values are RAW, deliberately NOT the node's merged identity, so a selector built from them matches the emitted series. A merged node can carry different values per metric, which is why these live here rather than on the node.
(string) --
(string) --
semantics (dict) --
What the metric means and the unit it is reported in.
description (string) --
Human-readable description of what the metric measures.
unit (string) --
The unit the metric is reported in.
aggregationTemporality (string) --
Aggregation temporality for the selected metric stream represented by this metadata entry. Present when known, including cumulative for OTel Summary metrics. Absent for Gauge metrics or when the information is unavailable.
monotonicity (string) --
Whether the selected Sum metric stream represented by this metadata entry is a non-negative accumulation. Absent for metrics other than Sum or when the information is unavailable.
operations (list) --
Names of the operations this metric measures. Each is a key in the node's operationDetails, whose identifier sets select that operation on this metric. Absent when the metric measures no operation or when the association is unknown.
(string) --
Operation name on a context graph node (typically OTel span.name).
semantics (dict) --
Semantic description of the node. Absent on an edge, because semantics describe a service rather than a relationship.
purpose (string) --
What the service does.
language (string) --
The primary programming language the service is written in.
framework (string) --
The application framework the service is built on.
kind (string) --
The kind of workload the service is.
repository (string) --
The source repository the service is built from.
logs (list) --
LOGS query selectors: a list of blocks to OR together, each block an AND of exact store column to raw value. Present on node metadata only — edges carry trace selectors. Returned when the request sets includeMetadata.
(dict) --
One LOGS query selector block on a node. The attributes map's keys are AND'd; each selects with col = value. Deliberately RAW/un-normalized so the selector matches the store, not the node's merged identity.
attributes (dict) --
One LOGS query-selector block: an exact log-store column mapped to the raw value it carries, so the selector matches the emitted signal. Keys are store column names, not bare attribute names. Every block carries "@logGroupName"; alongside it a block carries either the entity columns (" @entities.KeyAttributes.Name", ".Type", ".Environment", " @entities.Attributes.PlatformType") or OTel columns ("resource.attributes['service.name']", "resource.attributes['service.namespace']", "resource.attributes['cloud.provider'|'cloud.account.id'|'cloud.region']"). A dimension seen under several values — several log groups, or a service under two namespaces — becomes several blocks with the same columns and different values, to be OR'd together.
(string) --
(string) --
traces (list) --
TRACES query selectors, same block shape as the logs selectors. Present on both node and edge metadata. Returned when the request sets includeMetadata.
(dict) --
One TRACES query selector block on a node/edge (see LogMetadata).
attributes (dict) --
One TRACES query-selector block: an exact span-store column mapped to the raw value it carries. Keys are store column names, not bare attribute names — the service identity and cloud dimensions arrive as "resource.attributes['service.name']", "resource.attributes['service.namespace']", "resource.attributes['cloud.provider']", "resource.attributes['cloud.account.id']", "resource.attributes['cloud.region']" and "resource.attributes['deployment.environment']", and span-level identity as "attributes['aws.local.service']" and "attributes['aws.local.environment']". Not every column is present on every block; which ones appear depends on what the span carried.
(string) --
(string) --
profiles (list) --
Profile query selectors. Attributes within one block are ANDed, and blocks are ORed. Present on nodes only. Label names and values match the Profile query API exactly. Returned when the request sets includeMetadata.
(dict) --
One exact Profile query selector on a context graph node.
attributes (dict) --
One Profile query selector block. The Profile query API ANDs all attributes in the block.
(string) --
An exact Profile query label, such as @resource.service.name.
(string) --
The raw value of a Profile query label.
firstObservedAt (datetime) --
When this node was first observed (UTC), at minute granularity. For a node that merged across sources, this is the earliest value any source reported.
lastObservedAt (datetime) --
When this node was most recently observed (UTC), at minute granularity. For a node that merged across sources, this is the latest value any source reported.
edges (list) --
Outbound edges originating from this node. Each edge carries its from.
(dict) --
A directed edge in the context graph connecting two nodes.
edgeId (string) --
The unique identifier of the edge within the context graph.
from (string) --
The node identifier the edge originates from.
to (string) --
The node identifier the edge points to.
edgeType (string) --
The kind of relationship the edge represents.
operations (list) --
The operations observed on this edge.
(string) --
edgeProperties (dict) --
Attributes promoted out of the flat attribute map onto typed members. Which members are present depends on what produced the edge.
protocol (string) --
The IANA protocol name for the observed network traffic, such as "tcp".
sourcePort (string) --
The source port of the observed traffic. May be a placeholder when the port is unknown.
destinationPort (string) --
The destination port of the observed traffic. May be a placeholder when the port is unknown.
blocked (boolean) --
Whether the observed network flow was denied. Absent means the edge was not derived from network flow data, which is not the same as allowed.
errorCode (string) --
The error code returned when the call was attempted and refused. Its presence means the edge exists but the dependency is failing.
httpStatusCode (string) --
The HTTP status code observed on the request. Distinct from errorCode.
httpMethod (string) --
The HTTP method observed on the request.
serviceInitiated (boolean) --
Whether the caller was an AWS service principal rather than a user or role. Absent means the edge was not derived from a source that reports it.
trafficStats (dict) --
Traffic counters accumulated over the edge's observation window.
bytes (integer) --
Total bytes observed across the edge.
packets (integer) --
Total packets observed across the edge.
flows (integer) --
Total network flows observed across the edge.
sentBytes (integer) --
Total bytes sent to the destination.
receivedBytes (integer) --
Total bytes received from the destination.
telemetryAttributes (dict) --
The edge's OpenTelemetry (OTel) attributes, as emitted by telemetry. A key promoted onto an edgeProperties member is removed here, so no value appears twice.
(string) --
(string) --
signalTypes (list) --
The kinds of telemetry signal observed on this edge.
(string) --
Signal enum for context graph queries.
sources (list) --
The discovery sources that contributed this edge.
(string) --
Data source enum for context graph queries.
metadata (dict) --
Descriptive metadata about the edge. Present only when the request sets includeMetadata.
metrics (list) --
The metrics observed on the element.
(dict) --
A single metric observed on a context graph node or edge.
name (string) --
The metric name as emitted, such as "Duration".
preferredStat (string) --
The statistic to chart or alarm on, such as "p99" or "Sum". Free-form and frequently absent.
metricType (string) --
OTel metric kind: "gauge", "sum", "histogram", "exponential_histogram", or "summary" (CloudWatch-vended metrics carry the same kinds). Absent when the producer did not report one.
attributes (dict) --
Per-metric qualifying attributes used to query this metric's telemetry. Keys are the metric store's own label names, not bare OTel attribute names: service identity arrives as "@resource.service.name" and "@resource.service.namespace", and the instrumentation scope as "@instrumentation.@name". Span-derived metrics can additionally carry the service as a bare data point "service.name" label. Cloud provider, account and region are not repeated per metric — read those from the node. Values are RAW, deliberately NOT the node's merged identity, so a selector built from them matches the emitted series. A merged node can carry different values per metric, which is why these live here rather than on the node.
(string) --
(string) --
semantics (dict) --
What the metric means and the unit it is reported in.
description (string) --
Human-readable description of what the metric measures.
unit (string) --
The unit the metric is reported in.
aggregationTemporality (string) --
Aggregation temporality for the selected metric stream represented by this metadata entry. Present when known, including cumulative for OTel Summary metrics. Absent for Gauge metrics or when the information is unavailable.
monotonicity (string) --
Whether the selected Sum metric stream represented by this metadata entry is a non-negative accumulation. Absent for metrics other than Sum or when the information is unavailable.
operations (list) --
Names of the operations this metric measures. Each is a key in the node's operationDetails, whose identifier sets select that operation on this metric. Absent when the metric measures no operation or when the association is unknown.
(string) --
Operation name on a context graph node (typically OTel span.name).
semantics (dict) --
Semantic description of the node. Absent on an edge, because semantics describe a service rather than a relationship.
purpose (string) --
What the service does.
language (string) --
The primary programming language the service is written in.
framework (string) --
The application framework the service is built on.
kind (string) --
The kind of workload the service is.
repository (string) --
The source repository the service is built from.
logs (list) --
LOGS query selectors: a list of blocks to OR together, each block an AND of exact store column to raw value. Present on node metadata only — edges carry trace selectors. Returned when the request sets includeMetadata.
(dict) --
One LOGS query selector block on a node. The attributes map's keys are AND'd; each selects with col = value. Deliberately RAW/un-normalized so the selector matches the store, not the node's merged identity.
attributes (dict) --
One LOGS query-selector block: an exact log-store column mapped to the raw value it carries, so the selector matches the emitted signal. Keys are store column names, not bare attribute names. Every block carries "@logGroupName"; alongside it a block carries either the entity columns (" @entities.KeyAttributes.Name", ".Type", ".Environment", " @entities.Attributes.PlatformType") or OTel columns ("resource.attributes['service.name']", "resource.attributes['service.namespace']", "resource.attributes['cloud.provider'|'cloud.account.id'|'cloud.region']"). A dimension seen under several values — several log groups, or a service under two namespaces — becomes several blocks with the same columns and different values, to be OR'd together.
(string) --
(string) --
traces (list) --
TRACES query selectors, same block shape as the logs selectors. Present on both node and edge metadata. Returned when the request sets includeMetadata.
(dict) --
One TRACES query selector block on a node/edge (see LogMetadata).
attributes (dict) --
One TRACES query-selector block: an exact span-store column mapped to the raw value it carries. Keys are store column names, not bare attribute names — the service identity and cloud dimensions arrive as "resource.attributes['service.name']", "resource.attributes['service.namespace']", "resource.attributes['cloud.provider']", "resource.attributes['cloud.account.id']", "resource.attributes['cloud.region']" and "resource.attributes['deployment.environment']", and span-level identity as "attributes['aws.local.service']" and "attributes['aws.local.environment']". Not every column is present on every block; which ones appear depends on what the span carried.
(string) --
(string) --
profiles (list) --
Profile query selectors. Attributes within one block are ANDed, and blocks are ORed. Present on nodes only. Label names and values match the Profile query API exactly. Returned when the request sets includeMetadata.
(dict) --
One exact Profile query selector on a context graph node.
attributes (dict) --
One Profile query selector block. The Profile query API ANDs all attributes in the block.
(string) --
An exact Profile query label, such as @resource.service.name.
(string) --
The raw value of a Profile query label.
firstObservedAt (datetime) --
When this edge was first observed (UTC), at minute granularity. For an edge that merged across sources, this is the earliest value any source reported.
lastObservedAt (datetime) --
When this edge was most recently observed (UTC), at minute granularity. For an edge that merged across sources, this is the latest value any source reported.
nextToken (string) --
Pagination token for the next page; absent when there are no more results.
{'domain': {'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}}
Retrieves the details of a domain by ID.
See also: AWS API Documentation
Request Syntax
client.get_domain(
domainId='string'
)
string
[REQUIRED]
The unique ID of the domain.
dict
Response Syntax
{
'domain': {
'domainId': 'string',
'domainArn': 'string',
'name': 'string',
'identityProviders': [
'IAM'|'IDC',
],
'identityProviderConfiguration': {
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
},
'domainEndpointUrl': 'string',
'customEndpointUrls': [
'string',
],
'identityCenterApplicationArn': 'string',
'region': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'status': 'ACTIVE'
}
}
Response Structure
(dict) --
domain (dict) --
The details of the domain.
domainId (string) --
The unique ID of the domain.
domainArn (string) --
The Amazon Resource Name (ARN) of the domain.
name (string) --
A name that identifies the domain.
identityProviders (list) --
The identity providers configured for the domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
identityProviderConfiguration (dict) --
Identity provider configuration for the domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) --
Whether Spaces in this domain may use Identity Center in a different Region.
domainEndpointUrl (string) --
The HTTPS endpoint URL for accessing the domain.
customEndpointUrls (list) --
Additional endpoint URLs derived from the domain name.
(string) --
identityCenterApplicationArn (string) --
The ARN of the Identity Center application. Absent for IAM-only domains.
region (string) --
The Region where this domain was created.
createdAt (datetime) --
The timestamp when the domain was created.
updatedAt (datetime) --
The timestamp when the domain was last updated.
status (string) --
Current status of the domain.
{'organizationDomain': {'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}}
Retrieves the details of an organization domain by ID.
See also: AWS API Documentation
Request Syntax
client.get_domain_for_organization(
domainId='string'
)
string
[REQUIRED]
The ID of the organization domain.
dict
Response Syntax
{
'organizationDomain': {
'domainId': 'string',
'domainArn': 'string',
'name': 'string',
'domainEndpointUrl': 'string',
'customEndpointUrls': [
'string',
],
'organizationId': 'string',
'ownerAccountId': 'string',
'identityProviders': [
'IAM'|'IDC',
],
'identityProviderConfiguration': {
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
},
'identityCenterApplicationArn': 'string',
'region': 'string',
'status': 'ACTIVE',
'domainAccessRoleArn': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
organizationDomain (dict) --
The details of the organization domain.
domainId (string) --
The unique ID of the organization domain.
domainArn (string) --
The Amazon Resource Name (ARN) of the organization domain.
name (string) --
A name that identifies the organization domain.
domainEndpointUrl (string) --
The HTTPS endpoint URL for accessing the organization domain.
customEndpointUrls (list) --
Additional endpoint URLs derived from the domain name.
(string) --
organizationId (string) --
The ID of the AWS Organization that owns the domain.
ownerAccountId (string) --
The AWS account ID that owns the organization domain.
identityProviders (list) --
The identity providers configured for the organization domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
identityProviderConfiguration (dict) --
Identity provider configuration for the organization domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) --
Whether Spaces in this domain may use Identity Center in a different Region.
identityCenterApplicationArn (string) --
The ARN of the Identity Center application. Absent for IAM-only domains.
region (string) --
The Region where this organization domain was created.
status (string) --
Current status of the organization domain.
domainAccessRoleArn (string) --
The ARN of the customer-provided IAM role in the management account used for domain access.
createdAt (datetime) --
The timestamp when the organization domain was created.
updatedAt (datetime) --
The timestamp when the organization domain was last updated.
{'integration': {'integrationType': {'GITHUB',
'GITHUB_ENTERPRISE',
'PAGERDUTY'}}}
Returns the details of a single integration, identified by its identifier, Amazon Resource Name, or name.
See also: AWS API Documentation
Request Syntax
client.get_integration(
identifier={
'integrationId': 'string',
'integrationArn': 'string',
'integrationName': 'string'
}
)
dict
[REQUIRED]
Identifies the integration to return — exactly one of integrationId, integrationArn, or integrationName.
integrationId (string) --
The unique identifier of the integration.
integrationArn (string) --
The Amazon Resource Name of the integration.
integrationName (string) --
The name of the integration; unique within the account.
dict
Response Syntax
{
'integration': {
'integrationId': 'string',
'integrationArn': 'string',
'integrationType': 'AWS_CONFIG_SLREC'|'AWS_CONFIG_AZURE_SLREC'|'GITHUB'|'SLACK'|'EXTERNAL_AGENT'|'AWS_INTEGRATION'|'PAGERDUTY'|'GITHUB_ENTERPRISE',
'name': 'string',
'status': 'ACTIVE'|'DELETED'|'PENDING'|'PENDING_OAUTH'|'ERROR'|'FAILED',
'authType': 'NONE'|'OAUTH2'|'API_KEY',
'credentialArn': 'string',
'roleArn': 'string',
'integrationAttributes': {
'string': 'string'
},
'authorizationUrl': 'string',
'errorMessage': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'scope': 'ACCOUNT'|'ORGANIZATION'
}
}
Response Structure
(dict) --
The response containing the requested integration.
integration (dict) --
The details of the requested integration.
integrationId (string) --
The unique identifier of the integration.
integrationArn (string) --
The Amazon Resource Name (ARN) of the integration.
integrationType (string) --
The type of external system that an integration connects to, such as a source of configuration data, a messaging destination, or a model provider.
name (string) --
The customer-provided name of the integration.
status (string) --
The current lifecycle state of an integration.
authType (string) --
The authentication method that an integration uses to connect to its external system.
credentialArn (string) --
The Amazon Resource Name (ARN) of the secret that stores the integration's credentials.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to access the external system.
integrationAttributes (dict) --
Provider-specific key/value attributes that configure the integration.
(string) --
(string) --
authorizationUrl (string) --
The URL the customer visits to authorize the integration. Present while an OAuth authorization is pending.
errorMessage (string) --
A human-readable description of why the integration is in an ERROR or FAILED state. Present only when the integration has failed.
createdAt (datetime) --
The time at which the integration was created.
updatedAt (datetime) --
The time at which the integration was last updated.
scope (string) --
Whether this integration is account-scoped (ACCOUNT, customer-created) or organization-scoped (ORGANIZATION, created by an org-enablement rule). Absent on legacy records is treated as ACCOUNT.
{'autoInvestigations': [{'integrationArn': 'string',
'minimumSeverity': 'LOW | MEDIUM | HIGH'}],
'intelligenceEnabled': 'boolean',
'notificationTargets': [{'filter': {'minimumSeverity': 'LOW | MEDIUM | HIGH',
'services': ['string']},
'target': {'arn': 'string',
'metadata': {'string': 'string'},
'type': 'sns | slack | pagerduty'},
'targetId': 'string'}]}
Retrieves the intelligence configuration for the calling account in the current Region. The account is the account of the caller's credentials; the request does not name it. If the account has no configuration yet, the response is the default configuration, with intelligenceEnabled set to false.
See also: AWS API Documentation
Request Syntax
client.get_intelligence_configuration()
dict
Response Syntax
{
'accountId': 'string',
'intelligenceEnabled': True|False,
'kmsKeyArn': 'string',
'updatedAt': datetime(2015, 1, 1),
'createdAt': datetime(2015, 1, 1),
'notificationTargets': [
{
'targetId': 'string',
'target': {
'type': 'sns'|'slack'|'pagerduty',
'arn': 'string',
'metadata': {
'string': 'string'
}
},
'filter': {
'services': [
'string',
],
'minimumSeverity': 'LOW'|'MEDIUM'|'HIGH'
}
},
],
'autoInvestigations': [
{
'integrationArn': 'string',
'minimumSeverity': 'LOW'|'MEDIUM'|'HIGH'
},
]
}
Response Structure
(dict) --
The intelligence configuration for the calling account.
accountId (string) --
The AWS account ID this configuration applies to.
intelligenceEnabled (boolean) --
Whether Observations, which detects anomalies and correlates them into observations, is enabled for the account. It is false when the account has not enabled it.
Observations is in preview release and is subject to change.
kmsKeyArn (string) --
The currently active KMS key ARN for customer-managed encryption, if configured.
updatedAt (datetime) --
ISO-8601 timestamp of the last update.
createdAt (datetime) --
ISO-8601 timestamp of initial creation.
notificationTargets (list) --
The destinations Intelligence notifications are sent to. Every entry carries its service-assigned targetId.
Observations is in preview release and is subject to change.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
One notification target stored on the Intelligence configuration, with its service-assigned identifier.
targetId (string) --
The identifier the service assigns to the entry when it is first saved. Omit it on a new entry. To keep an existing entry, echo its targetId and its target unchanged; its filter may change. An entry whose targetId is not stored on the configuration, or whose target differs from the stored target for that targetId, is rejected.
target (dict) --
The destination.
type (string) --
The kind of destination.
arn (string) --
For slack and pagerduty, the ARN of the connected integration, as returned by ListIntegrations, in the account and Region of the configuration. This is the integration ARN, not a channel or service ARN. For sns, the ARN of a standard SNS topic in the same partition and Region, in any account. At most 1011 characters, the AWS-wide ARN limit.
metadata (dict) --
Target-specific metadata. The accepted keys depend on type, and any other key is rejected with ValidationException.
slack: channel (required), the Slack channel name, and channelId (optional), the Slack channel identifier. When a target is added, the service resolves the channel name to its identifier and stores it as channelId, and notifications are posted to that identifier, so renaming the channel does not break the target. A channel the integration's app cannot see is rejected. A channelId sent with a new target must identify the named channel. No other key is accepted.
pagerduty: service_name (required), the exact, case-sensitive name of the PagerDuty service or event orchestration to page, and the optional keys serviceId (the PagerDuty service identifier), class, group, and component. No other key is accepted.
sns: absent or empty. No key is accepted.
(string) --
(string) --
filter (dict) --
The routing filter that selects which notifications reach this target. Optional. The filter sent with an entry replaces the stored one, and an entry sent without filter has no filter, so to keep an existing entry's filter, send it back with the entry. Unlike target, the filter of an existing entry may change, and a change to it is a change to notificationTargets.
services (list) --
The services whose observations reach this target. The observation reaches the target when any of its affected service names equals a listed name, ignoring case. An observation can name several services, and one match is enough. An observation with no affected services matches no list. Empty or absent means all services. Each name is 1 to 256 characters with no leading or trailing whitespace, and two names that differ only in case are rejected as duplicates. Names are stored as given and are not checked against the account's services.
(string) --
A service name in a notification routing filter: 1 to 256 characters with no leading or trailing whitespace.
minimumSeverity (string) --
The lowest severity that reaches this target. The observation reaches the target when its severity, ranked LOW below MEDIUM below HIGH, is at or above this value. Absent means all severities. LOW has the same effect as absent.
autoInvestigations (list) --
The automatic-investigation entries for the account in this Region. Absent or empty means automatic investigations are off.
Observations is in preview release and is subject to change.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
One automatic-investigation entry: the integration that investigates observations, and the lowest severity it investigates. An entry covers the entire account.
integrationArn (string) --
The ARN of an active AWS DevOps Agent integration in the account and Region of the configuration. At most 1011 characters, the AWS-wide ARN limit.
minimumSeverity (string) --
The lowest observation severity that starts an investigation. An investigation starts only for an observation whose severity, ranked LOW below MEDIUM below HIGH, is at or above this value. In a PutIntelligenceConfiguration request, an entry for the stored entry's integration sent without this member keeps the stored value. A new entry, or an entry for another integration, sent without it gets HIGH, so only HIGH observations start an investigation. GetIntelligenceConfiguration and the PutIntelligenceConfiguration output always show the value in effect, HIGH for an entry stored without one.
{'space': {'identityCenterConfiguration': {'region': 'string'}}}
Retrieves the details of a space by ID.
See also: AWS API Documentation
Request Syntax
client.get_space(
spaceId='string'
)
string
[REQUIRED]
The unique ID of the space.
dict
Response Syntax
{
'space': {
'spaceId': 'string',
'name': 'string',
'spaceArn': 'string',
'domainArn': 'string',
'region': 'string',
'identityCenterConfiguration': {
'region': 'string'
},
'ownerAccountId': 'string',
'dataAccessRoleArn': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'agentCoreEvaluationRoleArn': 'string',
'status': 'ACTIVE'|'SUSPENDED'|'MOVING',
'statusReason': 'string',
'encryptionConfiguration': {
'encryptionStrategy': 'AWS_OWNED'|'CUSTOMER_MANAGED',
'kmsKeyArn': 'string'
}
}
}
Response Structure
(dict) --
space (dict) --
The details of the space.
spaceId (string) --
The unique ID of the space.
name (string) --
A name that identifies the space.
spaceArn (string) --
The Amazon Resource Name (ARN) of the space.
domainArn (string) --
The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
region (string) --
The region where this space was created.
identityCenterConfiguration (dict) --
Identity Center settings for this space. Absent for IAM-only spaces.
region (string) --
The Region where this space sends Identity Center requests.
ownerAccountId (string) --
AWS account ID that owns this space.
dataAccessRoleArn (string) --
The ARN of the IAM role used for data access.
createdAt (datetime) --
The timestamp when the space was created.
updatedAt (datetime) --
The timestamp when the space was last updated.
agentCoreEvaluationRoleArn (string) --
The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
status (string) --
The status of the space.
statusReason (string) --
Reason for the current space status.
encryptionConfiguration (dict) --
How the space's data at rest is encrypted. Always populated: a space with no customer managed key reports encryptionStrategy AWS_OWNED and no kmsKeyArn.
encryptionStrategy (string) --
Which kind of key to use. Required.
kmsKeyArn (string) --
Customer managed KMS key ARN. Required when encryptionStrategy is CUSTOMER_MANAGED, and must be omitted when it is AWS_OWNED. Must be a symmetric ENCRYPT_DECRYPT key in the caller's account and region.
{'credentialType': {'PROVISIONING'}}
Returns temporary credentials for a space in an organization member account. The credentials are valid for one hour.
The caller must be the organization's management account or a delegated administrator with access to the target space. The target account must be an active member of the same organization as the domain, and the space must already exist.
See also: AWS API Documentation
Request Syntax
client.get_space_credentials_for_organization(
context={
'spaceId': 'string',
'domainId': 'string',
'targetAccountId': 'string'
},
credentialType='SPACE_OPERATION'|'PROVISIONING'
)
dict
[REQUIRED]
Context for credential resolution.
spaceId (string) --
The ID of an existing space to return credentials for.
domainId (string) --
The ID of the domain, when returning credentials for a target account that does not yet have a space.
targetAccountId (string) --
The ID of the target member account. Required when domainId is set.
string
[REQUIRED]
Selects which member-account credential to return.
dict
Response Syntax
{
'credentials': {
'accessKeyId': 'string',
'secretAccessKey': 'string',
'sessionToken': 'string',
'expiration': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
credentials (dict) --
The temporary AWS credentials for the space.
accessKeyId (string) --
The AWS access key ID.
secretAccessKey (string) --
The AWS secret access key.
sessionToken (string) --
The AWS session token.
expiration (datetime) --
The timestamp when the credentials expire.
{'principalType': {'SLO'}}
Response {'items': {'principal': {'principalType': {'SLO'}}}}
Returns AccessGrants, with optional filtering by domain, space, principal, or permission. A grant is returned only when it matches every filter supplied. With no filters, returns the grants for the current account and Region.
See also: AWS API Documentation
Request Syntax
client.list_access_grants(
domainId='string',
spaceId='string',
principalId='string',
principalType='IDC_USER'|'IDC_GROUP'|'IAM_USER'|'IAM_ROLE'|'IAM_ROOT'|'ACCESS_PROFILE'|'ALERT'|'AGENT'|'SLO',
permission='SPACE_ADMIN'|'READ'|'READ_WRITE_DELETE'|'CUSTOM',
nextToken='string',
maxResults=123
)
string
Filter by domain ID.
string
Filter by space ID.
string
Filter by principal ID.
string
Filter by principal type.
string
Filter by permission level.
string
A token to retrieve the next page of results. Supply the same filters used on the request that returned it. Tokens expire after 24 hours.
integer
The maximum number of access grants to return per page. Defaults to 100. A page can contain fewer results than this value even when more results remain; continue while nextToken is present.
dict
Response Syntax
{
'items': [
{
'grantId': 'string',
'grantArn': 'string',
'name': 'string',
'domainId': 'string',
'principal': {
'principalType': 'IDC_USER'|'IDC_GROUP'|'IAM_USER'|'IAM_ROLE'|'IAM_ROOT'|'ACCESS_PROFILE'|'ALERT'|'AGENT'|'SLO',
'principalId': 'string',
'principalAttributes': [
{
'key': 'string',
'value': 'string'
},
]
},
'permission': 'SPACE_ADMIN'|'READ'|'READ_WRITE_DELETE'|'CUSTOM',
'grantType': 'SERVICE_MANAGED'|'CUSTOMER_MANAGED',
'spaceId': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The list of access grant summaries.
(dict) --
Summary of an AccessGrant. Call GetAccessGrant for the full grant.
grantId (string) --
The unique ID of the access grant.
grantArn (string) --
The Amazon Resource Name (ARN) of the access grant.
name (string) --
A name that identifies the access grant.
domainId (string) --
The ID of the domain the grant belongs to.
principal (dict) --
The principal receiving the grant.
principalType (string) --
The type of principal receiving the grant.
principalId (string) --
The ID of the principal receiving the grant.
principalAttributes (list) --
Attribute conditions for attribute-based access. When provided, the grant targets any principal matching all specified conditions. Supported only for IDC_USER principals.
(dict) --
A single attribute condition used to match principals for attribute-based access.
key (string) --
The Identity Center user attribute to match on. One of userName, active, userStatus, displayName, email, name.givenName, name.familyName, enterprise.department, enterprise.division, enterprise.organization, enterprise.costCenter, or enterprise.employeeNumber. Each key may appear only once per grant.
value (string) --
The attribute value.
permission (string) --
The permission granted.
grantType (string) --
Who manages the grant.
spaceId (string) --
The space this grant applies to. Domain-scoped grants are returned by ListDomainAccessGrantsForOrganization instead.
nextToken (string) --
A token to retrieve the next page of results, or null if there are no more results.
{'filterCriteria': {'sloIds': ['string']}}
Response {'items': {'sloId': 'string'}}
Lists alerts within a space, optionally filtered by exact name(s), a single name prefix, or exact alertId(s), with pagination.
Use GetAlert to retrieve a single alert's full detail.
See also: AWS API Documentation
Request Syntax
client.list_alerts(
spaceId='string',
filterCriteria={
'names': [
'string',
],
'namePrefix': 'string',
'ids': [
'string',
],
'stateValue': [
'OK'|'WARNING'|'CRITICAL'|'NODATA',
],
'notificationsEnabled': True|False,
'sloIds': [
'string',
]
},
sortBy='NAME'|'STATE',
sortOrder='ASC'|'DESC',
nextToken='string',
maxResults=123
)
string
[REQUIRED]
The unique ID of the space.
dict
Filter criteria narrowing which alerts are returned. All members are optional; the three name/id filters are mutually exclusive.
names (list) --
Filter to alerts whose name exactly matches any entry (OR semantics). Mutually exclusive with {@code namePrefix} and {@code ids}.
(string) --
namePrefix (string) --
Filter to alerts whose name starts with this prefix. Mutually exclusive with {@code names} and {@code ids}.
ids (list) --
Filter to alerts whose {@link AlertId} exactly matches any entry (OR semantics). Mutually exclusive with {@code names} and {@code namePrefix}.
(string) --
The stable alert identifier: a 32-character lowercase hex uuid, minted by the backend on create and immutable across updates.
It deliberately carries no name, so that a future rename cannot change an alert's identity and break the ARNs, saved links and IAM policies pointing at it. Use {@code name} to display an alert and {@code alertId} to address one.
stateValue (list) --
Filter to alerts currently in any of these states (OR semantics).
(string) --
Flat alert state. Severity is folded in: a WARNING/CRITICAL alert reports that state directly. {@code NODATA} indicates the evaluation produced no data (subject to the rule's noData.treatAs handling).
notificationsEnabled (boolean) --
Filter to alerts by whether notifications are enabled.
sloIds (list) --
Filter to alerts whose {@code rule.sloRule.sloId} matches any entry (OR semantics). Alerts with a telemetryRule never match, and an unknown id matches nothing. Combines with the other filters using AND; it is not part of the {@code names}, {@code namePrefix}, {@code ids} exclusion.
(string) --
Server-generated identifier of an SLO: 32 lowercase hexadecimal characters. It never changes, including when the SLO is renamed, and it is the resource ID in the SLO's ARN.
string
The field to sort results by.
string
The order in which to sort results.
string
A token to retrieve the next page of results.
integer
The maximum number of alerts to return per page.
dict
Response Syntax
{
'items': [
{
'name': 'string',
'alertId': 'string',
'spaceId': 'string',
'sloId': 'string',
'profileId': 'string',
'notificationStatus': 'ENABLED'|'DISABLED',
'state': {
'value': 'OK'|'WARNING'|'CRITICAL'|'NODATA',
'transitionedAt': datetime(2015, 1, 1),
'contributorSummary': {
'warningCount': 123,
'criticalCount': 123
},
'data': {
'thresholdBreached': 123.0
}
},
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'alertArn': 'string'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
items (list) --
The list of alert summaries.
(dict) --
Summary representation of an alert used in list responses.
name (string) --
The name of the alert.
alertId (string) --
The stable alert identifier (see {@link Alert#alertId}). Use it to address the alert; it is also the ARN's resource id.
spaceId (string) --
The ID of the space the alert belongs to.
sloId (string) --
The SLO the alert is built on. Present only for alerts with an sloRule; absent for telemetry alerts.
profileId (string) --
The ID of the access profile associated with the alert.
notificationStatus (string) --
Whether notifications are enabled.
state (dict) --
Live evaluation state (read-only, system-managed).
value (string) --
Current flat state.
transitionedAt (datetime) --
When the alert transitioned to its current state.
contributorSummary (dict) --
Counts of contributors currently breaching each severity threshold. Present only when contributor-level tracking is active; absent until the first contributor breaches a {@code WARNING} or {@code CRITICAL} threshold.
warningCount (integer) --
Number of contributors currently breaching the warning threshold.
criticalCount (integer) --
Number of contributors currently breaching the critical threshold.
data (dict) --
Structured detail about why the alert is in its current state.
thresholdBreached (float) --
For COUNT_OF_RESULTS alerts, the row count that breached; null for FIELD_VALUE (multi-contributor) alerts.
createdAt (datetime) --
The timestamp when the alert was created.
updatedAt (datetime) --
The timestamp when the alert was last updated.
alertArn (string) --
The Amazon Resource Name (ARN) of the alert.
nextToken (string) --
A token to retrieve the next page of results, or null if there are no more results.
{'integrationType': {'GITHUB', 'PAGERDUTY', 'GITHUB_ENTERPRISE'}}
Response {'items': {'integrationType': {'GITHUB', 'PAGERDUTY', 'GITHUB_ENTERPRISE'}}}
Lists the integrations in the account, optionally filtered by type, status, or name. Results are paginated.
See also: AWS API Documentation
Request Syntax
client.list_integrations(
integrationType='AWS_CONFIG_SLREC'|'AWS_CONFIG_AZURE_SLREC'|'GITHUB'|'SLACK'|'EXTERNAL_AGENT'|'AWS_INTEGRATION'|'PAGERDUTY'|'GITHUB_ENTERPRISE',
status='ACTIVE'|'DELETED'|'PENDING'|'PENDING_OAUTH'|'ERROR'|'FAILED',
name='string',
nextToken='string',
maxResults=123
)
string
Returns only integrations of this provider type.
string
Returns only integrations in this status.
string
Returns only the integration with this exact name.
string
Pagination token from a previous response; omit for the first page.
integer
Maximum number of integrations to return in one page.
dict
Response Syntax
{
'items': [
{
'integrationId': 'string',
'integrationArn': 'string',
'integrationType': 'AWS_CONFIG_SLREC'|'AWS_CONFIG_AZURE_SLREC'|'GITHUB'|'SLACK'|'EXTERNAL_AGENT'|'AWS_INTEGRATION'|'PAGERDUTY'|'GITHUB_ENTERPRISE',
'name': 'string',
'status': 'ACTIVE'|'DELETED'|'PENDING'|'PENDING_OAUTH'|'ERROR'|'FAILED',
'authType': 'NONE'|'OAUTH2'|'API_KEY',
'credentialArn': 'string',
'roleArn': 'string',
'integrationAttributes': {
'string': 'string'
},
'authorizationUrl': 'string',
'errorMessage': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'scope': 'ACCOUNT'|'ORGANIZATION'
},
],
'nextToken': 'string'
}
Response Structure
(dict) --
The response containing a page of integrations.
items (list) --
The page of integrations.
(dict) --
A connection between CloudWatch and an external system — such as a source of telemetry or configuration data, a messaging destination, or a model provider.
integrationId (string) --
The unique identifier of the integration.
integrationArn (string) --
The Amazon Resource Name (ARN) of the integration.
integrationType (string) --
The type of external system that an integration connects to, such as a source of configuration data, a messaging destination, or a model provider.
name (string) --
The customer-provided name of the integration.
status (string) --
The current lifecycle state of an integration.
authType (string) --
The authentication method that an integration uses to connect to its external system.
credentialArn (string) --
The Amazon Resource Name (ARN) of the secret that stores the integration's credentials.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to access the external system.
integrationAttributes (dict) --
Provider-specific key/value attributes that configure the integration.
(string) --
(string) --
authorizationUrl (string) --
The URL the customer visits to authorize the integration. Present while an OAuth authorization is pending.
errorMessage (string) --
A human-readable description of why the integration is in an ERROR or FAILED state. Present only when the integration has failed.
createdAt (datetime) --
The time at which the integration was created.
updatedAt (datetime) --
The time at which the integration was last updated.
scope (string) --
Whether this integration is account-scoped (ACCOUNT, customer-created) or organization-scoped (ORGANIZATION, created by an org-enablement rule). Absent on legacy records is treated as ACCOUNT.
nextToken (string) --
Pagination token for the next page; absent when there are no more results.
{'autoInvestigations': [{'integrationArn': 'string',
'minimumSeverity': 'LOW | MEDIUM | HIGH'}],
'intelligenceEnabled': 'boolean',
'notificationTargets': [{'filter': {'minimumSeverity': 'LOW | MEDIUM | HIGH',
'services': ['string']},
'target': {'arn': 'string',
'metadata': {'string': 'string'},
'type': 'sns | slack | pagerduty'},
'targetId': 'string'}]}
Creates or updates the intelligence configuration for the calling account in the current Region. The account is the account of the caller's credentials; the request does not name it. Set intelligenceEnabled to true to enable Observations, or to false to disable it. A request that sets no setting fails with ValidationException. Each setting that the request sends replaces the stored value, and each setting that it omits stays unchanged. An automatic-investigation entry for the stored integration sent without minimumSeverity keeps the stored minimumSeverity.
The service does not check whether the configuration changed after the caller last read it. The request carries no version, so a request based on an earlier GetIntelligenceConfiguration response replaces any change saved after that read, and no error is returned. One exception is a notification target sent with a targetId that is no longer stored, for example because another save removed it, which fails with ValidationException. ConflictException means only that another update was saved while this request was being processed, after the service read the configuration for this request and before it saved the result. The service checks for such a change to the notification targets when the request carries notificationTargets, to the automatic-investigation entries when it carries autoInvestigations, and to the KMS key when it sets a new key or removes the key. A request that adds a notification target or changes its filter also fails with ConflictException if Observations is turned off while the request is being processed. Other updates saved while the request is being processed can also cause ConflictException. When the request fails with ConflictException, nothing is saved. To lower the chance of replacing another caller's change, call GetIntelligenceConfiguration right before saving, and omit each setting that you do not mean to change.
The service does not use clientToken to recognize a retry, so a retried request is processed again like a new one (see clientToken).
See also: AWS API Documentation
Request Syntax
client.put_intelligence_configuration(
intelligenceEnabled=True|False,
kmsKeyArn='string',
removeKmsKey=True|False,
clientToken='string',
notificationTargets=[
{
'targetId': 'string',
'target': {
'type': 'sns'|'slack'|'pagerduty',
'arn': 'string',
'metadata': {
'string': 'string'
}
},
'filter': {
'services': [
'string',
],
'minimumSeverity': 'LOW'|'MEDIUM'|'HIGH'
}
},
],
autoInvestigations=[
{
'integrationArn': 'string',
'minimumSeverity': 'LOW'|'MEDIUM'|'HIGH'
},
]
)
boolean
Whether to enable Observations, which detects anomalies and correlates them into observations, for the calling account. Set it to true to enable and to false to disable.
Observations is in preview release and is subject to change.
string
Optional KMS key ARN to configure customer-managed encryption for anomaly data. The key must be in the calling account and in the current Region. A key in another account or another Region fails with ValidationException and nothing is saved.
boolean
Set to true to disassociate the configured KMS key. Mutually exclusive with kmsKeyArn; the service returns ValidationException if both are provided.
string
A token that identifies the request: 1 to 64 printable ASCII characters, with no spaces. For this operation, the token does not make a retry safe: the service checks only its format, and does not store the token or compare it with earlier requests, so a request sent again with the same token is processed again as a new request, not answered with the first result. Sending the same settings again saves them again, and a notification target sent without a targetId is added again with a new targetId. A retry fails with ConflictException only if another update of the configuration is saved while the retry is being processed. To find out whether an earlier attempt was saved, call GetIntelligenceConfiguration.
This field is autopopulated if not provided.
list
The destinations Intelligence notifications are sent to. Omit it to leave the stored targets unchanged, send an empty list to remove all targets, and send any other list to replace the stored list in full.
Send a new entry without a targetId; the service assigns one. For an existing entry, echo its targetId and its target, including metadata, unchanged; its filter may change. Every write that changes the list re-validates all of its targets, and if any target fails, the request fails with ValidationException and nothing is stored.
A save that adds a target, or changes the filter of a stored target, needs Intelligence already enabled on the account and not turned off by the same request, permission to view observations (cloudwatch:ListObservations), and kms:Decrypt on the configuration's customer managed key when one is set. A save that adds a slack or pagerduty target, or changes its filter, also needs cloudwatch:InvokeIntegration on its integration. A save that adds an sns target also needs sns:GetTopicAttributes on its topic. Removing targets and sending an empty list need none of these.
The list replaces the targets stored when the service reads the configuration for this request, so of two requests that change the targets one after the other, the later one replaces the list the earlier one saved. If the stored targets change while the request is being saved, the request fails with ConflictException and nothing is stored, so the caller reads the configuration again and retries. There is no version member to send for the targets: the service compares against the targets it read for this request.
Observations is in preview release and is subject to change.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
One notification target stored on the Intelligence configuration, with its service-assigned identifier.
targetId (string) --
The identifier the service assigns to the entry when it is first saved. Omit it on a new entry. To keep an existing entry, echo its targetId and its target unchanged; its filter may change. An entry whose targetId is not stored on the configuration, or whose target differs from the stored target for that targetId, is rejected.
target (dict) -- [REQUIRED]
The destination.
type (string) -- [REQUIRED]
The kind of destination.
arn (string) -- [REQUIRED]
For slack and pagerduty, the ARN of the connected integration, as returned by ListIntegrations, in the account and Region of the configuration. This is the integration ARN, not a channel or service ARN. For sns, the ARN of a standard SNS topic in the same partition and Region, in any account. At most 1011 characters, the AWS-wide ARN limit.
metadata (dict) --
Target-specific metadata. The accepted keys depend on type, and any other key is rejected with ValidationException.
slack: channel (required), the Slack channel name, and channelId (optional), the Slack channel identifier. When a target is added, the service resolves the channel name to its identifier and stores it as channelId, and notifications are posted to that identifier, so renaming the channel does not break the target. A channel the integration's app cannot see is rejected. A channelId sent with a new target must identify the named channel. No other key is accepted.
pagerduty: service_name (required), the exact, case-sensitive name of the PagerDuty service or event orchestration to page, and the optional keys serviceId (the PagerDuty service identifier), class, group, and component. No other key is accepted.
sns: absent or empty. No key is accepted.
(string) --
(string) --
filter (dict) --
The routing filter that selects which notifications reach this target. Optional. The filter sent with an entry replaces the stored one, and an entry sent without filter has no filter, so to keep an existing entry's filter, send it back with the entry. Unlike target, the filter of an existing entry may change, and a change to it is a change to notificationTargets.
services (list) --
The services whose observations reach this target. The observation reaches the target when any of its affected service names equals a listed name, ignoring case. An observation can name several services, and one match is enough. An observation with no affected services matches no list. Empty or absent means all services. Each name is 1 to 256 characters with no leading or trailing whitespace, and two names that differ only in case are rejected as duplicates. Names are stored as given and are not checked against the account's services.
(string) --
A service name in a notification routing filter: 1 to 256 characters with no leading or trailing whitespace.
minimumSeverity (string) --
The lowest severity that reaches this target. The observation reaches the target when its severity, ranked LOW below MEDIUM below HIGH, is at or above this value. Absent means all severities. LOW has the same effect as absent.
list
The automatic-investigation entries for the account in this Region. Omit it to leave the stored entries unchanged, send an empty list to turn automatic investigations off, and send any other list to replace the stored entries in full. An entry for the stored integration sent without minimumSeverity keeps the stored minimumSeverity.
Each entry names the ARN of an active AWS DevOps Agent integration in the account and Region. For each entry that the request adds, or whose integration or effective minimumSeverity it changes, the caller needs permission to view and to invoke that integration. At most one entry is accepted, and it covers the entire account. If any check fails, the request fails and nothing is stored. If the stored entries change while the request is being saved, the request fails with ConflictException and nothing is stored, so the caller reads the configuration again and retries. There is no version member to send for these entries: the service compares against the entries it read for this request.
Observations is in preview release and is subject to change.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
One automatic-investigation entry: the integration that investigates observations, and the lowest severity it investigates. An entry covers the entire account.
integrationArn (string) -- [REQUIRED]
The ARN of an active AWS DevOps Agent integration in the account and Region of the configuration. At most 1011 characters, the AWS-wide ARN limit.
minimumSeverity (string) --
The lowest observation severity that starts an investigation. An investigation starts only for an observation whose severity, ranked LOW below MEDIUM below HIGH, is at or above this value. In a PutIntelligenceConfiguration request, an entry for the stored entry's integration sent without this member keeps the stored value. A new entry, or an entry for another integration, sent without it gets HIGH, so only HIGH observations start an investigation. GetIntelligenceConfiguration and the PutIntelligenceConfiguration output always show the value in effect, HIGH for an entry stored without one.
dict
Response Syntax
{
'accountId': 'string',
'intelligenceEnabled': True|False,
'kmsKeyArn': 'string',
'updatedAt': datetime(2015, 1, 1),
'createdAt': datetime(2015, 1, 1),
'notificationTargets': [
{
'targetId': 'string',
'target': {
'type': 'sns'|'slack'|'pagerduty',
'arn': 'string',
'metadata': {
'string': 'string'
}
},
'filter': {
'services': [
'string',
],
'minimumSeverity': 'LOW'|'MEDIUM'|'HIGH'
}
},
],
'autoInvestigations': [
{
'integrationArn': 'string',
'minimumSeverity': 'LOW'|'MEDIUM'|'HIGH'
},
]
}
Response Structure
(dict) --
The intelligence configuration for the calling account after the update.
accountId (string) --
The AWS account ID this configuration applies to.
intelligenceEnabled (boolean) --
Whether Observations, which detects anomalies and correlates them into observations, is enabled for the account. It is false when the account has not enabled it.
Observations is in preview release and is subject to change.
kmsKeyArn (string) --
The currently active KMS key ARN for customer-managed encryption, if configured.
updatedAt (datetime) --
ISO-8601 timestamp of the last update.
createdAt (datetime) --
ISO-8601 timestamp of initial creation.
notificationTargets (list) --
The destinations Intelligence notifications are sent to. Every entry carries its service-assigned targetId.
Observations is in preview release and is subject to change.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
One notification target stored on the Intelligence configuration, with its service-assigned identifier.
targetId (string) --
The identifier the service assigns to the entry when it is first saved. Omit it on a new entry. To keep an existing entry, echo its targetId and its target unchanged; its filter may change. An entry whose targetId is not stored on the configuration, or whose target differs from the stored target for that targetId, is rejected.
target (dict) --
The destination.
type (string) --
The kind of destination.
arn (string) --
For slack and pagerduty, the ARN of the connected integration, as returned by ListIntegrations, in the account and Region of the configuration. This is the integration ARN, not a channel or service ARN. For sns, the ARN of a standard SNS topic in the same partition and Region, in any account. At most 1011 characters, the AWS-wide ARN limit.
metadata (dict) --
Target-specific metadata. The accepted keys depend on type, and any other key is rejected with ValidationException.
slack: channel (required), the Slack channel name, and channelId (optional), the Slack channel identifier. When a target is added, the service resolves the channel name to its identifier and stores it as channelId, and notifications are posted to that identifier, so renaming the channel does not break the target. A channel the integration's app cannot see is rejected. A channelId sent with a new target must identify the named channel. No other key is accepted.
pagerduty: service_name (required), the exact, case-sensitive name of the PagerDuty service or event orchestration to page, and the optional keys serviceId (the PagerDuty service identifier), class, group, and component. No other key is accepted.
sns: absent or empty. No key is accepted.
(string) --
(string) --
filter (dict) --
The routing filter that selects which notifications reach this target. Optional. The filter sent with an entry replaces the stored one, and an entry sent without filter has no filter, so to keep an existing entry's filter, send it back with the entry. Unlike target, the filter of an existing entry may change, and a change to it is a change to notificationTargets.
services (list) --
The services whose observations reach this target. The observation reaches the target when any of its affected service names equals a listed name, ignoring case. An observation can name several services, and one match is enough. An observation with no affected services matches no list. Empty or absent means all services. Each name is 1 to 256 characters with no leading or trailing whitespace, and two names that differ only in case are rejected as duplicates. Names are stored as given and are not checked against the account's services.
(string) --
A service name in a notification routing filter: 1 to 256 characters with no leading or trailing whitespace.
minimumSeverity (string) --
The lowest severity that reaches this target. The observation reaches the target when its severity, ranked LOW below MEDIUM below HIGH, is at or above this value. Absent means all severities. LOW has the same effect as absent.
autoInvestigations (list) --
The automatic-investigation entries for the account in this Region. Absent or empty means automatic investigations are off.
Observations is in preview release and is subject to change.
(dict) --
This data type is part of Observations, which is in preview release for Amazon CloudWatch Omni and is subject to change.
One automatic-investigation entry: the integration that investigates observations, and the lowest severity it investigates. An entry covers the entire account.
integrationArn (string) --
The ARN of an active AWS DevOps Agent integration in the account and Region of the configuration. At most 1011 characters, the AWS-wide ARN limit.
minimumSeverity (string) --
The lowest observation severity that starts an investigation. An investigation starts only for an observation whose severity, ranked LOW below MEDIUM below HIGH, is at or above this value. In a PutIntelligenceConfiguration request, an entry for the stored entry's integration sent without this member keeps the stored value. A new entry, or an entry for another integration, sent without it gets HIGH, so only HIGH observations start an investigation. GetIntelligenceConfiguration and the PutIntelligenceConfiguration output always show the value in effect, HIGH for an entry stored without one.
{'notificationRules': {'target': {'type': {'investigation'}}},
'rule': {'sloRule': {'condition': {'burnRate': {'criticalThreshold': 'double',
'shortWindowMinutes': 'integer',
'warningThreshold': 'double',
'windowMinutes': 'integer'},
'errorBudget': {'criticalThreshold': 'double',
'warningThreshold': 'double'}},
'evaluation': {'intervalSeconds': 'integer',
'pendingDurationSeconds': 'integer',
'recoveryDurationSeconds': 'integer'},
'noData': {'treatAs': 'OK | WARNING | CRITICAL | NODATA'},
'sloId': 'string'}}}
Updates an existing alert.
Only non-null fields overwrite existing values.
See also: AWS API Documentation
Request Syntax
client.update_alert(
spaceId='string',
alertId='string',
profileId='string',
name='string',
description='string',
rule={
'telemetryRule': {
'query': {
'language': 'SQL'|'PROMQL',
'expression': 'string'
},
'condition': {
'thresholdMode': 'COUNT_OF_RESULTS'|'FIELD_VALUE',
'thresholdField': 'string',
'comparator': 'GT'|'LT'|'GTE'|'LTE',
'warningThreshold': 123.0,
'criticalThreshold': 123.0
},
'evaluation': {
'intervalSeconds': 123,
'pendingDurationSeconds': 123,
'recoveryDurationSeconds': 123
},
'noData': {
'treatAs': 'OK'|'WARNING'|'CRITICAL'|'NODATA'
}
},
'sloRule': {
'sloId': 'string',
'condition': {
'burnRate': {
'windowMinutes': 123,
'shortWindowMinutes': 123,
'warningThreshold': 123.0,
'criticalThreshold': 123.0
},
'errorBudget': {
'warningThreshold': 123.0,
'criticalThreshold': 123.0
}
},
'evaluation': {
'intervalSeconds': 123,
'pendingDurationSeconds': 123,
'recoveryDurationSeconds': 123
},
'noData': {
'treatAs': 'OK'|'WARNING'|'CRITICAL'|'NODATA'
}
}
},
notificationsEnabled=True|False,
notificationRules=[
{
'trigger': {
'stateValues': [
'OK'|'WARNING'|'CRITICAL'|'NODATA',
]
},
'target': {
'type': 'sns'|'slack'|'pagerduty'|'investigation',
'arn': 'string',
'metadata': {
'string': 'string'
}
}
},
]
)
string
[REQUIRED]
The unique ID of the space.
string
[REQUIRED]
The alert to update.
string
The ID of the access profile associated with the alert.
string
A new display name for the alert. Omit to leave the name unchanged (apply-if-present / PATCH). Same constraints as CreateAlert.name; the name is not the alert's identity, so a rename never changes the alertId.
string
A new description of the alert. Omit to leave unchanged.
dict
The rule that defines how the alert is evaluated. Omit to leave unchanged. For a telemetryRule, each of {@code query}, {@code condition}, {@code evaluation} and {@code noData} is replaced whole when present. For an sloRule, each of {@code sloId}, {@code condition}, {@code evaluation} and {@code noData} is applied only when supplied; omitted members keep their stored value, and a supplied block is replaced whole. Within any supplied block, an omitted optional member is cleared to unset (null/absent), not preserved from the stored alert or defaulted. The rule kind cannot change: supplying a sloRule for a telemetry alert, or a telemetryRule for an SLO alert, is a validation error.
telemetryRule (dict) --
The telemetry-based rule definition.
query (dict) --
The query expression to evaluate.
language (string) -- [REQUIRED]
The query language of the expression.
expression (string) -- [REQUIRED]
The query expression to evaluate.
condition (dict) --
The condition that determines when the alert fires.
thresholdMode (string) --
How the threshold is applied to query results.
thresholdField (string) --
The field the threshold is evaluated against.
comparator (string) --
The comparison operator applied to the threshold.
warningThreshold (float) --
The value at which the alert enters the WARNING state.
criticalThreshold (float) --
The value at which the alert enters the CRITICAL state.
evaluation (dict) --
The evaluation cadence and durations.
intervalSeconds (integer) -- [REQUIRED]
The interval between evaluations, in seconds.
pendingDurationSeconds (integer) --
The duration a breach must persist before the alert fires, in seconds.
recoveryDurationSeconds (integer) --
The duration a recovery must persist before the alert clears, in seconds.
noData (dict) --
How the alert behaves when a query produces no data.
treatAs (string) -- [REQUIRED]
The state to report when an evaluation produces no data.
sloRule (dict) --
An alert on the burn rate or the error budget of a service level objective (SLO) in the same space. On UpdateAlert, omitted members stay unchanged and a supplied block replaces that block whole. An alert cannot switch between telemetryRule and sloRule.
sloId (string) --
The SLO the alert is built on. It must be in the same space as the alert, and the caller must be allowed to read it. Required on create; omit on update to keep the current SLO.
condition (dict) --
What makes the alert fire. Exactly one member is set. Required on create; omit on update to keep the current condition. When supplied on update, the condition block is replaced whole.
burnRate (dict) --
Fire on how fast the error budget is being spent.
windowMinutes (integer) -- [REQUIRED]
The burn-rate window in multiples of 5 minutes, from 5 through 10080 (7 days).
shortWindowMinutes (integer) --
The short window of a pair, in multiples of 5 minutes from 5 through 10080 and shorter than windowMinutes. Omit for a single window. Recommended pairs are 60/5, 360/30, 1440/60 and 4320/360.
warningThreshold (float) --
The alert is WARNING when the burn rate reaches or exceeds this multiple of the sustainable rate. Greater than 0.
criticalThreshold (float) --
The alert is CRITICAL when the burn rate reaches or exceeds this multiple of the sustainable rate. Greater than 0, and greater than warningThreshold when both are set.
errorBudget (dict) --
Fire on how much of the error budget has been spent.
warningThreshold (float) --
The alert is WARNING when the consumed ratio reaches or exceeds this value. Greater than 0 and at most 1.
criticalThreshold (float) --
The alert is CRITICAL when the consumed ratio reaches or exceeds this value. Greater than 0 and at most 1, and greater than warningThreshold when both are set.
evaluation (dict) --
The evaluation cadence and durations. Required on create; omit on update to keep the current evaluation settings. When supplied on update, the evaluation block is replaced whole.
intervalSeconds (integer) -- [REQUIRED]
The interval between evaluations, in seconds.
pendingDurationSeconds (integer) --
The duration a breach must persist before the alert fires, in seconds.
recoveryDurationSeconds (integer) --
The duration a recovery must persist before the alert clears, in seconds.
noData (dict) --
How the alert behaves when no fresh SLO measurement is available. Omit on create to use NODATA. Omit on update to keep the current behavior. When supplied on update, the noData block is replaced whole.
treatAs (string) -- [REQUIRED]
The state to report when an evaluation produces no data.
boolean
Whether actions (notifications) are enabled for this alert. Omitted = leave existing value unchanged.
list
Replaces the entire notification rule list when present; full-replace, not merge. Omitted = leave existing rules unchanged. An empty list clears all rules (the alert keeps evaluating; only notifications stop).
(dict) --
Single notification rule: which transitions trigger this rule and where the resulting notification should be sent.
trigger (dict) -- [REQUIRED]
The conditions that trigger this notification rule.
stateValues (list) --
Alert state(s) that trigger this rule. Empty / omitted = any state.
(string) --
Flat alert state. Severity is folded in: a WARNING/CRITICAL alert reports that state directly. {@code NODATA} indicates the evaluation produced no data (subject to the rule's noData.treatAs handling).
target (dict) -- [REQUIRED]
The destination for notifications from this rule.
type (string) -- [REQUIRED]
The type of notification target.
arn (string) -- [REQUIRED]
The Amazon Resource Name (ARN) of the notification target. For {@code slack} and {@code pagerduty}, an integration ARN as returned by {@code ListIntegrations}.
metadata (dict) --
Additional target-specific metadata.
(string) --
(string) --
dict
Response Syntax
{}
Response Structure
(dict) --
{'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}
Response {'domain': {'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}}
Updates a domain's name or identity provider configuration.
Only the provided fields are changed; omitted fields are left unchanged. Renaming a domain also changes the endpoint URLs derived from its name.
See also: AWS API Documentation
Request Syntax
client.update_domain(
domainId='string',
name='string',
identityProviders=[
'IAM'|'IDC',
],
identityProviderConfiguration={
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
}
)
string
[REQUIRED]
The unique ID of the domain to update.
string
A new name for the domain. Omit to leave unchanged. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
list
The identity providers to configure for the domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
dict
Identity provider configuration for the domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) -- [REQUIRED]
Whether Spaces in this domain may use Identity Center in a different Region.
dict
Response Syntax
{
'domain': {
'domainId': 'string',
'domainArn': 'string',
'name': 'string',
'identityProviders': [
'IAM'|'IDC',
],
'identityProviderConfiguration': {
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
},
'domainEndpointUrl': 'string',
'customEndpointUrls': [
'string',
],
'identityCenterApplicationArn': 'string',
'region': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'status': 'ACTIVE'
}
}
Response Structure
(dict) --
domain (dict) --
The details of the updated domain.
domainId (string) --
The unique ID of the domain.
domainArn (string) --
The Amazon Resource Name (ARN) of the domain.
name (string) --
A name that identifies the domain.
identityProviders (list) --
The identity providers configured for the domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
identityProviderConfiguration (dict) --
Identity provider configuration for the domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) --
Whether Spaces in this domain may use Identity Center in a different Region.
domainEndpointUrl (string) --
The HTTPS endpoint URL for accessing the domain.
customEndpointUrls (list) --
Additional endpoint URLs derived from the domain name.
(string) --
identityCenterApplicationArn (string) --
The ARN of the Identity Center application. Absent for IAM-only domains.
region (string) --
The Region where this domain was created.
createdAt (datetime) --
The timestamp when the domain was created.
updatedAt (datetime) --
The timestamp when the domain was last updated.
status (string) --
Current status of the domain.
{'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}
Response {'organizationDomain': {'identityProviderConfiguration': {'identityCenterConfiguration': {'crossRegionConfiguration': {'enabled': 'boolean'}}}}}
Updates an organization domain's name or identity provider configuration. Call this operation in the Region where the domain was created.
Only the provided fields are changed; omitted fields are left unchanged. Renaming a domain also changes the endpoint URLs derived from its name.
See also: AWS API Documentation
Request Syntax
client.update_domain_for_organization(
domainId='string',
name='string',
identityProviders=[
'IAM'|'IDC',
],
identityProviderConfiguration={
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
}
)
string
[REQUIRED]
The ID of the organization domain to update.
string
A new name for the organization domain. Omit to leave unchanged. Must be 3-63 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
list
The identity providers to configure for the domain. Omit to leave unchanged.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
dict
Identity provider configuration for the domain. Omit to leave unchanged.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) -- [REQUIRED]
Whether Spaces in this domain may use Identity Center in a different Region.
dict
Response Syntax
{
'organizationDomain': {
'domainId': 'string',
'domainArn': 'string',
'name': 'string',
'domainEndpointUrl': 'string',
'customEndpointUrls': [
'string',
],
'organizationId': 'string',
'ownerAccountId': 'string',
'identityProviders': [
'IAM'|'IDC',
],
'identityProviderConfiguration': {
'identityCenterConfiguration': {
'identityCenterInstanceArn': 'string',
'crossRegionConfiguration': {
'enabled': True|False
}
}
},
'identityCenterApplicationArn': 'string',
'region': 'string',
'status': 'ACTIVE',
'domainAccessRoleArn': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
organizationDomain (dict) --
The details of the updated organization domain.
domainId (string) --
The unique ID of the organization domain.
domainArn (string) --
The Amazon Resource Name (ARN) of the organization domain.
name (string) --
A name that identifies the organization domain.
domainEndpointUrl (string) --
The HTTPS endpoint URL for accessing the organization domain.
customEndpointUrls (list) --
Additional endpoint URLs derived from the domain name.
(string) --
organizationId (string) --
The ID of the AWS Organization that owns the domain.
ownerAccountId (string) --
The AWS account ID that owns the organization domain.
identityProviders (list) --
The identity providers configured for the organization domain.
(string) --
Identity provider type for a domain. Determines which identity mechanisms are active for authentication.
identityProviderConfiguration (dict) --
Identity provider configuration for the organization domain.
identityCenterConfiguration (dict) --
Identity Center configuration. Required when identityProviders includes IDC.
identityCenterInstanceArn (string) --
Identity Center instance ARN
crossRegionConfiguration (dict) --
Cross-Region Identity Center access for Spaces in this domain.
enabled (boolean) --
Whether Spaces in this domain may use Identity Center in a different Region.
identityCenterApplicationArn (string) --
The ARN of the Identity Center application. Absent for IAM-only domains.
region (string) --
The Region where this organization domain was created.
status (string) --
Current status of the organization domain.
domainAccessRoleArn (string) --
The ARN of the customer-provided IAM role in the management account used for domain access.
createdAt (datetime) --
The timestamp when the organization domain was created.
updatedAt (datetime) --
The timestamp when the organization domain was last updated.
{'integration': {'integrationType': {'GITHUB',
'GITHUB_ENTERPRISE',
'PAGERDUTY'}}}
Updates an existing integration, identified by its id, ARN, or name. Only the fields you provide are changed.
See also: AWS API Documentation
Request Syntax
client.update_integration(
identifier={
'integrationId': 'string',
'integrationArn': 'string',
'integrationName': 'string'
},
credential={
'oauthCodeCredential': {
'authCode': 'string'
},
'oauthClientCredential': {
'clientId': 'string',
'clientSecret': 'string',
'providerId': 'string'
},
'apiKeyCredential': {
'apiKeyValue': 'string'
}
},
integrationAttributes={
'string': 'string'
},
roleArn='string'
)
dict
[REQUIRED]
Identifies the integration to update — exactly one of integrationId, integrationArn, or integrationName.
integrationId (string) --
The unique identifier of the integration.
integrationArn (string) --
The Amazon Resource Name of the integration.
integrationName (string) --
The name of the integration; unique within the account.
dict
The replacement credential used to authenticate with the provider.
oauthCodeCredential (dict) --
Credentials for an OAuth 2.0 authorization-code grant.
authCode (string) -- [REQUIRED]
The OAuth 2.0 authorization code returned by the external system's authorization endpoint.
oauthClientCredential (dict) --
Credentials for an OAuth 2.0 client-credentials grant.
clientId (string) -- [REQUIRED]
The OAuth 2.0 client identifier registered with the external system.
clientSecret (string) -- [REQUIRED]
The OAuth 2.0 client secret that pairs with the client identifier.
providerId (string) --
The identifier of the OAuth provider that issued the client credentials.
apiKeyCredential (dict) --
An API key credential.
apiKeyValue (string) -- [REQUIRED]
The API key value used to authenticate with the external system.
dict
The provider-specific attributes to associate with the integration.
(string) --
(string) --
string
The Amazon Resource Name of the IAM role assumed to access the integration.
dict
Response Syntax
{
'integration': {
'integrationId': 'string',
'integrationArn': 'string',
'integrationType': 'AWS_CONFIG_SLREC'|'AWS_CONFIG_AZURE_SLREC'|'GITHUB'|'SLACK'|'EXTERNAL_AGENT'|'AWS_INTEGRATION'|'PAGERDUTY'|'GITHUB_ENTERPRISE',
'name': 'string',
'status': 'ACTIVE'|'DELETED'|'PENDING'|'PENDING_OAUTH'|'ERROR'|'FAILED',
'authType': 'NONE'|'OAUTH2'|'API_KEY',
'credentialArn': 'string',
'roleArn': 'string',
'integrationAttributes': {
'string': 'string'
},
'authorizationUrl': 'string',
'errorMessage': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'scope': 'ACCOUNT'|'ORGANIZATION'
}
}
Response Structure
(dict) --
The response from updating an integration.
integration (dict) --
The details of the updated integration. This is the same object returned by GetIntegration and CreateIntegration. Populated on a successful update; absent only if the post-update read-back of the resource did not complete.
integrationId (string) --
The unique identifier of the integration.
integrationArn (string) --
The Amazon Resource Name (ARN) of the integration.
integrationType (string) --
The type of external system that an integration connects to, such as a source of configuration data, a messaging destination, or a model provider.
name (string) --
The customer-provided name of the integration.
status (string) --
The current lifecycle state of an integration.
authType (string) --
The authentication method that an integration uses to connect to its external system.
credentialArn (string) --
The Amazon Resource Name (ARN) of the secret that stores the integration's credentials.
roleArn (string) --
The Amazon Resource Name (ARN) of the IAM role that CloudWatch assumes to access the external system.
integrationAttributes (dict) --
Provider-specific key/value attributes that configure the integration.
(string) --
(string) --
authorizationUrl (string) --
The URL the customer visits to authorize the integration. Present while an OAuth authorization is pending.
errorMessage (string) --
A human-readable description of why the integration is in an ERROR or FAILED state. Present only when the integration has failed.
createdAt (datetime) --
The time at which the integration was created.
updatedAt (datetime) --
The time at which the integration was last updated.
scope (string) --
Whether this integration is account-scoped (ACCOUNT, customer-created) or organization-scoped (ORGANIZATION, created by an org-enablement rule). Absent on legacy records is treated as ACCOUNT.
{'identityCenterConfiguration': {'region': 'string'}}
Response {'space': {'identityCenterConfiguration': {'region': 'string'}}}
Updates a space.
Only the provided fields are changed; omitted fields are left unchanged.
See also: AWS API Documentation
Request Syntax
client.update_space(
spaceId='string',
identityCenterConfiguration={
'region': 'string'
},
name='string',
agentCoreEvaluationRoleArn='string',
encryptionConfiguration={
'encryptionStrategy': 'AWS_OWNED'|'CUSTOMER_MANAGED',
'kmsKeyArn': 'string'
}
)
string
[REQUIRED]
The unique ID of the space to update.
dict
Identity Center settings for this space. Omit to leave the configuration unchanged.
region (string) -- [REQUIRED]
The Region where this space sends Identity Center requests.
string
A new name for the space. Omit to leave unchanged. Must be 3-64 characters: lowercase letters, numbers, and hyphens. It must begin and end with a letter or number and cannot contain consecutive hyphens.
string
The ARN of the IAM role used by AgentCore online evaluation. Must be in the caller's account. Omit if the space does not use AgentCore online evaluation.
dict
How to encrypt the space's data at rest. Omit to leave encryption unchanged. Pass encryptionStrategy AWS_OWNED to stop using a customer managed key and revert to service owned encryption.
encryptionStrategy (string) -- [REQUIRED]
Which kind of key to use. Required.
kmsKeyArn (string) --
Customer managed KMS key ARN. Required when encryptionStrategy is CUSTOMER_MANAGED, and must be omitted when it is AWS_OWNED. Must be a symmetric ENCRYPT_DECRYPT key in the caller's account and region.
dict
Response Syntax
{
'space': {
'spaceId': 'string',
'name': 'string',
'spaceArn': 'string',
'domainArn': 'string',
'region': 'string',
'identityCenterConfiguration': {
'region': 'string'
},
'ownerAccountId': 'string',
'dataAccessRoleArn': 'string',
'createdAt': datetime(2015, 1, 1),
'updatedAt': datetime(2015, 1, 1),
'agentCoreEvaluationRoleArn': 'string',
'status': 'ACTIVE'|'SUSPENDED'|'MOVING',
'statusReason': 'string',
'encryptionConfiguration': {
'encryptionStrategy': 'AWS_OWNED'|'CUSTOMER_MANAGED',
'kmsKeyArn': 'string'
}
}
}
Response Structure
(dict) --
space (dict) --
The updated details of the space.
spaceId (string) --
The unique ID of the space.
name (string) --
A name that identifies the space.
spaceArn (string) --
The Amazon Resource Name (ARN) of the space.
domainArn (string) --
The Amazon Resource Name (ARN) of the domain the space belongs to. Absent when the space is not associated with a domain, so callers must tolerate its absence.
region (string) --
The region where this space was created.
identityCenterConfiguration (dict) --
Identity Center settings for this space. Absent for IAM-only spaces.
region (string) --
The Region where this space sends Identity Center requests.
ownerAccountId (string) --
AWS account ID that owns this space.
dataAccessRoleArn (string) --
The ARN of the IAM role used for data access.
createdAt (datetime) --
The timestamp when the space was created.
updatedAt (datetime) --
The timestamp when the space was last updated.
agentCoreEvaluationRoleArn (string) --
The ARN of the IAM role used by AgentCore online evaluation. Absent when the space was created without one.
status (string) --
The status of the space.
statusReason (string) --
Reason for the current space status.
encryptionConfiguration (dict) --
How the space's data at rest is encrypted. Always populated: a space with no customer managed key reports encryptionStrategy AWS_OWNED and no kmsKeyArn.
encryptionStrategy (string) --
Which kind of key to use. Required.
kmsKeyArn (string) --
Customer managed KMS key ARN. Required when encryptionStrategy is CUSTOMER_MANAGED, and must be omitted when it is AWS_OWNED. Must be a symmetric ENCRYPT_DECRYPT key in the caller's account and region.