Skip to content

Commit cc4bb66

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit fa551a3 of spec repo (#705)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 8738ec0 commit cc4bb66

23 files changed

+537
-54
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.5.1.dev2",
7-
"regenerated": "2021-12-22 10:37:25.275485",
8-
"spec_repo_commit": "ef25063"
7+
"regenerated": "2021-12-22 15:41:09.807167",
8+
"spec_repo_commit": "fa551a3"
99
},
1010
"v2": {
1111
"apigentools_version": "1.5.1.dev2",
12-
"regenerated": "2021-12-22 10:37:25.768826",
13-
"spec_repo_commit": "ef25063"
12+
"regenerated": "2021-12-22 15:41:10.250595",
13+
"spec_repo_commit": "fa551a3"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 56 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,21 @@ components:
477477
properties:
478478
name:
479479
description: Name of the application key.
480-
example: Application Key for submitting metrics
480+
example: Application Key for managing dashboards
481481
type: string
482+
scopes:
483+
description: Array of scopes to grant the application key. This feature
484+
is in private beta, please contact Datadog support to enable scopes for
485+
your application keys.
486+
example:
487+
- dashboards_read
488+
- dashboards_write
489+
- dashboards_public_share
490+
items:
491+
description: Name of scope.
492+
type: string
493+
nullable: true
494+
type: array
482495
required:
483496
- name
484497
type: object
@@ -529,10 +542,21 @@ components:
529542
properties:
530543
name:
531544
description: Name of the application key.
532-
example: Application Key for submitting metrics
545+
example: Application Key for managing dashboards
533546
type: string
534-
required:
535-
- name
547+
scopes:
548+
description: Array of scopes to grant the application key. This feature
549+
is in private beta, please contact Datadog support to enable scopes for
550+
your application keys.
551+
example:
552+
- dashboards_read
553+
- dashboards_write
554+
- dashboards_public_share
555+
items:
556+
description: Name of scope.
557+
type: string
558+
nullable: true
559+
type: array
536560
type: object
537561
ApplicationKeyUpdateData:
538562
description: Object used to update an application key.
@@ -852,8 +876,21 @@ components:
852876
type: string
853877
name:
854878
description: Name of the application key.
855-
example: Application Key for submitting metrics
879+
example: Application Key for managing dashboards
856880
type: string
881+
scopes:
882+
description: Array of scopes to grant the application key. This feature
883+
is in private beta, please contact Datadog support to enable scopes for
884+
your application keys.
885+
example:
886+
- dashboards_read
887+
- dashboards_write
888+
- dashboards_public_share
889+
items:
890+
description: Name of scope.
891+
type: string
892+
nullable: true
893+
type: array
857894
type: object
858895
HTTPLog:
859896
description: Structured log message.
@@ -3537,8 +3574,21 @@ components:
35373574
type: string
35383575
name:
35393576
description: Name of the application key.
3540-
example: Application Key for submitting metrics
3577+
example: Application Key for managing dashboards
35413578
type: string
3579+
scopes:
3580+
description: Array of scopes to grant the application key. This feature
3581+
is in private beta, please contact Datadog support to enable scopes for
3582+
your application keys.
3583+
example:
3584+
- dashboards_read
3585+
- dashboards_write
3586+
- dashboards_public_share
3587+
items:
3588+
description: Name of scope.
3589+
type: string
3590+
nullable: true
3591+
type: array
35423592
type: object
35433593
PartialApplicationKeyResponse:
35443594
description: Response for retrieving a partial application key.

docs/v2/ApplicationKeyCreateAttributes.md

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2/ApplicationKeyUpdateAttributes.md

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2/FullApplicationKeyAttributes.md

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2/KeyManagementApi.md

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2/PartialApplicationKeyAttributes.md

Lines changed: 6 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/v2/ServiceAccountsApi.md

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""
2+
Create an Application key with scopes for current user returns "Created" response
3+
"""
4+
5+
from datadog_api_client.v2 import ApiClient, Configuration
6+
from datadog_api_client.v2.api.key_management_api import KeyManagementApi
7+
from datadog_api_client.v2.model.application_key_create_attributes import ApplicationKeyCreateAttributes
8+
from datadog_api_client.v2.model.application_key_create_data import ApplicationKeyCreateData
9+
from datadog_api_client.v2.model.application_key_create_request import ApplicationKeyCreateRequest
10+
from datadog_api_client.v2.model.application_keys_type import ApplicationKeysType
11+
12+
body = ApplicationKeyCreateRequest(
13+
data=ApplicationKeyCreateData(
14+
type=ApplicationKeysType("application_keys"),
15+
attributes=ApplicationKeyCreateAttributes(
16+
name="Example-Create_an_Application_key_with_scopes_for_current_user_returns_Created_response",
17+
scopes=["dashboards_read", "dashboards_write", "dashboards_public_share"],
18+
),
19+
)
20+
)
21+
22+
configuration = Configuration()
23+
with ApiClient(configuration) as api_client:
24+
api_instance = KeyManagementApi(api_client)
25+
response = api_instance.create_current_user_application_key(body=body)
26+
27+
print(response)

examples/v2/key-management/UpdateApplicationKey.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
data=ApplicationKeyUpdateData(
1919
id=APPLICATION_KEY_DATA_ID,
2020
type=ApplicationKeysType("application_keys"),
21-
attributes=ApplicationKeyUpdateAttributes(name="Application Key for submitting metrics-updated"),
21+
attributes=ApplicationKeyUpdateAttributes(name="Application Key for managing dashboards-updated"),
2222
)
2323
)
2424

0 commit comments

Comments
 (0)