Class: Infrawrench::ChangesNamespace
- Inherits:
-
Object
- Object
- Infrawrench::ChangesNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.changes
Instance Attribute Summary collapse
-
#alert_settings ⇒ ChangesAlertSettingsNamespace
readonly
client.changes.alert_settings.
Instance Method Summary collapse
-
#get(org_id: nil, page: nil, page_size: nil, account_id: nil, resource_id: nil, kind: nil, from: nil, to: nil, request_options: nil) ⇒ Hash
Org-wide change timeline (paginated, filterable).
-
#initialize(transport) ⇒ ChangesNamespace
constructor
private
A new instance of ChangesNamespace.
-
#resource(resource_id:, org_id: nil, limit: nil, request_options: nil) ⇒ Hash
Change timeline for one resource.
Constructor Details
#initialize(transport) ⇒ ChangesNamespace
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ChangesNamespace.
1454 1455 1456 1457 |
# File 'lib/infrawrench/client.rb', line 1454 def initialize(transport) @transport = transport @alert_settings = ChangesAlertSettingsNamespace.new(@transport) end |
Instance Attribute Details
#alert_settings ⇒ ChangesAlertSettingsNamespace (readonly)
Returns client.changes.alert_settings.
1450 1451 1452 |
# File 'lib/infrawrench/client.rb', line 1450 def alert_settings @alert_settings end |
Instance Method Details
#get(org_id: nil, page: nil, page_size: nil, account_id: nil, resource_id: nil, kind: nil, from: nil, to: nil, request_options: nil) ⇒ Hash
Org-wide change timeline (paginated, filterable)
Change events recorded by the resource poller: each poll cycle diffs the freshly fetched state against the stored snapshot and records resources that appeared, changed a stored field, or disappeared upstream. Cross-provider by construction — the diff runs on the generic stored record, so every plugin's resources show up here.
Requires permission: resources:read.
GET /api/org/orgId/changes
Raises on 400: Bad request
1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 |
# File 'lib/infrawrench/client.rb', line 1486 def get( org_id: nil, page: nil, page_size: nil, account_id: nil, resource_id: nil, kind: nil, from: nil, to: nil, request_options: nil ) @transport.request( http_method: "GET", path: "/api/org/{orgId}/changes", path_params: { "orgId" => org_id }, query: { "page" => page, "pageSize" => page_size, "accountId" => account_id, "resourceId" => resource_id, "kind" => kind, "from" => from, "to" => to }, request_options: ) end |
#resource(resource_id:, org_id: nil, limit: nil, request_options: nil) ⇒ Hash
Change timeline for one resource
Recent change events for a single resource, newest first. The resource id travels as a query parameter because composite ids contain slashes and colons.
Requires permission: resources:read.
GET /api/org/orgId/changes/resource
Raises on 400: Bad request
1534 1535 1536 1537 1538 1539 1540 1541 1542 |
# File 'lib/infrawrench/client.rb', line 1534 def resource(resource_id:, org_id: nil, limit: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/changes/resource", path_params: { "orgId" => org_id }, query: { "resourceId" => resource_id, "limit" => limit }, request_options: ) end |