For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • DSX Exchange
    • Architecture
    • Pre-Deployment
    • Deployment
    • Integrator Quickstart
    • Operations
    • Authentication
    • BMS Integration
    • Validated Capabilities
  • Schema
      • Overview
      • Messages
      • Schemas
NVIDIANVIDIA
Developer-friendly docs for your API
Privacy Policy | Your Privacy Choices | Terms of Service | Accessibility | Corporate Policies | Product Security | Contact

Copyright © 2026, NVIDIA Corporation.

LogoLogo
On this page
  • Protocol Binding
  • CloudEvents Message Format
  • Source Format
  • Event Types
  • Security
  • Data Field Security (JWS)
  • Distributed Tracing
  • Raw AsyncAPI Spec
SchemaPower Management

Power Management 1.7.0

||View as Markdown|
Previous

Schemas

Next

Publish Load Target Set

Real-time power management and emergency control plane for data center grid events.

Protocol Binding

This API uses the MQTT Protocol Binding for CloudEvents v1.0.2.

MQTT 3.1.1 Structured Content Mode:

  • Content mode is always “structured” (MQTT 3.1.1 lacks custom metadata support)
  • The entire CloudEvents message is in the MQTT PUBLISH payload as JSON
  • Content-Type application/cloudevents+json is implied (no header in MQTT 3.1.1)
  • All CloudEvents attributes and data are in the JSON payload

CloudEvents Message Format

All messages conform to CloudEvents 1.0.2 specification with W3C Distributed Tracing Extension.

Each MQTT PUBLISH payload contains a JSON object with:

  • specversion: “1.0.2” (REQUIRED)
  • id: UUIDv4 unique event identifier (REQUIRED)
  • source: URI format //grid/v1/<role>/<identifier> (REQUIRED)
  • type: Event type e.g., grid.loadtarget.set.v1 (REQUIRED)
  • time: ISO 8601 timestamp (REQUIRED)
  • datacontenttype: “application/json” (REQUIRED)
  • subject: Resource subject e.g., loadtarget (REQUIRED)
  • traceparent: W3C Trace Context for distributed tracing (REQUIRED)
  • tracestate: Optional vendor-specific trace context
  • correlationid: UUIDv4 correlation identifier (OPTIONAL, CloudEvents extension)
  • data: JWS-signed payload (string - see Data Field Security below)

Source Format

The source attribute is a stable URI that identifies the publisher of an event. Format: //<namespace>/<version>/<role>/<identifier>

  • namespace: grid
  • version: v1
  • role: isv | poweragent | infra
  • identifier: deployment-unique name assigned during registration

Examples:

  • ISV: //grid/v1/isv/acme-energy
  • Power Agent: //grid/v1/poweragent/dps-prod
  • Infra Agent: //grid/v1/infra/ima-prod

Event Types

  • grid.loadtarget.set.v1 — ISV sets load target (fire-and-forget command)
  • grid.powerstate.status.v1 — Power Agent publishes power state snapshots
  • grid.powerbreach.alert.v1 — Power Agent publishes breach alerts
  • grid.powerbreach.enforcement.v1 — Infra Agent publishes enforcement outcomes

Security

  • Transport: MQTT 3.1.1 with TLS (mTLS or OAuth2 SSA)
  • Data Field: MUST be signed (JWS RFC 7515) — broker never sees verified plaintext

Data Field Security (JWS)

The data field uses cryptographic protection per RFC 7515 (JWS):

  1. Sign (JWS): The JSON payload is signed using JWS (JSON Web Signature)

    • Algorithm: ES256 (ECDSA using P-256 and SHA-256) or RS256
    • Provides: Data integrity and authenticity
    • The kid (Key ID) in JWS header identifies the signing key
  2. Result: The data field contains a JWS compact serialization string: <JWS Header>.<Payload>.<Signature>

Processing Order:

  • Sender: JSON payload → JWS sign → data field
  • Receiver: data field → JWS verify → JSON payload

Distributed Tracing

All participants MUST propagate traceparent/tracestate for end-to-end visibility.

