Skip to content

Commit abd984a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 34e91d4 of spec repo (#3477)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 83c7329 commit abd984a

6 files changed

Lines changed: 127 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,13 @@ components:
10121012
required: true
10131013
schema:
10141014
type: string
1015+
MicrosoftTeamsTenantIDPathParameter:
1016+
description: Your tenant id.
1017+
in: path
1018+
name: tenant_id
1019+
required: true
1020+
schema:
1021+
type: string
10151022
MicrosoftTeamsTenantIDQueryParameter:
10161023
description: Your tenant id.
10171024
in: query
@@ -134956,6 +134963,26 @@ paths:
134956134963
tags:
134957134964
- Microsoft Teams Integration
134958134965
x-codegen-request-body-name: body
134966+
/api/v2/integration/ms-teams/configuration/user-binding/{tenant_id}:
134967+
delete:
134968+
description: Delete the user binding for a given tenant from the Datadog Microsoft Teams integration.
134969+
operationId: DeleteMSTeamsUserBinding
134970+
parameters:
134971+
- $ref: "#/components/parameters/MicrosoftTeamsTenantIDPathParameter"
134972+
responses:
134973+
"204":
134974+
description: No Content
134975+
"400":
134976+
$ref: "#/components/responses/BadRequestResponse"
134977+
"403":
134978+
$ref: "#/components/responses/ForbiddenResponse"
134979+
"412":
134980+
$ref: "#/components/responses/PreconditionFailedResponse"
134981+
"429":
134982+
$ref: "#/components/responses/TooManyRequestsResponse"
134983+
summary: Delete user binding
134984+
tags:
134985+
- Microsoft Teams Integration
134959134986
/api/v2/integration/ms-teams/configuration/workflows-webhook-handles:
134960134987
get:
134961134988
description: Get a list of all Workflows webhook handles from the Datadog Microsoft Teams integration.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete user binding returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::MicrosoftTeamsIntegrationAPI.new
5+
api_instance.delete_ms_teams_user_binding("tenant_id")

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3555,6 +3555,9 @@
35553555
"handle_id" => "String",
35563556
"body" => "MicrosoftTeamsUpdateTenantBasedHandleRequest",
35573557
},
3558+
"v2.DeleteMSTeamsUserBinding" => {
3559+
"tenant_id" => "String",
3560+
},
35583561
"v2.ListWorkflowsWebhookHandles" => {
35593562
"name" => "String",
35603563
},

features/v2/microsoft_teams_integration.feature

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,27 @@ Feature: Microsoft Teams Integration
146146
When the request is sent
147147
Then the response status is 204 OK
148148

149+
@generated @skip @team:DataDog/chat-integrations
150+
Scenario: Delete user binding returns "Bad Request" response
151+
Given new "DeleteMSTeamsUserBinding" request
152+
And request contains "tenant_id" parameter from "REPLACE.ME"
153+
When the request is sent
154+
Then the response status is 400 Bad Request
155+
156+
@generated @skip @team:DataDog/chat-integrations
157+
Scenario: Delete user binding returns "Failed Precondition" response
158+
Given new "DeleteMSTeamsUserBinding" request
159+
And request contains "tenant_id" parameter from "REPLACE.ME"
160+
When the request is sent
161+
Then the response status is 412 Failed Precondition
162+
163+
@generated @skip @team:DataDog/chat-integrations
164+
Scenario: Delete user binding returns "No Content" response
165+
Given new "DeleteMSTeamsUserBinding" request
166+
And request contains "tenant_id" parameter from "REPLACE.ME"
167+
When the request is sent
168+
Then the response status is 204 No Content
169+
149170
@team:DataDog/chat-integrations
150171
Scenario: Delete workflow webhook handle returns "OK" response
151172
Given there is a valid "workflows_webhook_handle" in the system

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,6 +3529,12 @@
35293529
"type": "idempotent"
35303530
}
35313531
},
3532+
"DeleteMSTeamsUserBinding": {
3533+
"tag": "Microsoft Teams Integration",
3534+
"undo": {
3535+
"type": "idempotent"
3536+
}
3537+
},
35323538
"ListWorkflowsWebhookHandles": {
35333539
"tag": "Microsoft Teams Integration",
35343540
"undo": {

lib/datadog_api_client/v2/api/microsoft_teams_integration_api.rb

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,71 @@ def create_workflows_webhook_handle_with_http_info(body, opts = {})
157157
return data, status_code, headers
158158
end
159159

160+
# Delete user binding.
161+
#
162+
# @see #delete_ms_teams_user_binding_with_http_info
163+
def delete_ms_teams_user_binding(tenant_id, opts = {})
164+
delete_ms_teams_user_binding_with_http_info(tenant_id, opts)
165+
nil
166+
end
167+
168+
# Delete user binding.
169+
#
170+
# Delete the user binding for a given tenant from the Datadog Microsoft Teams integration.
171+
#
172+
# @param tenant_id [String] Your tenant id.
173+
# @param opts [Hash] the optional parameters
174+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
175+
def delete_ms_teams_user_binding_with_http_info(tenant_id, opts = {})
176+
177+
if @api_client.config.debugging
178+
@api_client.config.logger.debug 'Calling API: MicrosoftTeamsIntegrationAPI.delete_ms_teams_user_binding ...'
179+
end
180+
# verify the required parameter 'tenant_id' is set
181+
if @api_client.config.client_side_validation && tenant_id.nil?
182+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling MicrosoftTeamsIntegrationAPI.delete_ms_teams_user_binding"
183+
end
184+
# resource path
185+
local_var_path = '/api/v2/integration/ms-teams/configuration/user-binding/{tenant_id}'.sub('{tenant_id}', CGI.escape(tenant_id.to_s).gsub('%2F', '/'))
186+
187+
# query parameters
188+
query_params = opts[:query_params] || {}
189+
190+
# header parameters
191+
header_params = opts[:header_params] || {}
192+
# HTTP header 'Accept' (if needed)
193+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
194+
195+
# form parameters
196+
form_params = opts[:form_params] || {}
197+
198+
# http body (model)
199+
post_body = opts[:debug_body]
200+
201+
# return_type
202+
return_type = opts[:debug_return_type]
203+
204+
# auth_names
205+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]
206+
207+
new_options = opts.merge(
208+
:operation => :delete_ms_teams_user_binding,
209+
:header_params => header_params,
210+
:query_params => query_params,
211+
:form_params => form_params,
212+
:body => post_body,
213+
:auth_names => auth_names,
214+
:return_type => return_type,
215+
:api_version => "V2"
216+
)
217+
218+
data, status_code, headers = @api_client.call_api(Net::HTTP::Delete, local_var_path, new_options)
219+
if @api_client.config.debugging
220+
@api_client.config.logger.debug "API called: MicrosoftTeamsIntegrationAPI#delete_ms_teams_user_binding\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
221+
end
222+
return data, status_code, headers
223+
end
224+
160225
# Delete tenant-based handle.
161226
#
162227
# @see #delete_tenant_based_handle_with_http_info

0 commit comments

Comments
 (0)