Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 7 additions & 95 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71337,32 +71337,6 @@ components:
required:
- data
type: object
MonitorConfigPolicyDowntimePolicy:
additionalProperties: false
description: Downtime duration attributes of a monitor configuration policy.
properties:
max_duration_ms:
description: The maximum allowed downtime duration, in milliseconds.
example: 3600000
format: int64
minimum: 1
type: integer
required:
- max_duration_ms
type: object
MonitorConfigPolicyDowntimePolicyCreateRequest:
additionalProperties: false
description: Downtime duration attributes of a monitor configuration policy.
properties:
max_duration_ms:
description: The maximum allowed downtime duration, in milliseconds.
example: 3600000
format: int64
minimum: 1
type: integer
required:
- max_duration_ms
type: object
MonitorConfigPolicyEditData:
description: A monitor configuration policy data.
properties:
Expand Down Expand Up @@ -71400,12 +71374,10 @@ components:
description: Configuration for the policy.
oneOf:
- $ref: "#/components/schemas/MonitorConfigPolicyTagPolicy"
- $ref: "#/components/schemas/MonitorConfigPolicyDowntimePolicy"
MonitorConfigPolicyPolicyCreateRequest:
description: Configuration for the policy.
oneOf:
- $ref: "#/components/schemas/MonitorConfigPolicyTagPolicyCreateRequest"
- $ref: "#/components/schemas/MonitorConfigPolicyDowntimePolicyCreateRequest"
MonitorConfigPolicyResourceType:
default: monitor-config-policy
description: Monitor configuration policy resource type.
Expand Down Expand Up @@ -71434,7 +71406,6 @@ components:
$ref: "#/components/schemas/MonitorConfigPolicyResourceType"
type: object
MonitorConfigPolicyTagPolicy:
additionalProperties: false
description: Tag attributes of a monitor configuration policy.
properties:
tag_key:
Expand All @@ -71456,7 +71427,6 @@ components:
type: array
type: object
MonitorConfigPolicyTagPolicyCreateRequest:
additionalProperties: false
description: Tag attributes of a monitor configuration policy.
properties:
tag_key:
Expand All @@ -71483,18 +71453,13 @@ components:
type: object
MonitorConfigPolicyType:
default: tag
description: |-
The monitor configuration policy type.
`tag` enforces required tags on monitors.
`downtime` sets a maximum downtime duration for the organization.
description: The monitor configuration policy type.
enum:
- tag
- downtime
example: "tag"
type: string
x-enum-varnames:
- TAG
- DOWNTIME
MonitorDowntimeMatchResourceType:
default: downtime_match
description: Monitor Downtime Match resource type.
Expand Down Expand Up @@ -168187,6 +168152,7 @@ paths:
- manage_integrations
/api/v2/integration/salesforce-incidents/incident-templates:
get:
deprecated: true
description: Get all Salesforce incident templates configured for your organization.
operationId: GetIncidentTemplates
responses:
Expand Down Expand Up @@ -168221,6 +168187,7 @@ paths:
permissions:
- integrations_read
post:
deprecated: true
description: |-
Create a new Salesforce incident template for your organization. Template
names must be unique within an organization.
Expand Down Expand Up @@ -168284,6 +168251,7 @@ paths:
- manage_integrations
/api/v2/integration/salesforce-incidents/incident-templates/{incident_template_id}:
delete:
deprecated: true
description: Delete a single Salesforce incident template from your organization.
operationId: DeleteIncidentTemplate
parameters:
Expand All @@ -168305,6 +168273,7 @@ paths:
permissions:
- manage_integrations
patch:
deprecated: true
description: Update a single Salesforce incident template in your organization.
operationId: UpdateIncidentTemplate
parameters:
Expand Down Expand Up @@ -168364,6 +168333,7 @@ paths:
- manage_integrations
/api/v2/integration/salesforce-incidents/organizations:
get:
deprecated: true
description: |-
Get all Salesforce organizations connected to your Datadog organization
through the Salesforce integration. Salesforce organizations are connected
Expand Down Expand Up @@ -168404,6 +168374,7 @@ paths:
- integrations_read
/api/v2/integration/salesforce-incidents/organizations/{salesforce_org_id}:
delete:
deprecated: true
description: |-
Disconnect a Salesforce organization from your Datadog organization.
This also deletes any incident templates referencing the organization.
Expand Down Expand Up @@ -182142,16 +182113,6 @@ paths:
policy_type: tag
id: "00000000-0000-1234-0000-000000000000"
type: monitor-config-policy
downtime:
summary: Downtime duration policy
value:
data:
- attributes:
policy:
max_duration_ms: 3600000
policy_type: downtime
id: "00000000-0000-1234-0000-000000000000"
type: monitor-config-policy
schema:
$ref: "#/components/schemas/MonitorConfigPolicyListResponse"
description: OK
Expand Down Expand Up @@ -182194,15 +182155,6 @@ paths:
- staging
policy_type: tag
type: monitor-config-policy
downtime:
summary: Downtime duration policy
value:
data:
attributes:
policy:
max_duration_ms: 3600000
policy_type: downtime
type: monitor-config-policy
schema:
$ref: "#/components/schemas/MonitorConfigPolicyCreateRequest"
description: Create a monitor configuration policy request body.
Expand All @@ -182225,16 +182177,6 @@ paths:
policy_type: tag
id: "00000000-0000-1234-0000-000000000000"
type: monitor-config-policy
downtime:
summary: Downtime duration policy
value:
data:
attributes:
policy:
max_duration_ms: 3600000
policy_type: downtime
id: "00000000-0000-1234-0000-000000000000"
type: monitor-config-policy
schema:
$ref: "#/components/schemas/MonitorConfigPolicyResponse"
description: OK
Expand Down Expand Up @@ -182331,16 +182273,6 @@ paths:
policy_type: tag
id: "00000000-0000-1234-0000-000000000000"
type: monitor-config-policy
downtime:
summary: Downtime duration policy
value:
data:
attributes:
policy:
max_duration_ms: 3600000
policy_type: downtime
id: "00000000-0000-1234-0000-000000000000"
type: monitor-config-policy
schema:
$ref: "#/components/schemas/MonitorConfigPolicyResponse"
description: OK
Expand Down Expand Up @@ -182398,16 +182330,6 @@ paths:
policy_type: tag
id: 00000000-0000-1234-0000-000000000000
type: monitor-config-policy
downtime:
summary: Downtime duration policy
value:
data:
attributes:
policy:
max_duration_ms: 3600000
policy_type: downtime
id: 00000000-0000-1234-0000-000000000000
type: monitor-config-policy
schema:
$ref: "#/components/schemas/MonitorConfigPolicyEditRequest"
description: Description of the update.
Expand All @@ -182430,16 +182352,6 @@ paths:
policy_type: tag
id: "00000000-0000-1234-0000-000000000000"
type: monitor-config-policy
downtime:
summary: Downtime duration policy
value:
data:
attributes:
policy:
max_duration_ms: 3600000
policy_type: downtime
id: "00000000-0000-1234-0000-000000000000"
type: monitor-config-policy
schema:
$ref: "#/components/schemas/MonitorConfigPolicyResponse"
description: OK
Expand Down
35 changes: 0 additions & 35 deletions examples/v2/monitors/CreateMonitorConfigPolicy_1934105875.py

