Class: Infrawrench::MsteamsNamespace
- Inherits:
-
Object
- Object
- Infrawrench::MsteamsNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.msteams
Instance Attribute Summary collapse
-
#webhooks ⇒ MsteamsWebhooksNamespace
readonly
client.msteams.webhooks.
Instance Method Summary collapse
-
#initialize(transport) ⇒ MsteamsNamespace
constructor
private
A new instance of MsteamsNamespace.
-
#status(org_id: nil, request_options: nil) ⇒ Hash
List the organization's Teams channels.
-
#test(org_id: nil, request_options: nil) ⇒ Hash
Post a test card to every configured Teams channel.
Constructor Details
#initialize(transport) ⇒ MsteamsNamespace
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 MsteamsNamespace.
2610 2611 2612 2613 |
# File 'lib/infrawrench/client.rb', line 2610 def initialize(transport) @transport = transport @webhooks = MsteamsWebhooksNamespace.new(@transport) end |
Instance Attribute Details
#webhooks ⇒ MsteamsWebhooksNamespace (readonly)
Returns client.msteams.webhooks.
2606 2607 2608 |
# File 'lib/infrawrench/client.rb', line 2606 def webhooks @webhooks end |
Instance Method Details
#status(org_id: nil, request_options: nil) ⇒ Hash
List the organization's Teams channels
Returns the Teams channels alerts are routed to and which triggers each takes. Webhook URLs are never included.
GET /api/org/orgId/msteams/status
2627 2628 2629 2630 2631 2632 2633 2634 |
# File 'lib/infrawrench/client.rb', line 2627 def status(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/msteams/status", path_params: { "orgId" => org_id }, request_options: ) end |
#test(org_id: nil, request_options: nil) ⇒ Hash
Post a test card to every configured Teams channel
Ignores trigger opt-ins — every channel gets the test. Fails with the error Microsoft returned when nothing could be delivered (HTTP 404 usually means the Workflow was deleted or turned off).
POST /api/org/orgId/msteams/test
Raises on 400: Bad request
2651 2652 2653 2654 2655 2656 2657 2658 |
# File 'lib/infrawrench/client.rb', line 2651 def test(org_id: nil, request_options: nil) @transport.request( http_method: "POST", path: "/api/org/{orgId}/msteams/test", path_params: { "orgId" => org_id }, request_options: ) end |