Class: Infrawrench::ChangeFreezesNamespace
- Inherits:
-
Object
- Object
- Infrawrench::ChangeFreezesNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.change_freezes
Instance Method Summary collapse
-
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Declare a change freeze window.
-
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a change freeze window.
-
#initialize(transport) ⇒ ChangeFreezesNamespace
constructor
private
A new instance of ChangeFreezesNamespace.
-
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List change freeze windows, newest first.
-
#post_org_org_id_change_freezes_id_end(id:, org_id: nil, request_options: nil) ⇒ Hash
End a change freeze now.
-
#status(org_id: nil, request_options: nil) ⇒ Hash
The freeze currently in effect, if any.
-
#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Update a change freeze window.
Constructor Details
#initialize(transport) ⇒ ChangeFreezesNamespace
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 ChangeFreezesNamespace.
2769 2770 2771 |
# File 'lib/infrawrench/client.rb', line 2769 def initialize(transport) @transport = transport end |
Instance Method Details
#create(body:, org_id: nil, request_options: nil) ⇒ Hash
Declare a change freeze window
While the freeze is in effect, destructive actions (resource deletion,
destructive plugin actions, secret-version destroys, deployment rollbacks)
return 423 unless explicitly overridden by a caller with
freezes:override.
Requires permission: freezes:write.
POST /api/org/orgId/change-freezes
Raises on 400: Bad request
2792 2793 2794 2795 2796 2797 2798 2799 2800 |
# File 'lib/infrawrench/client.rb', line 2792 def create(body:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/change-freezes", path_params: { "orgId" => org_id }, body: body, request_options: ) end |
#delete(id:, org_id: nil, request_options: nil) ⇒ Hash
Delete a change freeze window
Requires permission: freezes:write.
DELETE /api/org/orgId/change-freezes/id
Raises on 404: Not found
2816 2817 2818 2819 2820 2821 2822 2823 |
# File 'lib/infrawrench/client.rb', line 2816 def delete(id:, org_id: nil, request_options: nil) @transport.request( http_method: "DELETE", path: "/api/org/{orgId}/change-freezes/{id}", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#list(org_id: nil, request_options: nil) ⇒ Array<Hash>
List change freeze windows, newest first
Requires permission: freezes:read.
GET /api/org/orgId/change-freezes
2860 2861 2862 2863 2864 2865 2866 2867 |
# File 'lib/infrawrench/client.rb', line 2860 def list(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/change-freezes", path_params: { "orgId" => org_id }, request_options: ) end |
#post_org_org_id_change_freezes_id_end(id:, org_id: nil, request_options: nil) ⇒ Hash
End a change freeze now
Requires permission: freezes:write.
POST /api/org/orgId/change-freezes/id/end
Raises on 404: Not found
2839 2840 2841 2842 2843 2844 2845 2846 |
# File 'lib/infrawrench/client.rb', line 2839 def post_org_org_id_change_freezes_id_end(id:, org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/change-freezes/{id}/end", path_params: { "orgId" => org_id, "id" => id }, request_options: ) end |
#status(org_id: nil, request_options: nil) ⇒ Hash
The freeze currently in effect, if any
Returns the active freeze window (active, started, not yet past its end
time) or freeze: null. Clients poll this to show the freeze banner and
pre-warn before destructive actions.
Requires permission: freezes:read.
GET /api/org/orgId/change-freezes/status
2885 2886 2887 2888 2889 2890 2891 2892 |
# File 'lib/infrawrench/client.rb', line 2885 def status(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/change-freezes/status", path_params: { "orgId" => org_id }, request_options: ) end |
#update(id:, body:, org_id: nil, request_options: nil) ⇒ Hash
Update a change freeze window
Requires permission: freezes:write.
PUT /api/org/orgId/change-freezes/id
Raises on 400: Bad request
Raises on 404: Not found
2911 2912 2913 2914 2915 2916 2917 2918 2919 |
# File 'lib/infrawrench/client.rb', line 2911 def update(id:, body:, org_id: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/change-freezes/{id}", path_params: { "orgId" => org_id, "id" => id }, body: body, request_options: ) end |