Skip to content

Commit

Permalink
Regenerate client from commit 52d61f02 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Oct 6, 2023
1 parent 6b9ed5a commit 9ebc6eb
Show file tree
Hide file tree
Showing 22 changed files with 935 additions and 37 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-05 20:05:40.670859",
"spec_repo_commit": "f7a95272"
"regenerated": "2023-10-06 18:50:52.443018",
"spec_repo_commit": "52d61f02"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-05 20:05:40.684801",
"spec_repo_commit": "f7a95272"
"regenerated": "2023-10-06 18:50:52.463981",
"spec_repo_commit": "52d61f02"
}
}
}
176 changes: 176 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14994,18 +14994,21 @@ components:
- $ref: '#/components/schemas/ServiceDefinitionV1'
- $ref: '#/components/schemas/ServiceDefinitionV2'
- $ref: '#/components/schemas/ServiceDefinitionV2Dot1'
- $ref: '#/components/schemas/ServiceDefinitionV2Dot2'
type: object
ServiceDefinitionSchemaVersions:
description: Schema versions
enum:
- v1
- v2
- v2.1
- v2.2
type: string
x-enum-varnames:
- V1
- V2
- V2_1
- V2_2
ServiceDefinitionV1:
deprecated: true
description: Deprecated - Service definition V1 for providing additional service
Expand Down Expand Up @@ -15466,6 +15469,178 @@ components:
type: string
x-enum-varnames:
- V2_1
ServiceDefinitionV2Dot2:
description: Service definition v2.2 for providing service metadata and integrations.
properties:
application:
description: Identifier for a group of related services serving a product
feature, which the service is a part of.
example: my-app
type: string
contacts:
description: A list of contacts related to the services.
items:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Contact'
type: array
dd-service:
description: Unique identifier of the service. Must be unique across all
services and is used to match with a service in Datadog.
example: my-service
type: string
description:
description: A short description of the service.
example: My service description
type: string
extensions:
additionalProperties: {}
description: Extensions to v2.2 schema.
example:
myorg/extension: extensionValue
type: object
integrations:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Integrations'
langauges:
description: The service's programming language. See example for a list
of recognizable languages.
example:
- dotnet
- go
- java
- js
- php
- python
- ruby
- c++
items:
type: string
type: array
lifecycle:
description: The current life cycle phase of the service.
example: sandbox
type: string
links:
description: A list of links related to the services.
items:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Link'
type: array
schema-version:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Version'
service-type:
description: The type of service. See example for a list of recognizable
service types.
example: '''database'', ''cache'', ''function'', ''web'', ''browser'', ''mobile'''
type: string
tags:
description: A set of custom tags.
example:
- my:tag
- service:tag
items:
type: string
type: array
team:
description: Team that owns the service. It is used to locate a team defined
in Datadog Teams if it exists.
example: my-team
type: string
tier:
description: Importance of the service.
example: High
type: string
required:
- schema-version
- dd-service
type: object
ServiceDefinitionV2Dot2Contact:
description: Service owner's contacts information.
properties:
contact:
description: Contact value.
example: https://teams.microsoft.com/myteam
type: string
name:
description: Contact Name.
example: My team channel
type: string
type:
description: Contact type. See example for a list of recognizable types.
example: '''email'', ''slack'', ''microsoft-teams'''
type: string
required:
- type
- contact
type: object
ServiceDefinitionV2Dot2Integrations:
description: Third party integrations that Datadog supports.
properties:
opsgenie:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Opsgenie'
pagerduty:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2Pagerduty'
type: object
ServiceDefinitionV2Dot2Link:
description: Service's external links.
properties:
name:
description: Link name.
example: Runbook
type: string
provider:
description: Link provider.
example: Github
type: string
type:
description: Link type. See example for a list of recognizable types.
example: '''runbook'', ''doc'', ''repo'', ''dashboard'', ''other'''
type: string
url:
description: Link URL.
example: https://my-runbook
type: string
required:
- name
- type
- url
type: object
ServiceDefinitionV2Dot2Opsgenie:
description: Opsgenie integration for the service.
properties:
region:
$ref: '#/components/schemas/ServiceDefinitionV2Dot2OpsgenieRegion'
service-url:
description: Opsgenie service url.
example: https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000
type: string
required:
- service-url
type: object
ServiceDefinitionV2Dot2OpsgenieRegion:
description: Opsgenie instance region.
enum:
- US
- EU
example: US
type: string
x-enum-varnames:
- US
- EU
ServiceDefinitionV2Dot2Pagerduty:
description: PagerDuty integration for the service.
properties:
service-url:
description: PagerDuty service url.
example: https://my-org.pagerduty.com/service-directory/PMyService
type: string
type: object
ServiceDefinitionV2Dot2Version:
default: v2.2
description: Schema version being used.
enum:
- v2.2
example: v2.2
type: string
x-enum-varnames:
- V2_2
ServiceDefinitionV2Email:
description: Service owner's email.
properties:
Expand Down Expand Up @@ -15649,6 +15824,7 @@ components:
ServiceDefinitionsCreateRequest:
description: Create service definitions request.
oneOf:
- $ref: '#/components/schemas/ServiceDefinitionV2Dot2'
- $ref: '#/components/schemas/ServiceDefinitionV2Dot1'
- $ref: '#/components/schemas/ServiceDefinitionV2'
- $ref: '#/components/schemas/ServiceDefinitionRaw'
Expand Down
49 changes: 49 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6875,6 +6875,55 @@ service\_definition\_v2\_dot1\_slack\_type
:members:
:show-inheritance:

