infrawrench-sdk 1.76.0 → 1.78.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # infrawrench-sdk v1.76.0 | MIT | Copyright (c) 2026 Infrawrench LLC
3
+ # infrawrench-sdk v1.78.0 | MIT | Copyright (c) 2026 Infrawrench LLC
4
4
  # https://github.com/Infrawrench/Infrawrench
5
5
  #
6
- # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.76.0).
6
+ # Generated from the Infrawrench API OpenAPI 3.1 spec (API version 1.78.0).
7
7
  #
8
8
  # DO NOT EDIT. Regenerate with:
9
9
  # pnpm --filter @infrawrench/web generate:sdk
@@ -4885,9 +4885,9 @@ module Infrawrench
4885
4885
  # Export the organization's configuration as one document
4886
4886
  #
4887
4887
  # Dashboards, workflows, custom graphs, budgets, metric alerts, synthetic
4888
- # probes, cost centres, the tag policy and the org-wide alert settings,
4889
- # addressed by stable keys rather than row ids so the result applies to any
4890
- # organization.
4888
+ # probes, SLOs, cost centres, the tag policy and the org-wide alert
4889
+ # settings, addressed by stable keys rather than row ids so the result
4890
+ # applies to any organization.
4891
4891
  #
4892
4892
  # Credentials, accounts, resources and workflow signing secrets are never
4893
4893
  # included. Ordering is stable, so re-exporting an unchanged organization
@@ -4908,8 +4908,8 @@ module Infrawrench
4908
4908
  # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
4909
4909
  # constructed with.
4910
4910
  # @param sections [String, nil] Comma-separated subset of sections to export. Defaults to
4911
- # all of: budgets, customGraphs, workflows, dashboards, metricAlerts, probes, costCentres,
4912
- # tagPolicy, alertSettings.
4911
+ # all of: budgets, customGraphs, workflows, dashboards, metricAlerts, probes, slos,
4912
+ # costCentres, tagPolicy, alertSettings.
4913
4913
  # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
4914
4914
  # @return [Hash] Parsed JSON, shaped as `OrgConfigDocument` — see `sig/infrawrench/sdk.rbs`.
4915
4915
  # @raise [Infrawrench::ApiError] On any non-2xx response.
@@ -12408,6 +12408,555 @@ module Infrawrench
12408
12408
  end
12409
12409
  end
12410
12410
 