This file was deleted.

19 changes: 13 additions & 6 deletions src/datadog_api_client/v2/api/salesforce_integration_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import annotations

from typing import Any, Dict
import warnings

from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
from datadog_api_client.configuration import Configuration
Expand Down Expand Up @@ -159,7 +160,7 @@ def create_incident_template(
self,
body: SalesforceIncidentsTemplateCreateRequest,
) -> SalesforceIncidentsTemplateResponse:
"""Create a Salesforce incident template.
"""Create a Salesforce incident template. **Deprecated**.

Create a new Salesforce incident template for your organization. Template
names must be unique within an organization.
Expand All @@ -171,13 +172,14 @@ def create_incident_template(
kwargs: Dict[str, Any] = {}
kwargs["body"] = body

warnings.warn("create_incident_template is deprecated", DeprecationWarning, stacklevel=2)
return self._create_incident_template_endpoint.call_with_http_info(**kwargs)

def delete_incident_template(
self,
incident_template_id: str,
) -> None:
"""Delete a Salesforce incident template.
"""Delete a Salesforce incident template. **Deprecated**.

Delete a single Salesforce incident template from your organization.

Expand All @@ -188,13 +190,14 @@ def delete_incident_template(
kwargs: Dict[str, Any] = {}
kwargs["incident_template_id"] = incident_template_id

warnings.warn("delete_incident_template is deprecated", DeprecationWarning, stacklevel=2)
return self._delete_incident_template_endpoint.call_with_http_info(**kwargs)

def delete_salesforce_organization(
self,
salesforce_org_id: str,
) -> None:
"""Delete a connected Salesforce organization.
"""Delete a connected Salesforce organization. **Deprecated**.

Disconnect a Salesforce organization from your Datadog organization.
This also deletes any incident templates referencing the organization.
Expand All @@ -206,24 +209,26 @@ def delete_salesforce_organization(
kwargs: Dict[str, Any] = {}
kwargs["salesforce_org_id"] = salesforce_org_id

warnings.warn("delete_salesforce_organization is deprecated", DeprecationWarning, stacklevel=2)
return self._delete_salesforce_organization_endpoint.call_with_http_info(**kwargs)

def get_incident_templates(
self,
) -> SalesforceIncidentsTemplatesResponse:
"""Get all Salesforce incident templates.
"""Get all Salesforce incident templates. **Deprecated**.

Get all Salesforce incident templates configured for your organization.

:rtype: SalesforceIncidentsTemplatesResponse
"""
kwargs: Dict[str, Any] = {}
warnings.warn("get_incident_templates is deprecated", DeprecationWarning, stacklevel=2)
return self._get_incident_templates_endpoint.call_with_http_info(**kwargs)

def get_salesforce_organizations(
self,
) -> SalesforceIncidentsOrganizationsResponse:
"""Get all connected Salesforce organizations.
"""Get all connected Salesforce organizations. **Deprecated**.

Get all Salesforce organizations connected to your Datadog organization
through the Salesforce integration. Salesforce organizations are connected
Expand All @@ -232,14 +237,15 @@ def get_salesforce_organizations(
:rtype: SalesforceIncidentsOrganizationsResponse
"""
kwargs: Dict[str, Any] = {}
warnings.warn("get_salesforce_organizations is deprecated", DeprecationWarning, stacklevel=2)
return self._get_salesforce_organizations_endpoint.call_with_http_info(**kwargs)

def update_incident_template(
self,
incident_template_id: str,
body: SalesforceIncidentsTemplateUpdateRequest,
) -> SalesforceIncidentsTemplateResponse:
"""Update a Salesforce incident template.
"""Update a Salesforce incident template. **Deprecated**.

Update a single Salesforce incident template in your organization.

Expand All @@ -254,4 +260,5 @@ def update_incident_template(

kwargs["body"] = body

warnings.warn("update_incident_template is deprecated", DeprecationWarning, stacklevel=2)
return self._update_incident_template_endpoint.call_with_http_info(**kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
from datadog_api_client.v2.model.monitor_config_policy_tag_policy_create_request import (
MonitorConfigPolicyTagPolicyCreateRequest,
)
from datadog_api_client.v2.model.monitor_config_policy_downtime_policy_create_request import (
MonitorConfigPolicyDowntimePolicyCreateRequest,
)


class MonitorConfigPolicyAttributeCreateRequest(ModelNormal):
Expand All @@ -44,11 +41,7 @@ def openapi_types(_):

def __init__(
self_,
policy: Union[
MonitorConfigPolicyPolicyCreateRequest,
MonitorConfigPolicyTagPolicyCreateRequest,
MonitorConfigPolicyDowntimePolicyCreateRequest,
],
policy: Union[MonitorConfigPolicyPolicyCreateRequest, MonitorConfigPolicyTagPolicyCreateRequest],
policy_type: MonitorConfigPolicyType,
**kwargs,
):
Expand All @@ -59,8 +52,6 @@ def __init__(
:type policy: MonitorConfigPolicyPolicyCreateRequest

:param policy_type: The monitor configuration policy type.
``tag`` enforces required tags on monitors.
``downtime`` sets a maximum downtime duration for the organization.
:type policy_type: MonitorConfigPolicyType
"""
super().__init__(kwargs)
Expand Down
Loading
Loading