service\_definition\_v2\_dot2
-----------------------------

.. automodule:: datadog_api_client.v2.model.service_definition_v2_dot2
:members:
:show-inheritance:

service\_definition\_v2\_dot2\_contact
--------------------------------------

.. automodule:: datadog_api_client.v2.model.service_definition_v2_dot2_contact
:members:
:show-inheritance:

service\_definition\_v2\_dot2\_integrations
-------------------------------------------

.. automodule:: datadog_api_client.v2.model.service_definition_v2_dot2_integrations
:members:
:show-inheritance:

service\_definition\_v2\_dot2\_link
-----------------------------------

.. automodule:: datadog_api_client.v2.model.service_definition_v2_dot2_link
:members:
:show-inheritance:

service\_definition\_v2\_dot2\_opsgenie
---------------------------------------

.. automodule:: datadog_api_client.v2.model.service_definition_v2_dot2_opsgenie
:members:
:show-inheritance:

service\_definition\_v2\_dot2\_opsgenie\_region
-----------------------------------------------

.. automodule:: datadog_api_client.v2.model.service_definition_v2_dot2_opsgenie_region
:members:
:show-inheritance:

service\_definition\_v2\_dot2\_pagerduty
----------------------------------------

.. automodule:: datadog_api_client.v2.model.service_definition_v2_dot2_pagerduty
:members:
:show-inheritance:

service\_definition\_v2\_email
------------------------------

