Skip to content

Commit

Permalink
Regenerate client from commit 9e6bd448 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 4, 2024
1 parent d58f88a commit 7c23d90
Show file tree
Hide file tree
Showing 27 changed files with 202 additions and 64 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": "2024-01-04 15:18:08.876360",
"spec_repo_commit": "e7cfa56f"
"regenerated": "2024-01-04 20:38:29.191872",
"spec_repo_commit": "9e6bd448"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-04 15:18:08.899971",
"spec_repo_commit": "e7cfa56f"
"regenerated": "2024-01-04 20:38:29.214072",
"spec_repo_commit": "9e6bd448"
}
}
}
48 changes: 48 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3776,6 +3776,22 @@ components:
description: The name of the Cloudflare account.
example: test-name
type: string
resources:
description: An allowlist of resources to restrict pulling metrics for.
example:
- web
- dns
items:
type: string
type: array
zones:
description: An allowlist of zones to restrict pulling metrics for.
example:
- zone_id_1
- zone_id_2
items:
type: string
type: array
required:
- api_key
- name
Expand Down Expand Up @@ -3808,6 +3824,22 @@ components:
description: The name of the Cloudflare account.
example: test-name
type: string
resources:
description: An allowlist of resources to restrict pulling metrics for.
example:
- web
- dns
items:
type: string
type: array
zones:
description: An allowlist of zones to restrict pulling metrics for.
example:
- zone_id_1
- zone_id_2
items:
type: string
type: array
required:
- name
type: object
Expand Down Expand Up @@ -3856,6 +3888,22 @@ components:
key is provided (and not a token), this field is also required.
example: test-email@example.com
type: string
resources:
description: An allowlist of resources to restrict pulling metrics for.
example:
- web
- dns
items:
type: string
type: array
zones:
description: An allowlist of zones to restrict pulling metrics for.
example:
- zone_id_1
- zone_id_2
items:
type: string
type: array
required:
- api_key
type: object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
data=CloudflareAccountCreateRequestData(
attributes=CloudflareAccountCreateRequestAttributes(
api_key="fakekey",
email="new@email",
email="dev@datadoghq.com",
name="examplecloudflareintegration",
),
type=CloudflareAccountType.CLOUDFLARE_ACCOUNTS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
data=CloudflareAccountUpdateRequestData(
attributes=CloudflareAccountUpdateRequestAttributes(
api_key="fakekey",
email="new@email",
email="dev@datadoghq.com",
zones=[
"zone-id-3",
],
),
type=CloudflareAccountType.CLOUDFLARE_ACCOUNTS,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union
from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -20,15 +20,27 @@ def openapi_types(_):
"api_key": (str,),
"email": (str,),
"name": (str,),
"resources": ([str],),
"zones": ([str],),
}

attribute_map = {
"api_key": "api_key",
"email": "email",
"name": "name",
"resources": "resources",
"zones": "zones",
}

def __init__(self_, api_key: str, name: str, email: Union[str, UnsetType] = unset, **kwargs):
def __init__(
self_,
api_key: str,
name: str,
email: Union[str, UnsetType] = unset,
resources: Union[List[str], UnsetType] = unset,
zones: Union[List[str], UnsetType] = unset,
**kwargs,
):
"""
Attributes object for creating a Cloudflare account.
Expand All @@ -40,9 +52,19 @@ def __init__(self_, api_key: str, name: str, email: Union[str, UnsetType] = unse
:param name: The name of the Cloudflare account.
:type name: str
:param resources: An allowlist of resources to restrict pulling metrics for.
:type resources: [str], optional
:param zones: An allowlist of zones to restrict pulling metrics for.
:type zones: [str], optional
"""
if email is not unset:
kwargs["email"] = email
if resources is not unset:
kwargs["resources"] = resources
if zones is not unset:
kwargs["zones"] = zones
super().__init__(kwargs)

self_.api_key = api_key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union
from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -19,14 +19,25 @@ def openapi_types(_):
return {
"email": (str,),
"name": (str,),
"resources": ([str],),
"zones": ([str],),
}

attribute_map = {
"email": "email",
"name": "name",
"resources": "resources",
"zones": "zones",
}

def __init__(self_, name: str, email: Union[str, UnsetType] = unset, **kwargs):
def __init__(
self_,
name: str,
email: Union[str, UnsetType] = unset,
resources: Union[List[str], UnsetType] = unset,
zones: Union[List[str], UnsetType] = unset,
**kwargs,
):
"""
Attributes object of a Cloudflare account.
Expand All @@ -35,9 +46,19 @@ def __init__(self_, name: str, email: Union[str, UnsetType] = unset, **kwargs):
:param name: The name of the Cloudflare account.
:type name: str
:param resources: An allowlist of resources to restrict pulling metrics for.
:type resources: [str], optional
:param zones: An allowlist of zones to restrict pulling metrics for.
:type zones: [str], optional
"""
if email is not unset:
kwargs["email"] = email
if resources is not unset:
kwargs["resources"] = resources
if zones is not unset:
kwargs["zones"] = zones
super().__init__(kwargs)

self_.name = name
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union
from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -19,14 +19,25 @@ def openapi_types(_):
return {
"api_key": (str,),
"email": (str,),
"resources": ([str],),
"zones": ([str],),
}

attribute_map = {
"api_key": "api_key",
"email": "email",
"resources": "resources",
"zones": "zones",
}

def __init__(self_, api_key: str, email: Union[str, UnsetType] = unset, **kwargs):
def __init__(
self_,
api_key: str,
email: Union[str, UnsetType] = unset,
resources: Union[List[str], UnsetType] = unset,
zones: Union[List[str], UnsetType] = unset,
**kwargs,
):
"""
Attributes object for updating a Cloudflare account.
Expand All @@ -35,9 +46,19 @@ def __init__(self_, api_key: str, email: Union[str, UnsetType] = unset, **kwargs
:param email: The email associated with the Cloudflare account. If an API key is provided (and not a token), this field is also required.
:type email: str, optional
:param resources: An allowlist of resources to restrict pulling metrics for.
:type resources: [str], optional
:param zones: An allowlist of zones to restrict pulling metrics for.
:type zones: [str], optional
"""
if email is not unset:
kwargs["email"] = email
if resources is not unset:
kwargs["resources"] = resources
if zones is not unset:
kwargs["zones"] = zones
super().__init__(kwargs)

self_.api_key = api_key
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-01-26T10:55:04.225Z
2024-01-04T18:40:40.939Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"data":{"attributes":{"api_key":"test-api-key","name":"testaddcloudflareaccountreturnsbadrequestresponseduetomissingemail1674730504"},"type":"cloudflare-accounts"}}'
body: '{"data":{"attributes":{"api_key":"fakekey","name":"testaddcloudflareaccountreturnsbadrequestresponseduetomissingemail1704393640"},"type":"cloudflare-accounts"}}'
headers:
accept:
- application/json
Expand All @@ -10,7 +10,7 @@ interactions:
uri: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts
response:
body:
string: '{"errors":["{u''_schema'': [''Email address is required if providing
string: '{"errors":["{''_schema'': [''Email address is required if providing
an api key and not an api token.'']}"]}'
headers:
content-type:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-01-26T10:54:47.296Z
2024-01-04T18:40:41.099Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"data":{"attributes":{"api_key":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","name":"testaddcloudflareaccountreturnsbadrequestresponseusinginvalidauthkey1674730487"},"type":"cloudflare-accounts"}}'
body: '{"data":{"attributes":{"api_key":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","name":"testaddcloudflareaccountreturnsbadrequestresponseusinginvalidauthkey1704393641"},"type":"cloudflare-accounts"}}'
headers:
accept:
- application/json
Expand All @@ -11,7 +11,7 @@ interactions:
response:
body:
string: '{"errors":["Invalid account. Your Cloudflare configuration is invalid.
Impossible to get zones for the account testaddcloudflareaccountreturnsbadrequestresponseusinginvalidauthkey1674730487:
Impossible to get zones for the account testaddcloudflareaccountreturnsbadrequestresponseusinginvalidauthkey1704393641:
API key or email is unknown."]}'
headers:
content-type:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-01-26T10:54:24.725Z
2024-01-04T18:40:41.520Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"data":{"attributes":{"api_key":"fakekey","email":"new@email","name":"testaddcloudflareaccountreturnscreatedresponse1674730464"},"type":"cloudflare-accounts"}}'
body: '{"data":{"attributes":{"api_key":"fakekey","email":"dev@datadoghq.com","name":"testaddcloudflareaccountreturnscreatedresponse1704393641"},"type":"cloudflare-accounts"}}'
headers:
accept:
- application/json
Expand All @@ -10,7 +10,7 @@ interactions:
uri: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts
response:
body:
string: '{"data":{"attributes":{"email":"new@email","name":"testaddcloudflareaccountreturnscreatedresponse1674730464"},"type":"cloudflare-accounts","id":"328432a98957fd7bcba6f70daea72519"}}
string: '{"data":{"type":"cloudflare-accounts","attributes":{"email":"dev@datadoghq.com","name":"testaddcloudflareaccountreturnscreatedresponse1704393641","resources":[],"zones":[]},"id":"baa2079200095466b080d75adfdb32fa"}}
'
headers:
Expand All @@ -25,7 +25,7 @@ interactions:
accept:
- '*/*'
method: DELETE
uri: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/328432a98957fd7bcba6f70daea72519
uri: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts/baa2079200095466b080d75adfdb32fa
response:
body:
string: ''
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-01-03T19:17:37.850Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
interactions:
- request:
body: '{"data":{"attributes":{"api_key":"fakekey","email":"new@email","name":"testaddcloudflareaccountreturnscreatedresponsewithoptionalfilters1704309457","resources":["lb","dns"],"zones":["zone-id-1","zone-id-2"]},"type":"cloudflare-accounts"}}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v2/integrations/cloudflare/accounts
response:
body:
string: '{"errors":["Invalid account. Your Cloudflare configuration is invalid.
Impossible to get zones for the account testaddcloudflareaccountreturnscreatedresponsewithoptionalfilters1704309457:
API key or email is not in the correct format."]}'
headers:
content-type:
- application/json
status:
code: 400
message: Bad Request
version: 1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-01-27T09:00:21.006Z
2024-01-04T18:40:42.323Z
Loading

0 comments on commit 7c23d90

Please sign in to comment.