diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2994c0bb30b6..30596739d0f7 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -30990,7 +30990,7 @@ components: properties: org_site: description: The site of the organization. - example: "datadoghq.com" + example: "us1" type: string org_uuid: description: The UUID of the organization. @@ -51298,7 +51298,7 @@ components: type: string owner_org_site: description: The site of the organization that owns this org group. - example: "datadoghq.com" + example: "us1" type: string owner_org_uuid: description: The UUID of the organization that owns this org group. @@ -51404,7 +51404,7 @@ components: type: string org_site: description: The site of the member organization. - example: "datadoghq.com" + example: "us1" type: string org_uuid: description: The UUID of the member organization. @@ -51625,11 +51625,8 @@ components: example: value: "UTC" type: object - enforced_at: - description: Timestamp when the policy was enforced. - example: "2024-01-15T10:30:00Z" - format: date-time - type: string + enforcement_tier: + $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" modified_at: description: Timestamp when the policy was last modified. example: "2024-01-15T10:30:00Z" @@ -51639,9 +51636,12 @@ components: description: The name of the policy. example: "monitor_timezone" type: string + policy_type: + $ref: "#/components/schemas/OrgGroupPolicyPolicyType" required: - policy_name - - enforced_at + - policy_type + - enforcement_tier - modified_at type: object OrgGroupPolicyConfigAttributes: @@ -51712,7 +51712,8 @@ components: x-enum-varnames: - ORG_GROUP_POLICY_CONFIGS OrgGroupPolicyCreateAttributes: - description: Attributes for creating an org group policy. + description: >- + Attributes for creating an org group policy. If `policy_type` or `enforcement_tier` are not provided, they default to `org_config` and `DEFAULT` respectively. properties: content: additionalProperties: {} @@ -51720,10 +51721,14 @@ components: example: value: "UTC" type: object + enforcement_tier: + $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" policy_name: description: The name of the policy. example: "monitor_timezone" type: string + policy_type: + $ref: "#/components/schemas/OrgGroupPolicyPolicyType" required: - policy_name - content @@ -51777,6 +51782,20 @@ components: - type - attributes type: object + OrgGroupPolicyEnforcementTier: + default: DEFAULT + description: >- + The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. + enum: + - DEFAULT + - ENFORCE + - DELEGATE + example: DEFAULT + type: string + x-enum-varnames: + - DEFAULT + - ENFORCE + - DELEGATE OrgGroupPolicyListResponse: description: Response containing a list of org group policies. properties: @@ -51809,7 +51828,7 @@ components: type: string org_site: description: The site of the organization that has the override. - example: "datadoghq.com" + example: "us1" type: string org_uuid: description: The UUID of the organization that has the override. @@ -51827,7 +51846,7 @@ components: properties: org_site: description: The site of the organization. - example: "datadoghq.com" + example: "us1" type: string org_uuid: description: The UUID of the organization to grant the override. @@ -51943,11 +51962,12 @@ components: x-enum-varnames: - ORG_GROUP_POLICY_OVERRIDES OrgGroupPolicyOverrideUpdateAttributes: - description: Attributes for updating a policy override. + description: >- + Attributes for updating a policy override. The `org_uuid` and `org_site` fields must match the existing override and cannot be changed. properties: org_site: description: The site of the organization. - example: "datadoghq.com" + example: "us1" type: string org_uuid: description: The UUID of the organization. @@ -51983,6 +52003,16 @@ components: required: - data type: object + OrgGroupPolicyPolicyType: + default: org_config + description: >- + The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. + enum: + - org_config + example: org_config + type: string + x-enum-varnames: + - ORG_CONFIG OrgGroupPolicyRelationshipToOne: description: Relationship to a single org group policy. properties: @@ -52051,6 +52081,8 @@ components: example: value: "UTC" type: object + enforcement_tier: + $ref: "#/components/schemas/OrgGroupPolicyEnforcementTier" type: object OrgGroupPolicyUpdateData: description: Data for updating an org group policy. @@ -62654,19 +62686,23 @@ components: - DONE - TIMEOUT SecurityMonitoringContentPackActivation: - description: The activation status of a content pack + description: The activation status of a content pack. enum: - never_activated - activated - deactivated example: activated type: string + x-enum-descriptions: + - Pack has never been activated for this organization. + - Pack is currently activated. + - Pack was previously activated but has since been deactivated. x-enum-varnames: - NEVER_ACTIVATED - ACTIVATED - DEACTIVATED SecurityMonitoringContentPackIntegrationStatus: - description: The installation status of the related integration + description: The installation status of the related integration. enum: - installed - available @@ -62675,6 +62711,12 @@ components: - error example: installed type: string + x-enum-descriptions: + - Integration is fully installed. + - Integration exists in the catalog but is not installed. + - Integration is only partially configured. + - Integration detected (for example, logs are flowing) but not explicitly installed. + - Integration is in an error state. x-enum-varnames: - INSTALLED - AVAILABLE @@ -62691,7 +62733,9 @@ components: cp_activation: $ref: "#/components/schemas/SecurityMonitoringContentPackActivation" filters_configured_for_logs: - description: Whether filters (Security Filters or Index Query depending on the pricing model) are configured for logs + description: |- + Whether filters (Security Filters or Index Query depending on the pricing model) are + present and correctly configured to route logs into Cloud SIEM. example: true type: boolean integration_installed_status: @@ -62699,7 +62743,7 @@ components: logs_last_collected: $ref: "#/components/schemas/SecurityMonitoringContentPackTimestampBucket" logs_seen_from_any_index: - description: Whether logs have been seen from any index + description: Whether logs for this content pack have been seen in any Datadog index within the last 72 hours. example: true type: boolean state: @@ -62764,7 +62808,7 @@ components: - meta type: object SecurityMonitoringContentPackStatus: - description: The current status of a content pack + description: The current operational status of a content pack. enum: - install - activate @@ -62774,6 +62818,13 @@ components: - broken example: active type: string + x-enum-descriptions: + - Not activated; no logs detected in the last 72 hours. + - Not activated; logs are flowing into a Datadog index but not yet routed through Cloud SIEM. + - Activated; awaiting first log ingestion. + - Activated; logs received within the last 24 hours. + - Activated; integration not installed or logs last seen 24 to 72 hours ago. + - Activated; no logs for over 72 hours, filter missing, or Cloud SIEM index incorrectly ordered. x-enum-varnames: - INSTALL - ACTIVATE @@ -62782,7 +62833,7 @@ components: - WARNING - BROKEN SecurityMonitoringContentPackTimestampBucket: - description: Timestamp bucket indicating when logs were last collected + description: Timestamp bucket indicating when logs were last collected. enum: - not_seen - within_24_hours @@ -62791,6 +62842,12 @@ components: - over_30d example: within_24_hours type: string + x-enum-descriptions: + - No logs observed. + - Logs received within the last 24 hours. + - Logs last seen 24 to 72 hours ago. + - Logs last seen 3 to 30 days ago. + - Logs last seen more than 30 days ago. x-enum-varnames: - NOT_SEEN - WITHIN_24_HOURS @@ -63881,7 +63938,7 @@ components: - $ref: "#/components/schemas/SecurityMonitoringSignalRulePayload" - $ref: "#/components/schemas/CloudConfigurationRulePayload" SecurityMonitoringSKU: - description: The SIEM pricing model (SKU) for the organization + description: The Cloud SIEM pricing model (SKU) for the organization. enum: - per_gb_analyzed - per_event_in_siem_index_2023 @@ -108264,7 +108321,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" org_name: "Acme Corp" - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108322,7 +108379,7 @@ paths: data: attributes: orgs: - - org_site: "datadoghq.com" + - org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" relationships: source_org_group: @@ -108349,7 +108406,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" org_name: "Acme Corp" - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108414,7 +108471,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" org_name: "Acme Corp" - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108495,7 +108552,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" org_name: "Acme Corp" - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "f1e2d3c4-b5a6-7890-1234-567890abcdef" relationships: @@ -108563,9 +108620,10 @@ paths: - attributes: content: value: "UTC" - enforced_at: "2024-01-15T10:30:00Z" + enforcement_tier: "DEFAULT" modified_at: "2024-01-15T10:30:00Z" policy_name: "monitor_timezone" + policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -108621,7 +108679,9 @@ paths: attributes: content: value: "UTC" + enforcement_tier: "DEFAULT" policy_name: "monitor_timezone" + policy_type: "org_config" relationships: org_group: data: @@ -108642,9 +108702,10 @@ paths: attributes: content: value: "UTC" - enforced_at: "2024-01-15T10:30:00Z" + enforcement_tier: "DEFAULT" modified_at: "2024-01-15T10:30:00Z" policy_name: "monitor_timezone" + policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -108734,8 +108795,73 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a specific organization group policy by its ID. + operationId: GetOrgGroupPolicy + parameters: + - $ref: "#/components/parameters/OrgGroupPolicyId" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + content: + value: "UTC" + enforcement_tier: "DEFAULT" + modified_at: "2024-01-15T10:30:00Z" + policy_name: "monitor_timezone" + policy_type: "org_config" + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + type: org_group_policies + schema: + $ref: "#/components/schemas/OrgGroupPolicyResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an org group policy + tags: [Org Groups] + "x-permission": + operator: OR + permissions: + - org_group_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: - description: Update the content of an existing organization group policy. + description: Update an existing organization group policy. operationId: UpdateOrgGroupPolicy parameters: - $ref: "#/components/parameters/OrgGroupPolicyId" @@ -108749,6 +108875,7 @@ paths: attributes: content: value: "US/Eastern" + enforcement_tier: "ENFORCE" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" type: org_group_policies schema: @@ -108765,9 +108892,10 @@ paths: attributes: content: value: "US/Eastern" - enforced_at: "2024-01-15T10:30:00Z" + enforcement_tier: "ENFORCE" modified_at: "2024-01-16T14:00:00Z" policy_name: "monitor_timezone" + policy_type: "org_config" id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" relationships: org_group: @@ -108881,7 +109009,7 @@ paths: - attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -108940,7 +109068,7 @@ paths: value: data: attributes: - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" relationships: org_group: @@ -108966,7 +109094,7 @@ paths: attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -109061,6 +109189,73 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get a specific organization group policy override by its ID. + operationId: GetOrgGroupPolicyOverride + parameters: + - $ref: "#/components/parameters/OrgGroupPolicyOverrideId" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + modified_at: "2024-01-15T10:30:00Z" + org_site: "us1" + org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" + id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" + relationships: + org_group: + data: + id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" + type: org_groups + org_group_policy: + data: + id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789" + type: org_group_policies + type: org_group_policy_overrides + schema: + $ref: "#/components/schemas/OrgGroupPolicyOverrideResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Get an org group policy override + tags: [Org Groups] + "x-permission": + operator: OR + permissions: + - org_group_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). patch: description: Update an existing organization group policy override. operationId: UpdateOrgGroupPolicyOverride @@ -109074,7 +109269,7 @@ paths: value: data: attributes: - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" type: org_group_policy_overrides @@ -109092,7 +109287,7 @@ paths: attributes: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" - org_site: "datadoghq.com" + org_site: "us1" org_uuid: "c3d4e5f6-a7b8-9012-cdef-012345678901" id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321" relationships: @@ -109164,7 +109359,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "datadoghq.com" + owner_org_site: "us1" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109231,7 +109426,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "datadoghq.com" + owner_org_site: "us1" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109334,7 +109529,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-15T10:30:00Z" name: "My Org Group" - owner_org_site: "datadoghq.com" + owner_org_site: "us1" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -109407,7 +109602,7 @@ paths: created_at: "2024-01-15T10:30:00Z" modified_at: "2024-01-16T14:00:00Z" name: "Updated Org Group Name" - owner_org_site: "datadoghq.com" + owner_org_site: "us1" owner_org_uuid: "b2c3d4e5-f6a7-8901-bcde-f01234567890" id: "a1b2c3d4-e5f6-7890-abcd-ef0123456789" type: org_groups @@ -118804,9 +118999,8 @@ paths: /api/v2/security_monitoring/content_packs/states: get: description: |- - Get the activation and configuration states for all security monitoring content packs. - This endpoint returns status information about each content pack including activation state, - integration status, and log collection status. + Get the activation state, integration status, and log collection status + for all Cloud SIEM content packs. operationId: GetContentPacksStates responses: "200": @@ -118829,21 +119023,31 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_filters_read summary: Get content pack states tags: - Security Monitoring + "x-permission": + operator: OR + permissions: + - security_monitoring_filters_read + - logs_read_index_data x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security_monitoring/content_packs/{content_pack_id}/activate: put: description: |- - Activate a security monitoring content pack. This operation configures the necessary + Activate a Cloud SIEM content pack. This operation configures the necessary log filters or security filters depending on the pricing model and updates the content pack activation state. operationId: ActivateContentPack parameters: - - description: The ID of the content pack to activate. + - description: The ID of the content pack to activate (for example, `aws-cloudtrail`). in: path name: content_pack_id required: true @@ -118867,20 +119071,30 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_filters_write summary: Activate content pack tags: - Security Monitoring + "x-permission": + operator: OR + permissions: + - security_monitoring_filters_write + - logs_modify_indexes x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate: put: description: |- - Deactivate a security monitoring content pack. This operation removes the content pack's + Deactivate a Cloud SIEM content pack. This operation removes the content pack's configuration from log filters or security filters and updates the content pack activation state. operationId: DeactivateContentPack parameters: - - description: The ID of the content pack to deactivate. + - description: The ID of the content pack to deactivate (for example, `aws-cloudtrail`). in: path name: content_pack_id required: true @@ -118904,9 +119118,19 @@ paths: description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - security_monitoring_filters_write summary: Deactivate content pack tags: - Security Monitoring + "x-permission": + operator: OR + permissions: + - security_monitoring_filters_write + - logs_modify_indexes x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). diff --git a/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.ts b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.ts index d5b1fec0c2bb..1ce5bd7f9917 100644 --- a/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.ts +++ b/examples/v2/org-groups/BulkUpdateOrgGroupMemberships.ts @@ -14,7 +14,7 @@ const params: v2.OrgGroupsApiBulkUpdateOrgGroupMembershipsRequest = { attributes: { orgs: [ { - orgSite: "datadoghq.com", + orgSite: "us1", orgUuid: "c3d4e5f6-a7b8-9012-cdef-012345678901", }, ], diff --git a/examples/v2/org-groups/CreateOrgGroupPolicy.ts b/examples/v2/org-groups/CreateOrgGroupPolicy.ts index 685ceb1799be..d01c5c2eea73 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicy.ts +++ b/examples/v2/org-groups/CreateOrgGroupPolicy.ts @@ -15,7 +15,9 @@ const params: v2.OrgGroupsApiCreateOrgGroupPolicyRequest = { content: { value: "UTC", }, + enforcementTier: "DEFAULT", policyName: "monitor_timezone", + policyType: "org_config", }, relationships: { orgGroup: { diff --git a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.ts b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.ts index 8ff5c289bc5e..e94d9fac2af4 100644 --- a/examples/v2/org-groups/CreateOrgGroupPolicyOverride.ts +++ b/examples/v2/org-groups/CreateOrgGroupPolicyOverride.ts @@ -12,7 +12,7 @@ const params: v2.OrgGroupsApiCreateOrgGroupPolicyOverrideRequest = { body: { data: { attributes: { - orgSite: "datadoghq.com", + orgSite: "us1", orgUuid: "c3d4e5f6-a7b8-9012-cdef-012345678901", }, relationships: { diff --git a/examples/v2/org-groups/GetOrgGroupPolicy.ts b/examples/v2/org-groups/GetOrgGroupPolicy.ts new file mode 100644 index 000000000000..b3c1d32be5e2 --- /dev/null +++ b/examples/v2/org-groups/GetOrgGroupPolicy.ts @@ -0,0 +1,22 @@ +/** + * Get an org group policy returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getOrgGroupPolicy"] = true; +const apiInstance = new v2.OrgGroupsApi(configuration); + +const params: v2.OrgGroupsApiGetOrgGroupPolicyRequest = { + orgGroupPolicyId: "1a2b3c4d-5e6f-7890-abcd-ef0123456789", +}; + +apiInstance + .getOrgGroupPolicy(params) + .then((data: v2.OrgGroupPolicyResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/org-groups/GetOrgGroupPolicyOverride.ts b/examples/v2/org-groups/GetOrgGroupPolicyOverride.ts new file mode 100644 index 000000000000..3cc17223560d --- /dev/null +++ b/examples/v2/org-groups/GetOrgGroupPolicyOverride.ts @@ -0,0 +1,22 @@ +/** + * Get an org group policy override returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getOrgGroupPolicyOverride"] = true; +const apiInstance = new v2.OrgGroupsApi(configuration); + +const params: v2.OrgGroupsApiGetOrgGroupPolicyOverrideRequest = { + orgGroupPolicyOverrideId: "9f8e7d6c-5b4a-3210-fedc-ba0987654321", +}; + +apiInstance + .getOrgGroupPolicyOverride(params) + .then((data: v2.OrgGroupPolicyOverrideResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicy.ts b/examples/v2/org-groups/UpdateOrgGroupPolicy.ts index 1fa08bf656d4..9aa0ee43d23b 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicy.ts +++ b/examples/v2/org-groups/UpdateOrgGroupPolicy.ts @@ -15,6 +15,7 @@ const params: v2.OrgGroupsApiUpdateOrgGroupPolicyRequest = { content: { value: "UTC", }, + enforcementTier: "DEFAULT", }, id: "1a2b3c4d-5e6f-7890-abcd-ef0123456789", type: "org_group_policies", diff --git a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.ts b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.ts index 4a508ed15e1a..88f911248dfc 100644 --- a/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.ts +++ b/examples/v2/org-groups/UpdateOrgGroupPolicyOverride.ts @@ -12,7 +12,7 @@ const params: v2.OrgGroupsApiUpdateOrgGroupPolicyOverrideRequest = { body: { data: { attributes: { - orgSite: "datadoghq.com", + orgSite: "us1", orgUuid: "c3d4e5f6-a7b8-9012-cdef-012345678901", }, id: "9f8e7d6c-5b4a-3210-fedc-ba0987654321", diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 0bc74e3bb72d..e2d047f32c69 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -9665,6 +9665,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "OrgGroupPolicyResponse", }, + "v2.GetOrgGroupPolicy": { + "orgGroupPolicyId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "OrgGroupPolicyResponse", + }, "v2.DeleteOrgGroupPolicy": { "orgGroupPolicyId": { "type": "string", @@ -9716,6 +9723,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "OrgGroupPolicyOverrideResponse", }, + "v2.GetOrgGroupPolicyOverride": { + "orgGroupPolicyOverrideId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "OrgGroupPolicyOverrideResponse", + }, "v2.DeleteOrgGroupPolicyOverride": { "orgGroupPolicyOverrideId": { "type": "string", diff --git a/features/v2/org_groups.feature b/features/v2/org_groups.feature index 73cce63cd8eb..b8c5fe1b61d1 100644 --- a/features/v2/org_groups.feature +++ b/features/v2/org_groups.feature @@ -12,7 +12,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "Bad Request" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 400 Bad Request @@ -20,7 +20,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "Not Found" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 404 Not Found @@ -28,7 +28,7 @@ Feature: Org Groups Scenario: Bulk update org group memberships returns "OK" response Given operation "BulkUpdateOrgGroupMemberships" enabled And new "BulkUpdateOrgGroupMemberships" request - And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} + And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}} When the request is sent Then the response status is 200 OK @@ -36,7 +36,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Bad Request" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 400 Bad Request @@ -44,7 +44,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Conflict" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 409 Conflict @@ -52,7 +52,7 @@ Feature: Org Groups Scenario: Create an org group policy override returns "Created" response Given operation "CreateOrgGroupPolicyOverride" enabled And new "CreateOrgGroupPolicyOverride" request - And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 201 Created @@ -60,7 +60,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Bad Request" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 400 Bad Request @@ -68,7 +68,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Conflict" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 409 Conflict @@ -76,7 +76,7 @@ Feature: Org Groups Scenario: Create an org group policy returns "Created" response Given operation "CreateOrgGroupPolicy" enabled And new "CreateOrgGroupPolicy" request - And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}} When the request is sent Then the response status is 201 Created @@ -200,6 +200,54 @@ Feature: Org Groups When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/org-management + Scenario: Get an org group policy override returns "Bad Request" response + Given operation "GetOrgGroupPolicyOverride" enabled + And new "GetOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group policy override returns "Not Found" response + Given operation "GetOrgGroupPolicyOverride" enabled + And new "GetOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group policy override returns "OK" response + Given operation "GetOrgGroupPolicyOverride" enabled + And new "GetOrgGroupPolicyOverride" request + And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group policy returns "Bad Request" response + Given operation "GetOrgGroupPolicy" enabled + And new "GetOrgGroupPolicy" request + And request contains "org_group_policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group policy returns "Not Found" response + Given operation "GetOrgGroupPolicy" enabled + And new "GetOrgGroupPolicy" request + And request contains "org_group_policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/org-management + Scenario: Get an org group policy returns "OK" response + Given operation "GetOrgGroupPolicy" enabled + And new "GetOrgGroupPolicy" request + And request contains "org_group_policy_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/org-management Scenario: Get an org group returns "Bad Request" response Given operation "GetOrgGroup" enabled @@ -323,7 +371,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 400 Bad Request @@ -332,7 +380,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 404 Not Found @@ -341,7 +389,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicyOverride" enabled And new "UpdateOrgGroupPolicyOverride" request And request contains "org_group_policy_override_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} + And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}} When the request is sent Then the response status is 200 OK @@ -350,7 +398,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 400 Bad Request @@ -359,7 +407,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 404 Not Found @@ -368,7 +416,7 @@ Feature: Org Groups Given operation "UpdateOrgGroupPolicy" enabled And new "UpdateOrgGroupPolicy" request And request contains "org_group_policy_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} + And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}} When the request is sent Then the response status is 200 OK diff --git a/features/v2/undo.json b/features/v2/undo.json index 31f26b910917..9152f6b2278b 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4222,6 +4222,12 @@ "type": "unsafe" } }, + "GetOrgGroupPolicy": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, "UpdateOrgGroupPolicy": { "tag": "Org Groups", "undo": { @@ -4258,6 +4264,12 @@ "type": "unsafe" } }, + "GetOrgGroupPolicyOverride": { + "tag": "Org Groups", + "undo": { + "type": "safe" + } + }, "UpdateOrgGroupPolicyOverride": { "tag": "Org Groups", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index fb5ffc8f2d30..8e2ee30363d1 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -447,6 +447,8 @@ export function createConfiguration( "v2.deleteOrgGroupPolicyOverride": false, "v2.getOrgGroup": false, "v2.getOrgGroupMembership": false, + "v2.getOrgGroupPolicy": false, + "v2.getOrgGroupPolicyOverride": false, "v2.listOrgGroupMemberships": false, "v2.listOrgGroupPolicies": false, "v2.listOrgGroupPolicyConfigs": false, diff --git a/packages/datadog-api-client-v2/apis/OrgGroupsApi.ts b/packages/datadog-api-client-v2/apis/OrgGroupsApi.ts index 75230ab11f99..722a155c897c 100644 --- a/packages/datadog-api-client-v2/apis/OrgGroupsApi.ts +++ b/packages/datadog-api-client-v2/apis/OrgGroupsApi.ts @@ -439,6 +439,92 @@ export class OrgGroupsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async getOrgGroupPolicy( + orgGroupPolicyId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getOrgGroupPolicy'"); + if (!_config.unstableOperations["v2.getOrgGroupPolicy"]) { + throw new Error("Unstable operation 'getOrgGroupPolicy' is disabled"); + } + + // verify required parameter 'orgGroupPolicyId' is not null or undefined + if (orgGroupPolicyId === null || orgGroupPolicyId === undefined) { + throw new RequiredError("orgGroupPolicyId", "getOrgGroupPolicy"); + } + + // Path Params + const localVarPath = + "/api/v2/org_group_policies/{org_group_policy_id}".replace( + "{org_group_policy_id}", + encodeURIComponent(String(orgGroupPolicyId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.OrgGroupsApi.getOrgGroupPolicy") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getOrgGroupPolicyOverride( + orgGroupPolicyOverrideId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getOrgGroupPolicyOverride'"); + if (!_config.unstableOperations["v2.getOrgGroupPolicyOverride"]) { + throw new Error( + "Unstable operation 'getOrgGroupPolicyOverride' is disabled" + ); + } + + // verify required parameter 'orgGroupPolicyOverrideId' is not null or undefined + if ( + orgGroupPolicyOverrideId === null || + orgGroupPolicyOverrideId === undefined + ) { + throw new RequiredError( + "orgGroupPolicyOverrideId", + "getOrgGroupPolicyOverride" + ); + } + + // Path Params + const localVarPath = + "/api/v2/org_group_policy_overrides/{org_group_policy_override_id}".replace( + "{org_group_policy_override_id}", + encodeURIComponent(String(orgGroupPolicyOverrideId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.OrgGroupsApi.getOrgGroupPolicyOverride") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async listOrgGroupMemberships( filterOrgGroupId?: string, filterOrgUuid?: string, @@ -1752,6 +1838,178 @@ export class OrgGroupsApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getOrgGroupPolicy + * @throws ApiException if the response code was not in [200, 299] + */ + public async getOrgGroupPolicy( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: OrgGroupPolicyResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgGroupPolicyResponse" + ) as OrgGroupPolicyResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgGroupPolicyResponse", + "" + ) as OrgGroupPolicyResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to getOrgGroupPolicyOverride + * @throws ApiException if the response code was not in [200, 299] + */ + public async getOrgGroupPolicyOverride( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: OrgGroupPolicyOverrideResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgGroupPolicyOverrideResponse" + ) as OrgGroupPolicyOverrideResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: OrgGroupPolicyOverrideResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "OrgGroupPolicyOverrideResponse", + "" + ) as OrgGroupPolicyOverrideResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -2590,6 +2848,22 @@ export interface OrgGroupsApiGetOrgGroupMembershipRequest { orgGroupMembershipId: string; } +export interface OrgGroupsApiGetOrgGroupPolicyRequest { + /** + * The ID of the org group policy. + * @type string + */ + orgGroupPolicyId: string; +} + +export interface OrgGroupsApiGetOrgGroupPolicyOverrideRequest { + /** + * The ID of the org group policy override. + * @type string + */ + orgGroupPolicyOverrideId: string; +} + export interface OrgGroupsApiListOrgGroupMembershipsRequest { /** * Filter memberships by org group ID. Required when `filter[org_uuid]` is not provided. @@ -2954,6 +3228,50 @@ export class OrgGroupsApi { }); } + /** + * Get a specific organization group policy by its ID. + * @param param The request object + */ + public getOrgGroupPolicy( + param: OrgGroupsApiGetOrgGroupPolicyRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getOrgGroupPolicy( + param.orgGroupPolicyId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getOrgGroupPolicy(responseContext); + }); + }); + } + + /** + * Get a specific organization group policy override by its ID. + * @param param The request object + */ + public getOrgGroupPolicyOverride( + param: OrgGroupsApiGetOrgGroupPolicyOverrideRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getOrgGroupPolicyOverride( + param.orgGroupPolicyOverrideId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getOrgGroupPolicyOverride( + responseContext + ); + }); + }); + } + /** * List organization group memberships. Filter by org group ID or org UUID. At least one of `filter[org_group_id]` or `filter[org_uuid]` must be provided. When filtering by org UUID, returns a single-item list with the membership for that org. * @param param The request object @@ -3125,7 +3443,7 @@ export class OrgGroupsApi { } /** - * Update the content of an existing organization group policy. + * Update an existing organization group policy. * @param param The request object */ public updateOrgGroupPolicy( diff --git a/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts b/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts index b1fd77130fc3..dcef2459dd1d 100644 --- a/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts +++ b/packages/datadog-api-client-v2/apis/SecurityMonitoringApi.ts @@ -162,6 +162,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -1216,6 +1217,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -1877,6 +1879,7 @@ export class SecurityMonitoringApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; @@ -11447,7 +11450,7 @@ export class SecurityMonitoringApiResponseProcessor { export interface SecurityMonitoringApiActivateContentPackRequest { /** - * The ID of the content pack to activate. + * The ID of the content pack to activate (for example, `aws-cloudtrail`). * @type string */ contentPackId: string; @@ -11631,7 +11634,7 @@ export interface SecurityMonitoringApiCreateVulnerabilityNotificationRuleRequest export interface SecurityMonitoringApiDeactivateContentPackRequest { /** - * The ID of the content pack to deactivate. + * The ID of the content pack to deactivate (for example, `aws-cloudtrail`). * @type string */ contentPackId: string; @@ -12886,7 +12889,7 @@ export class SecurityMonitoringApi { } /** - * Activate a security monitoring content pack. This operation configures the necessary + * Activate a Cloud SIEM content pack. This operation configures the necessary * log filters or security filters depending on the pricing model and updates the content * pack activation state. * @param param The request object @@ -13417,7 +13420,7 @@ export class SecurityMonitoringApi { } /** - * Deactivate a security monitoring content pack. This operation removes the content pack's + * Deactivate a Cloud SIEM content pack. This operation removes the content pack's * configuration from log filters or security filters and updates the content pack activation state. * @param param The request object */ @@ -13766,9 +13769,8 @@ export class SecurityMonitoringApi { } /** - * Get the activation and configuration states for all security monitoring content packs. - * This endpoint returns status information about each content pack including activation state, - * integration status, and log collection status. + * Get the activation state, integration status, and log collection status + * for all Cloud SIEM content packs. * @param param The request object */ public getContentPacksStates( diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index f032ea9f40b6..9ef1c297a978 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -831,6 +831,8 @@ export { OrgGroupsApiDeleteOrgGroupPolicyOverrideRequest, OrgGroupsApiGetOrgGroupRequest, OrgGroupsApiGetOrgGroupMembershipRequest, + OrgGroupsApiGetOrgGroupPolicyRequest, + OrgGroupsApiGetOrgGroupPolicyOverrideRequest, OrgGroupsApiListOrgGroupMembershipsRequest, OrgGroupsApiListOrgGroupPoliciesRequest, OrgGroupsApiListOrgGroupPolicyOverridesRequest, @@ -4583,6 +4585,7 @@ export { OrgGroupPolicyCreateData } from "./models/OrgGroupPolicyCreateData"; export { OrgGroupPolicyCreateRelationships } from "./models/OrgGroupPolicyCreateRelationships"; export { OrgGroupPolicyCreateRequest } from "./models/OrgGroupPolicyCreateRequest"; export { OrgGroupPolicyData } from "./models/OrgGroupPolicyData"; +export { OrgGroupPolicyEnforcementTier } from "./models/OrgGroupPolicyEnforcementTier"; export { OrgGroupPolicyListResponse } from "./models/OrgGroupPolicyListResponse"; export { OrgGroupPolicyOverrideAttributes } from "./models/OrgGroupPolicyOverrideAttributes"; export { OrgGroupPolicyOverrideCreateAttributes } from "./models/OrgGroupPolicyOverrideCreateAttributes"; @@ -4598,6 +4601,7 @@ export { OrgGroupPolicyOverrideType } from "./models/OrgGroupPolicyOverrideType" export { OrgGroupPolicyOverrideUpdateAttributes } from "./models/OrgGroupPolicyOverrideUpdateAttributes"; export { OrgGroupPolicyOverrideUpdateData } from "./models/OrgGroupPolicyOverrideUpdateData"; export { OrgGroupPolicyOverrideUpdateRequest } from "./models/OrgGroupPolicyOverrideUpdateRequest"; +export { OrgGroupPolicyPolicyType } from "./models/OrgGroupPolicyPolicyType"; export { OrgGroupPolicyRelationships } from "./models/OrgGroupPolicyRelationships"; export { OrgGroupPolicyRelationshipToOne } from "./models/OrgGroupPolicyRelationshipToOne"; export { OrgGroupPolicyRelationshipToOneData } from "./models/OrgGroupPolicyRelationshipToOneData"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index a55e5c54d055..a271014778fb 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -5260,8 +5260,10 @@ const enumsMap: { [key: string]: any[] } = { OrgGroupMembershipSortOption: ["name", "-name", "uuid", "-uuid"], OrgGroupMembershipType: ["org_group_memberships"], OrgGroupPolicyConfigType: ["org_group_policy_configs"], + OrgGroupPolicyEnforcementTier: ["DEFAULT", "ENFORCE", "DELEGATE"], OrgGroupPolicyOverrideSortOption: ["id", "-id", "org_uuid", "-org_uuid"], OrgGroupPolicyOverrideType: ["org_group_policy_overrides"], + OrgGroupPolicyPolicyType: ["org_config"], OrgGroupPolicySortOption: ["id", "-id", "name", "-name"], OrgGroupPolicyType: ["org_group_policies"], OrgGroupSortOption: ["name", "-name", "uuid", "-uuid"], diff --git a/packages/datadog-api-client-v2/models/OrgGroupPolicyAttributes.ts b/packages/datadog-api-client-v2/models/OrgGroupPolicyAttributes.ts index 0cb000711375..1b48069e3618 100644 --- a/packages/datadog-api-client-v2/models/OrgGroupPolicyAttributes.ts +++ b/packages/datadog-api-client-v2/models/OrgGroupPolicyAttributes.ts @@ -3,6 +3,8 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { OrgGroupPolicyEnforcementTier } from "./OrgGroupPolicyEnforcementTier"; +import { OrgGroupPolicyPolicyType } from "./OrgGroupPolicyPolicyType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -15,9 +17,9 @@ export class OrgGroupPolicyAttributes { */ "content"?: { [key: string]: any }; /** - * Timestamp when the policy was enforced. + * The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. */ - "enforcedAt": Date; + "enforcementTier": OrgGroupPolicyEnforcementTier; /** * Timestamp when the policy was last modified. */ @@ -26,6 +28,10 @@ export class OrgGroupPolicyAttributes { * The name of the policy. */ "policyName": string; + /** + * The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. + */ + "policyType": OrgGroupPolicyPolicyType; /** * A container for additional, undeclared properties. @@ -47,11 +53,10 @@ export class OrgGroupPolicyAttributes { baseName: "content", type: "{ [key: string]: any; }", }, - enforcedAt: { - baseName: "enforced_at", - type: "Date", + enforcementTier: { + baseName: "enforcement_tier", + type: "OrgGroupPolicyEnforcementTier", required: true, - format: "date-time", }, modifiedAt: { baseName: "modified_at", @@ -64,6 +69,11 @@ export class OrgGroupPolicyAttributes { type: "string", required: true, }, + policyType: { + baseName: "policy_type", + type: "OrgGroupPolicyPolicyType", + required: true, + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }", diff --git a/packages/datadog-api-client-v2/models/OrgGroupPolicyCreateAttributes.ts b/packages/datadog-api-client-v2/models/OrgGroupPolicyCreateAttributes.ts index 7671abecc15c..000a37bb8565 100644 --- a/packages/datadog-api-client-v2/models/OrgGroupPolicyCreateAttributes.ts +++ b/packages/datadog-api-client-v2/models/OrgGroupPolicyCreateAttributes.ts @@ -3,21 +3,31 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { OrgGroupPolicyEnforcementTier } from "./OrgGroupPolicyEnforcementTier"; +import { OrgGroupPolicyPolicyType } from "./OrgGroupPolicyPolicyType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Attributes for creating an org group policy. + * Attributes for creating an org group policy. If `policy_type` or `enforcement_tier` are not provided, they default to `org_config` and `DEFAULT` respectively. */ export class OrgGroupPolicyCreateAttributes { /** * The policy content as key-value pairs. */ "content": { [key: string]: any }; + /** + * The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. + */ + "enforcementTier"?: OrgGroupPolicyEnforcementTier; /** * The name of the policy. */ "policyName": string; + /** + * The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. + */ + "policyType"?: OrgGroupPolicyPolicyType; /** * A container for additional, undeclared properties. @@ -40,11 +50,19 @@ export class OrgGroupPolicyCreateAttributes { type: "{ [key: string]: any; }", required: true, }, + enforcementTier: { + baseName: "enforcement_tier", + type: "OrgGroupPolicyEnforcementTier", + }, policyName: { baseName: "policy_name", type: "string", required: true, }, + policyType: { + baseName: "policy_type", + type: "OrgGroupPolicyPolicyType", + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }", diff --git a/packages/datadog-api-client-v2/models/OrgGroupPolicyCreateData.ts b/packages/datadog-api-client-v2/models/OrgGroupPolicyCreateData.ts index e7716cf353d2..58a607337683 100644 --- a/packages/datadog-api-client-v2/models/OrgGroupPolicyCreateData.ts +++ b/packages/datadog-api-client-v2/models/OrgGroupPolicyCreateData.ts @@ -14,7 +14,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class OrgGroupPolicyCreateData { /** - * Attributes for creating an org group policy. + * Attributes for creating an org group policy. If `policy_type` or `enforcement_tier` are not provided, they default to `org_config` and `DEFAULT` respectively. */ "attributes": OrgGroupPolicyCreateAttributes; /** diff --git a/packages/datadog-api-client-v2/models/OrgGroupPolicyEnforcementTier.ts b/packages/datadog-api-client-v2/models/OrgGroupPolicyEnforcementTier.ts new file mode 100644 index 000000000000..3d6aebe453ae --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgGroupPolicyEnforcementTier.ts @@ -0,0 +1,20 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. + */ + +export type OrgGroupPolicyEnforcementTier = + | typeof DEFAULT + | typeof ENFORCE + | typeof DELEGATE + | UnparsedObject; +export const DEFAULT = "DEFAULT"; +export const ENFORCE = "ENFORCE"; +export const DELEGATE = "DELEGATE"; diff --git a/packages/datadog-api-client-v2/models/OrgGroupPolicyOverrideUpdateAttributes.ts b/packages/datadog-api-client-v2/models/OrgGroupPolicyOverrideUpdateAttributes.ts index d6e65936c95c..2f82bfa70de5 100644 --- a/packages/datadog-api-client-v2/models/OrgGroupPolicyOverrideUpdateAttributes.ts +++ b/packages/datadog-api-client-v2/models/OrgGroupPolicyOverrideUpdateAttributes.ts @@ -7,7 +7,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Attributes for updating a policy override. + * Attributes for updating a policy override. The `org_uuid` and `org_site` fields must match the existing override and cannot be changed. */ export class OrgGroupPolicyOverrideUpdateAttributes { /** diff --git a/packages/datadog-api-client-v2/models/OrgGroupPolicyOverrideUpdateData.ts b/packages/datadog-api-client-v2/models/OrgGroupPolicyOverrideUpdateData.ts index 94c1c338fc07..ce346cdb7a25 100644 --- a/packages/datadog-api-client-v2/models/OrgGroupPolicyOverrideUpdateData.ts +++ b/packages/datadog-api-client-v2/models/OrgGroupPolicyOverrideUpdateData.ts @@ -13,7 +13,7 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; */ export class OrgGroupPolicyOverrideUpdateData { /** - * Attributes for updating a policy override. + * Attributes for updating a policy override. The `org_uuid` and `org_site` fields must match the existing override and cannot be changed. */ "attributes": OrgGroupPolicyOverrideUpdateAttributes; /** diff --git a/packages/datadog-api-client-v2/models/OrgGroupPolicyPolicyType.ts b/packages/datadog-api-client-v2/models/OrgGroupPolicyPolicyType.ts new file mode 100644 index 000000000000..53b0ba28e4c5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/OrgGroupPolicyPolicyType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * The type of the policy. Only `org_config` is supported, indicating a policy backed by an organization configuration setting. + */ + +export type OrgGroupPolicyPolicyType = typeof ORG_CONFIG | UnparsedObject; +export const ORG_CONFIG = "org_config"; diff --git a/packages/datadog-api-client-v2/models/OrgGroupPolicyUpdateAttributes.ts b/packages/datadog-api-client-v2/models/OrgGroupPolicyUpdateAttributes.ts index 82018baa4644..72c461b09a3e 100644 --- a/packages/datadog-api-client-v2/models/OrgGroupPolicyUpdateAttributes.ts +++ b/packages/datadog-api-client-v2/models/OrgGroupPolicyUpdateAttributes.ts @@ -3,6 +3,7 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ +import { OrgGroupPolicyEnforcementTier } from "./OrgGroupPolicyEnforcementTier"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -14,6 +15,10 @@ export class OrgGroupPolicyUpdateAttributes { * The policy content as key-value pairs. */ "content"?: { [key: string]: any }; + /** + * The enforcement tier of the policy. `DEFAULT` means the policy is set but member orgs may mutate it. `ENFORCE` means the policy is strictly controlled and mutations are blocked for affected orgs. `DELEGATE` means each member org controls its own value. + */ + "enforcementTier"?: OrgGroupPolicyEnforcementTier; /** * A container for additional, undeclared properties. @@ -35,6 +40,10 @@ export class OrgGroupPolicyUpdateAttributes { baseName: "content", type: "{ [key: string]: any; }", }, + enforcementTier: { + baseName: "enforcement_tier", + type: "OrgGroupPolicyEnforcementTier", + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }", diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackActivation.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackActivation.ts index 093db5c19515..d1620ff79faf 100644 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackActivation.ts +++ b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackActivation.ts @@ -7,7 +7,7 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; /** - * The activation status of a content pack + * The activation status of a content pack. */ export type SecurityMonitoringContentPackActivation = diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackIntegrationStatus.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackIntegrationStatus.ts index fe084f9281c4..8406719dcf73 100644 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackIntegrationStatus.ts +++ b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackIntegrationStatus.ts @@ -7,7 +7,7 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; /** - * The installation status of the related integration + * The installation status of the related integration. */ export type SecurityMonitoringContentPackIntegrationStatus = diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStateAttributes.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStateAttributes.ts index 3d9fc59192a4..6a195934e1e6 100644 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStateAttributes.ts +++ b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStateAttributes.ts @@ -19,27 +19,28 @@ export class SecurityMonitoringContentPackStateAttributes { */ "cloudSiemIndexIncorrect": boolean; /** - * The activation status of a content pack + * The activation status of a content pack. */ "cpActivation": SecurityMonitoringContentPackActivation; /** - * Whether filters (Security Filters or Index Query depending on the pricing model) are configured for logs + * Whether filters (Security Filters or Index Query depending on the pricing model) are + * present and correctly configured to route logs into Cloud SIEM. */ "filtersConfiguredForLogs": boolean; /** - * The installation status of the related integration + * The installation status of the related integration. */ "integrationInstalledStatus"?: SecurityMonitoringContentPackIntegrationStatus; /** - * Timestamp bucket indicating when logs were last collected + * Timestamp bucket indicating when logs were last collected. */ "logsLastCollected": SecurityMonitoringContentPackTimestampBucket; /** - * Whether logs have been seen from any index + * Whether logs for this content pack have been seen in any Datadog index within the last 72 hours. */ "logsSeenFromAnyIndex": boolean; /** - * The current status of a content pack + * The current operational status of a content pack. */ "state": SecurityMonitoringContentPackStatus; diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStateMeta.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStateMeta.ts index 7539147ca32b..e2604332fea7 100644 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStateMeta.ts +++ b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStateMeta.ts @@ -16,7 +16,7 @@ export class SecurityMonitoringContentPackStateMeta { */ "cloudSiemIndexIncorrect": boolean; /** - * The SIEM pricing model (SKU) for the organization + * The Cloud SIEM pricing model (SKU) for the organization. */ "sku": SecurityMonitoringSKU; diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStatus.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStatus.ts index c5cb878bb0a8..a8637968028f 100644 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStatus.ts +++ b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackStatus.ts @@ -7,7 +7,7 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; /** - * The current status of a content pack + * The current operational status of a content pack. */ export type SecurityMonitoringContentPackStatus = diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackTimestampBucket.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackTimestampBucket.ts index 23cee6c58441..8eff06bf7e07 100644 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackTimestampBucket.ts +++ b/packages/datadog-api-client-v2/models/SecurityMonitoringContentPackTimestampBucket.ts @@ -7,7 +7,7 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; /** - * Timestamp bucket indicating when logs were last collected + * Timestamp bucket indicating when logs were last collected. */ export type SecurityMonitoringContentPackTimestampBucket = diff --git a/packages/datadog-api-client-v2/models/SecurityMonitoringSKU.ts b/packages/datadog-api-client-v2/models/SecurityMonitoringSKU.ts index 1542fa491e7a..1b3230e5b020 100644 --- a/packages/datadog-api-client-v2/models/SecurityMonitoringSKU.ts +++ b/packages/datadog-api-client-v2/models/SecurityMonitoringSKU.ts @@ -7,7 +7,7 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; /** - * The SIEM pricing model (SKU) for the organization + * The Cloud SIEM pricing model (SKU) for the organization. */ export type SecurityMonitoringSKU =