diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4bc99f94bc..045a30b94d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1088,6 +1088,13 @@ components: required: true schema: type: string + OpsgenieAccountIDPathParameter: + description: The UUID of the Opsgenie account. + in: path + name: account_id + required: true + schema: + type: string OpsgenieServiceIDPathParameter: description: The UUID of the service. in: path @@ -61684,6 +61691,129 @@ components: format: binary type: string type: object + OpsgenieAccountCreateAttributes: + description: The Opsgenie account attributes for a create request. + properties: + api_key: + description: The Opsgenie API key for your Opsgenie account. + example: "00000000-0000-0000-0000-000000000000" + minLength: 1 + type: string + region: + $ref: "#/components/schemas/OpsgenieServiceRegionType" + required: + - api_key + - region + type: object + OpsgenieAccountCreateData: + description: Opsgenie account data for a create request. + properties: + attributes: + $ref: "#/components/schemas/OpsgenieAccountCreateAttributes" + type: + $ref: "#/components/schemas/OpsgenieAccountType" + required: + - type + - attributes + type: object + OpsgenieAccountCreateRequest: + description: Create request for an Opsgenie account. + properties: + data: + $ref: "#/components/schemas/OpsgenieAccountCreateData" + required: + - data + type: object + OpsgenieAccountResponse: + description: Response containing an Opsgenie account. + properties: + data: + $ref: "#/components/schemas/OpsgenieAccountResponseData" + required: + - data + type: object + OpsgenieAccountResponseAttributes: + description: The attributes from an Opsgenie account response. + properties: + region: + $ref: "#/components/schemas/OpsgenieServiceRegionType" + type: object + OpsgenieAccountResponseData: + description: Opsgenie account data from a response. + properties: + attributes: + $ref: "#/components/schemas/OpsgenieAccountResponseAttributes" + id: + description: The ID of the Opsgenie account. + example: "596da4af-0563-4097-90ff-07230c3f9db3" + maxLength: 100 + minLength: 1 + type: string + type: + $ref: "#/components/schemas/OpsgenieAccountType" + required: + - id + - type + - attributes + type: object + OpsgenieAccountType: + default: opsgenie-account + description: Opsgenie account resource type. + enum: + - opsgenie-account + example: opsgenie-account + type: string + x-enum-varnames: + - OPSGENIE_ACCOUNT + OpsgenieAccountUpdateAttributes: + description: The Opsgenie account attributes for an update request. + properties: + api_key: + description: The Opsgenie API key for your Opsgenie account. + example: "00000000-0000-0000-0000-000000000000" + minLength: 1 + type: string + region: + $ref: "#/components/schemas/OpsgenieServiceRegionType" + type: object + OpsgenieAccountUpdateData: + description: Opsgenie account data for an update request. + properties: + attributes: + $ref: "#/components/schemas/OpsgenieAccountUpdateAttributes" + id: + description: The ID of the Opsgenie account. + example: "596da4af-0563-4097-90ff-07230c3f9db3" + maxLength: 100 + minLength: 1 + type: string + type: + $ref: "#/components/schemas/OpsgenieAccountType" + required: + - id + - type + - attributes + type: object + OpsgenieAccountUpdateRequest: + description: Update request for an Opsgenie account. + properties: + data: + $ref: "#/components/schemas/OpsgenieAccountUpdateData" + required: + - data + type: object + OpsgenieAccountsResponse: + description: Response with a list of Opsgenie accounts. + properties: + data: + description: An array of Opsgenie accounts. + example: [{"attributes": {"region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-account"}, {"attributes": {"region": "eu"}, "id": "0d2937f1-b561-44fa-914a-99910f848014", "type": "opsgenie-account"}] + items: + $ref: "#/components/schemas/OpsgenieAccountResponseData" + type: array + required: + - data + type: object OpsgenieServiceCreateAttributes: description: The Opsgenie service attributes for a create request. properties: @@ -124953,6 +125083,161 @@ paths: summary: Update tenancy config tags: - OCI Integration + /api/v2/integration/opsgenie/accounts: + get: + description: Get a list of all Opsgenie accounts from the Datadog Opsgenie integration. + operationId: ListOpsgenieAccounts + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + region: us + id: 00000000-0000-0000-0000-000000000001 + type: opsgenie-account + schema: + $ref: "#/components/schemas/OpsgenieAccountsResponse" + description: OK + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get all Opsgenie accounts + tags: + - Opsgenie Integration + "x-permission": + operator: OR + permissions: + - integrations_read + post: + description: Create a new Opsgenie account in the Datadog Opsgenie integration. + operationId: CreateOpsgenieAccount + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + api_key: 00000000-0000-0000-0000-000000000000 + region: us + type: opsgenie-account + schema: + $ref: "#/components/schemas/OpsgenieAccountCreateRequest" + description: Opsgenie account payload. + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + region: us + id: 00000000-0000-0000-0000-000000000002 + type: opsgenie-account + schema: + $ref: "#/components/schemas/OpsgenieAccountResponse" + description: CREATED + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a new Opsgenie account + tags: + - Opsgenie Integration + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations + /api/v2/integration/opsgenie/accounts/{account_id}: + delete: + description: Delete a single Opsgenie account from the Datadog Opsgenie integration. + operationId: DeleteOpsgenieAccount + parameters: + - $ref: "#/components/parameters/OpsgenieAccountIDPathParameter" + responses: + "204": + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Delete an Opsgenie account + tags: + - Opsgenie Integration + "x-permission": + operator: OR + permissions: + - manage_integrations + patch: + description: Update a single Opsgenie account in the Datadog Opsgenie integration. + operationId: UpdateOpsgenieAccount + parameters: + - $ref: "#/components/parameters/OpsgenieAccountIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + api_key: 00000000-0000-0000-0000-000000000000 + region: us + id: 596da4af-0563-4097-90ff-07230c3f9db3 + type: opsgenie-account + schema: + $ref: "#/components/schemas/OpsgenieAccountUpdateRequest" + description: Opsgenie account payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + region: us + id: 00000000-0000-0000-0000-000000000003 + type: opsgenie-account + schema: + $ref: "#/components/schemas/OpsgenieAccountResponse" + description: OK + "400": + $ref: "#/components/responses/BadRequestResponse" + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + $ref: "#/components/responses/NotFoundResponse" + "422": + $ref: "#/components/responses/UnprocessableEntityResponse" + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Update an Opsgenie account + tags: + - Opsgenie Integration + x-codegen-request-body-name: body + "x-permission": + operator: OR + permissions: + - manage_integrations /api/v2/integration/opsgenie/services: get: description: Get a list of all services from the Datadog Opsgenie integration. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 5d1f8d7e30..d9aab67a5a 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -26275,6 +26275,83 @@ datadog\_api\_client.v2.model.open\_api\_file module :members: :show-inheritance: +datadog\_api\_client.v2.model.opsgenie\_account\_create\_attributes module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_create_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_create\_data module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_create_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_create\_request module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_create_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_response module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_response\_attributes module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_response\_data module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_type module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_update\_attributes module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_update_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_update\_data module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_update_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_account\_update\_request module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_account_update_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.opsgenie\_accounts\_response module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.opsgenie_accounts_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.opsgenie\_service\_create\_attributes module -------------------------------------------------------------------------- diff --git a/examples/v2/opsgenie-integration/CreateOpsgenieAccount.py b/examples/v2/opsgenie-integration/CreateOpsgenieAccount.py new file mode 100644 index 0000000000..dbd9a32e51 --- /dev/null +++ b/examples/v2/opsgenie-integration/CreateOpsgenieAccount.py @@ -0,0 +1,28 @@ +""" +Create a new Opsgenie account returns "CREATED" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.opsgenie_integration_api import OpsgenieIntegrationApi +from datadog_api_client.v2.model.opsgenie_account_create_attributes import OpsgenieAccountCreateAttributes +from datadog_api_client.v2.model.opsgenie_account_create_data import OpsgenieAccountCreateData +from datadog_api_client.v2.model.opsgenie_account_create_request import OpsgenieAccountCreateRequest +from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType +from datadog_api_client.v2.model.opsgenie_service_region_type import OpsgenieServiceRegionType + +body = OpsgenieAccountCreateRequest( + data=OpsgenieAccountCreateData( + attributes=OpsgenieAccountCreateAttributes( + api_key="00000000-0000-0000-0000-000000000000", + region=OpsgenieServiceRegionType.US, + ), + type=OpsgenieAccountType.OPSGENIE_ACCOUNT, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = OpsgenieIntegrationApi(api_client) + response = api_instance.create_opsgenie_account(body=body) + + print(response) diff --git a/examples/v2/opsgenie-integration/DeleteOpsgenieAccount.py b/examples/v2/opsgenie-integration/DeleteOpsgenieAccount.py new file mode 100644 index 0000000000..e11954658c --- /dev/null +++ b/examples/v2/opsgenie-integration/DeleteOpsgenieAccount.py @@ -0,0 +1,13 @@ +""" +Delete an Opsgenie account returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.opsgenie_integration_api import OpsgenieIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = OpsgenieIntegrationApi(api_client) + api_instance.delete_opsgenie_account( + account_id="account_id", + ) diff --git a/examples/v2/opsgenie-integration/ListOpsgenieAccounts.py b/examples/v2/opsgenie-integration/ListOpsgenieAccounts.py new file mode 100644 index 0000000000..ec09710d69 --- /dev/null +++ b/examples/v2/opsgenie-integration/ListOpsgenieAccounts.py @@ -0,0 +1,13 @@ +""" +Get all Opsgenie accounts returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.opsgenie_integration_api import OpsgenieIntegrationApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = OpsgenieIntegrationApi(api_client) + response = api_instance.list_opsgenie_accounts() + + print(response) diff --git a/examples/v2/opsgenie-integration/UpdateOpsgenieAccount.py b/examples/v2/opsgenie-integration/UpdateOpsgenieAccount.py new file mode 100644 index 0000000000..82d5df1baf --- /dev/null +++ b/examples/v2/opsgenie-integration/UpdateOpsgenieAccount.py @@ -0,0 +1,29 @@ +""" +Update an Opsgenie account returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.opsgenie_integration_api import OpsgenieIntegrationApi +from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType +from datadog_api_client.v2.model.opsgenie_account_update_attributes import OpsgenieAccountUpdateAttributes +from datadog_api_client.v2.model.opsgenie_account_update_data import OpsgenieAccountUpdateData +from datadog_api_client.v2.model.opsgenie_account_update_request import OpsgenieAccountUpdateRequest +from datadog_api_client.v2.model.opsgenie_service_region_type import OpsgenieServiceRegionType + +body = OpsgenieAccountUpdateRequest( + data=OpsgenieAccountUpdateData( + attributes=OpsgenieAccountUpdateAttributes( + api_key="00000000-0000-0000-0000-000000000000", + region=OpsgenieServiceRegionType.US, + ), + id="596da4af-0563-4097-90ff-07230c3f9db3", + type=OpsgenieAccountType.OPSGENIE_ACCOUNT, + ), +) + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = OpsgenieIntegrationApi(api_client) + response = api_instance.update_opsgenie_account(account_id="account_id", body=body) + + print(response) diff --git a/src/datadog_api_client/v2/api/opsgenie_integration_api.py b/src/datadog_api_client/v2/api/opsgenie_integration_api.py index d3e75c9c6e..1104acba63 100644 --- a/src/datadog_api_client/v2/api/opsgenie_integration_api.py +++ b/src/datadog_api_client/v2/api/opsgenie_integration_api.py @@ -7,6 +7,10 @@ from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint from datadog_api_client.configuration import Configuration +from datadog_api_client.v2.model.opsgenie_accounts_response import OpsgenieAccountsResponse +from datadog_api_client.v2.model.opsgenie_account_response import OpsgenieAccountResponse +from datadog_api_client.v2.model.opsgenie_account_create_request import OpsgenieAccountCreateRequest +from datadog_api_client.v2.model.opsgenie_account_update_request import OpsgenieAccountUpdateRequest from datadog_api_client.v2.model.opsgenie_services_response import OpsgenieServicesResponse from datadog_api_client.v2.model.opsgenie_service_response import OpsgenieServiceResponse from datadog_api_client.v2.model.opsgenie_service_create_request import OpsgenieServiceCreateRequest @@ -24,6 +28,26 @@ def __init__(self, api_client=None): api_client = ApiClient(Configuration()) self.api_client = api_client + self._create_opsgenie_account_endpoint = _Endpoint( + settings={ + "response_type": (OpsgenieAccountResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/opsgenie/accounts", + "operation_id": "create_opsgenie_account", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (OpsgenieAccountCreateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._create_opsgenie_service_endpoint = _Endpoint( settings={ "response_type": (OpsgenieServiceResponse,), @@ -44,6 +68,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._delete_opsgenie_account_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/opsgenie/accounts/{account_id}", + "operation_id": "delete_opsgenie_account", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "account_id": { + "required": True, + "openapi_types": (str,), + "attribute": "account_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._delete_opsgenie_service_endpoint = _Endpoint( settings={ "response_type": None, @@ -90,6 +137,22 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_opsgenie_accounts_endpoint = _Endpoint( + settings={ + "response_type": (OpsgenieAccountsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/opsgenie/accounts", + "operation_id": "list_opsgenie_accounts", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_opsgenie_services_endpoint = _Endpoint( settings={ "response_type": (OpsgenieServicesResponse,), @@ -106,6 +169,32 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._update_opsgenie_account_endpoint = _Endpoint( + settings={ + "response_type": (OpsgenieAccountResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/integration/opsgenie/accounts/{account_id}", + "operation_id": "update_opsgenie_account", + "http_method": "PATCH", + "version": "v2", + }, + params_map={ + "account_id": { + "required": True, + "openapi_types": (str,), + "attribute": "account_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (OpsgenieAccountUpdateRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._update_opsgenie_service_endpoint = _Endpoint( settings={ "response_type": (OpsgenieServiceResponse,), @@ -132,6 +221,23 @@ def __init__(self, api_client=None): api_client=api_client, ) + def create_opsgenie_account( + self, + body: OpsgenieAccountCreateRequest, + ) -> OpsgenieAccountResponse: + """Create a new Opsgenie account. + + Create a new Opsgenie account in the Datadog Opsgenie integration. + + :param body: Opsgenie account payload. + :type body: OpsgenieAccountCreateRequest + :rtype: OpsgenieAccountResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_opsgenie_account_endpoint.call_with_http_info(**kwargs) + def create_opsgenie_service( self, body: OpsgenieServiceCreateRequest, @@ -149,6 +255,23 @@ def create_opsgenie_service( return self._create_opsgenie_service_endpoint.call_with_http_info(**kwargs) + def delete_opsgenie_account( + self, + account_id: str, + ) -> None: + """Delete an Opsgenie account. + + Delete a single Opsgenie account from the Datadog Opsgenie integration. + + :param account_id: The UUID of the Opsgenie account. + :type account_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["account_id"] = account_id + + return self._delete_opsgenie_account_endpoint.call_with_http_info(**kwargs) + def delete_opsgenie_service( self, integration_service_id: str, @@ -183,6 +306,18 @@ def get_opsgenie_service( return self._get_opsgenie_service_endpoint.call_with_http_info(**kwargs) + def list_opsgenie_accounts( + self, + ) -> OpsgenieAccountsResponse: + """Get all Opsgenie accounts. + + Get a list of all Opsgenie accounts from the Datadog Opsgenie integration. + + :rtype: OpsgenieAccountsResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_opsgenie_accounts_endpoint.call_with_http_info(**kwargs) + def list_opsgenie_services( self, ) -> OpsgenieServicesResponse: @@ -195,6 +330,28 @@ def list_opsgenie_services( kwargs: Dict[str, Any] = {} return self._list_opsgenie_services_endpoint.call_with_http_info(**kwargs) + def update_opsgenie_account( + self, + account_id: str, + body: OpsgenieAccountUpdateRequest, + ) -> OpsgenieAccountResponse: + """Update an Opsgenie account. + + Update a single Opsgenie account in the Datadog Opsgenie integration. + + :param account_id: The UUID of the Opsgenie account. + :type account_id: str + :param body: Opsgenie account payload. + :type body: OpsgenieAccountUpdateRequest + :rtype: OpsgenieAccountResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["account_id"] = account_id + + kwargs["body"] = body + + return self._update_opsgenie_account_endpoint.call_with_http_info(**kwargs) + def update_opsgenie_service( self, integration_service_id: str, diff --git a/src/datadog_api_client/v2/model/opsgenie_account_create_attributes.py b/src/datadog_api_client/v2/model/opsgenie_account_create_attributes.py new file mode 100644 index 0000000000..6d97e763a0 --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_create_attributes.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_service_region_type import OpsgenieServiceRegionType + + +class OpsgenieAccountCreateAttributes(ModelNormal): + validations = { + "api_key": { + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_service_region_type import OpsgenieServiceRegionType + + return { + "api_key": (str,), + "region": (OpsgenieServiceRegionType,), + } + + attribute_map = { + "api_key": "api_key", + "region": "region", + } + + def __init__(self_, api_key: str, region: OpsgenieServiceRegionType, **kwargs): + """ + The Opsgenie account attributes for a create request. + + :param api_key: The Opsgenie API key for your Opsgenie account. + :type api_key: str + + :param region: The region for the Opsgenie service. + :type region: OpsgenieServiceRegionType + """ + super().__init__(kwargs) + + self_.api_key = api_key + self_.region = region diff --git a/src/datadog_api_client/v2/model/opsgenie_account_create_data.py b/src/datadog_api_client/v2/model/opsgenie_account_create_data.py new file mode 100644 index 0000000000..d5d44662a0 --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_create_data.py @@ -0,0 +1,48 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_account_create_attributes import OpsgenieAccountCreateAttributes + from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType + + +class OpsgenieAccountCreateData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_account_create_attributes import OpsgenieAccountCreateAttributes + from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType + + return { + "attributes": (OpsgenieAccountCreateAttributes,), + "type": (OpsgenieAccountType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: OpsgenieAccountCreateAttributes, type: OpsgenieAccountType, **kwargs): + """ + Opsgenie account data for a create request. + + :param attributes: The Opsgenie account attributes for a create request. + :type attributes: OpsgenieAccountCreateAttributes + + :param type: Opsgenie account resource type. + :type type: OpsgenieAccountType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/opsgenie_account_create_request.py b/src/datadog_api_client/v2/model/opsgenie_account_create_request.py new file mode 100644 index 0000000000..b315995df5 --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_create_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_account_create_data import OpsgenieAccountCreateData + + +class OpsgenieAccountCreateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_account_create_data import OpsgenieAccountCreateData + + return { + "data": (OpsgenieAccountCreateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: OpsgenieAccountCreateData, **kwargs): + """ + Create request for an Opsgenie account. + + :param data: Opsgenie account data for a create request. + :type data: OpsgenieAccountCreateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/opsgenie_account_response.py b/src/datadog_api_client/v2/model/opsgenie_account_response.py new file mode 100644 index 0000000000..9d976e6250 --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_account_response_data import OpsgenieAccountResponseData + + +class OpsgenieAccountResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_account_response_data import OpsgenieAccountResponseData + + return { + "data": (OpsgenieAccountResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: OpsgenieAccountResponseData, **kwargs): + """ + Response containing an Opsgenie account. + + :param data: Opsgenie account data from a response. + :type data: OpsgenieAccountResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/opsgenie_account_response_attributes.py b/src/datadog_api_client/v2/model/opsgenie_account_response_attributes.py new file mode 100644 index 0000000000..8078ef2ab5 --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_response_attributes.py @@ -0,0 +1,42 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_service_region_type import OpsgenieServiceRegionType + + +class OpsgenieAccountResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_service_region_type import OpsgenieServiceRegionType + + return { + "region": (OpsgenieServiceRegionType,), + } + + attribute_map = { + "region": "region", + } + + def __init__(self_, region: Union[OpsgenieServiceRegionType, UnsetType] = unset, **kwargs): + """ + The attributes from an Opsgenie account response. + + :param region: The region for the Opsgenie service. + :type region: OpsgenieServiceRegionType, optional + """ + if region is not unset: + kwargs["region"] = region + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/opsgenie_account_response_data.py b/src/datadog_api_client/v2/model/opsgenie_account_response_data.py new file mode 100644 index 0000000000..94f7c43ca0 --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_response_data.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_account_response_attributes import OpsgenieAccountResponseAttributes + from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType + + +class OpsgenieAccountResponseData(ModelNormal): + validations = { + "id": { + "max_length": 100, + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_account_response_attributes import OpsgenieAccountResponseAttributes + from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType + + return { + "attributes": (OpsgenieAccountResponseAttributes,), + "id": (str,), + "type": (OpsgenieAccountType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: OpsgenieAccountResponseAttributes, id: str, type: OpsgenieAccountType, **kwargs): + """ + Opsgenie account data from a response. + + :param attributes: The attributes from an Opsgenie account response. + :type attributes: OpsgenieAccountResponseAttributes + + :param id: The ID of the Opsgenie account. + :type id: str + + :param type: Opsgenie account resource type. + :type type: OpsgenieAccountType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/opsgenie_account_type.py b/src/datadog_api_client/v2/model/opsgenie_account_type.py new file mode 100644 index 0000000000..2c2e2acba8 --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class OpsgenieAccountType(ModelSimple): + """ + Opsgenie account resource type. + + :param value: If omitted defaults to "opsgenie-account". Must be one of ["opsgenie-account"]. + :type value: str + """ + + allowed_values = { + "opsgenie-account", + } + OPSGENIE_ACCOUNT: ClassVar["OpsgenieAccountType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +OpsgenieAccountType.OPSGENIE_ACCOUNT = OpsgenieAccountType("opsgenie-account") diff --git a/src/datadog_api_client/v2/model/opsgenie_account_update_attributes.py b/src/datadog_api_client/v2/model/opsgenie_account_update_attributes.py new file mode 100644 index 0000000000..98c352f0fe --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_update_attributes.py @@ -0,0 +1,60 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_service_region_type import OpsgenieServiceRegionType + + +class OpsgenieAccountUpdateAttributes(ModelNormal): + validations = { + "api_key": { + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_service_region_type import OpsgenieServiceRegionType + + return { + "api_key": (str,), + "region": (OpsgenieServiceRegionType,), + } + + attribute_map = { + "api_key": "api_key", + "region": "region", + } + + def __init__( + self_, + api_key: Union[str, UnsetType] = unset, + region: Union[OpsgenieServiceRegionType, UnsetType] = unset, + **kwargs, + ): + """ + The Opsgenie account attributes for an update request. + + :param api_key: The Opsgenie API key for your Opsgenie account. + :type api_key: str, optional + + :param region: The region for the Opsgenie service. + :type region: OpsgenieServiceRegionType, optional + """ + if api_key is not unset: + kwargs["api_key"] = api_key + if region is not unset: + kwargs["region"] = region + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/opsgenie_account_update_data.py b/src/datadog_api_client/v2/model/opsgenie_account_update_data.py new file mode 100644 index 0000000000..3fd4c9db75 --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_update_data.py @@ -0,0 +1,61 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_account_update_attributes import OpsgenieAccountUpdateAttributes + from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType + + +class OpsgenieAccountUpdateData(ModelNormal): + validations = { + "id": { + "max_length": 100, + "min_length": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_account_update_attributes import OpsgenieAccountUpdateAttributes + from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType + + return { + "attributes": (OpsgenieAccountUpdateAttributes,), + "id": (str,), + "type": (OpsgenieAccountType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: OpsgenieAccountUpdateAttributes, id: str, type: OpsgenieAccountType, **kwargs): + """ + Opsgenie account data for an update request. + + :param attributes: The Opsgenie account attributes for an update request. + :type attributes: OpsgenieAccountUpdateAttributes + + :param id: The ID of the Opsgenie account. + :type id: str + + :param type: Opsgenie account resource type. + :type type: OpsgenieAccountType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/opsgenie_account_update_request.py b/src/datadog_api_client/v2/model/opsgenie_account_update_request.py new file mode 100644 index 0000000000..28504116fa --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_account_update_request.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_account_update_data import OpsgenieAccountUpdateData + + +class OpsgenieAccountUpdateRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_account_update_data import OpsgenieAccountUpdateData + + return { + "data": (OpsgenieAccountUpdateData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: OpsgenieAccountUpdateData, **kwargs): + """ + Update request for an Opsgenie account. + + :param data: Opsgenie account data for an update request. + :type data: OpsgenieAccountUpdateData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/opsgenie_accounts_response.py b/src/datadog_api_client/v2/model/opsgenie_accounts_response.py new file mode 100644 index 0000000000..0962dd5dcd --- /dev/null +++ b/src/datadog_api_client/v2/model/opsgenie_accounts_response.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.opsgenie_account_response_data import OpsgenieAccountResponseData + + +class OpsgenieAccountsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.opsgenie_account_response_data import OpsgenieAccountResponseData + + return { + "data": ([OpsgenieAccountResponseData],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[OpsgenieAccountResponseData], **kwargs): + """ + Response with a list of Opsgenie accounts. + + :param data: An array of Opsgenie accounts. + :type data: [OpsgenieAccountResponseData] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index cea5bec21d..b7f6dd1d12 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -5364,6 +5364,17 @@ from datadog_api_client.v2.model.open_ai_integration_update import OpenAIIntegrationUpdate from datadog_api_client.v2.model.open_api_endpoint import OpenAPIEndpoint from datadog_api_client.v2.model.open_api_file import OpenAPIFile +from datadog_api_client.v2.model.opsgenie_account_create_attributes import OpsgenieAccountCreateAttributes +from datadog_api_client.v2.model.opsgenie_account_create_data import OpsgenieAccountCreateData +from datadog_api_client.v2.model.opsgenie_account_create_request import OpsgenieAccountCreateRequest +from datadog_api_client.v2.model.opsgenie_account_response import OpsgenieAccountResponse +from datadog_api_client.v2.model.opsgenie_account_response_attributes import OpsgenieAccountResponseAttributes +from datadog_api_client.v2.model.opsgenie_account_response_data import OpsgenieAccountResponseData +from datadog_api_client.v2.model.opsgenie_account_type import OpsgenieAccountType +from datadog_api_client.v2.model.opsgenie_account_update_attributes import OpsgenieAccountUpdateAttributes +from datadog_api_client.v2.model.opsgenie_account_update_data import OpsgenieAccountUpdateData +from datadog_api_client.v2.model.opsgenie_account_update_request import OpsgenieAccountUpdateRequest +from datadog_api_client.v2.model.opsgenie_accounts_response import OpsgenieAccountsResponse from datadog_api_client.v2.model.opsgenie_service_create_attributes import OpsgenieServiceCreateAttributes from datadog_api_client.v2.model.opsgenie_service_create_data import OpsgenieServiceCreateData from datadog_api_client.v2.model.opsgenie_service_create_request import OpsgenieServiceCreateRequest @@ -12240,6 +12251,17 @@ "OpenAIIntegrationUpdate", "OpenAPIEndpoint", "OpenAPIFile", + "OpsgenieAccountCreateAttributes", + "OpsgenieAccountCreateData", + "OpsgenieAccountCreateRequest", + "OpsgenieAccountResponse", + "OpsgenieAccountResponseAttributes", + "OpsgenieAccountResponseData", + "OpsgenieAccountType", + "OpsgenieAccountUpdateAttributes", + "OpsgenieAccountUpdateData", + "OpsgenieAccountUpdateRequest", + "OpsgenieAccountsResponse", "OpsgenieServiceCreateAttributes", "OpsgenieServiceCreateData", "OpsgenieServiceCreateRequest", diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 7139a86ede..41a3abc9b5 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -674,6 +674,18 @@ "tag": "Microsoft Teams Integration", "operationId": "CreateWorkflowsWebhookHandle" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"api_key\": \"00000000-0000-0000-0000-000000000000\",\n \"region\": \"us\"\n },\n \"type\": \"opsgenie-account\"\n }\n}" + } + ], + "step": "there is a valid \"opsgenie_account\" in the system", + "key": "opsgenie_account", + "tag": "Opsgenie Integration", + "operationId": "CreateOpsgenieAccount" + }, { "parameters": [ { diff --git a/tests/v2/features/opsgenie_integration.feature b/tests/v2/features/opsgenie_integration.feature index 5df3907ac0..453d4a3027 100644 --- a/tests/v2/features/opsgenie_integration.feature +++ b/tests/v2/features/opsgenie_integration.feature @@ -9,6 +9,20 @@ Feature: Opsgenie Integration And a valid "appKeyAuth" key in the system And an instance of "OpsgenieIntegration" API + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Create a new Opsgenie account returns "Bad Request" response + Given new "CreateOpsgenieAccount" request + And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "type": "opsgenie-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Create a new Opsgenie account returns "CREATED" response + Given new "CreateOpsgenieAccount" request + And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "type": "opsgenie-account"}} + When the request is sent + Then the response status is 201 CREATED + @skip @team:Datadog/collaboration-integrations Scenario: Create a new service object returns "Bad Request" response Given new "CreateOpsgenieService" request @@ -54,6 +68,27 @@ Feature: Opsgenie Integration When the request is sent Then the response status is 204 OK + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Delete an Opsgenie account returns "Bad Request" response + Given new "DeleteOpsgenieAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Delete an Opsgenie account returns "Not Found" response + Given new "DeleteOpsgenieAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Delete an Opsgenie account returns "OK" response + Given new "DeleteOpsgenieAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 OK + @generated @skip @team:Datadog/collaboration-integrations Scenario: Get a single service object returns "Bad Request" response Given new "GetOpsgenieService" request @@ -85,6 +120,12 @@ Feature: Opsgenie Integration And the response "data.attributes.name" has the same value as "opsgenie_service.data.attributes.name" And the response "data.attributes.region" is equal to "us" + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Get all Opsgenie accounts returns "OK" response + Given new "ListOpsgenieAccounts" request + When the request is sent + Then the response status is 200 OK + @team:Datadog/collaboration-integrations Scenario: Get all service objects returns "OK" response Given there is a valid "opsgenie_service" in the system @@ -127,3 +168,35 @@ Feature: Opsgenie Integration Then the response status is 200 OK And the response "data.attributes.name" is equal to "{{ opsgenie_service.data.attributes.name }}--updated" And the response "data.attributes.region" is equal to "eu" + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Update an Opsgenie account returns "Bad Request" response + Given new "UpdateOpsgenieAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-account"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Update an Opsgenie account returns "Not Found" response + Given new "UpdateOpsgenieAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-account"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Update an Opsgenie account returns "OK" response + Given new "UpdateOpsgenieAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-account"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/collaboration-integrations + Scenario: Update an Opsgenie account returns "The server cannot process the request because it contains invalid data." response + Given new "UpdateOpsgenieAccount" request + And request contains "account_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"api_key": "00000000-0000-0000-0000-000000000000", "region": "us"}, "id": "596da4af-0563-4097-90ff-07230c3f9db3", "type": "opsgenie-account"}} + When the request is sent + Then the response status is 422 The server cannot process the request because it contains invalid data. diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index b6003df868..e16c17893f 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -3456,6 +3456,37 @@ "type": "idempotent" } }, + "ListOpsgenieAccounts": { + "tag": "Opsgenie Integration", + "undo": { + "type": "safe" + } + }, + "CreateOpsgenieAccount": { + "tag": "Opsgenie Integration", + "undo": { + "operationId": "DeleteOpsgenieAccount", + "parameters": [ + { + "name": "account_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteOpsgenieAccount": { + "tag": "Opsgenie Integration", + "undo": { + "type": "idempotent" + } + }, + "UpdateOpsgenieAccount": { + "tag": "Opsgenie Integration", + "undo": { + "type": "idempotent" + } + }, "ListOpsgenieServices": { "tag": "Opsgenie Integration", "undo": {