Skip to content

Commit 1446272

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 4c9a0db of spec repo
1 parent 9294cf9 commit 1446272

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
@@ -133592,6 +133599,26 @@ paths:
133592133599
tags:
133593133600
- Microsoft Teams Integration
133594133601
x-codegen-request-body-name: body
133602+
/api/v2/integration/ms-teams/configuration/user-binding/{tenant_id}:
133603+
delete:
133604+
description: Delete the user binding for a given tenant from the Datadog Microsoft Teams integration.
133605+
operationId: DeleteMSTeamsUserBinding
133606+
parameters:
133607+
- $ref: "#/components/parameters/MicrosoftTeamsTenantIDPathParameter"
133608+
responses:
133609+
"204":
133610+
description: No Content
133611+
"400":
133612+
$ref: "#/components/responses/BadRequestResponse"
133613+
"403":
133614+
$ref: "#/components/responses/ForbiddenResponse"
133615+
"412":
133616+
$ref: "#/components/responses/PreconditionFailedResponse"
133617+
"429":
133618+
$ref: "#/components/responses/TooManyRequestsResponse"
133619+
summary: Delete user binding
133620+
tags:
133621+
- Microsoft Teams Integration
133595133622
/api/v2/integration/ms-teams/configuration/workflows-webhook-handles:
133596133623
get:
133597133624
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
@@ -3486,6 +3486,12 @@
34863486
"type": "idempotent"
34873487
}
34883488
},
3489+
"DeleteMSTeamsUserBinding": {
3490+
"tag": "Microsoft Teams Integration",
3491+
"undo": {
3492+
"type": "idempotent"
3493+
}
3494+
},
34893495
"ListWorkflowsWebhookHandles": {
34903496
"tag": "Microsoft Teams Integration",
34913497
"undo": {

0 commit comments

Comments
 (0)