12411
+ # `client.jit_access.accounts`
12412
+ class JitAccessAccountsNamespace
12413
+ # @api private
12414
+ # @param transport [Transport]
12415
+ def initialize(transport)
12416
+ @transport = transport
12417
+ end
12418
+
12419
+ # Accounts that can grant just-in-time access
12420
+ #
12421
+ # Connected accounts whose provider plugin declares the just-in-time
12422
+ # capability.
12423
+ #
12424
+ # _Requires permission: `access:read`._
12425
+ #
12426
+ # GET /api/org/{orgId}/jit-access/accounts
12427
+ #
12428
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12429
+ # constructed with.
12430
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12431
+ # @return [Array<Hash>] Parsed JSON, shaped as `Array<JitAccessAccount>` — see
12432
+ # `sig/infrawrench/sdk.rbs`.
12433
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12434
+ def list(org_id: nil, request_options: nil)
12435
+ @transport.request(
12436
+ http_method: "GET",
12437
+ path: "/api/org/{orgId}/jit-access/accounts",
12438
+ path_params: { "orgId" => org_id },
12439
+ request_options: request_options
12440
+ )
12441
+ end
12442
+
12443
+ # Grantable roles in a scope (picker)
12444
+ #
12445
+ # _Requires permission: `org:settings:write`._
12446
+ #
12447
+ # GET /api/org/{orgId}/jit-access/accounts/{accountId}/roles
12448
+ #
12449
+ # Raises on 502: Provider error
12450
+ #
12451
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12452
+ # constructed with.
12453
+ # @param account_id [String]
12454
+ # @param scope_id [String]
12455
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12456
+ # @return [Array<Hash>] Parsed JSON, shaped as `Array<JitPickerOption>` — see
12457
+ # `sig/infrawrench/sdk.rbs`.
12458
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12459
+ def roles(account_id:, scope_id:, org_id: nil, request_options: nil)
12460
+ @transport.request(
12461
+ http_method: "GET",
12462
+ path: "/api/org/{orgId}/jit-access/accounts/{accountId}/roles",
12463
+ path_params: { "orgId" => org_id, "accountId" => account_id },
12464
+ query: { "scopeId" => scope_id },
12465
+ request_options: request_options
12466
+ )
12467
+ end
12468
+
12469
+ # Scopes on an account (picker)
12470
+ #
12471
+ # The places a role can be granted (AWS accounts, GCP projects, namespaces),
12472
+ # read from the provider.
12473
+ #
12474
+ # _Requires permission: `org:settings:write`._
12475
+ #
12476
+ # GET /api/org/{orgId}/jit-access/accounts/{accountId}/scopes
12477
+ #
12478
+ # Raises on 502: Provider error
12479
+ #
12480
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12481
+ # constructed with.
12482
+ # @param account_id [String]
12483
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12484
+ # @return [Array<Hash>] Parsed JSON, shaped as `Array<JitPickerOption>` — see
12485
+ # `sig/infrawrench/sdk.rbs`.
12486
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12487
+ def scopes(account_id:, org_id: nil, request_options: nil)
12488
+ @transport.request(
12489
+ http_method: "GET",
12490
+ path: "/api/org/{orgId}/jit-access/accounts/{accountId}/scopes",
12491
+ path_params: { "orgId" => org_id, "accountId" => account_id },
12492
+ request_options: request_options
12493
+ )
12494
+ end
12495
+ end
12496
+
12497
+ # `client.jit_access.policies`
12498
+ class JitAccessPoliciesNamespace
12499
+ # @api private
12500
+ # @param transport [Transport]
12501
+ def initialize(transport)
12502
+ @transport = transport
12503
+ end
12504
+
12505
+ # Create a policy
12506
+ #
12507
+ # Audit-logged. At least one approver (member, role or on-call rotation) is
12508
+ # required.
12509
+ #
12510
+ # _Requires permission: `org:settings:write`._
12511
+ #
12512
+ # POST /api/org/{orgId}/jit-access/policies
12513
+ #
12514
+ # Raises on 400: Bad request
12515
+ #
12516
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12517
+ # constructed with.
12518
+ # @param body [Hash, nil] Request body, shaped as `JitPolicyInput`.
12519
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12520
+ # @return [Hash] Parsed JSON, shaped as `JitPolicy` — see `sig/infrawrench/sdk.rbs`.
12521
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12522
+ def create(org_id: nil, body: nil, request_options: nil)
12523
+ @transport.request(
12524
+ http_method: "POST",
12525
+ path: "/api/org/{orgId}/jit-access/policies",
12526
+ path_params: { "orgId" => org_id },
12527
+ body: body,
12528
+ request_options: request_options
12529
+ )
12530
+ end
12531
+
12532
+ # Delete a policy
12533
+ #
12534
+ # Grants the policy produced still end on time; its pending requests have no
12535
+ # approvers and time out.
12536
+ #
12537
+ # _Requires permission: `org:settings:write`._
12538
+ #
12539
+ # DELETE /api/org/{orgId}/jit-access/policies/{policyId}
12540
+ #
12541
+ # Raises on 404: Not found
12542
+ #
12543
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12544
+ # constructed with.
12545
+ # @param policy_id [String]
12546
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12547
+ # @return [Hash] Parsed JSON, shaped as `Ok` — see `sig/infrawrench/sdk.rbs`.
12548
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12549
+ def delete(policy_id:, org_id: nil, request_options: nil)
12550
+ @transport.request(
12551
+ http_method: "DELETE",
12552
+ path: "/api/org/{orgId}/jit-access/policies/{policyId}",
12553
+ path_params: { "orgId" => org_id, "policyId" => policy_id },
12554
+ request_options: request_options
12555
+ )
12556
+ end
12557
+
12558
+ # Get a policy
12559
+ #
12560
+ # _Requires permission: `access:read`._
12561
+ #
12562
+ # GET /api/org/{orgId}/jit-access/policies/{policyId}
12563
+ #
12564
+ # Raises on 404: Not found
12565
+ #
12566
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12567
+ # constructed with.
12568
+ # @param policy_id [String]
12569
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12570
+ # @return [Hash] Parsed JSON, shaped as `JitPolicy` — see `sig/infrawrench/sdk.rbs`.
12571
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12572
+ def get(policy_id:, org_id: nil, request_options: nil)
12573
+ @transport.request(
12574
+ http_method: "GET",
12575
+ path: "/api/org/{orgId}/jit-access/policies/{policyId}",
12576
+ path_params: { "orgId" => org_id, "policyId" => policy_id },
12577
+ request_options: request_options
12578
+ )
12579
+ end
12580
+
12581
+ # List just-in-time access policies
12582
+ #
12583
+ # _Requires permission: `access:read`._
12584
+ #
12585
+ # GET /api/org/{orgId}/jit-access/policies
12586
+ #
12587
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12588
+ # constructed with.
12589
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12590
+ # @return [Array<Hash>] Parsed JSON, shaped as `Array<JitPolicy>` — see
12591
+ # `sig/infrawrench/sdk.rbs`.
12592
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12593
+ def list(org_id: nil, request_options: nil)
12594
+ @transport.request(
12595
+ http_method: "GET",
12596
+ path: "/api/org/{orgId}/jit-access/policies",
12597
+ path_params: { "orgId" => org_id },
12598
+ request_options: request_options
12599
+ )
12600
+ end
12601
+
12602
+ # Resolve the caller's provider principal
12603
+ #
12604
+ # Who the grant would go to, matched by the caller's email in the provider.
12605
+ #
12606
+ # _Requires permission: `access:request`._
12607
+ #
12608
+ # GET /api/org/{orgId}/jit-access/policies/{policyId}/principal
12609
+ #
12610
+ # Raises on 403: Not a requester
12611
+ #
12612
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12613
+ # constructed with.
12614
+ # @param policy_id [String]
12615
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12616
+ # @return [Hash] Parsed JSON, shaped as `JitPrincipalResolution` — see
12617
+ # `sig/infrawrench/sdk.rbs`.
12618
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12619
+ def principal(policy_id:, org_id: nil, request_options: nil)
12620
+ @transport.request(
12621
+ http_method: "GET",
12622
+ path: "/api/org/{orgId}/jit-access/policies/{policyId}/principal",
12623
+ path_params: { "orgId" => org_id, "policyId" => policy_id },
12624
+ request_options: request_options
12625
+ )
12626
+ end
12627
+
12628
+ # Principals the caller may pick
12629
+ #
12630
+ # _Requires permission: `access:request`._
12631
+ #
12632
+ # GET /api/org/{orgId}/jit-access/policies/{policyId}/principals
12633
+ #
12634
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12635
+ # constructed with.
12636
+ # @param policy_id [String]
12637
+ # @param q [String, nil]
12638
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12639
+ # @return [Array<Hash>] Parsed JSON, shaped as `Array<JitPrincipalOption & Hash>` — see
12640
+ # `sig/infrawrench/sdk.rbs`.
12641
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12642
+ def principals(policy_id:, org_id: nil, q: nil, request_options: nil)
12643
+ @transport.request(
12644
+ http_method: "GET",
12645
+ path: "/api/org/{orgId}/jit-access/policies/{policyId}/principals",
12646
+ path_params: { "orgId" => org_id, "policyId" => policy_id },
12647
+ query: { "q" => q },
12648
+ request_options: request_options
12649
+ )
12650
+ end
12651
+
12652
+ # Replace a policy
12653
+ #
12654
+ # Live grants keep their window; pending requests are decided against the
12655
+ # new approver set.
12656
+ #
12657
+ # _Requires permission: `org:settings:write`._
12658
+ #
12659
+ # PUT /api/org/{orgId}/jit-access/policies/{policyId}
12660
+ #
12661
+ # Raises on 400: Bad request
12662
+ #
12663
+ # Raises on 404: Not found
12664
+ #
12665
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12666
+ # constructed with.
12667
+ # @param policy_id [String]
12668
+ # @param body [Hash, nil] Request body, shaped as `JitPolicyInput`.
12669
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12670
+ # @return [Hash] Parsed JSON, shaped as `JitPolicy` — see `sig/infrawrench/sdk.rbs`.
12671
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12672
+ def update(policy_id:, org_id: nil, body: nil, request_options: nil)
12673
+ @transport.request(
12674
+ http_method: "PUT",
12675
+ path: "/api/org/{orgId}/jit-access/policies/{policyId}",
12676
+ path_params: { "orgId" => org_id, "policyId" => policy_id },
12677
+ body: body,
12678
+ request_options: request_options
12679
+ )
12680
+ end
12681
+ end
12682
+
12683
+ # `client.jit_access.requests`
12684
+ class JitAccessRequestsNamespace
12685
+ # @api private
12686
+ # @param transport [Transport]
12687
+ def initialize(transport)
12688
+ @transport = transport
12689
+ end
12690
+
12691
+ # Approve a request
12692
+ #
12693
+ # The caller must be in the policy's approver set at this moment. On
12694
+ # approval the provider grant is made; the response may still read
12695
+ # `granting` when it completes in the background. Audit-logged. Not
12696
+ # available to API keys.
12697
+ #
12698
+ # _Requires permission: `access:read`._
12699
+ #
12700
+ # POST /api/org/{orgId}/jit-access/requests/{requestId}/approve
12701
+ #
12702
+ # Raises on 403: Not allowed
12703
+ #
12704
+ # Raises on 404: Not found
12705
+ #
12706
+ # Raises on 409: Already decided, timed out, or not in a state for this
12707
+ #
12708
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12709
+ # constructed with.
12710
+ # @param request_id [String]
12711
+ # @param body [Hash, nil] Request body, shaped as `Hash`.
12712
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12713
+ # @return [Hash] Parsed JSON, shaped as `JitAccessRequest` — see `sig/infrawrench/sdk.rbs`.
12714
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12715
+ def approve(request_id:, org_id: nil, body: nil, request_options: nil)
12716
+ @transport.request(
12717
+ http_method: "POST",
12718
+ path: "/api/org/{orgId}/jit-access/requests/{requestId}/approve",
12719
+ path_params: { "orgId" => org_id, "requestId" => request_id },
12720
+ body: body,
12721
+ request_options: request_options
12722
+ )
12723
+ end
12724
+
12725
+ # Cancel your pending request
12726
+ #
12727
+ # Requester only. Audit-logged. Not available to API keys.
12728
+ #
12729
+ # _Requires permission: `access:request`._
12730
+ #
12731
+ # POST /api/org/{orgId}/jit-access/requests/{requestId}/cancel
12732
+ #
12733
+ # Raises on 403: Not allowed
12734
+ #
12735
+ # Raises on 404: Not found
12736
+ #
12737
+ # Raises on 409: Already decided, timed out, or not in a state for this
12738
+ #
12739
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12740
+ # constructed with.
12741
+ # @param request_id [String]
12742
+ # @param body [Hash, nil] Request body, shaped as `Hash`.
12743
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12744
+ # @return [Hash] Parsed JSON, shaped as `JitAccessRequest` — see `sig/infrawrench/sdk.rbs`.
12745
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12746
+ def cancel(request_id:, org_id: nil, body: nil, request_options: nil)
12747
+ @transport.request(
12748
+ http_method: "POST",
12749
+ path: "/api/org/{orgId}/jit-access/requests/{requestId}/cancel",
12750
+ path_params: { "orgId" => org_id, "requestId" => request_id },
12751
+ body: body,
12752
+ request_options: request_options
12753
+ )
12754
+ end
12755
+
12756
+ # Request just-in-time access
12757
+ #
12758
+ # Ask for one of a policy's scope and role pairs for a bounded window.
12759
+ # Approvers are notified over push, Slack (with Approve/Deny buttons) and
12760
+ # Microsoft Teams. Not available to API keys.
12761
+ #
12762
+ # _Requires permission: `access:request`._
12763
+ #
12764
+ # POST /api/org/{orgId}/jit-access/requests
12765
+ #
12766
+ # Raises on 400: Invalid
12767
+ #
12768
+ # Raises on 403: Not a requester under this policy
12769
+ #
12770
+ # Raises on 409: A pending or active request already covers this
12771
+ #
12772
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12773
+ # constructed with.
12774
+ # @param body [Hash, nil] Request body, shaped as `JitCreateRequest`.
12775
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12776
+ # @return [Hash] Parsed JSON, shaped as `JitAccessRequest` — see `sig/infrawrench/sdk.rbs`.
12777
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12778
+ def create(org_id: nil, body: nil, request_options: nil)
12779
+ @transport.request(
12780
+ http_method: "POST",
12781
+ path: "/api/org/{orgId}/jit-access/requests",
12782
+ path_params: { "orgId" => org_id },
12783
+ body: body,
12784
+ request_options: request_options
12785
+ )
12786
+ end
12787
+
12788
+ # Deny a request
12789
+ #
12790
+ # The caller must be in the policy's approver set. Audit-logged. Not
12791
+ # available to API keys.
12792
+ #
12793
+ # _Requires permission: `access:read`._
12794
+ #
12795
+ # POST /api/org/{orgId}/jit-access/requests/{requestId}/deny
12796
+ #
12797
+ # Raises on 403: Not allowed
12798
+ #
12799
+ # Raises on 404: Not found
12800
+ #
12801
+ # Raises on 409: Already decided, timed out, or not in a state for this
12802
+ #
12803
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12804
+ # constructed with.
12805
+ # @param request_id [String]
12806
+ # @param body [Hash, nil] Request body, shaped as `Hash`.
12807
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12808
+ # @return [Hash] Parsed JSON, shaped as `JitAccessRequest` — see `sig/infrawrench/sdk.rbs`.
12809
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12810
+ def deny(request_id:, org_id: nil, body: nil, request_options: nil)
12811
+ @transport.request(
12812
+ http_method: "POST",
12813
+ path: "/api/org/{orgId}/jit-access/requests/{requestId}/deny",
12814
+ path_params: { "orgId" => org_id, "requestId" => request_id },
12815
+ body: body,
12816
+ request_options: request_options
12817
+ )
12818
+ end
12819
+
12820
+ # Extend an active grant
12821
+ #
12822
+ # Approvers only, within the policy maximum for the whole window. A
12823
+ # provider-enforced expiry is moved upstream first. Audit-logged. Not
12824
+ # available to API keys.
12825
+ #
12826
+ # _Requires permission: `access:read`._
12827
+ #
12828
+ # POST /api/org/{orgId}/jit-access/requests/{requestId}/extend
12829
+ #
12830
+ # Raises on 400: Beyond the policy maximum
12831
+ #
12832
+ # Raises on 403: Not an approver
12833
+ #
12834
+ # Raises on 409: Not active
12835
+ #
12836
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12837
+ # constructed with.
12838
+ # @param request_id [String]
12839
+ # @param body [Hash, nil] Request body, shaped as `Hash`.
12840
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12841
+ # @return [Hash] Parsed JSON, shaped as `JitAccessRequest` — see `sig/infrawrench/sdk.rbs`.
12842
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12843
+ def post_org_org_id_jit_access_requests_request_id_extend(
12844
+ request_id:,
12845
+ org_id: nil,
12846
+ body: nil,
12847
+ request_options: nil
12848
+ )
12849
+ @transport.request(
12850
+ http_method: "POST",
12851
+ path: "/api/org/{orgId}/jit-access/requests/{requestId}/extend",
12852
+ path_params: { "orgId" => org_id, "requestId" => request_id },
12853
+ body: body,
12854
+ request_options: request_options
12855
+ )
12856
+ end
12857
+
12858
+ # Get a request
12859
+ #
12860
+ # _Requires permission: `access:read`._
12861
+ #
12862
+ # GET /api/org/{orgId}/jit-access/requests/{requestId}
12863
+ #
12864
+ # Raises on 404: Not found
12865
+ #
12866
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12867
+ # constructed with.
12868
+ # @param request_id [String]
12869
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12870
+ # @return [Hash] Parsed JSON, shaped as `JitAccessRequest` — see `sig/infrawrench/sdk.rbs`.
12871
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12872
+ def get(request_id:, org_id: nil, request_options: nil)
12873
+ @transport.request(
12874
+ http_method: "GET",
12875
+ path: "/api/org/{orgId}/jit-access/requests/{requestId}",
12876
+ path_params: { "orgId" => org_id, "requestId" => request_id },
12877
+ request_options: request_options
12878
+ )
12879
+ end
12880
+
12881
+ # List just-in-time access requests
12882
+ #
12883
+ # Newest first, with caller-relative action flags.
12884
+ #
12885
+ # _Requires permission: `access:read`._
12886
+ #
12887
+ # GET /api/org/{orgId}/jit-access/requests
12888
+ #
12889
+ # Raises on 400: Bad request
12890
+ #
12891
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12892
+ # constructed with.
12893
+ # @param status [String, nil]
12894
+ # @param mine [String, nil]
12895
+ # @param holding [String, nil] Only rows that may be holding access upstream.
12896
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12897
+ # @return [Array<Hash>] Parsed JSON, shaped as `Array<JitAccessRequest>` — see
12898
+ # `sig/infrawrench/sdk.rbs`.
12899
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12900
+ def list(org_id: nil, status: nil, mine: nil, holding: nil, request_options: nil)
12901
+ @transport.request(
12902
+ http_method: "GET",
12903
+ path: "/api/org/{orgId}/jit-access/requests",
12904
+ path_params: { "orgId" => org_id },
12905
+ query: { "status" => status, "mine" => mine, "holding" => holding },
12906
+ request_options: request_options
12907
+ )
12908
+ end
12909
+
12910
+ # End a grant early
12911
+ #
12912
+ # Allowed for the holder, an approver, or a member with org:settings:write.
12913
+ # Audit-logged. Not available to API keys.
12914
+ #
12915
+ # POST /api/org/{orgId}/jit-access/requests/{requestId}/revoke
12916
+ #
12917
+ # Raises on 403: Not allowed
12918
+ #
12919
+ # Raises on 404: Not found
12920
+ #
12921
+ # Raises on 409: Already decided, timed out, or not in a state for this
12922
+ #
12923
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
12924
+ # constructed with.
12925
+ # @param request_id [String]
12926
+ # @param body [Hash, nil] Request body, shaped as `Hash`.
12927
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
12928
+ # @return [Hash] Parsed JSON, shaped as `JitAccessRequest` — see `sig/infrawrench/sdk.rbs`.
12929
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
12930
+ def revoke(request_id:, org_id: nil, body: nil, request_options: nil)
12931
+ @transport.request(
12932
+ http_method: "POST",
12933
+ path: "/api/org/{orgId}/jit-access/requests/{requestId}/revoke",
12934
+ path_params: { "orgId" => org_id, "requestId" => request_id },
12935
+ body: body,
12936
+ request_options: request_options
12937
+ )
12938
+ end
12939
+ end
12940
+
12941
+ # `client.jit_access`
12942
+ class JitAccessNamespace
12943
+ # @return [JitAccessAccountsNamespace] `client.jit_access.accounts`
12944
+ attr_reader :accounts
12945
+ # @return [JitAccessPoliciesNamespace] `client.jit_access.policies`
12946
+ attr_reader :policies
12947
+ # @return [JitAccessRequestsNamespace] `client.jit_access.requests`
12948
+ attr_reader :requests
12949
+
12950
+ # @api private
12951
+ # @param transport [Transport]
12952
+ def initialize(transport)
12953
+ @transport = transport
12954
+ @accounts = JitAccessAccountsNamespace.new(@transport)
12955
+ @policies = JitAccessPoliciesNamespace.new(@transport)
12956
+ @requests = JitAccessRequestsNamespace.new(@transport)
12957
+ end
12958
+ end
12959
+
12411
12960
  # `client.kv`
