orgs
Creates, updates, deletes, gets or lists an orgs resource.
Overview
| Name | orgs |
| Type | Resource |
| Id | datadog.organization.orgs |
Fields
The following fields are returned by SELECT queries:
- get_org
- list_orgs
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the child organization, limited to 32 characters. (example: New child org) |
public_id | string | The public_id of the organization you are operating within. (example: abcdef12345) |
billing | object | A JSON array of billing type. |
created | string | Date of the organization creation. (example: 2019-09-26T17:28:28Z) |
description | string | Description of the organization. (example: some description) |
settings | object | A JSON array of settings. |
subscription | object | Subscription definition. |
trial | boolean | Only available for MSP customers. Allows child organizations to be created on a trial plan. |
| Name | Datatype | Description |
|---|---|---|
id | string (uuid) | The UUID of the current organization. (example: 4dee724d-00cc-11ea-a77b-570c9d03c6c5) |
relationships | object | Relationships of the managed organizations resource. |
type | string | The resource type for managed organizations. (managed_orgs) (example: managed_orgs) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_org | select | public_id | Get organization information. | |
list_orgs | select | filter[name] | Returns the current organization and its managed organizations in JSON:API format. | |
create_child_org | insert | name | Create a child organization.<br /><br />This endpoint requires the<br />[multi-organization account](https://docs.datadoghq.com/account_management/multi_organization/)<br />feature and must be enabled by<br />[contacting support](https://docs.datadoghq.com/help/).<br /><br />Once a new child organization is created, you can interact with it<br />by using the org.public_id, api_key.key, and<br />application_key.hash provided in the response. | |
update_org | replace | public_id | Update your organization. | |
disable_customer_org | exec | data | Disable the Datadog organization associated with the authenticated user or API key.<br />The request body uses JSON:API format. If org_uuid is supplied, it must match<br />the authenticated org or the request is rejected. Successful calls disable the org<br />and return the resulting state from the downstream service. Requires the<br />org_management permission. | |
downgrade_org | exec | public_id | Only available for MSP customers. Removes a child organization from the hierarchy of the master organization and places the child organization on a 30-day trial. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
public_id | string | The public_id of the organization you are operating within. |
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
filter[name] | string | Filter managed organizations by name. (example: My Child Org) |
SELECT examples
- get_org
- list_orgs
Get organization information.
SELECT
name,
public_id,
billing,
created,
description,
settings,
subscription,
trial
FROM datadog.organization.orgs
WHERE public_id = '{{ public_id }}' -- required
;
Returns the current organization and its managed organizations in JSON:API format.
SELECT
id,
relationships,
type
FROM datadog.organization.orgs
WHERE filter[name] = '{{ filter[name] }}'
;
INSERT examples
- create_child_org
- Manifest
Create a child organization.<br /><br />This endpoint requires the<br />[multi-organization account](https://docs.datadoghq.com/account_management/multi_organization/)<br />feature and must be enabled by<br />[contacting support](https://docs.datadoghq.com/help/).<br /><br />Once a new child organization is created, you can interact with it<br />by using the org.public_id, api_key.key, and<br />application_key.hash provided in the response.
INSERT INTO datadog.organization.orgs (
billing,
name,
subscription
)
SELECT
'{{ billing }}',
'{{ name }}' /* required */,
'{{ subscription }}'
RETURNING
api_key,
application_key,
org,
user
;
# Description fields are for documentation purposes
- name: orgs
props:
- name: billing
description: |
A JSON array of billing type.
value:
type: "{{ type }}"
- name: name
value: "{{ name }}"
description: |
The name of the new child-organization, limited to 32 characters.
- name: subscription
description: |
Subscription definition.
value:
type: "{{ type }}"
REPLACE examples
- update_org
Update your organization.
REPLACE datadog.organization.orgs
SET
billing = '{{ billing }}',
description = '{{ description }}',
name = '{{ name }}',
public_id = '{{ public_id }}',
settings = '{{ settings }}',
subscription = '{{ subscription }}',
trial = {{ trial }}
WHERE
public_id = '{{ public_id }}' --required
RETURNING
org;
Lifecycle Methods
EXEC variables use wire (API) names.
- disable_customer_org
- downgrade_org
Disable the Datadog organization associated with the authenticated user or API key.<br />The request body uses JSON:API format. If org_uuid is supplied, it must match<br />the authenticated org or the request is rejected. Successful calls disable the org<br />and return the resulting state from the downstream service. Requires the<br />org_management permission.
EXEC datadog.organization.orgs.disable_customer_org
@@json=
'{
"data": "{{ data }}"
}'
;
Only available for MSP customers. Removes a child organization from the hierarchy of the master organization and places the child organization on a 30-day trial.
EXEC datadog.organization.orgs.downgrade_org
@public_id='{{ public_id }}' --required
;