Expand Down
53 changes: 31 additions & 22 deletions examples/v2/service-definition/CreateOrUpdateServiceDefinitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,57 @@

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.service_definition_api import ServiceDefinitionApi
from datadog_api_client.v2.model.service_definition_v2_dot1 import ServiceDefinitionV2Dot1
from datadog_api_client.v2.model.service_definition_v2_dot1_email import ServiceDefinitionV2Dot1Email
from datadog_api_client.v2.model.service_definition_v2_dot1_email_type import ServiceDefinitionV2Dot1EmailType
from datadog_api_client.v2.model.service_definition_v2_dot1_integrations import ServiceDefinitionV2Dot1Integrations
from datadog_api_client.v2.model.service_definition_v2_dot1_link import ServiceDefinitionV2Dot1Link
from datadog_api_client.v2.model.service_definition_v2_dot1_link_type import ServiceDefinitionV2Dot1LinkType
from datadog_api_client.v2.model.service_definition_v2_dot1_opsgenie import ServiceDefinitionV2Dot1Opsgenie
from datadog_api_client.v2.model.service_definition_v2_dot1_opsgenie_region import ServiceDefinitionV2Dot1OpsgenieRegion
from datadog_api_client.v2.model.service_definition_v2_dot1_pagerduty import ServiceDefinitionV2Dot1Pagerduty
from datadog_api_client.v2.model.service_definition_v2_dot1_version import ServiceDefinitionV2Dot1Version
from datadog_api_client.v2.model.service_definition_v2_dot2 import ServiceDefinitionV2Dot2
from datadog_api_client.v2.model.service_definition_v2_dot2_contact import ServiceDefinitionV2Dot2Contact
from datadog_api_client.v2.model.service_definition_v2_dot2_integrations import ServiceDefinitionV2Dot2Integrations
from datadog_api_client.v2.model.service_definition_v2_dot2_link import ServiceDefinitionV2Dot2Link
from datadog_api_client.v2.model.service_definition_v2_dot2_opsgenie import ServiceDefinitionV2Dot2Opsgenie
from datadog_api_client.v2.model.service_definition_v2_dot2_opsgenie_region import ServiceDefinitionV2Dot2OpsgenieRegion
from datadog_api_client.v2.model.service_definition_v2_dot2_pagerduty import ServiceDefinitionV2Dot2Pagerduty
from datadog_api_client.v2.model.service_definition_v2_dot2_version import ServiceDefinitionV2Dot2Version

body = ServiceDefinitionV2Dot1(
body = ServiceDefinitionV2Dot2(
application="my-app",
contacts=[
ServiceDefinitionV2Dot1Email(
contact="contact@datadoghq.com",
name="Team Email",
type=ServiceDefinitionV2Dot1EmailType.EMAIL,
ServiceDefinitionV2Dot2Contact(
contact="https://teams.microsoft.com/myteam",
name="My team channel",
type="'email', 'slack', 'microsoft-teams'",
),
],
dd_service="my-service",
description="My service description",
extensions=dict([("myorg/extension", "extensionValue")]),
integrations=ServiceDefinitionV2Dot1Integrations(
opsgenie=ServiceDefinitionV2Dot1Opsgenie(
region=ServiceDefinitionV2Dot1OpsgenieRegion.US,
integrations=ServiceDefinitionV2Dot2Integrations(
opsgenie=ServiceDefinitionV2Dot2Opsgenie(
region=ServiceDefinitionV2Dot2OpsgenieRegion.US,
service_url="https://my-org.opsgenie.com/service/123e4567-e89b-12d3-a456-426614174000",
),
pagerduty=ServiceDefinitionV2Dot1Pagerduty(
pagerduty=ServiceDefinitionV2Dot2Pagerduty(
service_url="https://my-org.pagerduty.com/service-directory/PMyService",
),
),
langauges=[
"dotnet",
"go",
"java",
"js",
"php",
"python",
"ruby",
"c++",
],
lifecycle="sandbox",
links=[
ServiceDefinitionV2Dot1Link(
ServiceDefinitionV2Dot2Link(
name="Runbook",
provider="Github",
type=ServiceDefinitionV2Dot1LinkType.RUNBOOK,
type="'runbook', 'doc', 'repo', 'dashboard', 'other'",
url="https://my-runbook",
),
],
schema_version=ServiceDefinitionV2Dot1Version.V2_1,
schema_version=ServiceDefinitionV2Dot2Version.V2_2,
service_type="'database', 'cache', 'function', 'web', 'browser', 'mobile'",
tags=[
"my:tag",
"service:tag",
Expand Down
Loading

0 comments on commit 9ebc6eb

Please sign in to comment.