12412
12961
  class KvNamespace
12413
12962
  # @api private
@@ -19150,6 +19699,225 @@ module Infrawrench
19150
19699
  end
19151
19700
  end
19152
19701
 
19702
+ # `client.slos.get`
19703
+ class SlosGetNamespace
19704
+ # @api private
19705
+ # @param transport [Transport]
19706
+ def initialize(transport)
19707
+ @transport = transport
19708
+ end
19709
+
19710
+ # List SLOs
19711
+ #
19712
+ # Every service-level objective with its last snapshot: SLI, error budget
19713
+ # remaining (as a fraction and in minutes) and burn rates over the alerting
19714
+ # windows.
19715
+ #
19716
+ # _Requires permission: `resources:read`._
19717
+ #
19718
+ # GET /api/org/{orgId}/slos
19719
+ #
19720
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
19721
+ # constructed with.
19722
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
19723
+ # @return [Hash] Parsed JSON, shaped as `SloList` — see `sig/infrawrench/sdk.rbs`.
19724
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
19725
+ def get(org_id: nil, request_options: nil)
19726
+ @transport.request(
19727
+ http_method: "GET",
19728
+ path: "/api/org/{orgId}/slos",
19729
+ path_params: { "orgId" => org_id },
19730
+ request_options: request_options
19731
+ )
19732
+ end
19733
+
19734
+ # Read an SLO with its history
19735
+ #
19736
+ # The SLO plus hourly good/total buckets over its window (the SLI and
19737
+ # budget-burndown charts are drawn from these) and the change freeze in
19738
+ # effect, if any.
19739
+ #
19740
+ # _Requires permission: `resources:read`._
19741
+ #
19742
+ # GET /api/org/{orgId}/slos/{sloId}
19743
+ #
19744
+ # Raises on 404: Not found
19745
+ #
19746
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
19747
+ # constructed with.
19748
+ # @param slo_id [String]
19749
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
19750
+ # @return [Hash] Parsed JSON, shaped as `SloDetail` — see `sig/infrawrench/sdk.rbs`.
19751
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
19752
+ def get_org_org_id_slos_slo_id(slo_id:, org_id: nil, request_options: nil)
19753
+ @transport.request(
19754
+ http_method: "GET",
19755
+ path: "/api/org/{orgId}/slos/{sloId}",
19756
+ path_params: { "orgId" => org_id, "sloId" => slo_id },
19757
+ request_options: request_options
19758
+ )
19759
+ end
19760
+ end
19761
+
19762
+ # `client.slos`
19763
+ class SlosNamespace
19764
+ # @return [SlosGetNamespace] `client.slos.get`
19765
+ attr_reader :get
19766
+
19767
+ # @api private
19768
+ # @param transport [Transport]
19769
+ def initialize(transport)
19770
+ @transport = transport
19771
+ @get = SlosGetNamespace.new(@transport)
19772
+ end
19773
+
19774
+ # Create an SLO
19775
+ #
19776
+ # Out-of-range inputs are rejected, not clamped. The source must exist in
19777
+ # the organization. The first evaluation runs within one poller tick.
19778
+ # Audit-logged.
19779
+ #
19780
+ # _Requires permission: `resources:write`._
19781
+ #
19782
+ # POST /api/org/{orgId}/slos
19783
+ #
19784
+ # Raises on 400: Bad request
19785
+ #
19786
+ # Raises on 404: Not found
19787
+ #
19788
+ # Raises on 409: Conflict
19789
+ #
19790
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
19791
+ # constructed with.
19792
+ # @param body [Hash, nil] Request body, shaped as `SloCreate`.
19793
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
19794
+ # @return [Hash] Parsed JSON, shaped as `Slo` — see `sig/infrawrench/sdk.rbs`.
19795
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
19796
+ def create(org_id: nil, body: nil, request_options: nil)
19797
+ @transport.request(
19798
+ http_method: "POST",
19799
+ path: "/api/org/{orgId}/slos",
19800
+ path_params: { "orgId" => org_id },
19801
+ body: body,
19802
+ request_options: request_options
19803
+ )
19804
+ end
19805
+
19806
+ # Delete an SLO
19807
+ #
19808
+ # The measured series are untouched. Audit-logged.
19809
+ #
19810
+ # _Requires permission: `resources:write`._
19811
+ #
19812
+ # DELETE /api/org/{orgId}/slos/{sloId}
19813
+ #
19814
+ # Raises on 404: Not found
19815
+ #
19816
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
19817
+ # constructed with.
19818
+ # @param slo_id [String]
19819
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
19820
+ # @return [nil] This endpoint returns no content.
19821
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
19822
+ def delete(slo_id:, org_id: nil, request_options: nil)
19823
+ @transport.request(
19824
+ http_method: "DELETE",
19825
+ path: "/api/org/{orgId}/slos/{sloId}",
19826
+ path_params: { "orgId" => org_id, "sloId" => slo_id },
19827
+ accept: :empty,
19828
+ request_options: request_options
19829
+ )
19830
+ end
19831
+
19832
+ # Start a change freeze for an SLO
19833
+ #
19834
+ # Acts on the freeze suggestion an exhausted budget makes: creates an
19835
+ # ordinary change freeze named after the SLO, listed and ended like any
19836
+ # other. Needs `freezes:write`.
19837
+ #
19838
+ # _Requires permission: `freezes:write`._
19839
+ #
19840
+ # POST /api/org/{orgId}/slos/{sloId}/freeze
19841
+ #
19842
+ # Raises on 400: Bad request
19843
+ #
19844
+ # Raises on 404: Not found
19845
+ #
19846
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
19847
+ # constructed with.
19848
+ # @param slo_id [String]
19849
+ # @param body [Hash, nil] Request body, shaped as `SloFreezeRequest`.
19850
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
19851
+ # @return [Hash] Parsed JSON, shaped as `SloActiveFreeze & Hash` — see
19852
+ # `sig/infrawrench/sdk.rbs`.
19853
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
19854
+ def post_org_org_id_slos_slo_id_freeze(slo_id:, org_id: nil, body: nil, request_options: nil)
19855
+ @transport.request(
19856
+ http_method: "POST",
19857
+ path: "/api/org/{orgId}/slos/{sloId}/freeze",
19858
+ path_params: { "orgId" => org_id, "sloId" => slo_id },
19859
+ body: body,
19860
+ request_options: request_options
19861
+ )
19862
+ end
19863
+
19864
+ # List what an SLO can be measured from
19865
+ #
19866
+ # Every synthetic probe, and every synced resource that reported a metric
19867
+ # series in the last week with the series it reported. Feeds the editor's
19868
+ # pickers.
19869
+ #
19870
+ # _Requires permission: `resources:read`._
19871
+ #
19872
+ # GET /api/org/{orgId}/slos/sources
19873
+ #
19874
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
19875
+ # constructed with.
19876
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
19877
+ # @return [Hash] Parsed JSON, shaped as `SloSources` — see `sig/infrawrench/sdk.rbs`.
19878
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
19879
+ def sources(org_id: nil, request_options: nil)
19880
+ @transport.request(
19881
+ http_method: "GET",
19882
+ path: "/api/org/{orgId}/slos/sources",
19883
+ path_params: { "orgId" => org_id },
19884
+ request_options: request_options
19885
+ )
19886
+ end
19887
+
19888
+ # Update an SLO
19889
+ #
19890
+ # Omitted fields keep their value. Changing the source, target or window
19891
+ # resets the snapshot and the alert state. Audit-logged.
19892
+ #
19893
+ # _Requires permission: `resources:write`._
19894
+ #
19895
+ # PUT /api/org/{orgId}/slos/{sloId}
19896
+ #
19897
+ # Raises on 400: Bad request
19898
+ #
19899
+ # Raises on 404: Not found
19900
+ #
19901
+ # Raises on 409: Conflict
19902
+ #
19903
+ # @param org_id [String, nil] Organization id. Defaults to the `org_id` the client was
19904
+ # constructed with.
19905
+ # @param slo_id [String]
19906
+ # @param body [Hash, nil] Request body, shaped as `SloUpdate`.
19907
+ # @param request_options [Hash, nil] Per-call `:headers`, `:timeout` and `:open_timeout`.
19908
+ # @return [Hash] Parsed JSON, shaped as `Slo` — see `sig/infrawrench/sdk.rbs`.
19909
+ # @raise [Infrawrench::ApiError] On any non-2xx response.
19910
+ def update(slo_id:, org_id: nil, body: nil, request_options: nil)
19911
+ @transport.request(
19912
+ http_method: "PUT",
19913
+ path: "/api/org/{orgId}/slos/{sloId}",
19914
+ path_params: { "orgId" => org_id, "sloId" => slo_id },
19915
+ body: body,
19916
+ request_options: request_options
19917
+ )
19918
+ end
19919
+ end
19920
+
19153
19921
  # `client.sql`
