Class: Infrawrench::TagPolicyNamespace
- Inherits:
-
Object
- Object
- Infrawrench::TagPolicyNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.tag_policy
Instance Method Summary collapse
-
#compliance(org_id: nil, request_options: nil) ⇒ Hash
Per-account tag compliance scores.
-
#get(org_id: nil, request_options: nil) ⇒ Hash
The org's required-tag policy.
-
#initialize(transport) ⇒ TagPolicyNamespace
constructor
private
A new instance of TagPolicyNamespace.
-
#update(body:, org_id: nil, request_options: nil) ⇒ Hash
Replace the org's tag policy.
Constructor Details
#initialize(transport) ⇒ TagPolicyNamespace
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 TagPolicyNamespace.
6229 6230 6231 |
# File 'lib/infrawrench/client.rb', line 6229 def initialize(transport) @transport = transport end |
Instance Method Details
#compliance(org_id: nil, request_options: nil) ⇒ Hash
Per-account tag compliance scores
For each account: how many of its resources expose tags and how many of
those carry every required tag with an allowed value. score is over the
evaluated (tag-capable) set so untaggable resource types don't drag it.
Requires permission: resources:read.
GET /api/org/orgId/tag-policy/compliance
6249 6250 6251 6252 6253 6254 6255 6256 |
# File 'lib/infrawrench/client.rb', line 6249 def compliance(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/tag-policy/compliance", path_params: { "orgId" => org_id }, request_options: ) end |
#get(org_id: nil, request_options: nil) ⇒ Hash
The org's required-tag policy
Requires permission: resources:read.
GET /api/org/orgId/tag-policy
6269 6270 6271 6272 6273 6274 6275 6276 |
# File 'lib/infrawrench/client.rb', line 6269 def get(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/tag-policy", path_params: { "orgId" => org_id }, request_options: ) end |
#update(body:, org_id: nil, request_options: nil) ⇒ Hash
Replace the org's tag policy
Sets the required tag keys (each optionally restricted to allowed values)
and whether resource creation is blocked when they are missing. Keys are
matched case-insensitively against the generic tags/labels field
convention.
Requires permission: org:settings:write.
PUT /api/org/orgId/tag-policy
Raises on 400: Bad request
6297 6298 6299 6300 6301 6302 6303 6304 6305 |
# File 'lib/infrawrench/client.rb', line 6297 def update(body:, org_id: nil, request_options: nil) @transport.request( http_method: "PUT", path: "/api/org/{orgId}/tag-policy", path_params: { "orgId" => org_id }, body: body, request_options: ) end |