Skip to content

Commit 3c1c66a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit ba61a429 of spec repo (#1050)
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 e172ea4 commit 3c1c66a

File tree

11 files changed

+189
-6
lines changed

11 files changed

+189
-6
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.6.2",
7-
"regenerated": "2022-06-17 16:06:16.866017",
8-
"spec_repo_commit": "d8878c2d"
7+
"regenerated": "2022-06-17 19:27:20.886323",
8+
"spec_repo_commit": "ba61a429"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-06-17 16:06:16.878203",
13-
"spec_repo_commit": "d8878c2d"
12+
"regenerated": "2022-06-17 19:27:20.900051",
13+
"spec_repo_commit": "ba61a429"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7820,6 +7820,13 @@ components:
78207820
format: int64
78217821
type: integer
78227822
type: object
7823+
OrgDowngradedResponse:
7824+
description: Status of downgrade
7825+
properties:
7826+
message:
7827+
description: Information pertaining to the downgraded child organization.
7828+
type: string
7829+
type: object
78237830
Organization:
78247831
description: Create, edit, and manage organizations.
78257832
properties:
@@ -7847,6 +7854,11 @@ components:
78477854
$ref: '#/components/schemas/OrganizationSettings'
78487855
subscription:
78497856
$ref: '#/components/schemas/OrganizationSubscription'
7857+
trial:
7858+
description: Only available for MSP customers. Allows child organizations
7859+
to be created on a trial plan.
7860+
example: false
7861+
type: boolean
78507862
type: object
78517863
OrganizationBilling:
78527864
deprecated: true
@@ -23348,6 +23360,47 @@ paths:
2334823360
x-menu-order: 4
2334923361
x-undo:
2335023362
type: idempotent
23363+
/api/v1/org/{public_id}/downgrade:
23364+
post:
23365+
description: Only available for MSP customers. Removes a child organization
23366+
from the hierarchy of the master organization and places the child organization
23367+
on a 30-day trial.
23368+
operationId: DowngradeOrg
23369+
parameters:
23370+
- description: The `public_id` of the organization you are operating within.
23371+
in: path
23372+
name: public_id
23373+
required: true
23374+
schema:
23375+
example: abc123
23376+
type: string
23377+
responses:
23378+
'200':
23379+
content:
23380+
application/json:
23381+
schema:
23382+
$ref: '#/components/schemas/OrgDowngradedResponse'
23383+
description: OK
23384+
'400':
23385+
content:
23386+
application/json:
23387+
schema:
23388+
$ref: '#/components/schemas/APIErrorResponse'
23389+
description: Bad Request
23390+
'403':
23391+
content:
23392+
application/json:
23393+
schema:
23394+
$ref: '#/components/schemas/APIErrorResponse'
23395+
description: Forbidden
23396+
'429':
23397+
$ref: '#/components/responses/TooManyRequestsResponse'
23398+
summary: Spin-off Child Organization
23399+
tags:
23400+
- Organizations
23401+
x-menu-order: 6
23402+
x-undo:
23403+
type: unsafe
2335123404
/api/v1/org/{public_id}/idp_metadata:
2335223405
post:
2335323406
description: 'There are a couple of options for updating the Identity Provider

docs/datadog_api_client.v1.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,6 +2346,13 @@ notebooks\_response\_page
23462346
:members:
23472347
:show-inheritance:
23482348

2349+
org\_downgraded\_response
2350+
-------------------------
2351+
2352+
.. automodule:: datadog_api_client.v1.model.org_downgraded_response
2353+
:members:
2354+
:show-inheritance:
2355+
23492356
organization
23502357
------------
23512358

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""
2+
Spin-off Child Organization returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v1.api.organizations_api import OrganizationsApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = OrganizationsApi(api_client)
11+
response = api_instance.downgrade_org(
12+
public_id="abc123",
13+
)
14+
15+
print(response)

examples/v1/organizations/UpdateOrg.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
subscription=OrganizationSubscription(
5252
type="pro",
5353
),
54+
trial=False,
5455
)
5556

5657
configuration = Configuration()

src/datadog_api_client/v1/api/organizations_api.py

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

src/datadog_api_client/v1/model/org_downgraded_response.py

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

