Skip to content

Commit cbb1d4e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b489f46 of spec repo
1 parent f87447a commit cbb1d4e

5 files changed

Lines changed: 107 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
@@ -134462,6 +134469,26 @@ paths:
134462134469
tags:
134463134470
- Microsoft Teams Integration
134464134471
x-codegen-request-body-name: body
134472+
/api/v2/integration/ms-teams/configuration/user-binding/{tenant_id}:
134473+
delete:
134474+
description: Delete the user binding for a given tenant from the Datadog Microsoft Teams integration.
134475+
operationId: DeleteMSTeamsUserBinding
134476+
parameters:
134477+
- $ref: "#/components/parameters/MicrosoftTeamsTenantIDPathParameter"
134478+
responses:
134479+
"204":
134480+
description: No Content
134481+
"400":
134482+
$ref: "#/components/responses/BadRequestResponse"
134483+
"403":
134484+
$ref: "#/components/responses/ForbiddenResponse"
134485+
"412":
134486+
$ref: "#/components/responses/PreconditionFailedResponse"
134487+
"429":
134488+
$ref: "#/components/responses/TooManyRequestsResponse"
134489+
summary: Delete user binding
134490+
tags:
134491+
- Microsoft Teams Integration
134465134492
/api/v2/integration/ms-teams/configuration/workflows-webhook-handles:
134466134493
get:
134467134494
description: Get a list of all Workflows webhook handles from the Datadog Microsoft Teams integration.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Delete user binding returns "No Content" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.microsoft_teams_integration_api import MicrosoftTeamsIntegrationApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = MicrosoftTeamsIntegrationApi(api_client)
11+
api_instance.delete_ms_teams_user_binding(
12+
tenant_id="tenant_id",
13+
)

src/datadog_api_client/v2/api/microsoft_teams_integration_api.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,29 @@ def __init__(self, api_client=None):
9191
api_client=api_client,
9292
)
9393

94+
self._delete_ms_teams_user_binding_endpoint = _Endpoint(
95+
settings={
96+
"response_type": None,
97+
"auth": ["apiKeyAuth", "appKeyAuth"],
98+
"endpoint_path": "/api/v2/integration/ms-teams/configuration/user-binding/{tenant_id}",
99+
"operation_id": "delete_ms_teams_user_binding",
100+
"http_method": "DELETE",
101+
"version": "v2",
102+
},
103+
params_map={
104+
"tenant_id": {
105+
"required": True,
106+
"openapi_types": (str,),
107+
"attribute": "tenant_id",
108+
"location": "path",
109+
},
110+
},
111+
headers_map={
112+
"accept": ["*/*"],
113+
},
114+
api_client=api_client,
115+
)
116+
94117
self._delete_tenant_based_handle_endpoint = _Endpoint(
95118
settings={
96119
"response_type": None,
@@ -353,6 +376,23 @@ def create_workflows_webhook_handle(
353376

354377
return self._create_workflows_webhook_handle_endpoint.call_with_http_info(**kwargs)
355378

379+
def delete_ms_teams_user_binding(
380+
self,
381+
tenant_id: str,
382+
) -> None:
383+
"""Delete user binding.
384+
385+
Delete the user binding for a given tenant from the Datadog Microsoft Teams integration.
386+
387+
:param tenant_id: Your tenant id.
388+
:type tenant_id: str
389+
:rtype: None
390+
"""
391+
kwargs: Dict[str, Any] = {}
392+
kwargs["tenant_id"] = tenant_id
393+
394+
return self._delete_ms_teams_user_binding_endpoint.call_with_http_info(**kwargs)
395+
356396
def delete_tenant_based_handle(
357397
self,
358398
handle_id: str,

tests/v2/features/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

tests/v2/features/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3523,6 +3523,12 @@
35233523
"type": "idempotent"
35243524
}
35253525
},
3526+
"DeleteMSTeamsUserBinding": {
3527+
"tag": "Microsoft Teams Integration",
3528+
"undo": {
3529+
"type": "idempotent"
3530+
}
3531+
},
35263532
"ListWorkflowsWebhookHandles": {
35273533
"tag": "Microsoft Teams Integration",
35283534
"undo": {

0 commit comments

Comments
 (0)