Default Content Type: application/cloudevents+json

Raw AsyncAPI Spec

View / copy the raw AsyncAPI YAML
1# Copyright 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2# SPDX-License-Identifier: Apache-2.0
3
4asyncapi: 3.1.0
5info:
6 title: Power Management
7 version: 1.7.0
8 description: |
9 Real-time power management and emergency control plane for data center grid events.
10
11 ## Protocol Binding
12
13 This API uses the MQTT [Protocol Binding for CloudEvents v1.0.2](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/mqtt-protocol-binding.md).
14
15 **MQTT 3.1.1 Structured Content Mode:**
16
17 - Content mode is always "structured" (MQTT 3.1.1 lacks custom metadata support)
18 - The entire CloudEvents message is in the MQTT PUBLISH payload as JSON
19 - Content-Type `application/cloudevents+json` is implied (no header in MQTT 3.1.1)
20 - All CloudEvents attributes and data are in the JSON payload
21
22 ## CloudEvents Message Format
23
24 All messages conform to [CloudEvents 1.0.2 specification](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md) with W3C [Distributed Tracing Extension](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/extensions/distributed-tracing.md).
25
26 Each MQTT PUBLISH payload contains a JSON object with:
27
28 - **specversion**: "1.0.2" (REQUIRED)
29 - **id**: UUIDv4 unique event identifier (REQUIRED)
30 - **source**: URI format //grid/v1/<role>/<identifier> (REQUIRED)
31 - **type**: Event type e.g., grid.loadtarget.set.v1 (REQUIRED)
32 - **time**: ISO 8601 timestamp (REQUIRED)
33 - **datacontenttype**: "application/json" (REQUIRED)
34 - **subject**: Resource subject e.g., loadtarget (REQUIRED)
35 - **traceparent**: W3C Trace Context for distributed tracing (REQUIRED)
36 - **tracestate**: Optional vendor-specific trace context
37 - **correlationid**: UUIDv4 correlation identifier (OPTIONAL, CloudEvents extension)
38 - **data**: JWS-signed payload (string - see Data Field Security below)
39
40 ## Source Format
41
42 The source attribute is a stable URI that identifies the publisher of an event.
43 Format: //<namespace>/<version>/<role>/<identifier>
44
45 - namespace: grid
46 - version: v1
47 - role: isv | poweragent | infra
48 - identifier: deployment-unique name assigned during registration
49
50 Examples:
51
52 - ISV: //grid/v1/isv/acme-energy
53 - Power Agent: //grid/v1/poweragent/dps-prod
54 - Infra Agent: //grid/v1/infra/ima-prod
55
56 ## Event Types
57
58 - grid.loadtarget.set.v1 — ISV sets load target (fire-and-forget command)
59 - grid.powerstate.status.v1 — Power Agent publishes power state snapshots
60 - grid.powerbreach.alert.v1 — Power Agent publishes breach alerts
61 - grid.powerbreach.enforcement.v1 — Infra Agent publishes enforcement outcomes
62
63 ## Security
64
65 - Transport: MQTT 3.1.1 with TLS (mTLS or OAuth2 SSA)
66 - Data Field: MUST be signed (JWS RFC 7515) — broker never sees verified plaintext
67
68 ## Data Field Security (JWS)
69
70 The `data` field uses cryptographic protection per RFC 7515 (JWS):
71
72 1. **Sign (JWS)**: The JSON payload is signed using JWS (JSON Web Signature)
73 - Algorithm: ES256 (ECDSA using P-256 and SHA-256) or RS256
74 - Provides: Data integrity and authenticity
75 - The `kid` (Key ID) in JWS header identifies the signing key
76
77 2. **Result**: The `data` field contains a JWS compact serialization string:
78 `<JWS Header>.<Payload>.<Signature>`
79
80 **Processing Order:**
81
82 - Sender: JSON payload → JWS sign → data field
83 - Receiver: data field → JWS verify → JSON payload
84
85 ## Distributed Tracing
86
87 All participants MUST propagate traceparent/tracestate for end-to-end visibility.
88 contact:
89 name: Grid Platform Team
90 email: grid-platform@nvidia.com
91
92defaultContentType: application/cloudevents+json
93
94servers:
95 production:
96 host: broker.example.com
97 protocol: mqtt
98 description: MQTT broker for power management grid events
99
100channels:
101 loadTargetSetChannel:
102 address: grid/v1/isv/{identifier}/loadtarget/set
103 parameters:
104 identifier:
105 $ref: '#/components/parameters/identifier'
106 messages:
107 loadTargetSet:
108 $ref: '#/components/messages/LoadTargetSetMessage'
109 description: |
110 ISV publishes load target commands. Fire-and-forget pattern — the ISV
111 does not wait for a response. Confirmation comes via grid.powerstate.status.v1.
112 bindings:
113 mqtt:
114 qos: 1
115
116 powerStateStatusChannel:
117 address: grid/v1/poweragent/{identifier}/powerstate/status
118 parameters:
119 identifier:
120 $ref: '#/components/parameters/identifier'
121 messages:
122 powerStateStatus:
123 $ref: '#/components/messages/PowerStateStatusMessage'
124 description: |
125 Power Management Agent publishes full snapshots of current power state
126 for all feeds. Includes compliance, ramp state, and active/scheduled targets.
127 Published on state transitions and as periodic heartbeats.
128 bindings:
129 mqtt:
130 qos: 1
131
132 powerBreachAlertChannel:
133 address: grid/v1/poweragent/{identifier}/powerbreach
134 parameters:
135 identifier:
136 $ref: '#/components/parameters/identifier'
137 messages:
138 powerBreachAlert:
139 $ref: '#/components/messages/PowerBreachAlertMessage'
140 description: |
141 Power Management Agent publishes breach alerts when measured power exceeds
142 the active load target. Breach lifecycle: active → escalated → resolved.
143 All events in a single breach share the same breach_id.
144 bindings:
145 mqtt:
146 qos: 2
147
148 powerBreachEnforcementChannel:
149 address: grid/v1/infra/{infraAgentId}/powerbreach/enforcement
150 parameters:
151 infraAgentId:
152 $ref: '#/components/parameters/infraAgentId'
153 messages:
154 powerBreachEnforcement:
155 $ref: '#/components/messages/PowerBreachEnforcementMessage'
156 description: |
157 Infrastructure Management Agent publishes enforcement outcomes after
158 applying or reverting shed hints at the hardware level via Redfish BMC.
159 bindings:
160 mqtt:
161 qos: 2
162
163operations:
164 publishLoadTargetSet:
165 action: send
166 channel:
167 $ref: '#/channels/loadTargetSetChannel'
168 summary: ISV → Power Management Agent (set load target command)
169 messages:
170 - $ref: '#/channels/loadTargetSetChannel/messages/loadTargetSet'
171
172 subscribeLoadTargetSet:
173 action: receive
174 channel:
175 $ref: '#/channels/loadTargetSetChannel'
176 summary: Power Management Agent subscribes to load target commands
177 messages:
178 - $ref: '#/channels/loadTargetSetChannel/messages/loadTargetSet'
179
180 publishPowerStateStatus:
181 action: send
182 channel:
183 $ref: '#/channels/powerStateStatusChannel'
184 summary: Power Management Agent → ISVs (power state snapshot)
185 messages:
186 - $ref: '#/channels/powerStateStatusChannel/messages/powerStateStatus'
187
188 subscribePowerStateStatus:
189 action: receive
190 channel:
191 $ref: '#/channels/powerStateStatusChannel'
192 summary: ISVs subscribe to power state status updates
193 messages:
194 - $ref: '#/channels/powerStateStatusChannel/messages/powerStateStatus'
195
196 publishPowerBreachAlert:
197 action: send
198 channel:
199 $ref: '#/channels/powerBreachAlertChannel'
200 summary: Power Management Agent → Infra Agent + ISVs (breach alert)
201 messages:
202 - $ref: '#/channels/powerBreachAlertChannel/messages/powerBreachAlert'
203
204 subscribePowerBreachAlert:
205 action: receive
206 channel:
207 $ref: '#/channels/powerBreachAlertChannel'
208 summary: Infra Agent and ISVs subscribe to breach alerts
209 messages:
210 - $ref: '#/channels/powerBreachAlertChannel/messages/powerBreachAlert'
211
212 publishPowerBreachEnforcement:
213 action: send
214 channel:
215 $ref: '#/channels/powerBreachEnforcementChannel'
216 summary: Infra Agent → Power Management Agent + ISVs (enforcement outcome)
217 messages:
218 - $ref: '#/channels/powerBreachEnforcementChannel/messages/powerBreachEnforcement'
219
220 subscribePowerBreachEnforcement:
221 action: receive
222 channel:
223 $ref: '#/channels/powerBreachEnforcementChannel'
224 summary: Power Management Agent and ISVs subscribe to enforcement outcomes
225 messages:
226 - $ref: '#/channels/powerBreachEnforcementChannel/messages/powerBreachEnforcement'
227
228components:
229 schemas:
230 # =========================================================================
231 # Reusable Primitives
232 # =========================================================================
233
234 PowerUnit:
235 type: object
236 description: Power measurement with value and unit.
237 required: [value, unit]
238 properties:
239 value:
240 type: number
241 format: double
242 minimum: 0
243 description: Power value (must be >= 0).
244 unit:
245 type: string
246 enum: [watt, kilowatt, megawatt]
247 description: Unit of measurement.
248
249 Interval:
250 type: object
251 description: Time window for load target scheduling.
252 properties:
253 start_time:
254 type: string
255 format: date-time
256 description: ISO 8601 UTC start time. Defaults to now if omitted.
257 end_time:
258 type: string
259 format: date-time
260 description: ISO 8601 UTC end time. If omitted, target remains in effect until replaced.
261
262 Strategy:
263 type: object
264 description: Load shedding strategy configuration.
265 properties:
266 best_effort:
267 type: boolean
268 default: false
269 description: |
270 If true, DPS sheds load non-disruptively by adjusting DPM-enabled jobs.
271 If the constraint cannot be satisfied, DPS sheds as much as possible and
272 leaves the feed in a non-compliant state until workloads terminate.
273
274 LoadConstraint:
275 type: object
276 description: Power limit constraint.
277 required: [value, unit]
278 properties:
279 value:
280 type: number
281 format: double
282 minimum: 0
283 description: Target power limit (must be > 0).
284 unit:
285 type: string
286 enum: [watt, kilowatt, megawatt]
287 description: Unit of measurement.
288
289 FeedTags:
290 type: array
291 description: |
292 List of feed identifiers this target applies to (e.g., ["main-a"]).
293 If omitted or empty, the target applies to all feeds.
294 items:
295 type: string
296 examples:
297 - [main-a, main-b]
298
299 # =========================================================================
300 # Breach and Enforcement Schemas
301 # =========================================================================
302
303 ShedHint:
304 type: object
305 description: |
306 Resource-level load shedding recommendation. Shed hints are non-binding
307 advisory suggestions. The Infrastructure Management Agent MAY override
308 or augment based on topology and operational criteria.
309 required: [resource_id, resource_type, action, priority]
310 properties:
311 resource_id:
312 type: string
313 description: Identifier of the resource to throttle.
314 resource_type:
315 type: string
316 enum: [node, gpu, chassis]
317 description: Type of resource.
318 action:
319 type: string
320 enum: [power_cap, throttle, suspend]
321 description: Recommended action.
322 priority:
323 type: integer
324 minimum: 1
325 description: Shedding priority (1 = shed first, higher = shed later).
326 target_power:
327 allOf:
328 - $ref: '#/components/schemas/PowerUnit'
329 description: Suggested power cap. Present when action is power_cap.
330
331 EnforcementResult:
332 type: object
333 description: Per-resource enforcement outcome.
334 required: [resource_id, resource_type, requested_action, code]
335 properties:
336 resource_id:
337 type: string
338 description: The resource identifier from the shed hint.
339 resource_type:
340 type: string
341 enum: [node, gpu, chassis]
342 description: Type of resource.
343 requested_action:
344 type: string
345 enum: [power_cap, throttle, suspend]
346 description: The action that was requested.
347 code:
348 type: string
349 enum: [applied, failed, skipped]
350 description: Per-resource enforcement status.
351 message:
352 type: string
353 description: Diagnostic message (e.g., "BMC unreachable after 3 retries").
354 applied_power:
355 allOf:
356 - $ref: '#/components/schemas/PowerUnit'
357 description: The actual power cap applied, if different from the requested target_power.
358
359 # =========================================================================
360 # Feed State Schemas (for PowerStateStatus)
361 # =========================================================================
362
363 FeedMetadata:
364 type: object
365 description: Static feed configuration. Values don't change during a curtailment event.
366 required: [power_minimum, power_maximum, default_constraint]
367 properties:
368 power_minimum:
369 allOf:
370 - $ref: '#/components/schemas/PowerUnit'
371 description: Minimum power threshold for this feed.
372 power_maximum:
373 allOf:
374 - $ref: '#/components/schemas/PowerUnit'
375 description: Maximum power capacity for this feed.
376 default_constraint:
377 allOf:
378 - $ref: '#/components/schemas/PowerUnit'
379 description: Default power constraint when no load target is active.
380
381 FeedTarget:
382 type: object
383 description: A load target for a feed — active or scheduled.
384 required: [active, load_constraint, interval, strategy, correlation_id]
385 properties:
386 active:
387 type: boolean
388 description: true if this target is currently being enforced.
389 load_constraint:
390 $ref: '#/components/schemas/LoadConstraint'
391 interval:
392 $ref: '#/components/schemas/Interval'
393 strategy:
394 $ref: '#/components/schemas/Strategy'
395 correlation_id:
396 type: string
397 format: uuid
398 description: The correlationid from the grid.loadtarget.set.v1 that created this target.
399
400 FeedState:
401 type: object
402 description: Current power state for a single feed.
403 required: [metadata, targets, calculated_load, in_flight, compliant]
404 properties:
405 metadata:
406 $ref: '#/components/schemas/FeedMetadata'
407 targets:
408 type: array
409 description: All load targets for this feed — active and scheduled. Empty array if no targets exist.
410 items:
411 $ref: '#/components/schemas/FeedTarget'
412 calculated_load:
413 allOf:
414 - $ref: '#/components/schemas/PowerUnit'
415 description: |
416 Agent-calculated effective load after shedding strategy is applied.
417 May differ from actual measured power during ramp transitions.
418 in_flight:
419 type: boolean
420 description: true if the agent is actively transitioning between power levels.
421 power_event_start_time:
422 type: string
423 format: date-time
424 description: ISO 8601 UTC timestamp when the current power event began. null if no event is active.
425 compliant:
426 type: boolean
427 description: true if the calculated load is within the active target constraint. true when no target is active.
428
429 # =========================================================================
430 # Breach Detail Schemas
431 # =========================================================================
432
433 BreachDetails:
434 type: object
435 description: Breach identification and timing.
436 required: [breach_id, detected_at]
437 properties:
438 breach_id:
439 type: string
440 format: uuid
441 description: |
442 Unique identifier for this breach instance (UUIDv4). Remains the same
443 across active → escalated → resolved for the same breach.
444 detected_at:
445 type: string
446 format: date-time
447 description: ISO 8601 UTC timestamp when the breach was first detected.
448 resolved_at:
449 type: string
450 format: date-time
451 description: ISO 8601 UTC timestamp when the breach was resolved. Present only when status is resolved.
452
453 BreachTarget:
454 type: object
455 description: The load target being breached.
456 required: [correlation_id, load_constraint]
457 properties:
458 correlation_id:
459 type: string
460 format: uuid
461 description: The correlationid from the grid.loadtarget.set.v1 that established this target.
462 load_constraint:
463 $ref: '#/components/schemas/LoadConstraint'
464
465 # =========================================================================
466 # Event Data Payloads
467 # =========================================================================
468
469 SetLoadTargetData:
470 type: object
471 description: Payload for grid.loadtarget.set.v1.
472 required: [targets]
473 properties:
474 targets:
475 type: array
476 description: List of load target requests.
477 minItems: 1
478 items:
479 type: object
480 required: [interval, load_constraint]
481 properties:
482 interval:
483 $ref: '#/components/schemas/Interval'
484 feed_tags:
485 $ref: '#/components/schemas/FeedTags'
486 load_constraint:
487 description: |
488 Power constraint to apply. If null, removes any active constraint
489 and reverts the feed to its unconstrained default load level.
490 oneOf:
491 - $ref: '#/components/schemas/LoadConstraint'
492 - type: 'null'
493 strategy:
494 $ref: '#/components/schemas/Strategy'
495
496 PowerStateStatusData:
497 type: object
498 description: Payload for grid.powerstate.status.v1.
499 required: [snapshot_time, event, feeds]
500 properties:
501 snapshot_time:
502 type: string
503 format: date-time
504 description: ISO 8601 UTC timestamp of this snapshot.
505 event:
506 type: string
507 enum:
508 - target_set
509 - start_ramp_down
510 - end_ramp_down
511 - start_ramp_up
512 - end_ramp_up
513 - periodic
514 description: |
515 The trigger that caused this status to be published:
516 - target_set — a grid.loadtarget.set.v1 was received and schedule updated
517 - start_ramp_down — constraint applied or tightened, redistribution begins
518 - end_ramp_down — redistribution complete, load converged to target
519 - start_ramp_up — constraint relaxed or removed, redistribution begins
520 - end_ramp_up — redistribution complete
521 - periodic — regular heartbeat, no state change
522 feeds:
523 type: object
524 description: Map of feed_tag to power state.
525 additionalProperties:
526 $ref: '#/components/schemas/FeedState'
527
528 PowerBreachAlertData:
529 type: object
530 description: Payload for grid.powerbreach.alert.v1.
531 required: [feed_tag, status, severity, breach, target, measured_load, infrastructure_actions]
532 properties:
533 feed_tag:
534 type: string
535 description: The feed identifier where the breach was detected.
536 status:
537 type: string
538 enum: [active, escalated, resolved]
539 description: Breach lifecycle state.
540 severity:
541 type: string
542 enum: [warning, critical]
543 description: |
544 Breach severity level:
545 - warning — excess between threshold and 20% over target
546 - critical — excess exceeds 20% over target
547 breach:
548 $ref: '#/components/schemas/BreachDetails'
549 target:
550 $ref: '#/components/schemas/BreachTarget'
551 measured_load:
552 allOf:
553 - $ref: '#/components/schemas/PowerUnit'
554 description: Actual measured power at time of event.
555 shed_hints:
556 type: array
557 description: |
558 Ordered list of load shedding recommendations. Present when status
559 is active or escalated. Absent when resolved.
560 items:
561 $ref: '#/components/schemas/ShedHint'
562 infrastructure_actions:
563 type: array
564 description: |
565 Ordered list of escalating infrastructure-level actions. Empty array
566 when status is resolved. Ordered from least to most disruptive.
567 items:
568 type: string
569 enum: [SHUTDOWN_NODES, SHUTDOWN_RACKS, CUT_DATA_FEEDS, TRIP_BREAKERS]
570
571 PowerBreachEnforcementData:
572 type: object
573 description: Payload for grid.powerbreach.enforcement.v1.
574 required: [breach_id, feed_tag, action, code, results, timestamp]
575 properties:
576 breach_id:
577 type: string
578 format: uuid
579 description: The breach_id from the originating grid.powerbreach.alert.v1 event.
580 feed_tag:
581 type: string
582 description: The feed identifier this enforcement applies to.
583 action:
584 type: string
585 enum: [applied, reverted]
586 description: What phase of enforcement this represents.
587 code:
588 type: string
589 enum: [success, partial, error]
590 description: Overall enforcement outcome.
591 diag_msg:
592 type: string
593 description: Human-readable diagnostic message.
594 results:
595 type: array
596 description: Per-resource enforcement outcome.
597 items:
598 $ref: '#/components/schemas/EnforcementResult'
599 timestamp:
600 type: string
601 format: date-time
602 description: ISO 8601 UTC timestamp when enforcement completed.
603
604 # =========================================================================
605 # JWS Data Field Security
606 # =========================================================================
607
608 JwsCompactSerialization:
609 type: string
610 description: |
611 JWS Compact Serialization (RFC 7515) containing a signed payload.
612 This is the WIRE FORMAT for the "data" field in CloudEvents messages.
613
614 Structure: BASE64URL(JWS Header).BASE64URL(Payload).BASE64URL(Signature)
615
616 JWS Header (example):
617 {
618 "alg": "ES256",
619 "kid": "<signing-key-id>"
620 }
621
622 The payload, when verified, contains the JSON event data
623 as defined by the message type schema.
624 pattern: ^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$
625
626 # =========================================================================
627 # Base CloudEvents Schema
628 # =========================================================================
629
630 BaseCloudEvent:
631 type: object
632 description: |
633 Common CloudEvents 1.0.2 attributes shared by all events.
634 Each event type extends this with a specific "data" field.
635
636 The "data" field is transmitted as a JWS compact serialization string.
637 The plaintext JSON payload is signed with JWS (RFC 7515).
638 required:
639 - specversion
640 - id
641 - source
642 - type
643 - time
644 - datacontenttype
645 - subject
646 - traceparent
647 properties:
648 specversion:
649 type: string
650 const: '1.0.2'
651 description: MUST be "1.0.2" — version of the CloudEvents specification.
652 id:
653 type: string
654 format: uuid
655 description: MUST be a UUIDv4 — globally unique identifier for this event instance.
656 source:
657 type: string
658 pattern: ^//grid/v1/(isv|poweragent|infra)/[^/]+$
659 description: |
660 Stable URI identifying the publisher. Format: //grid/v1/<role>/<identifier>.
661 Examples:
662 - //grid/v1/isv/acme-energy
663 - //grid/v1/poweragent/dps-prod
664 - //grid/v1/infra/ima-prod
665 type:
666 type: string
667 description: Event type following grid.<entity>.<action>.v1 or grid.<entity>.status.v1.
668 time:
669 type: string
670 format: date-time
671 description: MUST be an ISO 8601 timestamp — time the event was created.
672 datacontenttype:
673 type: string
674 const: application/json
675 description: MUST be "application/json" — media type of the data payload.
676 subject:
677 type: string
678 description: Resource subject identifying the domain object (e.g., loadtarget, powerstate, powerbreach).
679 correlationid:
680 type: string
681 format: uuid
682 description: |
683 CloudEvents extension attribute. UUIDv4 correlation identifier.
684 Generated by the ISV on grid.loadtarget.set.v1. Echoed by the
685 Power Management Agent in status events for correlation.
686 traceparent:
687 type: string
688 pattern: ^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$
689 description: |
690 REQUIRED per W3C Trace Context and CloudEvents Distributed Tracing Extension.
691 Format: version-traceid-parentid-flags.
692 tracestate:
693 type: string
694 description: |
695 OPTIONAL per W3C Trace Context. Carries vendor-specific contextual
696 information across tracing systems.
697
698 # =========================================================================
699 # Event-Specific CloudEvents Envelope Schemas
700 # =========================================================================
701
702 LoadTargetSetEvent:
703 description: CloudEvents envelope for grid.loadtarget.set.v1.
704 allOf:
705 - $ref: '#/components/schemas/BaseCloudEvent'
706 - type: object
707 required: [data]
708 properties:
709 type:
710 const: grid.loadtarget.set.v1
711 data:
712 description: |
713 WIRE FORMAT: JWS compact serialization string (type: string).
714 PLAINTEXT CONTENT: After JWS verification, the payload conforms
715 to SetLoadTargetData schema (type: object).
716 oneOf:
717 - $ref: '#/components/schemas/JwsCompactSerialization'
718 - $ref: '#/components/schemas/SetLoadTargetData'
719
720 PowerStateStatusEvent:
721 description: CloudEvents envelope for grid.powerstate.status.v1.
722 allOf:
723 - $ref: '#/components/schemas/BaseCloudEvent'
724 - type: object
725 required: [data]
726 properties:
727 type:
728 const: grid.powerstate.status.v1
729 data:
730 description: |
731 WIRE FORMAT: JWS compact serialization string (type: string).
732 PLAINTEXT CONTENT: After JWS verification, the payload conforms
733 to PowerStateStatusData schema (type: object).
734 oneOf:
735 - $ref: '#/components/schemas/JwsCompactSerialization'
736 - $ref: '#/components/schemas/PowerStateStatusData'
737
738 PowerBreachAlertEvent:
739 description: CloudEvents envelope for grid.powerbreach.alert.v1.
740 allOf:
741 - $ref: '#/components/schemas/BaseCloudEvent'
742 - type: object
743 required: [data]
744 properties:
745 type:
746 const: grid.powerbreach.alert.v1
747 data:
748 description: |
749 WIRE FORMAT: JWS compact serialization string (type: string).
750 PLAINTEXT CONTENT: After JWS verification, the payload conforms
751 to PowerBreachAlertData schema (type: object).
752 oneOf:
753 - $ref: '#/components/schemas/JwsCompactSerialization'
754 - $ref: '#/components/schemas/PowerBreachAlertData'
755
756 PowerBreachEnforcementEvent:
757 description: CloudEvents envelope for grid.powerbreach.enforcement.v1.
758 allOf:
759 - $ref: '#/components/schemas/BaseCloudEvent'
760 - type: object
761 required: [data]
762 properties:
763 type:
764 const: grid.powerbreach.enforcement.v1
765 data:
766 description: |
767 WIRE FORMAT: JWS compact serialization string (type: string).
768 PLAINTEXT CONTENT: After JWS verification, the payload conforms
769 to PowerBreachEnforcementData schema (type: object).
770 oneOf:
771 - $ref: '#/components/schemas/JwsCompactSerialization'
772 - $ref: '#/components/schemas/PowerBreachEnforcementData'
773
774 messages:
775 LoadTargetSetMessage:
776 name: LoadTargetSetMessage
777 title: Set Load Target
778 summary: ISV publishes load target command to the event bus.
779 contentType: application/cloudevents+json
780 payload:
781 $ref: '#/components/schemas/LoadTargetSetEvent'
782
783 PowerStateStatusMessage:
784 name: PowerStateStatusMessage
785 title: Power State Status
786 summary: Power Management Agent publishes full power state snapshot.
787 contentType: application/cloudevents+json
788 payload:
789 $ref: '#/components/schemas/PowerStateStatusEvent'
790
791 PowerBreachAlertMessage:
792 name: PowerBreachAlertMessage
793 title: Power Breach Alert
794 summary: Power Management Agent publishes breach alert with shed hints.
795 contentType: application/cloudevents+json
796 payload:
797 $ref: '#/components/schemas/PowerBreachAlertEvent'
798
799 PowerBreachEnforcementMessage:
800 name: PowerBreachEnforcementMessage
801 title: Power Breach Enforcement
802 summary: Infrastructure Management Agent publishes enforcement outcome.
803 contentType: application/cloudevents+json
804 payload:
805 $ref: '#/components/schemas/PowerBreachEnforcementEvent'
806
807 parameters:
808 identifier:
809 description: Unique identifier of the ISV, power agent, or infrastructure agent.
810 infraAgentId:
811 description: Unique identifier of the Infrastructure Management Agent.
812
813 securitySchemes:
814 oauth2Ssa:
815 type: oauth2
816 description: OAuth2 SSA token in MQTT password field (username "oauthtoken").
817 flows:
818 clientCredentials:
819 tokenUrl: https://auth.example.com/token
820 availableScopes:
821 mqtt: Access to MQTT topics
822
823 mTLS:
824 type: X509
825 description: Mutual TLS with client certificate signed by cluster CA.