src/datadog_api_client/v1/model/organization.py

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

src/datadog_api_client/v1/models/__init__.py

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/v1/features/organizations.feature

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,33 @@ Feature: Organizations
4242
When the request is sent
4343
Then the response status is 200 OK
4444

45+
@generated @skip @team:DataDog/team-aaa
46+
Scenario: Spin-off Child Organization returns "Bad Request" response
47+
Given new "DowngradeOrg" request
48+
And request contains "public_id" parameter from "REPLACE.ME"
49+
When the request is sent
50+
Then the response status is 400 Bad Request
51+
52+
@generated @skip @team:DataDog/team-aaa
53+
Scenario: Spin-off Child Organization returns "OK" response
54+
Given new "DowngradeOrg" request
55+
And request contains "public_id" parameter from "REPLACE.ME"
56+
When the request is sent
57+
Then the response status is 200 OK
58+
4559
@generated @skip @team:DataDog/team-aaa
4660
Scenario: Update your organization returns "Bad Request" response
4761
Given new "UpdateOrg" request
4862
And request contains "public_id" parameter from "REPLACE.ME"
49-
And body with value {"billing": {"type": "parent_billing"}, "description": "some description", "name": "New child org", "public_id": "abcdef12345", "settings": {"private_widget_share": false, "saml": {"enabled": false}, "saml_autocreate_access_role": "st", "saml_autocreate_users_domains": {"domains": ["example.com"], "enabled": false}, "saml_can_be_enabled": false, "saml_idp_endpoint": "https://my.saml.endpoint", "saml_idp_initiated_login": {"enabled": false}, "saml_idp_metadata_uploaded": false, "saml_login_url": "https://my.saml.login.url", "saml_strict_mode": {"enabled": false}}, "subscription": {"type": "pro"}}
63+
And body with value {"billing": {"type": "parent_billing"}, "description": "some description", "name": "New child org", "public_id": "abcdef12345", "settings": {"private_widget_share": false, "saml": {"enabled": false}, "saml_autocreate_access_role": "st", "saml_autocreate_users_domains": {"domains": ["example.com"], "enabled": false}, "saml_can_be_enabled": false, "saml_idp_endpoint": "https://my.saml.endpoint", "saml_idp_initiated_login": {"enabled": false}, "saml_idp_metadata_uploaded": false, "saml_login_url": "https://my.saml.login.url", "saml_strict_mode": {"enabled": false}}, "subscription": {"type": "pro"}, "trial": false}
5064
When the request is sent
5165
Then the response status is 400 Bad Request
5266

5367
@generated @skip @team:DataDog/team-aaa
5468
Scenario: Update your organization returns "OK" response
5569
Given new "UpdateOrg" request
5670
And request contains "public_id" parameter from "REPLACE.ME"
57-
And body with value {"billing": {"type": "parent_billing"}, "description": "some description", "name": "New child org", "public_id": "abcdef12345", "settings": {"private_widget_share": false, "saml": {"enabled": false}, "saml_autocreate_access_role": "st", "saml_autocreate_users_domains": {"domains": ["example.com"], "enabled": false}, "saml_can_be_enabled": false, "saml_idp_endpoint": "https://my.saml.endpoint", "saml_idp_initiated_login": {"enabled": false}, "saml_idp_metadata_uploaded": false, "saml_login_url": "https://my.saml.login.url", "saml_strict_mode": {"enabled": false}}, "subscription": {"type": "pro"}}
71+
And body with value {"billing": {"type": "parent_billing"}, "description": "some description", "name": "New child org", "public_id": "abcdef12345", "settings": {"private_widget_share": false, "saml": {"enabled": false}, "saml_autocreate_access_role": "st", "saml_autocreate_users_domains": {"domains": ["example.com"], "enabled": false}, "saml_can_be_enabled": false, "saml_idp_endpoint": "https://my.saml.endpoint", "saml_idp_initiated_login": {"enabled": false}, "saml_idp_metadata_uploaded": false, "saml_login_url": "https://my.saml.login.url", "saml_strict_mode": {"enabled": false}}, "subscription": {"type": "pro"}, "trial": false}
5872
When the request is sent
5973
Then the response status is 200 OK
6074

0 commit comments

Comments
 (0)