19154
19922
  class SqlNamespace
19155
19923
  # @api private
@@ -21392,6 +22160,8 @@ module Infrawrench
21392
22160
  attr_reader :invoices
21393
22161
  # @return [JiraNamespace] `client.jira`
21394
22162
  attr_reader :jira
22163
+ # @return [JitAccessNamespace] `client.jit_access`
22164
+ attr_reader :jit_access
21395
22165
  # @return [KvNamespace] `client.kv`
21396
22166
  attr_reader :kv
21397
22167
  # @return [LeasesNamespace] `client.leases`
@@ -21462,6 +22232,8 @@ module Infrawrench
21462
22232
  attr_reader :sharing
21463
22233
  # @return [SlackNamespace] `client.slack`
21464
22234
  attr_reader :slack
22235
+ # @return [SlosNamespace] `client.slos`
22236
+ attr_reader :slos
21465
22237
  # @return [SqlNamespace] `client.sql`
21466
22238
  attr_reader :sql
21467
22239
  # @return [SshFanoutNamespace] `client.ssh_fanout`
@@ -21563,6 +22335,7 @@ module Infrawrench
21563
22335
  @invitations = InvitationsNamespace.new(@transport)
21564
22336
  @invoices = InvoicesNamespace.new(@transport)
21565
22337
  @jira = JiraNamespace.new(@transport)
22338
+ @jit_access = JitAccessNamespace.new(@transport)
21566
22339
  @kv = KvNamespace.new(@transport)
21567
22340
  @leases = LeasesNamespace.new(@transport)
21568
22341
  @linear = LinearNamespace.new(@transport)
@@ -21598,6 +22371,7 @@ module Infrawrench
21598
22371
  @shared_consoles = SharedConsolesNamespace.new(@transport)
21599
22372
  @sharing = SharingNamespace.new(@transport)
21600
22373
  @slack = SlackNamespace.new(@transport)
22374
+ @slos = SlosNamespace.new(@transport)
21601
22375
  @sql = SqlNamespace.new(@transport)
21602
22376
  @ssh_fanout = SshFanoutNamespace.new(@transport)
21603
22377
  @ssh_keys = SshKeysNamespace.new(@transport)